[P] Hip-Hop: Generating lyrics with RNNs
http://affinelayer.com/hiphop
/r/MachineLearning
https://redd.it/5l1bgb
http://affinelayer.com/hiphop
/r/MachineLearning
https://redd.it/5l1bgb
reddit
[P] Hip-Hop: Generating lyrics with RNNs • /r/MachineLearning
5 points and 0 comments so far on reddit
Comparing python clustering algorithms
http://nbviewer.ipython.org/github/lmcinnes/hdbscan/blob/master/notebooks/Comparing%20Clustering%20Algorithms.ipynb
/r/pystats
https://redd.it/3o3emg
http://nbviewer.ipython.org/github/lmcinnes/hdbscan/blob/master/notebooks/Comparing%20Clustering%20Algorithms.ipynb
/r/pystats
https://redd.it/3o3emg
Using Python 3.6 in Ubuntu 16.04 - Anaconda way
### Notice:
This requires starting a virtual environment whenever you wish to use Python 3.6. However this does solve the f string highlighting issue that comes with using pip.
### Installation Instructions:
Download [Full Anaconda](https://www.continuum.io/downloads#linux) (Python 3.5 version)
Install Anaconda
bash Anaconda3-4.2.0-Linux-x86_64.sh
conda update conda
Create a virtual environment with Python 3.6
conda create --name snowflakes python=3.6
source activate snowflakes
Install a python3.6 kernel in Jupyter
python3.6 -m pip install ipykernel
python3.6 -m ipykernel install --user
### Note:
How this is different from the pip installation instructions is that you will end up with version 4.2.3 of the notebook server using Anaconda and version 4.2.1 using pip. This update fixes the f string formatting issue.
### Using the Jupyter Notebook:
Unlike when installing with pip, if you use Anaconda, you will need to have an active virtual environment within a terminal to use Python 3.6.
I use `jupyter notebook --no-browser` so that I can choose the browser I run the notebook in, so I use the following commands in the terminal.
source activate snowflakes
jupyter notebook --no-browser
When I'm done ctrl-C twice to close the notebook and `source deactivate snowflake` exit the virtual environment.
/r/IPython
https://redd.it/5l0ai7
### Notice:
This requires starting a virtual environment whenever you wish to use Python 3.6. However this does solve the f string highlighting issue that comes with using pip.
### Installation Instructions:
Download [Full Anaconda](https://www.continuum.io/downloads#linux) (Python 3.5 version)
Install Anaconda
bash Anaconda3-4.2.0-Linux-x86_64.sh
conda update conda
Create a virtual environment with Python 3.6
conda create --name snowflakes python=3.6
source activate snowflakes
Install a python3.6 kernel in Jupyter
python3.6 -m pip install ipykernel
python3.6 -m ipykernel install --user
### Note:
How this is different from the pip installation instructions is that you will end up with version 4.2.3 of the notebook server using Anaconda and version 4.2.1 using pip. This update fixes the f string formatting issue.
### Using the Jupyter Notebook:
Unlike when installing with pip, if you use Anaconda, you will need to have an active virtual environment within a terminal to use Python 3.6.
I use `jupyter notebook --no-browser` so that I can choose the browser I run the notebook in, so I use the following commands in the terminal.
source activate snowflakes
jupyter notebook --no-browser
When I'm done ctrl-C twice to close the notebook and `source deactivate snowflake` exit the virtual environment.
/r/IPython
https://redd.it/5l0ai7
reddit
Using Python 3.6 in Ubuntu 16.04 - Anaconda way • /r/IPython
### Notice: This requires starting a virtual environment whenever you wish to use Python 3.6. However this does solve the f string highlighting...
A really nice Pandas cheat sheet, made by the Pandas guys themselves
https://github.com/pandas-dev/pandas/blob/master/doc/cheatsheet/Pandas_Cheat_Sheet.pdf
/r/Python
https://redd.it/5l0tsd
https://github.com/pandas-dev/pandas/blob/master/doc/cheatsheet/Pandas_Cheat_Sheet.pdf
/r/Python
https://redd.it/5l0tsd
GitHub
pandas/doc/cheatsheet/Pandas_Cheat_Sheet.pdf at main · pandas-dev/pandas
Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more - pandas-dev/pandas
Why is always a with statement needed for working with files?
I have a very basic query about python. I've seen most examples use the `with` statement to read from or write to a file, something like this:
with open('output.txt','w') as f:
f.write(html_doc)
Is it not a better idea to simply call `open('output.txt','w').write(html_doc)` considering simplicity is very much preferred in python? Is closing file handles absolutely necessary, because similar i/o functions in `php` don't require you to close the file handles.
/r/Python
https://redd.it/5l2ld9
I have a very basic query about python. I've seen most examples use the `with` statement to read from or write to a file, something like this:
with open('output.txt','w') as f:
f.write(html_doc)
Is it not a better idea to simply call `open('output.txt','w').write(html_doc)` considering simplicity is very much preferred in python? Is closing file handles absolutely necessary, because similar i/o functions in `php` don't require you to close the file handles.
/r/Python
https://redd.it/5l2ld9
reddit
Why is always a with statement needed for working with... • /r/Python
I have a very basic query about python. I've seen most examples use the `with` statement to read from or write to a file, something like...
Small lib for logging objects in human-readable form.
https://github.com/oleg-golovanov/unilog
/r/Python
https://redd.it/5l2huz
https://github.com/oleg-golovanov/unilog
/r/Python
https://redd.it/5l2huz
GitHub
oleg-golovanov/unilog
unilog - Representing complex object as unicode or simple string.
What special features or batteries does Django ship with that Flask doesn't has?
I've always used only flask for all the web apps I've built and surprisingly, I've never needed something like django. For database interaction, I always had `sqlalchemy`, for other stuff like the google api client library or something, I usually just `pip install` stuff that I need.
As a result, I've never felt the need to look much deeper into something like django. Nevertheless, since django is so much popular than flask and everyone seem to sing praises of it, I'm curious to know what all batteries are included in it that makes it more "fully featured" as a lot of developers say, when compared to flask.
/r/Python
https://redd.it/5l353d
I've always used only flask for all the web apps I've built and surprisingly, I've never needed something like django. For database interaction, I always had `sqlalchemy`, for other stuff like the google api client library or something, I usually just `pip install` stuff that I need.
As a result, I've never felt the need to look much deeper into something like django. Nevertheless, since django is so much popular than flask and everyone seem to sing praises of it, I'm curious to know what all batteries are included in it that makes it more "fully featured" as a lot of developers say, when compared to flask.
/r/Python
https://redd.it/5l353d
reddit
What special features or batteries does Django ship... • /r/Python
I've always used only flask for all the web apps I've built and surprisingly, I've never needed something like django. For database interaction, I...
Top 10 Django Projects Started in 2016 on Github — End of Year Review
https://medium.com/@raiderrobert/top-10-django-projects-started-2016-end-of-year-review-8e4efc88ac43#.dpm0969el
/r/django
https://redd.it/5kzkes
https://medium.com/@raiderrobert/top-10-django-projects-started-2016-end-of-year-review-8e4efc88ac43#.dpm0969el
/r/django
https://redd.it/5kzkes
Medium
Top 10 Django Projects Started in 2016 — End of Year Review
Earlier this year, I wrote an article that was sort of a mid-year review of popular Django projects from Github.
From iPython itself--a gallery of interesting notebooks
https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks
/r/JupyterNotebooks
https://redd.it/47mkn4
https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks
/r/JupyterNotebooks
https://redd.it/47mkn4
GitHub
A gallery of interesting IPython Notebooks
Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc. - ipython/ipython
Pandas Cheat Sheet
https://github.com/pandas-dev/pandas/blob/master/doc/cheatsheet/Pandas_Cheat_Sheet.pdf
/r/IPython
https://redd.it/5l3wfz
https://github.com/pandas-dev/pandas/blob/master/doc/cheatsheet/Pandas_Cheat_Sheet.pdf
/r/IPython
https://redd.it/5l3wfz
GitHub
pandas/doc/cheatsheet/Pandas_Cheat_Sheet.pdf at main · pandas-dev/pandas
Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more - pandas-dev/pandas
How to fake an authenticated user in Django with a middleware
https://consideratecode.com/2016/12/28/how-to-fake-an-authenticated-user-in-django/
/r/django
https://redd.it/5l300l
https://consideratecode.com/2016/12/28/how-to-fake-an-authenticated-user-in-django/
/r/django
https://redd.it/5l300l
Considerate Code
How to fake an authenticated user in Django
Let’s say you are developing a Django app that will be used as part of a bigger Django project. As you’ve learned in the Django tutorial, you want to make that app reusable, so you deve…
Python Project Template for 2.7-3.7 with all Github and Python services ready to use. (Travis, AppVeyor, Codecov, Readthedocs, CodeClimate, PyUp...)
https://github.com/SethMichaelLarson/python_project_template
/r/Python
https://redd.it/5l4kmv
https://github.com/SethMichaelLarson/python_project_template
/r/Python
https://redd.it/5l4kmv
GitHub
SethMichaelLarson/python_project_template
python_project_template - Template for all my Python projects on Github. Automatic integration with Python 2.7 - 3.7, Travis, AppVeyor, Codecov, CodeClimate, MentionBot, Sphinx, Readthedocs, Flake8...
Python function output into a django model
I am fairly new to django, and am having some trouble getting the output from a function into a model where it will be stored.
The idea is that the list of list function output is a name and a id string, and will be stored as values in the db with the default auto generated primary key.
[['t5.lg.ubuntu.template', '2c91808656b597ff0156ba98b79901f9'], ['DigitalOcean Ubuntu 14.04 Large FRA', '4028818650d4aca10150d4bf63470003'], ['DigitalOcean Ubuntu 14.04 Large NYC2', '4028818650d4aca10150d4bf63470004'], ['DigitalOcean Ubuntu 14.04 XLarge LON', '4028818650d4aca10150d4bf63470005']]
The functionality that i am looking for are fields in the database that I can periodically update by calling the function with any new values and updating the model.
This is my model that I currently have.
class dchqServerBlueprints(models.Model):
blueprintName = models.CharField(max_length=255)
blueprintId = models.CharField(max_length=255)
def __str__(self):
return (self.blueprintId, self.blueprintName)
After a lot of googling, I am pretty stuck on how to go about this. I've seen some references to serializing a list into JSON and storing that JSON in the database, but that seems a little excessive.
Any pointers on how to approach this problem would be greatly appreciated.
/r/django
https://redd.it/5l2a2v
I am fairly new to django, and am having some trouble getting the output from a function into a model where it will be stored.
The idea is that the list of list function output is a name and a id string, and will be stored as values in the db with the default auto generated primary key.
[['t5.lg.ubuntu.template', '2c91808656b597ff0156ba98b79901f9'], ['DigitalOcean Ubuntu 14.04 Large FRA', '4028818650d4aca10150d4bf63470003'], ['DigitalOcean Ubuntu 14.04 Large NYC2', '4028818650d4aca10150d4bf63470004'], ['DigitalOcean Ubuntu 14.04 XLarge LON', '4028818650d4aca10150d4bf63470005']]
The functionality that i am looking for are fields in the database that I can periodically update by calling the function with any new values and updating the model.
This is my model that I currently have.
class dchqServerBlueprints(models.Model):
blueprintName = models.CharField(max_length=255)
blueprintId = models.CharField(max_length=255)
def __str__(self):
return (self.blueprintId, self.blueprintName)
After a lot of googling, I am pretty stuck on how to go about this. I've seen some references to serializing a list into JSON and storing that JSON in the database, but that seems a little excessive.
Any pointers on how to approach this problem would be greatly appreciated.
/r/django
https://redd.it/5l2a2v
reddit
Python function output into a django model • /r/django
I am fairly new to django, and am having some trouble getting the output from a function into a model where it will be stored. The idea is that...
Is there a Markdown alternative to sphinx-apidoc for autogenerating documentation from source?
While I appreciate the functionality of sphinx, I really think that Markdown is a better plaintext format than Restructured Text, so I've been writing documentation using [mkdocs](http://www.mkdocs.org/), which works really well for guides etc.
However, when it comes to generating API documentation from docstrings, there don't seem to be many options that support Markdown or straight-to-HTML. One option is [pdoc](http://pdoc.burntsushi.net/pdoc), which works very well but doesn't support structured docstrings in any of Sphinx, Google, or Numpy style.
Does anyone know of a better option for such a purpose?
/r/Python
https://redd.it/5l6r7v
While I appreciate the functionality of sphinx, I really think that Markdown is a better plaintext format than Restructured Text, so I've been writing documentation using [mkdocs](http://www.mkdocs.org/), which works really well for guides etc.
However, when it comes to generating API documentation from docstrings, there don't seem to be many options that support Markdown or straight-to-HTML. One option is [pdoc](http://pdoc.burntsushi.net/pdoc), which works very well but doesn't support structured docstrings in any of Sphinx, Google, or Numpy style.
Does anyone know of a better option for such a purpose?
/r/Python
https://redd.it/5l6r7v
www.mkdocs.org
Project documentation with Markdown.
Did Python Earn You Any Passive Income in 2016?
Inspired by this post from [HackerNews](https://news.ycombinator.com/item?id=13150144).
Did you automate, create, or somehow leverage python for any side hustle this year?
/r/Python
https://redd.it/5l7wgc
Inspired by this post from [HackerNews](https://news.ycombinator.com/item?id=13150144).
Did you automate, create, or somehow leverage python for any side hustle this year?
/r/Python
https://redd.it/5l7wgc
How to improve UI of manytomany field?
I searched this on Google thinking that it is going to be a common question but to my surprise not a whole lot of info there. Django Admin UI is very good but can we replicate that in our templates? I am open to other ideas also. Thank You in advance.
/r/django
https://redd.it/5l2zfb
I searched this on Google thinking that it is going to be a common question but to my surprise not a whole lot of info there. Django Admin UI is very good but can we replicate that in our templates? I am open to other ideas also. Thank You in advance.
/r/django
https://redd.it/5l2zfb
reddit
How to improve UI of manytomany field? • /r/django
I searched this on Google thinking that it is going to be a common question but to my surprise not a whole lot of info there. Django Admin UI is...
Chartjs Engine - creating chart.js charts in django
https://github.com/deltaskelta/django-chartjs-engine
/r/django
https://redd.it/5l11of
https://github.com/deltaskelta/django-chartjs-engine
/r/django
https://redd.it/5l11of
Github
GitHub - deltaskelta/django-chartjs-engine: An engine for creating chartjs javascript charts in django
django-chartjs-engine - An engine for creating chartjs javascript charts in django
KivEnt 2.2 Released (Python-Kivy 2d Game Engine)
http://chaosbuffalogames.com/blog/kivent-22-released.html
/r/Python
https://redd.it/5l6zbs
http://chaosbuffalogames.com/blog/kivent-22-released.html
/r/Python
https://redd.it/5l6zbs
reddit
KivEnt 2.2 Released (Python-Kivy 2d Game Engine) • /r/Python
23 points and 0 comments so far on reddit
Did you know you can use Jupyter in VSCode?
https://github.com/DonJayamanne/pythonVSCode/wiki/Jupyter-Examples
/r/Python
https://redd.it/5l4rl4
https://github.com/DonJayamanne/pythonVSCode/wiki/Jupyter-Examples
/r/Python
https://redd.it/5l4rl4
GitHub
DonJayamanne/pythonVSCode
pythonVSCode - This extension is now maintained in the Microsoft fork.
Mark Zuckerberg recommending Python
I was reading through this article on "Building Jarvis" by Mark Zuckerberg. Though the title pic is full of non Python code ( I think it is Perl or is it PHP?) that was a let down, this is a overall fantastic work, which he says he has coded in Python, ObjC & PHP.
https://www.facebook.com/notes/mark-zuckerberg/building-jarvis/10154361492931634
In the comments section though I saw this which is very important.
Mark Brady: This is fantastic! In one of your comments, you said, "No regrets. Let's just make sure we teach our children to code!". My son is very interested in coding and asked me for a book for beginners. In order to "future proof" his capabilities (if there are any..?), what language(s) should he focus? What's good for getting his confidence?
Like · Reply · 145 · December 19 at 11:41pm
Mark Zuckerberg: I think Python is a safe bet.
Unlike · Reply · 1,038 · December 20 at 12:18pm
/r/Python
https://redd.it/5l9om5
I was reading through this article on "Building Jarvis" by Mark Zuckerberg. Though the title pic is full of non Python code ( I think it is Perl or is it PHP?) that was a let down, this is a overall fantastic work, which he says he has coded in Python, ObjC & PHP.
https://www.facebook.com/notes/mark-zuckerberg/building-jarvis/10154361492931634
In the comments section though I saw this which is very important.
Mark Brady: This is fantastic! In one of your comments, you said, "No regrets. Let's just make sure we teach our children to code!". My son is very interested in coding and asked me for a book for beginners. In order to "future proof" his capabilities (if there are any..?), what language(s) should he focus? What's good for getting his confidence?
Like · Reply · 145 · December 19 at 11:41pm
Mark Zuckerberg: I think Python is a safe bet.
Unlike · Reply · 1,038 · December 20 at 12:18pm
/r/Python
https://redd.it/5l9om5
reddit
Mark Zuckerberg recommending Python • /r/Python
I was reading through this article on "Building Jarvis" by Mark Zuckerberg. Though the title pic is full of non Python code ( I think it is Perl...