From ed at pythoncharmers.com Sun May 6 22:10:35 2018 From: ed at pythoncharmers.com (Ed Schofield) Date: Mon, 7 May 2018 12:10:35 +1000 Subject: [melbourne-pug] Next Melbourne Python meeting - tonight! - Monday 7 May Message-ID: Hi all! We're looking forward to our next Python meetup this evening. We have three talks planned: *1. Graeme Cross: From "Glue it" to "Ship it"* (~25 minutes) Python is an excellent language for rapidly prototyping ideas, and is very well suited to gluing together different tools, libraries and frameworks into a cohesive prototype. However this doesn't always map well into a robust production code base for an application that is shipped out to paying customers. This presentation will cover a checklist of considerations to factor into your project before you dive into your prototype to help make life easier, budgets lower, schedules shorter, lawyers poorer and customers happier when your well-received prototype then has to be shipped. *2. Mike Dewhirst: **Chemical database scraping via Django Admin* (~20 minutes) This is a beginner- to intermediate-level walk-through of a real-world project that uses Django and specifically its Admin interface. The Django Admin was originally billed as being "production ready" code but this was watered down in the Django docs a couple of years ago. Mike's SharedSDS project is in production and he will explain in this talk why he thinks the Admin is magnificent. *3. Ed Schofield: What's New in Python *(15 minutes) I'll give a brief run-down of new developments in the Python ecosystem in recent months. *4. Announcements and pizza* *When:* 5.45pm for mingling; talks from 6pm to ~7.15pm, pizza afterwards *Where: *Outcome-Hub Co-Working Space, Suite 1, 121 Cardigan Street, Carlton *How to get there: *Walk 12 minutes north from Melbourne Central station. *Afterwards:* drinks on Lygon Street *Sponsorship:* many thanks to Outcome Hub for providing the venue and Python Charmers for ongoing sponsorship. *RSVP:* Please respond on Meetup.com so we can track numbers: https://www. meetup.com/Melbourne-Python-Meetup-Group/ We hope to see you there! :-D Best wishes, Ed -- Dr. Edward Schofield Python Charmers http://pythoncharmers.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From miked at dewhirst.com.au Mon May 7 19:52:34 2018 From: miked at dewhirst.com.au (Mike Dewhirst) Date: Tue, 8 May 2018 09:52:34 +1000 Subject: [melbourne-pug] TNT video from last night's attempted tri-nitrated-toluene Message-ID: For those who sat through my mispelled web scraping exercise last night, here is a three and a half minute video of the real thing ... spelled correctly this time! https://www.sharedtrain.com/course/5/instruction/85/ Thanks Mike From david.crisp at gmail.com Thu May 17 19:35:16 2018 From: david.crisp at gmail.com (David Crisp) Date: Fri, 18 May 2018 09:35:16 +1000 Subject: [melbourne-pug] FroSolPy Fronius Inverter Data Collector / Code Feedback Message-ID: Gday, I'm not sure if this is appropriate to ask for or not but I was wondering if there was anybody who would be happy to do a quick code review / code feedback on my Fronius Solar module I have written and give me some feedback on it. I have been working on this module for a while and I think I'm beginning to not be able to see the trees for the forest. It is NOT finished yet but it does what I need it to do for the moment. There's no unit tests though. I haven't worked out how to do these for dynamic data collected from APIs etc which could return anything. Currently being unemployed and not having access to a development team I don't get a chance to drop code in front of more experienced people and get ideas from them. The module should be able to be found at the following location. https://github.com/dcrispgit/FroSolPy Bonus Points if you have your own Fronius solar inverter and you can actually run this code and retrieve data from it. If it's not appropriate to ask that then feel free to ignore or point me in the direction of somewhere that can help. Regards, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From jni.soma at gmail.com Thu May 17 19:46:01 2018 From: jni.soma at gmail.com (Juan Nunez-Iglesias) Date: Fri, 18 May 2018 09:46:01 +1000 Subject: [melbourne-pug] FroSolPy Fronius Inverter Data Collector / Code Feedback In-Reply-To: References: Message-ID: <1dd43bc1-09a6-44f7-9b06-ee8e686d5530@Spark> Hi David, I can?t speak for everyone on the list but for me this is exactly the kind of stuff I want to see on here: cool Python solutions to problems affecting global and, particularly, local challenges. We?re going to put solar on our house sometime in the next year, and the availability of Python APIs for one solution or another would certainly sway me. (Having said that, two years in I still haven?t played around with my Powershop data!) Unfortunately I don?t have the bandwidth right now to do a code review, but I hope someone else here will. Please write again when you are ready to release a 1.0-beta! =) Juan. On 18 May 2018, 9:36 AM +1000, David Crisp , wrote: > Gday, > > I'm not sure if this is appropriate to ask for or not but I was wondering if there was anybody who would be happy to do a quick code review / code feedback on my Fronius Solar module I have written? and give me some feedback on it. > > I have been working on this module for a while and I think I'm beginning to not be able to see the trees for the forest.?? It is NOT finished yet but it does what I need it to do for the moment. > > There's no unit tests though.? I haven't worked out how to do these for dynamic data collected from APIs etc which could return anything. > > Currently being unemployed and not having access to a development team I don't get a chance to drop code in front of more experienced people and get ideas from them. > > The module should be able to be found at the following location. > https://github.com/dcrispgit/FroSolPy > > Bonus Points if you have your own Fronius solar inverter and you can actually run this code and retrieve data from it. > > If it's not appropriate to ask that then feel free to ignore or point me in the direction of somewhere that can help. > > Regards, > David > _______________________________________________ > melbourne-pug mailing list > melbourne-pug at python.org > https://mail.python.org/mailman/listinfo/melbourne-pug -------------- next part -------------- An HTML attachment was scrubbed... URL: From news02 at metrak.com Thu May 17 23:40:20 2018 From: news02 at metrak.com (paul sorenson) Date: Thu, 17 May 2018 20:40:20 -0700 Subject: [melbourne-pug] FroSolPy Fronius Inverter Data Collector / Code Feedback In-Reply-To: References: Message-ID: Hey David, I probably can't run that on my inverter but I wrote some similar code for Aurora brand a while back. My inverter came with a CD-ROM which would push a cloud somewhere but I reckon it would be fun to crowd source really granular data. cheers On 05/17/2018 04:35 PM, David Crisp wrote: > Gday, > > I'm not sure if this is appropriate to ask for or not but I was > wondering if there was anybody who would be happy to do a quick code > review / code feedback on my Fronius Solar module I have written? and > give me some feedback on it.?? > > I have been working on this module for a while and I think I'm > beginning to not be able to see the trees for the forest.?? It is NOT > finished yet but it does what I need it to do for the moment. > > There's no unit tests though.? I haven't worked out how to do these > for dynamic data collected from APIs etc which could return anything. > > Currently being unemployed and not having access to a development team > I don't get a chance to drop code in front of more experienced people > and get ideas from them. > > The module should be able to be found at the following location. > https://github.com/dcrispgit/FroSolPy > > Bonus Points if you have your own Fronius solar inverter and you can > actually run this code and retrieve data from it. > > If it's not appropriate to ask that then feel free to ignore or point > me in the direction of somewhere that can help. > > Regards,? > David > > > _______________________________________________ > melbourne-pug mailing list > melbourne-pug at python.org > https://mail.python.org/mailman/listinfo/melbourne-pug -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.leslie.ttg at gmail.com Fri May 18 00:05:14 2018 From: william.leslie.ttg at gmail.com (William ML Leslie) Date: Fri, 18 May 2018 14:05:14 +1000 Subject: [melbourne-pug] FroSolPy Fronius Inverter Data Collector / Code Feedback In-Reply-To: References: Message-ID: On 18 May 2018 at 13:40, paul sorenson wrote: > My inverter came with a CD-ROM which would push a cloud somewhere but I > reckon it would be fun to crowd source really granular data. > The ability to push clouds is a great feature for a solar inverter to have. -- William Leslie Notice: Likely much of this email is, by the nature of copyright, covered under copyright law. You absolutely MAY reproduce any part of it in accordance with the copyright law of the nation you are reading this in. Any attempt to DENY YOU THOSE RIGHTS would be illegal without prior contractual agreement. From davidok7 at gmail.com Fri May 18 00:41:44 2018 From: davidok7 at gmail.com (David O'Keeffe) Date: Fri, 18 May 2018 14:41:44 +1000 Subject: [melbourne-pug] FroSolPy Fronius Inverter Data Collector / Code Feedback In-Reply-To: References: Message-ID: Hey David, I've been working on something similar for the Sungrow SH5K inverter talking through the Modbus protocol. From looking over your code briefly, it's an almost 2000 line script, I can't easily make sense of what your logic is. I'd take the long list of initializations out as a dictionary in another py file and write an abstract function for code blocks like this. @property def PowerApparent_S_Phase_1(self): if (self._checkdatacurrency(self .MeterRealTimeData.PowerApparent_S_Phase_1)): return self.MeterRealTimeData.PowerApparent_S_Phase_1.Value else: self._GetMeterRealtimeData() return self.MeterRealTimeData.PowerApparent_S_Phase_1.Value @property def PowerApparent_S_Phase_2(self): if (self._checkdatacurrency(self .MeterRealTimeData.PowerApparent_S_Phase_2)): return self.MeterRealTimeData.PowerApparent_S_Phase_2.Value else: self._GetMeterRealtimeData() return self.MeterRealTimeData.PowerApparent_S_Phase_2.Value Cheers, Dave On Fri, May 18, 2018 at 2:05 PM, William ML Leslie < william.leslie.ttg at gmail.com> wrote: > On 18 May 2018 at 13:40, paul sorenson wrote: > > My inverter came with a CD-ROM which would push a cloud somewhere but I > > reckon it would be fun to crowd source really granular data. > > > > The ability to push clouds is a great feature for a solar inverter to have. > > -- > William Leslie > > Notice: > Likely much of this email is, by the nature of copyright, covered > under copyright law. You absolutely MAY reproduce any part of it in > accordance with the copyright law of the nation you are reading this > in. Any attempt to DENY YOU THOSE RIGHTS would be illegal without > prior contractual agreement. > _______________________________________________ > melbourne-pug mailing list > melbourne-pug at python.org > https://mail.python.org/mailman/listinfo/melbourne-pug > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alaa at codedemigod.com Fri May 18 09:33:41 2018 From: alaa at codedemigod.com (Alaa Salman) Date: Fri, 18 May 2018 23:33:41 +1000 Subject: [melbourne-pug] FroSolPy Fronius Inverter Data Collector / Code Feedback In-Reply-To: References: Message-ID: Hi David, I am not sure what kind of code review you're after but I had a quick look at the code and though I can't comment on the functionality, there are a few things that stand out. 1- That's a lot of code to sit in a single file, you might want to consider splitting it up over multiple files or modules 2- The code pattern where you check for key existence before you fetch its value can be replaced with the get() dict function which would cut down on a lot of the code. Some lines in there can also be replaced with a default dict. 3- You'll find that most python code follows the directions in pep8 for style. There's no right or wrong for this one just convention/consistency and tradition. 4- I am not sure why you're doing __new__.__defaults__ = (None,) * len(self.CommonInverterValues.IAC._fields). There are more expressive ways to do this. 5- Something like "url={protocol}://{host}...." can be extracted to a common location since usually this wouldn't change for a single invocation. 6- Using named tuples inside of classes might make your code a bit more difficult to follow. Maybe consider encapsulating the different objects in different classes and populate those. 7- You mentioned there are no tests. I don't see any logic in there that could use testing. However, you can write tests to make sure that your code handles unexpected values as a start. I hope this helps. Very nice work on commenting your code and keeping it tidy. Please feel free to ask any questions you might have to the list and I'm sure we're all happy to help. On 18/05/18 14:05, melbourne-pug-request at python.org wrote: > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 18 May 2018 09:35:16 +1000 > From: David Crisp > To: Melbourne Python Users Group > Subject: [melbourne-pug] FroSolPy Fronius Inverter Data Collector / > Code Feedback > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Gday, > > I'm not sure if this is appropriate to ask for or not but I was wondering > if there was anybody who would be happy to do a quick code review / code > feedback on my Fronius Solar module I have written and give me some > feedback on it. > > I have been working on this module for a while and I think I'm beginning to > not be able to see the trees for the forest. It is NOT finished yet but > it does what I need it to do for the moment. > > There's no unit tests though. I haven't worked out how to do these for > dynamic data collected from APIs etc which could return anything. > > Currently being unemployed and not having access to a development team I > don't get a chance to drop code in front of more experienced people and get > ideas from them. > > The module should be able to be found at the following location. > https://github.com/dcrispgit/FroSolPy > > Bonus Points if you have your own Fronius solar inverter and you can > actually run this code and retrieve data from it. > > If it's not appropriate to ask that then feel free to ignore or point me in > the direction of somewhere that can help. > > Regards, > David > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ed at pythoncharmers.com Wed May 30 01:55:41 2018 From: ed at pythoncharmers.com (Ed Schofield) Date: Wed, 30 May 2018 15:55:41 +1000 Subject: [melbourne-pug] Next Melbourne Python meeting - next week - Monday 4 June Message-ID: Hi all! We're looking forward to our next Python meetup on Monday evening. We have a great line-up of talks planned: *1. Rory Hart: Just Enough OpenID Connect* (~25 minutes) Many of us encounter authentication protocols as a side effect of just trying to get things done. The simple task of accessing data from a client API or integrating with a third parties balloons out into a yak shaving session filled with obtuse authentication failure messages. Rory will walk through a number of scenarios involving OpenID Connect and offer practical guidance on productively using Python to work with OpenID Connect. *2. Michael Teasdale: Real-world case studies with Python-based web businesses * (~20 minutes) Michael has founded or worked for around a dozen e-commerce and logistics companies in Australia and Asia-Pacific that base their operations entirely on Python. He will describe some amazing success stories of Python adoption in automating various business processes. He will also describe workflow tools for ensuring sites are tested, robust, and production-ready in a short period of time. *3. Ruslan Dautov: JupyterHub and Apache Spark in the data center *(~20 minutes) Ruslan, a Research Assistant and PhD student at the Big Data Institute at Shengzhen University, will describe his research in GraphFrames and his experiences with JupyterHub and Apache Spark for supporting teams with shared computing infrastructure. *4. Announcements and pizza* *When:* 5.45pm for mingling; talks from 6pm to ~7.15pm, pizza afterwards *Where: *Outcome-Hub Co-Working Space, Suite 1, 121 Cardigan Street, Carlton *How to get there: *Walk 12 minutes north from Melbourne Central station. *Afterwards:* pizza and drinks on Lygon Street *Sponsorship:* many thanks to Outcome Hub for providing the venue and Python Charmers for ongoing sponsorship. *RSVP:* Please respond on Meetup.com so we can track numbers: https://www. meetup.com/Melbourne-Python-Meetup-Group/ We hope to see you there! :-D Best wishes, Ed -- Dr. Edward Schofield Python Charmers +61 (0)405 676 229 http://pythoncharmers.com -------------- next part -------------- An HTML attachment was scrubbed... URL: