From joe.jasinski at gmail.com Thu Oct 11 08:44:03 2018 From: joe.jasinski at gmail.com (Joe Jasinski) Date: Thu, 11 Oct 2018 07:44:03 -0500 Subject: [Chicago] ChiPy October 2018 Main Meeting Message-ID: ChiPy, We have a great meeting planned for the October. Hope to see you there! Thank you GrubHub for sponsoring! *When:*Thur Oct 11, 2018, 6:30 p.m. 6:00pm Doors open 6:30pm: Meeting starts *How:*You can RSVP at chipy.org or via our Meetup group. *Where:* GrubHub 111 W. Washington Suite 2100 Chicago, IL *What:* - *Tour of job scheduling in Python* By: Raymond Buhr Experience Level: Novice Once you've started to learn python, you're going to want to use it to automate tasks. Their are lots of ways to do this, each with it's own set of pros and cons. This talk will go over a few options for scheduling the execution of python scripts and the tradeoffs that come with each. Tools that will be covered include crontab, schedule, celery, airflow, and cloud options AWS Lambda and GCP functions. - *Why Learn PySpark?* By: David Liao Experience Level: Novice GrubHub has chosen to adopt the Spark Big Data computing framework to underpin it?s internal GrubHub Data Platform Spark was adopted very early by Silicon Valley FANG companies.. What features make Spark a great computing platform for both Analytical reporting and Machine Learning? Tips on how to install PySpark on a Mac OSX system so one can play wit PySpark without paying for a cloud cluster - *Defining services with grpc and protocol buffers* By: Patrick Boland Experience Level: Intermediate gRPC and protocol buffers offer a high performance, open source way to define services and messages for the future. Think of it like REST, but for the http2 protocol. *Thank you always to all our sponsors, including our Diamond sponsors: Metis and TelnyxAlso thank you to our Platinum sponsors: Braintree, Imaginary Landscape, Lumere, and Signature Consultants. Also, thank you to our Silver sponsor: Markit.Please be aware of our code of conduct http://www.chipy.org/pages/conduct/ * -- Joe J. Jasinski www.joejasinski.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.ebreo at gmail.com Fri Oct 12 14:30:20 2018 From: paul.ebreo at gmail.com (Paul Ebreo) Date: Fri, 12 Oct 2018 13:30:20 -0500 Subject: [Chicago] October 25 WebDev SIG call for speakers Message-ID: Hi ChiPy, We are looking for speakers for the Thursday, October 25th WebDev SIG ChiPy meeting. Here's a great way to get involved with the Python community. *If you'd like to speak, keep in mind:* - Talks typically range between 15 and 30 min (including question time) - Talks should be Python-related. *To submit a talk:* - You can email me directly: paul.ebreo at gmail.com - Slack me on the chipy slack: https://chipy.slack.com - my user name is paul_ebreo The meetup page is located here: https://www.meetup.com/_ChiPy_/events/254890457/ Let me know if you have any questions, and hope to hear from you soon! -------------- next part -------------- An HTML attachment was scrubbed... URL: From christos.jonathan.hayward at gmail.com Sat Oct 20 14:18:55 2018 From: christos.jonathan.hayward at gmail.com (Christos Hayward) Date: Sat, 20 Oct 2018 13:18:55 -0500 Subject: [Chicago] Unexpected indent: secondary damage in syntax error? Message-ID: I'm working on a very amateur firewalled CGI script for a friend's pet project, and I am getting an IndentationError on line 106, the line for a closing print statement. If I unindent "print" all the way to the left, the error remains; if I comment out the (multiline) statement, an error is reported at line 112 (the script is 111 lines). I have looked above line 106 for a syntax error that could be causing secondary damage, and I haven't been able to put my finger on it yet. What am I doing to trigger a reported IndentationError? Thanks, -- *Christos Hayward*, author, *The Best of Jonathan's Corner * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: empathy_edit.cgi Type: application/octet-stream Size: 3420 bytes Desc: not available URL: From carl at personnelware.com Sat Oct 20 14:38:03 2018 From: carl at personnelware.com (Carl Karsten) Date: Sat, 20 Oct 2018 13:38:03 -0500 Subject: [Chicago] Unexpected indent: secondary damage in syntax error? In-Reply-To: References: Message-ID: 87 try: doesn't have an except. which is an error. On Sat, Oct 20, 2018 at 1:19 PM Christos Hayward wrote: > > I'm working on a very amateur firewalled CGI script for a friend's pet project, and I am getting an IndentationError on line 106, the line for a closing print statement. If I unindent "print" all the way to the left, the error remains; if I comment out the (multiline) statement, an error is reported at line 112 (the script is 111 lines). > > I have looked above line 106 for a syntax error that could be causing secondary damage, and I haven't been able to put my finger on it yet. > > What am I doing to trigger a reported IndentationError? > > > Thanks, > -- > > Christos Hayward, author, The Best of Jonathan's Corner > > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago -- Carl K From zitterbewegung at gmail.com Sat Oct 20 15:01:53 2018 From: zitterbewegung at gmail.com (Joshua Herman) Date: Sat, 20 Oct 2018 14:01:53 -0500 Subject: [Chicago] Unexpected indent: secondary damage in syntax error? In-Reply-To: References: Message-ID: Dear Christos, I went over your code and in addition to the try: without except you had multiple issues with indentation which I have attempted to correct (but I could have also changed the logic in your program). Also, I refactored your two trys into one try that goes over the whole loop. I assume this was also written with python 2.7 and you had print statements that were using python 3.x print syntax. Sincerely, Joshua herman On Sat, Oct 20, 2018 at 1:39 PM Carl Karsten wrote: > 87 try: > > doesn't have an except. which is an error. > On Sat, Oct 20, 2018 at 1:19 PM Christos Hayward > wrote: > > > > I'm working on a very amateur firewalled CGI script for a friend's pet > project, and I am getting an IndentationError on line 106, the line for a > closing print statement. If I unindent "print" all the way to the left, the > error remains; if I comment out the (multiline) statement, an error is > reported at line 112 (the script is 111 lines). > > > > I have looked above line 106 for a syntax error that could be causing > secondary damage, and I haven't been able to put my finger on it yet. > > > > What am I doing to trigger a reported IndentationError? > > > > > > Thanks, > > -- > > > > Christos Hayward, author, The Best of Jonathan's Corner > > > > _______________________________________________ > > Chicago mailing list > > Chicago at python.org > > https://mail.python.org/mailman/listinfo/chicago > > > > -- > Carl K > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #!/usr/bin/python import cgi import cPickle import os import random import string import sys sys.stderr.write('Starting...') STORAGE = '/home/paul/empathy/pickled' ACCESS = '/home/paul/logs/empathy_log' def get_cgi(field, default = ''): if cgi_form.has_key(field): return cgi_form[field].value else: return default def load_saved(): global saved sys.stderr.write('load_saved()\n') try: saved = cPickle.load(open(STORAGE)) except: saved = {'index': 0, 'entries': []} def save_values(): sys.stderr.write('save_values()\n') if get_cgi('submitted'): sys.stderr.write('submitted') sys.stderr.write(repr(cgi_form.keys()) + '\n') for key in cgi_form.keys(): try: parts = key.split('_') entry = int(parts[1]) slot = int(parts[2]) if slot == 0: saved['entries'][entry][1] = get_cgi(key) else: sys.stderr.write('Entry: ' + str(entry)) sys.stderr.write('Slot: ' + str(slot)) sys.stderr.write(get_cgi(key)) sys.stderr.write(repr(saved['entries'][entry][2])) saved['entries'][entry][2][slot - 1] = get_cgi(key) sys.stderr.write(repr(saved['entries'][entry][2])) except IndexError: pass saved['index'] += 1 sys.stderr.write(repr(saved) + '\n') cPickle.dump(saved, open(STORAGE + '.' + str(os.getpid()), 'w')) os.rename(STORAGE + '.' + str(os.getpid()), STORAGE) if get_cgi('entry'): open(ACCESS, 'a').write('Statement: ' + saved['entries'][int(get_cgi('entry'))][1] + '\n' + 'Response: ' + get_cgi('response') + '\n\n') if __name__ == '__main__': cgi_form = cgi.FieldStorage() load_saved() save_values() print '''Content-type: text/html Empathy

