Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Can Jupyter (or similar) replace Excel?

I hope this question fit's here. If it's a dumb question, tell me and I'll delete it.

1. I don't want to encourage a war.
2. **I admit, that I don't know Jupyter or Excel well!**

Both programs can be used to analyze data.

*As far as I know* Jupyter, it's a bit like Python in the interactive mode, with some extra amenities and easy plotting of graphs. It's mostly used by scientists.

*As far as I know* in Excel, you have files that consist of big tables and in each cell there can either be data, computations, or some explanations like column names. You can probably also connect to dedicated data files/databases and dedicated files with code. You can also use it to make graphs. It's used in "business".

As I said: That is probably not entirely true - that's why I'm asking.

I'm a student of computer science and we learn that you should separate data, metadata, and computation and that having "locations" for data is "bad". In the sense that "goto [line]" commands are bad and pointers are bad if you want maintainability and productivity (of course pointers have their place). To me it seems like Excel makes these errors. (I know that you can give cells names.)

Jupyter can't be used to store and edit structured data (well), I think.

Is anyone of you familiar with both technologies?
What are some good use cases for Excel?
If Jupyter isn't it, do you know other potential replacements for Excel?

…Excel is reactive/"live", which is nice – you don't have to press "run".

/r/IPython
https://redd.it/69nmpa
quickest way to browse web-scraped data?

Hello there.
So, I'm looking for a house, so I wrote a crawler that scrape data from several local real estate agencies and do some filtering (number of rooms, price, etc). All data is currently saved in a sqlite database.

Now, the problem is: what is the quickest way to present the data? I was thinking about making a small Flask-based website to browse the data, deleted records, etc. but that seems a lot of work for an application which will have just two users (me and my GF).

Is there any framework which can help me?

Thanks!

/r/Python
https://redd.it/69mixz
A forensic toolkit in Python

https://github.com/MonroCoury/Forensic-Tools

A project I been working on, a bunch of Python scripts that facilitate digital forensic analysis.


Features:

-Document metadata extraction.

-Image EXIF metadata extraction.

-Firefox database parsing, including extracting cookies, history, form history, Google searches, and downloads. Can limit results to a certain time range.

-Skype database parsing, including Account details, contacts with full details, call log, and messages. Ability to look for messages/calls within a given time range and/or from/to a specific partner.

-Results are saved to html tables with row background highlighting for easier reading.

-I'm trying to make it as simple and easy to use as possible. Firefox scanner attempts to find the default databases across different platforms on its own should the user forget to point it.


Still a work in progress. Planned features:

-Chrome browsing data extraction

-Internet Explorer browsing data extraction

-Network traffic analysis

-Windows registry parsing

-PDF, zip, and rar password cracking

Feedback is most welcome!

/r/Python
https://redd.it/69nc8c
[D] Oxford deep nlp 2017 solutions

My solutions here: https://github.com/mleue/oxford-deep-nlp-2017-solutions

I've recently been going through the lectures of oxford's 2017 deep nlp course (https://github.com/oxford-cs-deepnlp-2017). The course was well presented and I've really deepened my understanding of modern NLP methods.

Naturally I am going through the practicals as well. I've linked to the repo with my current progress but I feel a bit stuck atm.

The main task revolves around a multi-class classification of ~2k transcripts of TED talks. However, the dataset is heavily skewed with one class covering ~50% and some classes only around 3-5% of the data.

Practical 2 wants you to try a basic averaging over word-vectors approach and then pumping that through a single-hidden-layer NN. I've been trying to tweak a lot with preprocessing and tokenization but I can't come beyond ~66% accuracy on the test set.

In Practical 3 you are then supposed to try the same task with a RNN approach. I thought this might get better but I am basically stuck at around the same test set accuracy of ~66%.

Maybe not much more is possible, especially given the fact that there is very little data for some of the classes. Basically I am wondering if anyone else has gone through the course (or even attended the real deal at oxford) so we can get a discussion going.

Thanks in advance! //Michael

/r/MachineLearning
https://redd.it/69pzdg
[AF] FLASK_DEBUG=1 won't start my flask application?

Hello, so I just found out on Windows that I can't run my flask app when I set the debug to true.

I may have done something wrong with config files? Or is it the fault of cmder where I try to tun this app? Or ... I don't have a clue. Pretty new to this.

Log:

D:\Programovani\github\beta-issues (master)
λ set FLASK_APP=flaskr

D:\Programovani\github\beta-issues (master)
λ set FLASK_DEBUG=1

D:\Programovani\github\beta-issues (master)
λ flask run
* Serving Flask app "flaskr"
* Forcing debug mode on
* Restarting with stat
File "C:\Python36\Scripts\flask.exe", line 1
SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Python36\Scripts\flask.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

D:\Programovani\github\beta-issues (master)
λ set FLASK_DEBUG=0

D:\Programovani\github\beta-issues (master)
λ flask run
* Serving Flask app "flaskr"
* Forcing debug mode off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Without debug the app starts normally.

Edit: The app is modified *Official Flask Tutorial* Flaskr app. [GitHub repo](http://www.github.com/SonGokussj4/beta-issues)

/r/flask
https://redd.it/69kjlg
What CMS would you recommend for a basic brochure website?

Hi all,

I have been designing a "brochure" travel agency website with lots of content pages. I am at the stage where I need to start thinking about the backend. This will pretty much be my first web project / deployment.

The people who will be maintaining the site aren't very technical so I was looking for a nice and simple CMS (I think the standard Django admin won't cut it) so I was looking at a few different options like Django-CMS, Mezzanine, etc... Although some of these seem a bit overkill?

The features we are looking for are pretty much just keeping content updated on pages, adding/removing pages and maintaining a blog.

Reddit, what would you recommend? Thanks!

/r/django
https://redd.it/69r4hp
How do you push updates to your Django website? Please help, prepare for the impending cringe.

I have a Django website on DigitalOcean. I used the one-click app for Django, and through many frustrations I ended up just overwriting the default app with my own app's code (I sshed in, pulled my git repo into a separate folder, and merged the folders with the existing one-click app default code).

When it comes to updates to my website code, I am currently forced to either A: ssh in and manually edit files with Vim or B: ssh in, pull my repo into a separate folder, and manually mv the new files into the correct Django project folders.

I understand if you're cringing really bad right now. Do you have tips on how I can improve my workflow?

* Should I put the entire project inside a Docker image?
* I have experience running databases inside Docker, but not entire projects. Would my PostgreSQL database go into a *separate* Docker image??

* Is there any way for me to set my repo up so that I can simply push to the `master` branch and that code gets written to my production server?

* It doesn't bother me to dish out more $$ for convenience in regards to hosting. This being said, do you have any suggestions as to which host I should be using?

/r/django
https://redd.it/69vomt
I need some help embedding a graph

I need some help getting a graph displaying on my site. For reference, I'm using matplotlib and mpld3 to do this. The graph itself seems to be working, but when i convert it to a JSON string to embed it in the HTML, I get a blank page. Then, the second time I try to load the page, there will be a runtime error: "main thread is not in main loop." I've been stuck on this for days lol, any help is appreciated.

/r/django
https://redd.it/69u34y
How can I do this?

I am trying to overlay a heat map (or conditional formatting, as Excel calls it) over a dataframe displayed within the notebook in Jupyter. Is there a way to do this?

/r/IPython
https://redd.it/69wddo