Re: ah, progress...

2018-12-20 Thread dieter
ant writes: > ... > in order to get this far below i had to edit each > file and put a try: except: around each import > statment checking if the module could be found > like (as an example): > > try: > import config as cfg > except: > import frog.config as cfg Is "frog" the package, yo

Re: ah, progress...

2018-12-20 Thread ant
dieter wrote: > ant writes: >> ant wrote: >> ... >>> (env) me@ant(26)~/src/test$ ngfp >>> Traceback (most recent call last): >>> File "/home/me/src/env/bin/ngfp", line 7, in >>> from ngfp import main >>> ImportError: cannot import name 'main' from 'ngfp' >>> (/home/me/src/salsa/env/lib/pyt

Re: building 3.7.1 from source, _ctypes and libffi troubles

2018-12-20 Thread Fetchinson . via Python-list
On 12/20/18, Fetchinson . wrote: > Hi all, I'm trying to build 3.7.1 from source and having trouble with > libffi and _ctypes. I'm on linux and have installed libffi also from > source to a custom location: > > $HOME/opt/lib64/libffi.so.6.0.4 > $HOME/opt/lib64/libffi.a > $HOME/opt/lib64/libffi.la

building 3.7.1 from source, _ctypes and libffi troubles

2018-12-20 Thread Fetchinson . via Python-list
Hi all, I'm trying to build 3.7.1 from source and having trouble with libffi and _ctypes. I'm on linux and have installed libffi also from source to a custom location: $HOME/opt/lib64/libffi.so.6.0.4 $HOME/opt/lib64/libffi.a $HOME/opt/lib64/libffi.la $HOME/opt/lib64/libffi.so.6 $HOME/opt/lib64/lib

Re: Decoding a huge JSON file incrementally

2018-12-20 Thread Terry Reedy
On 12/20/2018 10:42 AM, Paul Moore wrote: I'm looking for a way to incrementally decode a JSON file. I know this has come up before, and in general the problem is not soluble (because in theory the JSON file could be a single object). AFAIK, a JSON file always represents a single JSON item and

Re: How to generate image with a string?

2018-12-20 Thread MRAB
On 2018-12-20 16:37, sntshkm...@gmail.com wrote: More or less I'm trying to replicate placeholder.com in Python. I'll be using Django in the backend. Given all the parameters, I'm not sure how will I be generating the images. * I will be passing width and height of the image and maybe the te

Re: How to generate image with a string?

2018-12-20 Thread Chris Angelico
On Fri, Dec 21, 2018 at 4:50 AM wrote: > > More or less I'm trying to replicate placeholder.com in Python. I'll be using > Django in the backend. Given all the parameters, I'm not sure how will I be > generating the images. > > * I will be passing width and height of the image and maybe the tex

Re: Decoding a huge JSON file incrementally

2018-12-20 Thread Chris Angelico
On Fri, Dec 21, 2018 at 4:30 AM Paul Moore wrote: > On Thu, 20 Dec 2018 at 17:22, Chris Angelico wrote: > > Proper error handling is left as an exercise for the reader, both in > > terms of JSON errors and file errors. Also, the code is completely > > untested. Have fun :) > > Yeah, once you have

How to generate image with a string?

2018-12-20 Thread sntshkmr60
More or less I'm trying to replicate placeholder.com in Python. I'll be using Django in the backend. Given all the parameters, I'm not sure how will I be generating the images. * I will be passing width and height of the image and maybe the text and background color. * I also want to center

Re: Decoding a huge JSON file incrementally

2018-12-20 Thread Paul Moore
(Sorry, hit "Send" too soon on the last try!) On Thu, 20 Dec 2018 at 17:22, Chris Angelico wrote: > > On Fri, Dec 21, 2018 at 2:44 AM Paul Moore wrote: > > > > I'm looking for a way to incrementally decode a JSON file. I know this > > has come up before, and in general the problem is not soluble

Re: Decoding a huge JSON file incrementally

2018-12-20 Thread Paul Moore
On Thu, 20 Dec 2018 at 17:22, Chris Angelico wrote: > > On Fri, Dec 21, 2018 at 2:44 AM Paul Moore wrote: > > > > I'm looking for a way to incrementally decode a JSON file. I know this > > has come up before, and in general the problem is not soluble (because > > in theory the JSON file could be

Re: Decoding a huge JSON file incrementally

2018-12-20 Thread Chris Angelico
On Fri, Dec 21, 2018 at 2:44 AM Paul Moore wrote: > > I'm looking for a way to incrementally decode a JSON file. I know this > has come up before, and in general the problem is not soluble (because > in theory the JSON file could be a single object). In my particular > situation, though, I have a

Decoding a huge JSON file incrementally

2018-12-20 Thread Paul Moore
I'm looking for a way to incrementally decode a JSON file. I know this has come up before, and in general the problem is not soluble (because in theory the JSON file could be a single object). In my particular situation, though, I have a 9GB file containing a top-level array object, with many eleme

Better way to recontruct a continuous and repeated array with low time complexity?

2018-12-20 Thread lampahome
I write program to do experiment about time series(weekly) with machine learning. I record changes of everyday of each ID and Count. I read the csv as dataset like below: ID, Count 1,30 // First Day 2,33 3,45 4,11 5,66 7,88 1,32 // 2nd Day 2,35 3,55 4,21 5,36 7,48 I have two array X, y. I want to