Empathy

''' for index in range(saved['index']): try: print '''''' % (str(index), saved['entries'][index][1]) counter = 0 for current in saved['entries'][index][2]: counter += 1 if current: sys.stderr.write(current + '\n') print '''''' % (str(index), str(counter), current) except IndexError: pass print '''
''' From skip.montanaro at gmail.com Fri Oct 26 16:07:16 2018 From: skip.montanaro at gmail.com (Skip Montanaro) Date: Fri, 26 Oct 2018 15:07:16 -0500 Subject: [Chicago] Can I deep link to a Jupyter Notebook cell? Message-ID: If I have a Jupyter notebook running on a server, can another web page reference a cell within that notebook? Could I name a URL like so https://my.jupyter.nb.server/notebooks/chevy.ipynb#cell42 to bring up the notebook with cell 42 visible in the usual page anchor fashion? I am in control of the notebook contents, so it's not out of the question that I simply insert a Markdown cell ahead of cell 42 which defines the anchor. (Though if that's not necessary, that would be fine.) Thanks, Skip Montanaro -------------- next part -------------- An HTML attachment was scrubbed... URL: From christos.jonathan.hayward at gmail.com Sat Oct 27 14:23:19 2018 From: christos.jonathan.hayward at gmail.com (Christos Hayward) Date: Sat, 27 Oct 2018 13:23:19 -0500 Subject: [Chicago] Unexpected indent: secondary damage in syntax error? In-Reply-To: References: Message-ID: Thank you very much! On Sat, Oct 20, 2018 at 2:02 PM Joshua Herman wrote: > Dear Christos, > I went over your code and in addition to the try: without except you had > multiple issues with indentation which I have attempted to correct (but I > could have also changed the logic in your program). Also, I refactored > your two trys into one try that goes over the whole loop. I assume this was > also written with python 2.7 and you had print statements that were using > python 3.x print syntax. > Sincerely, > Joshua herman > > On Sat, Oct 20, 2018 at 1:39 PM Carl Karsten > wrote: > >> 87 try: >> >> doesn't have an except. which is an error. >> On Sat, Oct 20, 2018 at 1:19 PM Christos Hayward >> wrote: >> > >> > I'm working on a very amateur firewalled CGI script for a friend's pet >> project, and I am getting an IndentationError on line 106, the line for a >> closing print statement. If I unindent "print" all the way to the left, the >> error remains; if I comment out the (multiline) statement, an error is >> reported at line 112 (the script is 111 lines). >> > >> > I have looked above line 106 for a syntax error that could be causing >> secondary damage, and I haven't been able to put my finger on it yet. >> > >> > What am I doing to trigger a reported IndentationError? >> > >> > >> > Thanks, >> > -- >> > >> > Christos Hayward, author, The Best of Jonathan's Corner >> > >> > _______________________________________________ >> > Chicago mailing list >> > Chicago at python.org >> > https://mail.python.org/mailman/listinfo/chicago >> >> >> >> -- >> Carl K >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -- *Christos Hayward*, author, *The Best of Jonathan's Corner * -------------- next part -------------- An HTML attachment was scrubbed... URL: From skip.montanaro at gmail.com Sat Oct 27 19:26:55 2018 From: skip.montanaro at gmail.com (Skip Montanaro) Date: Sat, 27 Oct 2018 18:26:55 -0500 Subject: [Chicago] Can I deep link to a Jupyter Notebook cell? In-Reply-To: References: Message-ID: Thanks, Sameer. My Google-fu failed me, and hadn't come up with a solution. Skip On Sat, Oct 27, 2018, 8:21 AM Sameer D'Costa wrote: > Hi Skip, > > Did you check out Stackoverflow? > > Perhaps this would be related > https://stackoverflow.com/questions/28080066/how-to-reference-a-ipython-notebook-cell-in-markdown > > > Hope you are doing well. > > Cheers! > Sameer > > On Sat, Oct 27, 2018 at 7:26 AM Skip Montanaro > wrote: > >> If I have a Jupyter notebook running on a server, can another web page >> reference a cell within that notebook? Could I name a URL like so >> >> https://my.jupyter.nb.server/notebooks/chevy.ipynb#cell42 >> >> to bring up the notebook with cell 42 visible in the usual page anchor >> fashion? I am in control of the notebook contents, so it's not out of the >> question that I simply insert a Markdown cell ahead of cell 42 which >> defines the anchor. (Though if that's not necessary, that would be fine.) >> >> Thanks, >> >> Skip Montanaro >> _______________________________________________ >> Chicago mailing list >> Chicago at python.org >> https://mail.python.org/mailman/listinfo/chicago >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sunhwanj at gmail.com Sat Oct 27 09:11:46 2018 From: sunhwanj at gmail.com (Sunhwan Jo) Date: Sat, 27 Oct 2018 15:11:46 +0200 Subject: [Chicago] Can I deep link to a Jupyter Notebook cell? In-Reply-To: References: Message-ID: <4CF6DAA0-7938-41ED-8308-7A1C7AA1831D@gmail.com> https://stackoverflow.com/questions/16630969/ipython-notebook-anchor-link-to-refer-a-cell-directly-from-outside This link explains that either by adding a header cell or adding a cell with anchor (??) would do it. Best, Sunhwan > On Oct 26, 2018, at 10:07 PM, Skip Montanaro wrote: > > If I have a Jupyter notebook running on a server, can another web page reference a cell within that notebook? Could I name a URL like so > > https://my.jupyter.nb.server/notebooks/chevy.ipynb#cell42 > > to bring up the notebook with cell 42 visible in the usual page anchor fashion? I am in control of the notebook contents, so it's not out of the question that I simply insert a Markdown cell ahead of cell 42 which defines the anchor. (Though if that's not necessary, that would be fine.) > > Thanks, > > Skip Montanaro > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameerdcosta at gmail.com Sat Oct 27 09:21:00 2018 From: sameerdcosta at gmail.com (Sameer D'Costa) Date: Sat, 27 Oct 2018 08:21:00 -0500 Subject: [Chicago] Can I deep link to a Jupyter Notebook cell? In-Reply-To: References: Message-ID: Hi Skip, Did you check out Stackoverflow? Perhaps this would be related https://stackoverflow.com/questions/28080066/how-to-reference-a-ipython-notebook-cell-in-markdown Hope you are doing well. Cheers! Sameer On Sat, Oct 27, 2018 at 7:26 AM Skip Montanaro wrote: > If I have a Jupyter notebook running on a server, can another web page > reference a cell within that notebook? Could I name a URL like so > > https://my.jupyter.nb.server/notebooks/chevy.ipynb#cell42 > > to bring up the notebook with cell 42 visible in the usual page anchor > fashion? I am in control of the notebook contents, so it's not out of the > question that I simply insert a Markdown cell ahead of cell 42 which > defines the anchor. (Though if that's not necessary, that would be fine.) > > Thanks, > > Skip Montanaro > _______________________________________________ > Chicago mailing list > Chicago at python.org > https://mail.python.org/mailman/listinfo/chicago > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.jasinski at gmail.com Mon Oct 29 20:07:25 2018 From: joe.jasinski at gmail.com (Joe Jasinski) Date: Mon, 29 Oct 2018 19:07:25 -0500 Subject: [Chicago] ChiPy Call for Speakers for November Message-ID: Hey all, We are still looking for speakers for the November 8th meeting. If anyone is interested, please submit a Python-related talk to the following page: http://www.chipy.org/meetings/topics/propose/ Lightning talks are welcome too. Let me know if you have any questions. Hope to hear from you! -- Joe J. Jasinski www.joejasinski.com -------------- next part -------------- An HTML attachment was scrubbed... URL: