From deeppunster at gmail.com Thu Apr 4 14:51:36 2019 From: deeppunster at gmail.com (Travis Risner) Date: Thu, 04 Apr 2019 14:51:36 -0400 Subject: [CentralOH] DoJo Mumblings for April 4,2019 Message-ID: <0979A6A5-923A-445A-A280-5AF2F1C5DC3F@gmail.com> Hi everyone, Here is the challenge for those relatively new to Python. **?????????????? New to Python Challenge ??????????????????** **A number is considered perfect if its digits sum up to exactly 10.** **Given a positive integer n, return the n-th perfect number.** **For example, given 1, you should return 19. Given 2, you should return 28.** **????????????????????????????????** And for those who want to exercise their Python prowess, here is a challenge for you. **?????????????? Experienced Python Challenge ??????????????????** **A knight's tour is a sequence of moves by a knight on a chessboard such that all squares are visited once.** **Given N, write a function to return the number of knight's tours on an N by N chessboard.** **????????????????????????????????** See you tonight! Travis -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim.prior at accenture.com Tue Apr 9 15:36:17 2019 From: jim.prior at accenture.com (Prior, Jim) Date: Tue, 9 Apr 2019 19:36:17 +0000 Subject: [CentralOH] pytest books Message-ID: I am not looking for the results of searching the web for pytest books. pytest's official docs at https://docs.pytest.org/en/latest/contents.html are insufficient for me, so I am looking book for a pytest tutorial book that is good for a TDD beginner. If you know of such, please tell the list. I exclude "Test-Driven Development with Python", which COhPy's collection has, from consideration because of its emphasis on using unittest. Is "Python Testing with pytest" by Brian Okken good? Is it in COhPy's collection? ________________________________ This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy. ______________________________________________________________________________________ www.accenture.com From miller.eric.t at gmail.com Tue Apr 9 15:48:00 2019 From: miller.eric.t at gmail.com (Eric Miller) Date: Tue, 9 Apr 2019 15:48:00 -0400 Subject: [CentralOH] Python library for image processing? Message-ID: Looking for a library to parse each pixel in an image file. Need to map each x,y pixel to its associated RGB values. Any recommendations for a lib that will do this well? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at joeshaw.org Tue Apr 9 15:57:18 2019 From: joe at joeshaw.org (Joe Shaw) Date: Tue, 9 Apr 2019 15:57:18 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: Hi, Check out Pillow, https://pillow.readthedocs.io/en/stable/. It is a fork of the earlier PIL library. It also integrates nicely with numpy if you need it. If you needed something more powerful, like bindings to the ImageMagick C library, then something like Wand might be better. https://github.com/emcconville/wand Joe On Tue, Apr 9, 2019 at 3:48 PM Eric Miller wrote: > Looking for a library to parse each pixel in an image file. Need to map > each x,y pixel to its associated RGB values. > > Any recommendations for a lib that will do this well? > > Thanks! > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrewkubera at gmail.com Tue Apr 9 15:58:19 2019 From: andrewkubera at gmail.com (Andrew Kubera) Date: Tue, 9 Apr 2019 15:58:19 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: The Pillow library has an Image.getpixel method that is probably what you're looking for. On Tue, Apr 9, 2019, 3:48 PM Eric Miller wrote: > Looking for a library to parse each pixel in an image file. Need to map > each x,y pixel to its associated RGB values. > > Any recommendations for a lib that will do this well? > > Thanks! > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From miller.eric.t at gmail.com Tue Apr 9 16:04:19 2019 From: miller.eric.t at gmail.com (Eric Miller) Date: Tue, 9 Apr 2019 16:04:19 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: Thanks, that look perfect. On Tue, Apr 9, 2019, 3:57 PM Joe Shaw wrote: > Hi, > > Check out Pillow, https://pillow.readthedocs.io/en/stable/. It is a fork > of the earlier PIL library. It also integrates nicely with numpy if you > need it. > > If you needed something more powerful, like bindings to the ImageMagick C > library, then something like Wand might be better. > https://github.com/emcconville/wand > > Joe > > On Tue, Apr 9, 2019 at 3:48 PM Eric Miller > wrote: > >> Looking for a library to parse each pixel in an image file. Need to map >> each x,y pixel to its associated RGB values. >> >> Any recommendations for a lib that will do this well? >> >> Thanks! >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Tue Apr 9 16:17:23 2019 From: eric at intellovations.com (Eric Floehr) Date: Tue, 9 Apr 2019 16:17:23 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: Eric, Depending on what you want to do, getPixel may or may not be too slow for you. Both scipy[1] and skimage (sci-kit image)[2] manipulate images as numpy arrays which allow you to do very efficient matrix operations, if say, you are doing an operation on every pixel in an image. You can also easily load an image as a numpy array directly: from PIL import Image import numpy as np image = Image.open('xyz.png') img_array = np.array(image) [1] http://cs231n.github.io/python-numpy-tutorial/#scipy-image [2] https://scikit-image.org/ On Tue, Apr 9, 2019 at 4:04 PM Eric Miller wrote: > Thanks, that look perfect. > > On Tue, Apr 9, 2019, 3:57 PM Joe Shaw wrote: > >> Hi, >> >> Check out Pillow, https://pillow.readthedocs.io/en/stable/. It is a >> fork of the earlier PIL library. It also integrates nicely with numpy if >> you need it. >> >> If you needed something more powerful, like bindings to the ImageMagick C >> library, then something like Wand might be better. >> https://github.com/emcconville/wand >> >> Joe >> >> On Tue, Apr 9, 2019 at 3:48 PM Eric Miller >> wrote: >> >>> Looking for a library to parse each pixel in an image file. Need to map >>> each x,y pixel to its associated RGB values. >>> >>> Any recommendations for a lib that will do this well? >>> >>> Thanks! >>> _______________________________________________ >>> CentralOH mailing list >>> CentralOH at python.org >>> https://mail.python.org/mailman/listinfo/centraloh >>> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachary1998 at gmail.com Tue Apr 9 16:00:00 2019 From: zachary1998 at gmail.com (DaffyDaffyDaffy33322) Date: Tue, 9 Apr 2019 16:00:00 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: I'd recommend against .getpixel(), as it's very slow if you want to get every single value. Instead try `pixels = image.load()` and then address each pixel as `pixels[x,y]`. On Tue, Apr 9, 2019 at 3:58 PM Andrew Kubera wrote: > The Pillow library has an Image.getpixel method that is probably what > you're looking for. > > On Tue, Apr 9, 2019, 3:48 PM Eric Miller wrote: > >> Looking for a library to parse each pixel in an image file. Need to map >> each x,y pixel to its associated RGB values. >> >> Any recommendations for a lib that will do this well? >> >> Thanks! >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jallman112 at gmail.com Tue Apr 9 16:02:17 2019 From: jallman112 at gmail.com (Jeffrey Allman) Date: Tue, 9 Apr 2019 16:02:17 -0400 Subject: [CentralOH] pytest books In-Reply-To: References: Message-ID: I'm only about 35% through Brian Okken's book, but it's been good so far. Many of the pytest core developers acted as technical reviewers for his book. On Tue, Apr 9, 2019, 3:36 PM Prior, Jim wrote: > I am not looking for the results of searching the web for pytest books. > > pytest's official docs at > https://docs.pytest.org/en/latest/contents.html are insufficient > for me, so I am looking book for a pytest tutorial book that is > good for a TDD beginner. If you know of such, please tell the > list. > > I exclude "Test-Driven Development with Python", which COhPy's > collection has, from consideration because of its emphasis on > using unittest. > > Is "Python Testing with pytest" by Brian Okken good? > Is it in COhPy's collection? > > ________________________________ > > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise confidential information. If you have > received it in error, please notify the sender immediately and delete the > original. Any other use of the e-mail by you is prohibited. Where allowed > by local law, electronic communications with Accenture and its affiliates, > including e-mail and instant messaging (including content), may be scanned > by our systems for the purposes of information security and assessment of > internal compliance with Accenture policy. Your privacy is important to us. > Accenture uses your personal data only in compliance with data protection > laws. For further information on how Accenture processes your personal > data, please see our privacy statement at > https://www.accenture.com/us-en/privacy-policy. > > ______________________________________________________________________________________ > > www.accenture.com > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From miller.eric.t at gmail.com Tue Apr 9 17:05:36 2019 From: miller.eric.t at gmail.com (Eric Miller) Date: Tue, 9 Apr 2019 17:05:36 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: thanks Eric I do indeed plan on doing an operation on every pixel in the image. Sounds like I may need to use a few libs to achieve it efficiently. The goal is to parse Kerbal Space Program biome map images , to determine the landing spots that are nearest to the most number of surface biomes. On Tue, Apr 9, 2019 at 4:17 PM Eric Floehr wrote: > Eric, > > Depending on what you want to do, getPixel may or may not be too slow for > you. Both scipy[1] and skimage (sci-kit image)[2] manipulate images as > numpy arrays which allow you to do very efficient matrix operations, if > say, you are doing an operation on every pixel in an image. > > You can also easily load an image as a numpy array directly: > > from PIL import Image > import numpy as np > image = Image.open('xyz.png') > img_array = np.array(image) > > [1] http://cs231n.github.io/python-numpy-tutorial/#scipy-image > > [2] https://scikit-image.org/ > > > On Tue, Apr 9, 2019 at 4:04 PM Eric Miller > wrote: > >> Thanks, that look perfect. >> >> On Tue, Apr 9, 2019, 3:57 PM Joe Shaw wrote: >> >>> Hi, >>> >>> Check out Pillow, https://pillow.readthedocs.io/en/stable/. It is a >>> fork of the earlier PIL library. It also integrates nicely with numpy if >>> you need it. >>> >>> If you needed something more powerful, like bindings to the ImageMagick >>> C library, then something like Wand might be better. >>> https://github.com/emcconville/wand >>> >>> Joe >>> >>> On Tue, Apr 9, 2019 at 3:48 PM Eric Miller >>> wrote: >>> >>>> Looking for a library to parse each pixel in an image file. Need to map >>>> each x,y pixel to its associated RGB values. >>>> >>>> Any recommendations for a lib that will do this well? >>>> >>>> Thanks! >>>> _______________________________________________ >>>> CentralOH mailing list >>>> CentralOH at python.org >>>> https://mail.python.org/mailman/listinfo/centraloh >>>> >>> _______________________________________________ >>> CentralOH mailing list >>> CentralOH at python.org >>> https://mail.python.org/mailman/listinfo/centraloh >>> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Tue Apr 9 17:21:36 2019 From: eric at intellovations.com (Eric Floehr) Date: Tue, 9 Apr 2019 17:21:36 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: Eric, Awesome, that sounds like a really fun project! Would love to watch your progress on that! I bought KSP all the way back in 2013 but haven't played recently. It looks like they have added a bunch of cool stuff! Cheers, Eric On Tue, Apr 9, 2019 at 5:05 PM Eric Miller wrote: > thanks Eric I do indeed plan on doing an operation on every pixel in the > image. Sounds like I may need to use a few libs to achieve it efficiently. > > The goal is to parse Kerbal Space Program biome map images > , to determine the > landing spots that are nearest to the most number of surface biomes. > > On Tue, Apr 9, 2019 at 4:17 PM Eric Floehr > wrote: > >> Eric, >> >> Depending on what you want to do, getPixel may or may not be too slow for >> you. Both scipy[1] and skimage (sci-kit image)[2] manipulate images as >> numpy arrays which allow you to do very efficient matrix operations, if >> say, you are doing an operation on every pixel in an image. >> >> You can also easily load an image as a numpy array directly: >> >> from PIL import Image >> import numpy as np >> image = Image.open('xyz.png') >> img_array = np.array(image) >> >> [1] http://cs231n.github.io/python-numpy-tutorial/#scipy-image >> >> [2] https://scikit-image.org/ >> >> >> On Tue, Apr 9, 2019 at 4:04 PM Eric Miller >> wrote: >> >>> Thanks, that look perfect. >>> >>> On Tue, Apr 9, 2019, 3:57 PM Joe Shaw wrote: >>> >>>> Hi, >>>> >>>> Check out Pillow, https://pillow.readthedocs.io/en/stable/. It is a >>>> fork of the earlier PIL library. It also integrates nicely with numpy if >>>> you need it. >>>> >>>> If you needed something more powerful, like bindings to the ImageMagick >>>> C library, then something like Wand might be better. >>>> https://github.com/emcconville/wand >>>> >>>> Joe >>>> >>>> On Tue, Apr 9, 2019 at 3:48 PM Eric Miller >>>> wrote: >>>> >>>>> Looking for a library to parse each pixel in an image file. Need to >>>>> map each x,y pixel to its associated RGB values. >>>>> >>>>> Any recommendations for a lib that will do this well? >>>>> >>>>> Thanks! >>>>> _______________________________________________ >>>>> CentralOH mailing list >>>>> CentralOH at python.org >>>>> https://mail.python.org/mailman/listinfo/centraloh >>>>> >>>> _______________________________________________ >>>> CentralOH mailing list >>>> CentralOH at python.org >>>> https://mail.python.org/mailman/listinfo/centraloh >>>> >>> _______________________________________________ >>> CentralOH mailing list >>> CentralOH at python.org >>> https://mail.python.org/mailman/listinfo/centraloh >>> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From neil.ludban at gmail.com Tue Apr 9 18:34:12 2019 From: neil.ludban at gmail.com (neil ludban) Date: Tue, 9 Apr 2019 18:34:12 -0400 Subject: [CentralOH] pytest books In-Reply-To: References: Message-ID: On Tue, Apr 9, 2019 at 3:36 PM Prior, Jim wrote: > ...Is "Python Testing with pytest" by Brian Okken good? > Is it in COhPy's collection? > > Originally published Sep 2017; given the cohpy library was in limbo around this time, it's probably not in there. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cwandrews.oh at gmail.com Tue Apr 9 18:38:39 2019 From: cwandrews.oh at gmail.com (C.W. Andrews) Date: Tue, 9 Apr 2019 18:38:39 -0400 Subject: [CentralOH] pytest books In-Reply-To: Message-ID: <9177d560-df94-49b0-be00-70934ac72d83@ChristosiPhone> Jim, Very good. No idea about the library though. Thanks Chris > > On Apr 9, 2019 at 6:34 PM, wrote: > > > > > > > > On Tue, Apr 9, 2019 at 3:36 PM Prior, Jim wrote: > > > ...Is "Python Testing with pytest" by Brian Okken good? > > Is it in COhPy's collection? > > > > > > Originally published Sep 2017; given the cohpy library was in limbo around this time, it's probably not in there. > > > _______________________________________________ CentralOH mailing list CentralOH at python.org https://mail.python.org/mailman/listinfo/centraloh -------------- next part -------------- An HTML attachment was scrubbed... URL: From neil.ludban at gmail.com Tue Apr 9 18:53:10 2019 From: neil.ludban at gmail.com (neil ludban) Date: Tue, 9 Apr 2019 18:53:10 -0400 Subject: [CentralOH] [COhPy] DoJo Rumblings: Tonight's Python Challenge In-Reply-To: References: Message-ID: The algorithm that I forgot to include a pointer to: https://en.wikipedia.org/wiki/Maximum_subarray_problem The preprocessing trick is to recognize that the difference between any two entries in the original array is equal to the sum of the differences between all adjacent pairs between those two entries. On Tue, Mar 12, 2019 at 6:41 PM neil ludban wrote: > #!/usr/bin/env python3.7 > > def delta(x): > a = next(x) > for b in x: > yield b - a > a = b > > def positive_sums(x): > s = 0 > for c in x: > s += c > if s > 0: > yield s > else: > s = 0 > > prices = [ 9, 11, 8, 5, 7, 10 ] > print(max(positive_sums(delta(iter(prices))))) > > > On Thu, Mar 7, 2019 at 11:57 AM Travis Risner > wrote: > >> Here is a small problem for us to consider. At tonight?s DoJo meeting >> we will work together to solve this as individuals or small groups. We >> will also discuss the advantages of each approach. >> >> Given a array of numbers representing the stock prices of a >> company in >> chronological order, write a function that calculates the maximum >> profit you >> could have made from buying and selling that stock once. You must >> buy >> before >> you can sell it. >> >> For example, given [9, 11, 8, 5, 7, 10], you should return 5, >> since you >> could buy the stock at 5 dollars and sell it at 10 dollars. >> >> DoJo is at Smokehouse Brewing, 1130 Dublin Road, Columbus, Ohio. Join >> us at 6:00 or any time after that! >> >> Travis >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at captalent.com Tue Apr 9 18:30:35 2019 From: eric at captalent.com (Eric Lawson) Date: Tue, 9 Apr 2019 18:30:35 -0400 (EDT) Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: <131561422.313350.1554849035761@webmail.networksolutionsemail.com> Sometime a few years ago I was thinking of learning to code in Python. I haven't had time, maybe one day. Until then, would somebody remove me from this mailing list? Thanks! eric at captalent.com > On April 9, 2019 at 3:48 PM Eric Miller wrote: > > Looking for a library to parse each pixel in an image file. Need to map each x,y pixel to its associated RGB values. > > Any recommendations for a lib that will do this well? > > Thanks! > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Tue Apr 9 19:18:48 2019 From: eric at intellovations.com (Eric Floehr) Date: Tue, 9 Apr 2019 19:18:48 -0400 Subject: [CentralOH] Removing yourself from the email list In-Reply-To: <131561422.313350.1554849035761@webmail.networksolutionsemail.com> References: <131561422.313350.1554849035761@webmail.networksolutionsemail.com> Message-ID: I've removed Eric from the list, but for anyone else who might contemplate unsubscribing, all you have to do is click the link at the bottom of the email and follow the instructions there, which consists of typing in your email address, clicking "unsubscribe or edit options", check "yes I really want to unsubscribe" and then clicking "unsubscribe". On Tue, Apr 9, 2019, 7:10 PM Eric Lawson wrote: > Sometime a few years ago I was thinking of learning to code in Python. I > haven't had time, maybe one day. Until then, would somebody remove me from > this mailing list? Thanks! > > eric at captalent.com > _________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandmisme at gmail.com Wed Apr 10 10:22:57 2019 From: sandmisme at gmail.com (Sonya) Date: Wed, 10 Apr 2019 10:22:57 -0400 Subject: [CentralOH] Removing yourself from the email list In-Reply-To: References: <131561422.313350.1554849035761@webmail.networksolutionsemail.com> Message-ID: Hey Eric...I don?t see a link other than 2 for the mailing list and both pull up an email. On Tue, Apr 9, 2019 at 19:19 Eric Floehr wrote: > I've removed Eric from the list, but for anyone else who might contemplate > unsubscribing, all you have to do is click the link at the bottom of the > email and follow the instructions there, which consists of typing in your > email address, clicking "unsubscribe or edit options", check "yes I really > want to unsubscribe" and then clicking "unsubscribe". > > > > > > > On Tue, Apr 9, 2019, 7:10 PM Eric Lawson wrote: > >> Sometime a few years ago I was thinking of learning to code in Python. I >> haven't had time, maybe one day. Until then, would somebody remove me from >> this mailing list? Thanks! >> >> eric at captalent.com >> > _________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -- God so loved you that He extended His GRACE (God's Righteousness At Christ Expense) toward us... SM2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Wed Apr 10 10:52:17 2019 From: eric at intellovations.com (Eric Floehr) Date: Wed, 10 Apr 2019 10:52:17 -0400 Subject: [CentralOH] Removing yourself from the email list In-Reply-To: References: <131561422.313350.1554849035761@webmail.networksolutionsemail.com> Message-ID: Hi Sonya, Here is the footer that appears: _________________ CentralOH mailing list CentralOH at python.org https://mail.python.org/mailman/listinfo/centraloh The first link will pull up an email, but the second link will take you to a web page where you can follow the instructions I previously posted. Thanks, Eric On Wed, Apr 10, 2019 at 10:49 AM Sonya wrote: > Hey Eric...I don?t see a link other than 2 for the mailing list and both > pull up an email. > > On Tue, Apr 9, 2019 at 19:19 Eric Floehr wrote: > >> I've removed Eric from the list, but for anyone else who might >> contemplate unsubscribing, all you have to do is click the link at the >> bottom of the email and follow the instructions there, which consists of >> typing in your email address, clicking "unsubscribe or edit options", check >> "yes I really want to unsubscribe" and then clicking "unsubscribe". >> >> >> >> >> >> >> On Tue, Apr 9, 2019, 7:10 PM Eric Lawson wrote: >> >>> Sometime a few years ago I was thinking of learning to code in Python. >>> I haven't had time, maybe one day. Until then, would somebody remove me >>> from this mailing list? Thanks! >>> >>> eric at captalent.com >>> >> _________________ >>> CentralOH mailing list >>> CentralOH at python.org >>> https://mail.python.org/mailman/listinfo/centraloh >>> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > -- > God so loved you that He extended His GRACE (God's Righteousness At Christ > Expense) toward us... > SM2 > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From miller.eric.t at gmail.com Wed Apr 10 16:58:18 2019 From: miller.eric.t at gmail.com (Eric Miller) Date: Wed, 10 Apr 2019 16:58:18 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: Thanks E. Your suggestion got me on the right track, was able to create a numpy array from an image. I have some questions about where to go from there...mostly about handrolling my own cart coordinate code to brute force pixel by pixel, vs. 'some lib/method that already solves this, that I think exists but don't know' Rather than spam this list, I created an SO question. Happy and appreciative if anyone can take a look... https://stackoverflow.com/questions/55621100/find-closest-clusters-of-colors-in-a-numpy-array-from-an-image-file On Tue, Apr 9, 2019 at 5:22 PM Eric Floehr wrote: > Eric, > > Awesome, that sounds like a really fun project! Would love to watch your > progress on that! I bought KSP all the way back in 2013 but haven't played > recently. It looks like they have added a bunch of cool stuff! > > Cheers, > Eric > > > On Tue, Apr 9, 2019 at 5:05 PM Eric Miller > wrote: > >> thanks Eric I do indeed plan on doing an operation on every pixel in >> the image. Sounds like I may need to use a few libs to achieve it >> efficiently. >> >> The goal is to parse Kerbal Space Program biome map images >> , to determine the >> landing spots that are nearest to the most number of surface biomes. >> >> On Tue, Apr 9, 2019 at 4:17 PM Eric Floehr >> wrote: >> >>> Eric, >>> >>> Depending on what you want to do, getPixel may or may not be too slow >>> for you. Both scipy[1] and skimage (sci-kit image)[2] manipulate images as >>> numpy arrays which allow you to do very efficient matrix operations, if >>> say, you are doing an operation on every pixel in an image. >>> >>> You can also easily load an image as a numpy array directly: >>> >>> from PIL import Image >>> import numpy as np >>> image = Image.open('xyz.png') >>> img_array = np.array(image) >>> >>> [1] http://cs231n.github.io/python-numpy-tutorial/#scipy-image >>> >>> [2] https://scikit-image.org/ >>> >>> >>> On Tue, Apr 9, 2019 at 4:04 PM Eric Miller >>> wrote: >>> >>>> Thanks, that look perfect. >>>> >>>> On Tue, Apr 9, 2019, 3:57 PM Joe Shaw wrote: >>>> >>>>> Hi, >>>>> >>>>> Check out Pillow, https://pillow.readthedocs.io/en/stable/. It is a >>>>> fork of the earlier PIL library. It also integrates nicely with numpy if >>>>> you need it. >>>>> >>>>> If you needed something more powerful, like bindings to the >>>>> ImageMagick C library, then something like Wand might be better. >>>>> https://github.com/emcconville/wand >>>>> >>>>> Joe >>>>> >>>>> On Tue, Apr 9, 2019 at 3:48 PM Eric Miller >>>>> wrote: >>>>> >>>>>> Looking for a library to parse each pixel in an image file. Need to >>>>>> map each x,y pixel to its associated RGB values. >>>>>> >>>>>> Any recommendations for a lib that will do this well? >>>>>> >>>>>> Thanks! >>>>>> _______________________________________________ >>>>>> CentralOH mailing list >>>>>> CentralOH at python.org >>>>>> https://mail.python.org/mailman/listinfo/centraloh >>>>>> >>>>> _______________________________________________ >>>>> CentralOH mailing list >>>>> CentralOH at python.org >>>>> https://mail.python.org/mailman/listinfo/centraloh >>>>> >>>> _______________________________________________ >>>> CentralOH mailing list >>>> CentralOH at python.org >>>> https://mail.python.org/mailman/listinfo/centraloh >>>> >>> _______________________________________________ >>> CentralOH mailing list >>> CentralOH at python.org >>> https://mail.python.org/mailman/listinfo/centraloh >>> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From miller.eric.t at gmail.com Thu Apr 11 12:58:07 2019 From: miller.eric.t at gmail.com (Eric Miller) Date: Thu, 11 Apr 2019 12:58:07 -0400 Subject: [CentralOH] Python library for image processing? In-Reply-To: References: Message-ID: So...I posted this problem to both SO and several subreddits....and got almost no response! That tells me that either the question is *really* hard, or I'm asking it the wrong way (or both!). Anyway, Eric and others I think I have landed on an approach that might work. Take a look and let me know if this is sane? - each map image only has a small number of colors (between 3 and 20 depending on the map). We'll call the number of colors in a given image *n* - convert the image to an RGB numpy array - create *n* number of secondary arrays from that array, each with only one color represented. Each will be a 2D np array of x/y coordinates, 'e.g. the *list* of all x/y coordinates of a given color' (see [1] below for an example of what this list will look like) - for each pixel, and for each of the 2d arrays, use scipy.spatial.KDTree [1] to determine the closet pixel for each color. Progressively pop this value into a new 3d array. that's original x and y dims, plus a new 3rd dim that's a tuple of length *n*, containing the the closest distances to all colors for that pixel, indexed 0-n *(or should this be n number of new dimensions instead of a tuple??)* - do some yet-to-be determined numpy voodoo SQL like query to determine the pixels whose greatest distance to all other colors (call that *r*) is less than all the other pixels in the array. - the rest is just drawing circles with those pixels at the center, with radius *r* [1] https://stackoverflow.com/a/32781737/1404135 On Wed, Apr 10, 2019 at 4:58 PM Eric Miller wrote: > Thanks E. Your suggestion got me on the right track, was able to create a > numpy array from an image. I have some questions about where to go from > there...mostly about handrolling my own cart coordinate code to brute force > pixel by pixel, vs. 'some lib/method that already solves this, that I think > exists but don't know' > > Rather than spam this list, I created an SO question. Happy and > appreciative if anyone can take a look... > > > https://stackoverflow.com/questions/55621100/find-closest-clusters-of-colors-in-a-numpy-array-from-an-image-file > > On Tue, Apr 9, 2019 at 5:22 PM Eric Floehr > wrote: > >> Eric, >> >> Awesome, that sounds like a really fun project! Would love to watch your >> progress on that! I bought KSP all the way back in 2013 but haven't played >> recently. It looks like they have added a bunch of cool stuff! >> >> Cheers, >> Eric >> >> >> On Tue, Apr 9, 2019 at 5:05 PM Eric Miller >> wrote: >> >>> thanks Eric I do indeed plan on doing an operation on every pixel in >>> the image. Sounds like I may need to use a few libs to achieve it >>> efficiently. >>> >>> The goal is to parse Kerbal Space Program biome map images >>> , to determine the >>> landing spots that are nearest to the most number of surface biomes. >>> >>> On Tue, Apr 9, 2019 at 4:17 PM Eric Floehr >>> wrote: >>> >>>> Eric, >>>> >>>> Depending on what you want to do, getPixel may or may not be too slow >>>> for you. Both scipy[1] and skimage (sci-kit image)[2] manipulate images as >>>> numpy arrays which allow you to do very efficient matrix operations, if >>>> say, you are doing an operation on every pixel in an image. >>>> >>>> You can also easily load an image as a numpy array directly: >>>> >>>> from PIL import Image >>>> import numpy as np >>>> image = Image.open('xyz.png') >>>> img_array = np.array(image) >>>> >>>> [1] http://cs231n.github.io/python-numpy-tutorial/#scipy-image >>>> >>>> [2] https://scikit-image.org/ >>>> >>>> >>>> On Tue, Apr 9, 2019 at 4:04 PM Eric Miller >>>> wrote: >>>> >>>>> Thanks, that look perfect. >>>>> >>>>> On Tue, Apr 9, 2019, 3:57 PM Joe Shaw wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Check out Pillow, https://pillow.readthedocs.io/en/stable/. It is a >>>>>> fork of the earlier PIL library. It also integrates nicely with numpy if >>>>>> you need it. >>>>>> >>>>>> If you needed something more powerful, like bindings to the >>>>>> ImageMagick C library, then something like Wand might be better. >>>>>> https://github.com/emcconville/wand >>>>>> >>>>>> Joe >>>>>> >>>>>> On Tue, Apr 9, 2019 at 3:48 PM Eric Miller >>>>>> wrote: >>>>>> >>>>>>> Looking for a library to parse each pixel in an image file. Need to >>>>>>> map each x,y pixel to its associated RGB values. >>>>>>> >>>>>>> Any recommendations for a lib that will do this well? >>>>>>> >>>>>>> Thanks! >>>>>>> _______________________________________________ >>>>>>> CentralOH mailing list >>>>>>> CentralOH at python.org >>>>>>> https://mail.python.org/mailman/listinfo/centraloh >>>>>>> >>>>>> _______________________________________________ >>>>>> CentralOH mailing list >>>>>> CentralOH at python.org >>>>>> https://mail.python.org/mailman/listinfo/centraloh >>>>>> >>>>> _______________________________________________ >>>>> CentralOH mailing list >>>>> CentralOH at python.org >>>>> https://mail.python.org/mailman/listinfo/centraloh >>>>> >>>> _______________________________________________ >>>> CentralOH mailing list >>>> CentralOH at python.org >>>> https://mail.python.org/mailman/listinfo/centraloh >>>> >>> _______________________________________________ >>> CentralOH mailing list >>> CentralOH at python.org >>> https://mail.python.org/mailman/listinfo/centraloh >>> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeppunster at gmail.com Thu Apr 11 16:10:09 2019 From: deeppunster at gmail.com (Travis Risner) Date: Thu, 11 Apr 2019 16:10:09 -0400 Subject: [CentralOH] DoJo Rumblings: Tonight's Python Challenge (April 11) Message-ID: <21BF3940-E207-4579-A895-58524B9BD7D9@gmail.com> Here is a small problem for us to consider. At tonight?s DoJo meeting we will work together to solve this as individuals or small groups. We will also discuss the advantages of each approach. """ Given a list of possibly overlapping intervals, return a new list of intervals where all overlapping intervals have been merged. The input list is not necessarily ordered in any way. For example, given [(1, 3), (5, 8), (4, 10), (20, 25)], you should return [(1, 3), (4, 10), (20, 25)]. Source: Daily Coding Problems (https://www.dailycodingproblem.com/) """ DoJo is at Smokehouse Brewing, 1130 Dublin Road, Columbus, Ohio. Join us at 6:00 or any time after that! Travis From deeppunster at gmail.com Thu Apr 11 16:43:58 2019 From: deeppunster at gmail.com (Travis Risner) Date: Thu, 11 Apr 2019 16:43:58 -0400 Subject: [CentralOH] DoJo Challenges now on GitHub Message-ID: <01FC7666-6BF2-4C3D-A4AC-6162F504A0FA@gmail.com> For folks interested in current or past DoJo Challenges, there is now a COhPy repository at https://github.com/cohpy/DoJo-Challenges.git for your perusal. For those familiar with GitHub, please submit your solutions as pull requests. Pull requests will be processed quickly so all can see your solutions. Thanks, Travis From joe.friedrich at gmail.com Thu Apr 11 17:38:10 2019 From: joe.friedrich at gmail.com (joe friedrich) Date: Thu, 11 Apr 2019 17:38:10 -0400 Subject: [CentralOH] DoJo Challenges now on GitHub In-Reply-To: <01FC7666-6BF2-4C3D-A4AC-6162F504A0FA@gmail.com> References: <01FC7666-6BF2-4C3D-A4AC-6162F504A0FA@gmail.com> Message-ID: This is also good practice for those not familiar with git or GitHub. On Thu, Apr 11, 2019, 4:44 PM Travis Risner wrote: > For folks interested in current or past DoJo Challenges, there is now a > COhPy repository at https://github.com/cohpy/DoJo-Challenges.git for > your perusal. For those familiar with GitHub, please submit your > solutions as pull requests. > > Pull requests will be processed quickly so all can see your solutions. > > Thanks, > Travis > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damiencalloway at fastmail.com Thu Apr 11 19:55:23 2019 From: damiencalloway at fastmail.com (Damien Calloway) Date: Thu, 11 Apr 2019 19:55:23 -0400 Subject: [CentralOH] pytest books In-Reply-To: <9177d560-df94-49b0-be00-70934ac72d83@ChristosiPhone> References: <9177d560-df94-49b0-be00-70934ac72d83@ChristosiPhone> Message-ID: Just out of sheer curiosity: what qualities do you consider for a ?good? book on the subject? Did you have a hit list of features that you were looking for? Damien On Tue, Apr 9, 2019, at 6:38 PM, C.W. Andrews wrote: > > Jim, > > Very good. No idea about the library though. > > Thanks > > Chris > > > >> On Apr 9, 2019 at 6:34 PM, > wrote: >> >> On Tue, Apr 9, 2019 at 3:36 PM Prior, Jim wrote: >>> ...Is "Python Testing with pytest" by Brian Okken good? >>> Is it in COhPy's collection? >> >> Originally published Sep 2017; given the cohpy library was in limbo around this time, it's probably not in there. >> >> _______________________________________________ CentralOH mailing list CentralOH at python.org https://mail.python.org/mailman/listinfo/centraloh > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cwandrews.oh at gmail.com Sat Apr 13 12:14:07 2019 From: cwandrews.oh at gmail.com (C.W. Andrews) Date: Sat, 13 Apr 2019 12:14:07 -0400 Subject: [CentralOH] pytest books In-Reply-To: References: <9177d560-df94-49b0-be00-70934ac72d83@ChristosiPhone> Message-ID: Damien, I guess I think that there are a lot of ways for a book to be good; I don't have a set rubric. That being said, here are some reasons I thought it was good (from what I remember): 1. It was well written and approachable. 2. While not being exhaustive, it conveyed value in a number of different areas (basics, parameterizing tests, fixtures, extensions - even writing your own, etc.) 3. It is one of those books that I can and actually do use for reference and many if not all chapters can be read on their own and still stand-up, especially if you just need a refresher or an answer for a specific area. Additionally, I have looked for books on pytest and this is the only one that seems to have a printed edition and is specifically for pytest and not just testing in Python. Those are my thoughts at least. Thanks, Chris On Thu, Apr 11, 2019 at 7:55 PM Damien Calloway wrote: > Just out of sheer curiosity: what qualities do you consider for a ?good? > book on the subject? Did you have a hit list of features that you were > looking for? > > Damien > > On Tue, Apr 9, 2019, at 6:38 PM, C.W. Andrews wrote: > > > Jim, > > Very good. No idea about the library though. > > Thanks > > Chris > > > > On Apr 9, 2019 at 6:34 PM, > wrote: > > On Tue, Apr 9, 2019 at 3:36 PM Prior, Jim wrote: > > ...Is "Python Testing with pytest" by Brian Okken good? > Is it in COhPy's collection? > > > Originally published Sep 2017; given the cohpy library was in limbo around > this time, it's probably not in there. > > _______________________________________________ CentralOH mailing list > CentralOH at python.org https://mail.python.org/mailman/listinfo/centraloh > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -- *Chris W. Andrews* -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at wiphone.io Sun Apr 14 12:28:15 2019 From: ben at wiphone.io (Ben Wilson) Date: Sun, 14 Apr 2019 09:28:15 -0700 Subject: [CentralOH] WiPhone, a phone you can program in Python In-Reply-To: References: Message-ID: Hey all... I'm making a VoIP mobile phone that runs Python apps. The firmware will be open. Wanted to share and get the word out. I wanted a phone that lets hackers do what they want (instead of trapping you in a walled garden, huge IDE, non-serviceable design, etc.). The hardware is also meant to be easily expandable: the back of the phone is a PCB that can be swapped out for custom modules. Sort of like project Ara, except it's just a PCB. any hobby-level electrical designer should be able to make their own custom module. Kickstarter link: https://www.kickstarter.com/projects/2103809433/wiphone-a-phone-for-hackers-and-makers?ref=1jz5jk recent Reddit discussion: https://www.reddit.com/r/Python/comments/bagyxv/wiphone_a_phone_you_can_program_in_python/project build logs: https://hackaday.io/project/159811-esp32-wiphone Happy to answer questions here or on Reddit. -Ben From jallman112 at gmail.com Sat Apr 20 20:33:00 2019 From: jallman112 at gmail.com (Jeffrey Allman) Date: Sat, 20 Apr 2019 20:33:00 -0400 Subject: [CentralOH] PyOhio 2019 Message-ID: Just in case anyone missed the announcement, registration is open for PyOhio 2019! https://www.pyohio.org/2019/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Mon Apr 22 12:43:31 2019 From: eric at intellovations.com (Eric Floehr) Date: Mon, 22 Apr 2019 12:43:31 -0400 Subject: [CentralOH] April Monthly Meeting (Monday, April 29) Message-ID: This month, Travis Risner will be talking about tuples, os.walk, and scandir. Thanks much to Pillar for hosting us, and to Travis for talking! Please RSVP Here: https://www.meetup.com/Central-Ohio-Python-Users-Group/events/260828882 We also need speakers! Please help!! -------------- next part -------------- An HTML attachment was scrubbed... URL: