From grace at pybay.com Thu Aug 3 17:51:37 2017 From: grace at pybay.com (Grace Law) Date: Thu, 3 Aug 2017 14:51:37 -0700 Subject: [Baypiggies] PyBay Highlights and sign-ups for lightning talks! Message-ID: Hi Pythonistas, PyBay is in 8 days! Have you gotten your pass yet? Don't miss: - Keynote and Intermediate Python Workshop with Bay Area's most respected Python Core Dev/Trainer ?Raymond Hettinger? - Static Typing Panel with core devs from MyPy, PEP484, PyCharm... - Get fluent with Async/Await and Meta Programming from Luciano Ramalho (Yes, the Author of Fluent Python, all the way from Brazil) - Techniques to make code much faster by Rachel Thomas, co-founder of fast.ai - Machine Learning in the Cloud by Melanie Warrick at Google - Moving towards best practices in Legacy Code Bases by Moshe Zadhka, Twisted Core Dev - How your Django App is a User Interface by Flavio Juvenal, Partner at Vinta - How Linkedin and iPython moved to Python 3 - How Yelp Rebuilt their API - How Quora handles Asynchronous Programming - Workshops on Computer Science, Tensorflow, Pandas, Scikit-Learn, Keras and so much more... And most importantly, don?t miss an opportunity to geek out with awesome Devs on one of your favorite topics - Python! Yes, there are still opportunities to speak , but you must be a registered attendee. The main speakers did too to keep the ticket price low for everyone! Grab your pass before prices go up , bring a few friends and save! PS. Thanks for everyone that voted. The T-shirt Winner is attached! Grace Law PyBay Conference Chair and SF Python Organizer 415-323-0388 / grace at pybay.com Follow us on twitter at @py_bay Check out the highlights from Inaugural PyBay ? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PyBay T-shirt Final.jpg Type: image/jpeg Size: 2258057 bytes Desc: not available URL: From mdavis2 at ucsc.edu Sat Aug 5 12:04:43 2017 From: mdavis2 at ucsc.edu (Marilyn Davis) Date: Sat, 5 Aug 2017 11:04:43 -0500 Subject: [Baypiggies] Python Classes at UCSC-extension in Santa Clara Message-ID: Hi Python People, August 14 - 17, we have a "Python For Programmers" retreat-style lab class in the daytime at the beautiful UCSC Extension in Santa Clara: Where: https://www.google.com.mx/maps/place/UCSC+Silicon+Valley+Extension/@37.3796421,-121.9769927,15z/data=!4m5!3m4!1s0x0:0xeb5b7ce72e1f8ebf!8m2!3d37.3796421!4d-121.9769927 What: http://course.ucsc-extension.edu/modules/shop/index.html?action=section&OfferingID=1531625&SectionID=5456651 This class is for programmers who are already well-experienced in some other language. No beginning programmers please, but you can certainly be new to Python. If you are a bit rusty at programming, you might be more comfortable in an evening course that meets once a week so you have some time to absorb the concepts. You'll find those at the same url. Also, an online class is starting: http://course.ucsc-extension.edu/modules/shop/index.html?action=section&OfferingID=1531625&SectionID=5463181 It officially starts on Sep 8 but the site is open now for an early start. The online class allow you plenty of time to complete the material, and I'm there encouraging you and answering your questions. ---- All our Python courses are hands-on with short lectures, and lots of relevant exercises, and, we study the solutions after some lab time. Questions are always welcome; discussion and pair-programming are encouraged. Please come, and send students! Marilyn Davis, Ph.D. Python Instructor http:www.pythontrainer.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeffrey.fischer at gmail.com Mon Aug 7 15:13:33 2017 From: jeffrey.fischer at gmail.com (Jeff Fischer) Date: Mon, 7 Aug 2017 12:13:33 -0700 Subject: [Baypiggies] This month's BayPiggies talk: Stock Market ML API with Flask-RESTful AND Keras-Tensor-Flow Message-ID: *Data Science Night: Stock Market ML API with Flask-RESTful AND Keras-Tensor-Flow* *Speaker:* Dan Bikle Thursday August 24, 2017, 7pm to 9pm Location: LinkedIn, 950 West Maude Ave, Sunnyale, CA , Unify Conference Room *Note that we are in a new location, down the street from the old one!* So we can have an accurate count of people for food, please RSVP on meetup: https://www.meetup.com/BAyPIGgies/events/239118816/ *Abstract* This is part 2 of a two part series. Part 1 was presented in early 2016. In this talk Dan shows you how to build a sophisticated Machine Learning App from the ground up using Tensor Flow (Wrapped by Keras) and packages in Anaconda Python. We start by building a simple API server, with Python package Flask-RESTful, which responds to GET requests containing parameters which affect the behavior of a Keras backend server. We use Keras-Tensor-Flow to create a Deep Learning model and then generate predictions for any stock symbol of interest. The predictions are affected by features selected by end-user such as various slopes of price-moving-avg and/or date features like Day-of-Week and/or Month-of-Year. Building a Deep Learning model is expensive so we use Postgres to cache each model in case we encounter another identical request in the near future. Additionally we cache all predictions which could be generated from each model. Next in the workflow we use Flask-RESTful to serve predictions to the end-user as JSON documents. For deployment, we offer two techniques. Technique 1 is simple. Just deploy the app to an EC2 server and configure Flask-RESTful to listen on the public interface. Technique 2 might be more cost-effective. Find some unused hardware in your office which can run Ubuntu 16. Then deploy the app to that server. Next, deploy the Flask-RESTful piece to Heroku which should be free or low cost. Finally, configure both pieces so they communicate using shared data on a Postgres database hosted at Heroku. Each piece will connect to Postgres using Python package SQLAlchemy. Python is awesome technology and it is perfect for building an elegant Machine Learning Application. *Speaker Bio * Dan Bikle is a graduate of Caltech and works as an independent Data Scientist. He is skilled at extracting knowledge (forecasts mostly) from data. Also, Dan teaches three classes at Santa Clara Adult Education: Hands on Python, Time Series Data Science, and Machine Learning Applications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From annaraven at gmail.com Tue Aug 8 19:22:46 2017 From: annaraven at gmail.com (Anna Ravenscroft) Date: Tue, 8 Aug 2017 16:22:46 -0700 Subject: [Baypiggies] PyBay is here Message-ID: Get 15% off using this link https://ti.to/sf-python/pybay-2017/discount/PBFriends to attend the premier local Python conference. >From my phone. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grace at pybay.com Tue Aug 8 20:53:30 2017 From: grace at pybay.com (Grace Law) Date: Tue, 8 Aug 2017 17:53:30 -0700 Subject: [Baypiggies] PyBay is here In-Reply-To: References: Message-ID: Thanks Anna :) Looking forward to seeing you this weekend, whether it?s just the pre-conference workshops, the whole conference, or just one day. the 15% off using this link https://ti.to/sf-python/pybay-2017/discount/PBFriends applies to all ticket categories. Aside from the amazing talks on SAT and SUN , here are few highlights you won't want to miss! - All the pre-conference workshops are great, but you will find very limited access to these two instructors if you let this chance slip. - Luciano Ramalho , the author of Fluent Python is based out of Brazil! He is paying his own dime to come and speak to us, show him some support at one or two of his workshops on Concurrency and Meta Programming. - Raymond Hettinger. This man: 31K Twitter followers, companies get in line and pay great money to peel him away from his family to get Python training for their staff. If you aren?t working for the giants, or have a lot of money to hire him, here is your chance to boost your skills! Take his intermediate Python workshop! - If you are just coming for the workshops, your workshop pass includes a FREE entry to Friday's Opening Night. - On Friday 8/11 following the reception at Linkedin, we have a Static Typing Panel Discussion from devs representing MyPy, PyCharm, Google, Instagram, Quora, Lyft and Zulip and 10 Lightning Talks from community members. - On Sat 8/12 3-5p, there is a FREE Python for kids workshop for your child(or your neighbor?s!). Consider this your child care while attending PyBay and let past PyBay Speaker Meenal Pant get your young ones to create a chessboard using ipythonblocks in 2 hours. Please follow the instructions to register with Meenal separately. - Still a chance to give a talk - sign-up now to deliver an OpenSpace or sign-up at the conference to deliver a lightning talk - The workshops and main conference are held at different locations in SF! Click the icons on the map now to orient yourself! On Aug 8, 2017, at 4:22 PM, Anna Ravenscroft wrote: Get 15% off using this link https://ti.to/sf-python/ pybay-2017/discount/PBFriends to attend the premier local Python conference. >From my phone. _______________________________________________ Baypiggies mailing list Baypiggies at python.org To change your subscription options or unsubscribe: https://mail.python.org/mailman/listinfo/baypiggies ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Wed Aug 9 22:22:43 2017 From: glen at glenjarvis.com (Glen Jarvis) Date: Wed, 09 Aug 2017 22:22:43 -0400 Subject: [Baypiggies] Announcing Diversity Night in October / Call for speakers Message-ID: I believe a diverse Python community makes us all stronger. To deeply encourage real diversity in our community, I wish to organize a diversity night for our October Beginner's night. I am calling out for a diverse panel of speakers. This is a beginner's night, so please make the talks accessible for beginners. I'd like the speakers to be women and representatives from minority groups. I am looking for many smaller talks (15-30 minutes) instead of longer talks. Suggestions / Ideas: * Setting up Python for the first time (How to use virtualenv / pyenv) [aka Why using sudo is bad] * 10 tips and tricks to getting started in Python * Why we are all stronger because of a diverse community * Career challenges I have found as a [woman / minority] * Let me share what my organization is doing to help young men and women of color * Projects and examples from our diverse community Or many other ideas. This is in the proposal stages and I'm flexible on talks and format. However, the purpose is to promote diversity through positive examples of diversity. I ask you to be a role-model and help us support a diverse community. We as a community need you to step up. If you hadn't spoken in front of an audience before, don't worry -- we can personally help you prepare for the talk. It's a friendly audience -- we are all friends here and want to encourage each other. Please reach out to me (glen at glenjarvis.com) -- even if you aren't sure you want to speak yet. Kindest Regards, Glen Jarvis -- I use these email security features: - ProtonMail (https://protonmail.com/) for end-to-end encryption - SPF, DKIM, and DMARC DNS (glenjarvis.com) - DMARC policy of 'reject' (to reject all mails that don't pass security) - PGP keys / Keybase: https://keybase.io/glenjarvis Sent with [ProtonMail](https://protonmail.com) Secure Email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Sat Aug 12 22:50:50 2017 From: cappy2112 at gmail.com (Tony Cappellini) Date: Sat, 12 Aug 2017 19:50:50 -0700 Subject: [Baypiggies] For sale - Sunday ticket for PyBay 2017 Message-ID: Hi Everyone, I can't go to Pybay tomorrow. If anyone wants to buy my ticket at a substantial savings for entrance to Pybay for Aug 13, reply off line. I'm in San Jose, so you'll have to come pick it up in person. Thanks Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeffrey.fischer at gmail.com Thu Aug 24 11:28:10 2017 From: jeffrey.fischer at gmail.com (Jeff Fischer) Date: Thu, 24 Aug 2017 08:28:10 -0700 Subject: [Baypiggies] Reminder: BayPiggies Data Science talk tonight Message-ID: *Stock Market ML API with Flask-RESTful AND Keras-Tensor-Flow* *Speaker:* Dan Bikle Tonight, Thursday August 24, 2017, 7pm to 9pm Location: LinkedIn, 950 West Maude Ave, Sunnyale, CA , Unify Conference Room *Note that we are in a new location, down the street from the old one!* *RSVP* So we can have an accurate count of people for food, please RSVP on meetup: https://www.meetup.com/BAyPIGgies/events/239118816/ *Abstract* This is part 2 of a two part series. Part 1 was presented in early 2016. In this talk Dan shows you how to build a sophisticated Machine Learning App from the ground up using Tensor Flow (Wrapped by Keras) and packages in Anaconda Python. We start by building a simple API server, with Python package Flask-RESTful, which responds to GET requests containing parameters which affect the behavior of a Keras backend server. We use Keras-Tensor-Flow to create a Deep Learning model and then generate predictions for any stock symbol of interest. The predictions are affected by features selected by end-user such as various slopes of price-moving-avg and/or date features like Day-of-Week and/or Month-of-Year. Building a Deep Learning model is expensive so we use Postgres to cache each model in case we encounter another identical request in the near future. Additionally we cache all predictions which could be generated from each model. Next in the workflow we use Flask-RESTful to serve predictions to the end-user as JSON documents. For deployment, we offer two techniques. Technique 1 is simple. Just deploy the app to an EC2 server and configure Flask-RESTful to listen on the public interface. Technique 2 might be more cost-effective. Find some unused hardware in your office which can run Ubuntu 16. Then deploy the app to that server. Next, deploy the Flask-RESTful piece to Heroku which should be free or low cost. Finally, configure both pieces so they communicate using shared data on a Postgres database hosted at Heroku. Each piece will connect to Postgres using Python package SQLAlchemy. Python is awesome technology and it is perfect for building an elegant Machine Learning Application. *Speaker Bio * Dan Bikle is a graduate of Caltech and works as an independent Data Scientist. He is skilled at extracting knowledge (forecasts mostly) from data. Also, Dan teaches three classes at Santa Clara Adult Education: Hands on Python, Time Series Data Science, and Machine Learning Applications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeffrey.fischer at gmail.com Thu Aug 24 17:54:08 2017 From: jeffrey.fischer at gmail.com (Jeff Fischer) Date: Thu, 24 Aug 2017 14:54:08 -0700 Subject: [Baypiggies] Last month's BayPiggies talk now up on YouTub Message-ID: *xtensor and jet : bringing NumPy to C++ and JIT compiled C++ to Python* *Speaker:* Wolf Vollprecht https://youtu.be/ghH6zglXq1A Thanks to Wolf for giving the talk and to LinkedIn for hosting us and recording the talk. All the BayPiggies talks for this year so far are up on our YouTube channel: https://www.youtube.com/channel/UCBJV1sd5XcVhijm13pWfBCg Hope to see everyone at tonights talk! Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Wed Aug 30 23:28:16 2017 From: glen at glenjarvis.com (Glen Jarvis) Date: Wed, 30 Aug 2017 23:28:16 -0400 Subject: [Baypiggies] Want to contribute to OpenSource but don't know how? Message-ID: I have a fairly small open source project that has been broken down into four tasks. Although it would have been faster for me to actually write the solution for one of the tasks than it was to specify the task, I thought I'd keep it this way to allow others to participate in an OpenSource project if they never have: [h](https://github.com/glenjarvis/dmarc.lambda)[ttps://github.com/glenjarvis/dmarc.lambda](https://github.com/glenjarvis/dmarc.lambda) This is broken down into four tasks: * One of them requires no coding experience at all (but you would still need to learn how to make a pull request) https://github.com/glenjarvis/dmarc.lambda/tree/master/task1_readme_polishing * Another of them is a fairly beginner's Python function https://github.com/glenjarvis/dmarc.lambda/tree/master/task3_parse_filenames * Another is an average Python programmer task: https://github.com/glenjarvis/dmarc.lambda/tree/master/task2_extract_attachment * And a final one is also an average level task (but is bigger). Someone else has a repo that may already have the solution to this: https://github.com/glenjarvis/dmarc.lambda/tree/master/task4_parse_file_contents If you don't know how to make a Pull Request, I can help you make one against this repo -- if you create a working solution to the above problems. I can't promise to merge all of your Pull Requests. However, it is very good practice if you've never done one before. These individual tasks require no need to understand AWS Lambda. However, I will take these components and plug them into an AWS Lambda and other service solution as described here: AWS Lambda Application that receives, parses and processes DMARC summary reports Spam email has been a problem since the mid-nineties. There have been technological advances that let the owner of a domain (e.g., google.com or scs.lbl.gov or glenjarvis.com) absolutely control if an email from that domain really belongs to them: - https://en.wikipedia.org/wiki/Sender_Policy_Framework - https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail Even more recently, however, is the technological advance that ties both Sender Policy Framework (SPF) and DomainKeys Identified Mail (DKIM) linked above into a system that can also set policies. That means that if I, as the owner of glenjarvis.com, want to say "reject all mail that isn't sent from this SPF address with these keys," I can do so. I can also specify where to send reports when the bad actors pretend to be from glenjarvis.com but really aren't. This technology is called Domain-based Message Authentication, Reporting and Conformance (DMARC): - https://en.wikipedia.org/wiki/DMARC This OpenSource project is a framework that collects those reports, parses them, and stores them in a way where one can query and make meaningful reports. The specific technology used in this project uses Amazon Web Services (AWS) heavily in a serverless stack. These are the services that are used: - Reports are sent from email agents (google.com, yahoo.com, aol.com, etc.) via email. The AWS service that receives email is Simple Email Service (SES) - Contents of these emails are stored in an AWS service called Simple Storage Service (S3). - Code is needed to parse that email and extract the attached file. This code runs serverless in an AWS Lambdaservice. Once the attachment is parsed from the email (that is still stored in S3), the attachment will be also be stored in another S3 location. Lambda log output will be stored in the AWS CloudWatch service. - Code is needed to parse the previously attached DMARC compressed reports (xml compressed as either zip or gz). This will also run as a serverless Lambda. - Finally, the parsed data needs stored. The simplest place to store this data is in the AWS service called DynamoDB. One can convert that data to a Relational Database format of their choice. - Meaningful reports from the previously collected data can then be generated Again, Pull Requests are welcome. Glen Jarvis -- I use these email security features: - PGP keys / Keybase: https://keybase.io/glenjarvis - One name: https://onename.com/glenjarvis - ProtonMail (https://protonmail.com/) for end-to-end encryption - SPF, DKIM, and DMARC DNS (glenjarvis.com) - DMARC policy of 'reject' (to reject all mails that don't pass security) Sent with [ProtonMail](https://protonmail.com) Secure Email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Wed Aug 30 23:18:17 2017 From: glen at glenjarvis.com (Glen Jarvis) Date: Wed, 30 Aug 2017 23:18:17 -0400 Subject: [Baypiggies] This old dog needs a new trick (aka Feedback on type annotations) Message-ID: This old dog is learning new tricks. Specially Type annotation in the latest version of Python 3. I have written these instructions and tried to clarify with type annotations. Am I at the latest PEP standard? I need to go back to Guido's and DropBoxes' excellent BayPIGgies talk on the subject. Here is something I'm trying to specify (yes, I know the actual solution is only a few simple lines) using type annotations. The sample file in this directory (dmarc.lambda/task3_parse_filenames) is the type of file that is attached to DMARC emails. The filename of the file (`google.com!glenjarvis.com!1501372800!1501459199.zip`) contains four valuable pieces of information: 1. The first field in this filename is the name of the email service provider (in this example `google.com`) that received at least one email and applied the DMARC policies against it. 2. The second field in this filename is the name of the domain for which the DMARC policy was applied (in this example `glenjarvis.com`). 3. The third field in this filename is a Date/Time value represented as an integer (number of seconds since Epoch). In this example, this would be equivalent to the naive datetime "Sunday, July 30, 2017 00:00:00 AM". This represents the beginning date/time of the interval for which the report is valid. 4. The fourth and final field in this filename is another Date/Time value represented as described above. In this example, this would be equivalent to the naive datetime "Sunday, July 30, 2017 04:59:59 PM". This represents the beginning date/time of the interval for which the report is valid. This task should be a simple function. This skeleton should help describe what is intended/needed ``` def details_from_filename(dmarc_filename:str): .... email_provider = "google.com" # type: str domain = "glenjarvis.com" # type: str begin_time = datetime.datetime(2017, 7, 30, 0, 0, 0) # type: datetime.datetime end_time = datetime.datetime(2017, 7, 30, 16, 59, 59) # type: datetime.datetime return [email_provider, domain, begin_time, end_time] ``` Thanks in advance for the awesome feedback! :) Cheers, Glen Jarvis -- I use these email security features: - PGP keys / Keybase: https://keybase.io/glenjarvis - One name: https://onename.com/glenjarvis - ProtonMail (https://protonmail.com/) for end-to-end encryption - SPF, DKIM, and DMARC DNS (glenjarvis.com) - DMARC policy of 'reject' (to reject all mails that don't pass security) Sent with [ProtonMail](https://protonmail.com) Secure Email. -------------- next part -------------- An HTML attachment was scrubbed... URL: