Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to get array fit/transform to be correct?
Post: How to get array fit/transform to be correct?

I am trying to fit/transform a (1,2) ndarray, but I keep getting zeros instead of transformed values. sc = StandardScaler() test_data = np.array([[48], [290000]]).reshape(1,2) # also tried this... #...
Oliver Data Science 0 1,568 Jul-01-2021, 04:22 PM
    Thread: Where is the memory leak in this Flask Code?
Post: RE: Where is the memory leak in this Flask Code?

Matplotlib has a documented memory leak when used with web services like Flask. The workaround I saw suggested was to use a "figure", not a "plt", but when I tried to do that, it did not fix the memo...
Oliver General Coding Help 1 5,608 Jun-18-2021, 02:48 PM
    Thread: How to add a number to each column separtely in numpy array?
Post: How to add a number to each column separtely in nu...

I have a numpy array created like below for a graph. It graphs a unit box. np.array([[x, y] for x in np.arange(0, 1.01, .01) for y in np.arange(0, 1.01, .01)])I want to transfor...
Oliver General Coding Help 0 1,502 Jul-02-2020, 02:55 PM
    Thread: How to resolve scipy differences?
Post: RE: How to resolve scipy differences?

Thanks. I also found the right library to use instead. :) Appreciate your reply.
Oliver Data Science 2 3,940 Oct-08-2019, 08:40 PM
    Thread: How to resolve scipy differences?
Post: How to resolve scipy differences?

In Pycharm, I am importing "import scipy.misc" and the code that calls scipy.misc.comb(...) works fine. The scipy version in Pycharm is 0.19.1. Now, if I run that same code on the command line with s...
Oliver Data Science 2 3,940 Oct-01-2019, 12:54 PM
    Thread: Parsing an MBOX file
Post: Parsing an MBOX file

I have a client who wants to be able to parse and extract the message portions from an mbox (email) file. The mbox I have as an example has huge sections of what appears to be encrypted text. The code...
Oliver General Coding Help 1 8,203 Mar-14-2019, 07:49 PM
    Thread: Why is basic Twitter Connectivity So Difficult? Not sure what I'm doing wrong.
Post: Why is basic Twitter Connectivity So Difficult? No...

Hi all, I created a twitter app. I have created the consumer key, consumer secret key, the token and token secret keys. The app is set up for max permissions. The app has no callback URL set since ...
Oliver General Coding Help 0 1,895 Mar-10-2018, 12:38 PM
    Thread: Am I going about this wrong?
Post: Am I going about this wrong?

I have a Flask Web Service. In one of the POST methods, I read and build a SVC classifier. It works! Hurray. ---- What I was thinking was that in another POST method (TBD) I would just do predictio...
Oliver Web Scraping & Web Development 0 2,088 Feb-27-2018, 04:31 PM
    Thread: Read CSV data into Pandas DataSet From Variable?
Post: RE: Read CSV data into Pandas DataSet From Variabl...

OK, I appreciate your help with this. It really seems that instead of POSTing the data, the database should probably just export the CSV to a temporary disk path so the read_csv works easily. Thanks...
Oliver Data Science 7 13,989 Feb-27-2018, 02:18 PM
    Thread: Read CSV data into Pandas DataSet From Variable?
Post: RE: Read CSV data into Pandas DataSet From Variabl...

There must be a simple way to read csv "data" without writing an entire method like that. I'm a bit baffled why there isn't just a "pd.read(...type='csv',....)" method that will take "CSV", for exampl...
Oliver Data Science 7 13,989 Feb-26-2018, 12:48 PM
    Thread: Read CSV data into Pandas DataSet From Variable?
Post: RE: Read CSV data into Pandas DataSet From Variabl...

(Feb-26-2018, 12:27 AM)snippsat Wrote: After version pandas 0.19.2 --> it can read directly from url. You can mess with io.StringIO before,but you should really upgrade. If use Anaconda: conda up...
Oliver Data Science 7 13,989 Feb-26-2018, 11:53 AM
    Thread: Read CSV data into Pandas DataSet From Variable?
Post: Read CSV data into Pandas DataSet From Variable?

url = "http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data" the_names = ['sepal-length', 'sepal-width', 'petal-length', 'petal-width', 'class'] dataset = pandas.read_csv(url, na...
Oliver Data Science 7 13,989 Feb-25-2018, 02:00 PM
    Thread: Recursive Call Going Elsewhere?
Post: RE: Recursive Call Going Elsewhere?

(Feb-02-2018, 09:58 AM)DeaD_EyE Wrote: Quote:Did you have this code mostly figured out or I'm assuming you've worked with nested zip files before? No, but I think i needed one time the content from...
Oliver General Coding Help 6 4,581 Feb-02-2018, 10:58 AM
    Thread: Recursive Call Going Elsewhere?
Post: RE: Recursive Call Going Elsewhere?

(Jan-31-2018, 02:59 PM)DeaD_EyE Wrote: This snippet works: def list_zip(file, filename=None): zf = zipfile.ZipFile(file, 'r') for cf in zf.filelist: print(zf.filename or filename, c...
Oliver General Coding Help 6 4,581 Jan-31-2018, 09:42 PM
    Thread: Recursive Call Going Elsewhere?
Post: RE: Recursive Call Going Elsewhere?

Update: The problem appears to be that python can't readily process nested zip files. I found code online that will do 2 levels, but I'm having issues making that same code recursive for nested zip fi...
Oliver General Coding Help 6 4,581 Jan-31-2018, 01:33 PM
    Thread: Recursive Call Going Elsewhere?
Post: Recursive Call Going Elsewhere?

I have some python code outside of a function that walks a directory tree. When the code detects a zip file (which could be nested), it calls a method called "ProcessZipFile(filePath)". Inside that r...
Oliver General Coding Help 6 4,581 Jan-30-2018, 09:51 PM
    Thread: Using PyInstaller in PyCharm
Post: RE: Using PyInstaller in PyCharm

Command line seems like the way to go. Just making sure. So, I have python3 installed, and I installed Pyinstaller within the IDE for Python3, but how would I run pyinstaller under python3 at the com...
Oliver General Coding Help 6 29,166 Jan-08-2018, 10:57 AM
    Thread: Create Python "Executable" from PyCharm?
Post: RE: Create Python "Executable" from PyCharm?

Thanks
Oliver Data Science 8 61,492 Jan-08-2018, 10:52 AM
    Thread: Using PyInstaller in PyCharm
Post: Using PyInstaller in PyCharm

This question might have gotten lost in the other thread so here it is again. I was able to get PyInstaller to work from the command line (thanks for the replies!), but that's only for Python 2.7. S...
Oliver General Coding Help 6 29,166 Jan-07-2018, 11:44 AM
    Thread: Create Python "Executable" from PyCharm?
Post: RE: Create Python "Executable" from PyCharm?

I got pyinstaller to work from the command line, but that's python 2.7. Trying to get it to work in PyCharm wasn't as easy. Still stuck there. In PyCharm, I installed PyInstaller and PyInstaller "ho...
Oliver Data Science 8 61,492 Jan-06-2018, 12:34 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020