A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
# Twitter Topic Modeling Using R | |
# Author: Bryan Goodrich | |
# Date Created: February 13, 2015 | |
# Last Modified: April 3, 2015 | |
# | |
# Use twitteR API to query Twitter, parse the search result, and | |
# perform a series of topic models for identifying potentially | |
# useful topics from your query content. This has applications for | |
# social media, research, or general curiosity | |
# |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img
) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config
to:
def from_sklearn(docs,vect,lda,**kwargs): | |
"""Create Prepared Data from sklearn's vectorizer and Latent Dirichlet | |
Application | |
Parameters | |
---------- | |
docs : Pandas Series. | |
Documents to be passed as an input. | |
vect : Scikit-Learn Vectorizer (CountVectorizer,TfIdfVectorizer). |
The default format of keys was changed in OpenSSL 1.0. From OpenSSL 1.0 change log:
Make PKCS#8 the default write format for private keys, replacing the traditional format. This form is standardised, more secure and doesn't include an implicit MD5 dependency. [Steve Henson]
Good explanations of the difference between the two formats: https://tls.mbed.org/kb/cryptography/asn1-key-structures-in-der-and-pem
Converting RSA private key:
#!/usr/bin/env bash | |
# the text to be printed | |
text="You shall be as gods " | |
text_length=${#text} | |
# ANSI Colors | |
RED='\e[31m' BLA_BG='\e[40m' CLE='\e[0m' |