[web2py] Re: SQLTABLE problem with 2.15.4
I have now upgraded to 2.16.1 and everything is working including COUNT which now needs to be in uppercase. Many thanks for all your work on Web2py Leonel! On Thursday, 9 November 2017 12:41:49 UTC, Leonel Câmara wrote: > > I actually think that is also a bug because it is an inconsistency. For > some reason in > https://github.com/web2py/pydal/blob/master/pydal/dialects/base.py the > DAL is using caps for everything but not for count. I'll submit a pull > request for that too. > > web2py pull request fixing the tablename problem: > https://github.com/web2py/web2py/pull/1802 > > pydal pull request fixing "count" in lowercase: > https://github.com/web2py/pydal/pull/499 > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Import application from staging to production server
I don't understand the 'local_import' in this line pygal = local_import('pygal') > > Can't find it in the documentation for web2py, pygal or searching python local_import... but pygal works for me using just... import pygal > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: SSL certificate on web2py (aws ec2 + Nginx + uwsgi)
HI Dave, Many thanks, I'll check acme solution too. best regards, Em sexta-feira, 17 de novembro de 2017 22:22:18 UTC-2, Dave S escreveu: > > > > On Friday, November 17, 2017 at 4:16:50 PM UTC-8, Daniel Dos Santos > Guilhermino wrote: >> >> Thanks Dave! >> >> I'll search about let's encrypt, maybe help me. >> >> Best regards. >> >> >> Daniel Guilhermino >> > > I used certbot-auto from certbot.org, which is a sub-organization of EFF > and Let's Encrypt. the -auto puts some virtenv wrapping around the > regular certbot (python); AWS linux is considered "experimental" by > certbot. Some people prefer acme, which is a BASH script AIUI. > > /dps > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web2py and machine learning - scikit-learn
Depending on how you use matplotlib you may need to surround your calls with a lock section. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: JWT questions
On Saturday, November 18, 2017 at 4:50:43 AM UTC-8, Anthony wrote: > > >> returned 1, 2, 3, 4, for the browser, and 1, 1, 1, 1, for my >> curl-JWT accesses. If I wait long enough, the token expires as expected >> (not very long for the default), but before it expires it acts like the >> session stays around to keep me "logged in", but also like the session is >> new every time for the tcount variable. >> > > When you make an HTTP request to web2py, it sends back a session cookie. > Browsers retain and keep sending back the session cookie (throughout the > course of a browser session), so web2py can continue to identify the > browser with a particular session. Be default, curl does not retain cookies > and send them back to the remote server on subsequent requests, so web2py > has no way of associating each curl request with the same session. > > Okay, that's pretty clear. The counter was a just an experiment. > JWT auth does not work via cookies. Rather, the JWT goes in the HTTP > request headers. So, with curl, you are sending the JWT to web2py on every > request, and web2py is able to validate the JWT on each request (the JWT > can be validated based only on its own data -- nothing from a server-side > session is needed to validate it). web2py, therefore, is not "keeping you > logged in" -- you are really re-authenticating on every single request by > sending the JWT in the request headers. > > By the way, you can use curl to store and return cookies using the > --cookie and --cookie-jar options. > > Anthony > Thanks! You have both depth and breadth in the topics around here. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: list:string field length
On Saturday, November 18, 2017 at 6:57:54 PM UTC-5, Donald McClymont wrote: > > Issue may be with SQLFORM rather than Pydal - if I have a list string > field in my case its called answers and put it in a SQLFORM then in > form.validate if you do > > print type(form.vars.answers) > > I get str when there is 1 item in my list and list when multiple answers and > so my validation includes a line like this: > > > if isinstance(form.vars.answers, list) and len(form.vars.answers) > 1 and > len(form.vars.answers[1]) > 0: > > > I just thought I'd mention it as something to be aware of if you start using > length with list string fields as I always expected it to be a list. > > > This is still the case with 2.16.1 > > Got it. That has to do with the widget used to represent list:string fields in forms. It simply creates one or more inputs with the same name. When there is only one item, the value in request.vars and therefore form.vars is just a string, but when there are multiple form elements with the same name, request.vars and form.vars ends up as a list. SQLFORM.accepts does ultimately convert a single string in form.vars to a single element list, but not until after the onvalidation function has been run. Feel free to submit a Github issue about this (in the web2py repo, as it is related to SQLFORM, not PyDAL). Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] list:string field length
On Sunday, November 19, 2017 at 10:39:27 AM UTC-5, Yoel Benitez Fonseca wrote: > > I don't mean to set the length, i just wanted to know the DAL behavior > behind the scene. So, DAL translate 'string:list' to a list in > databases that natively support lists and to a TEXT field on normal > relational databases and hence set the length of the text field to the > default ? > It is a text field, not a varchar field, so length is not relevant. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.16.1 and python27
> > web2py application made with python 2.7 will be compatible? > web2py does not take Python 2.7 code and make it run under Python 3 -- it simply allows an app written in Python 3 to run under Python 3. If you've got Python 2.7 app, you'll need to convert it to Python 3 yourself before you can run it under Python 3 with web2py. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] web2py 2.16.1 and python27
What version of python 3 can I use with 2.16.1 version? How to upgrade python? web2py application made with python 2.7 will be compatible? thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] list:string field length
I don't mean to set the length, i just wanted to know the DAL behavior behind the scene. So, DAL translate 'string:list' to a list in databases that natively support lists and to a TEXT field on normal relational databases and hence set the length of the text field to the default ? 2017-11-17 15:53 GMT-05:00 Donald McClymont: > I don’t think you can set this but not sure why you would want to. However > beware if testing the length of the field as I think if you only have 1 item > in the list then this is a string and you get the number of chars in the > string. While if you have more than 1 you get the length of the list. So > you may need to test the type before using length to ensure you get what you > expect. I don’t know if this would be considered a bug or if it is still > the way it works but it was how it worked in 2.15.x and may have been a > change from 2.14.x. I haven’t checked 2.16.1 > > Donald > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Msc. Yoel Benítez Fonseca -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web2py and machine learning - scikit-learn
Thanks for your response! I've imported the libraries I was planning on using, however I noticed that Matplotlib doesn't seem to want to play nicely with Web2Py. If I try to produce a plot of my data set and open the web app, Web2Py will stop responding. Is this a known issue? Perhaps I have implemented it incorrectly. G On Tuesday, November 14, 2017 at 7:43:14 PM UTC, Massimo Di Pierro wrote: > > I have. Works fine. > You can import any python library in web2py as long as it is installed. > You can have issues with libraries that are not thread safe and if they > are, you will have to lock when using them. > I do not know for sure which algos in scikit learn are thread safe and > which ones are not. You have to check that. > > Massimo > > On Monday, 13 November 2017 23:57:25 UTC-6, GIsaac wrote: >> >> Hi all, >> >> I'm doing a project which will be based around web frameworks and >> adaptivity using machine learning, and have been looking into the >> possibility of using web2py. >> >> Is it possible to import/use the Scikit-learn library with web2py? Has >> anyone here done this? >> I understand that it is possible to import other python libraries into >> web2py, however haven't seen any examples of people doing this with scikit >> specifically. >> >> Many thanks for any help that can be given. >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Getting wrong Results with my grading system
WOOOW!!! Thank you Jose i have been switching the signs, i have been using *> *as small than and *< *as greater than,i do not know when all this information got mixed up in my head but it took your words to pay close attention & realize my error. Thank you. *And honestly its not an assignment* On Sunday, November 19, 2017 at 12:09:49 PM UTC+2, Jose C wrote: > > This is starting to look like a homework assignment. You do not seem to > understand what the >= (greater than or equal to) means. > > The python statement: > if perc >=100: > grade='A' > elif perc >= 79: > grade='B' > ... > > means or reads as (in English): > if the value in 'perc' is greater than or equal to 100, then set the value > of 'grade' to 'A'. > Else if the value in perc is greater than or equal to 79 , then set the > value of grade to 'B'. > Else if the value in perc is greater than or equal to 69, then set the > value of grade to 'C' > and so on > > The above statements stop being evaluated after the first condition that > is true. > > Now can you see the error in the logic? If not, I would suggest you run > through some sample values for perc using the above statements and see if > that helps. > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Getting wrong Results with my grading system
This is starting to look like a homework assignment. You do not seem to understand what the >= (greater than or equal to) means. The python statement: if perc >=100: grade='A' elif perc >= 79: grade='B' ... means or reads as (in English): if the value in 'perc' is greater than or equal to 100, then set the value of 'grade' to 'A'. Else if the value in perc is greater than or equal to 79 , then set the value of grade to 'B'. Else if the value in perc is greater than or equal to 69, then set the value of grade to 'C' and so on Now can you see the error in the logic? If not, I would suggest you run through some sample values for perc using the above statements and see if that helps. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Getting wrong Results with my grading system
think the answer is right in front of you (just a matter of conditional logic): What i want is to reflect an a 'A' if a student gets anything between 100% and 80%, hence the line if perc>=100: grade='A' *pls try (not tested):* if perc>=80 and perc<=100: grade='A' and get grade 'B' if a student gets anything between79% and 70% hence the line elif perc>=79: grade='B' *pls try (not tested):* elif perc>=70 perc<=79: grade='B' best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.