Pluralsight do not permit users to download their videos.
If you are an user of pluralsight you have agreed with their ToS,
and are thusly refrained from doing so.
Use this knowledge at your own risk.
# List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
# Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
# Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(valuelist)] |
# A python script which anonymizes email addresses in all files in current directory and sub-directories. | |
# e.g. A file with the following contents: | |
# siddhartha@gmail.com | |
# Sid Phn#- 6385833322 | |
# gupta49@illinois.edu | |
# weee@as.cd | |
# sid@yahoo.co.in | |
# Would change to: |
setTimeout(function() { | |
function getAllModules() { | |
return new Promise((resolve) => { | |
const id = _.uniqueId("fakeModule_"); | |
window["webpackJsonp"]( | |
[], | |
{ | |
[id]: function(module, exports, __webpack_require__) { | |
resolve(__webpack_require__.c); | |
} |
function isChatMessage(message) { | |
if (message.__x_isSentByMe) { | |
return false; | |
} | |
if (message.__x_isNotification) { | |
return false; | |
} | |
if (!message.__x_isUserCreatedType) { | |
return false; | |
} |
# | |
# Example of automatical rotating proxy middleware for scrapy-rotating-proxies using proxybroker | |
# | |
import codecs | |
import logging | |
from subprocess import call | |
from rotating_proxies.expire import Proxies | |
from rotating_proxies.middlewares import RotatingProxyMiddleware |
""" | |
GET_SAS_AS_DASK.PY | |
2019-05-02 | |
kingfischer16 | |
Functionality to read SAS data from a SAS server (or locally) and return | |
dask.dataframe. | |
General idea: Using SASPY, build a list of pandas.DataFrames that are blocks | |
called via a SAS session. These blocks then make up the dask.DataFrame. Helper |
d3js: Create an HTML table using d3.js
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
Step-by-step (uncomplete) tutorial for setting up a base Python library given the following requirements:
- Use conda (instead of pipenv or others) because this is both a package manager and an environment manager, and installing the Python scientific stack (Numpy, Pandas, Scipy, Matplotlib, etc.) is straightforward
- Use Visual Studio Code (instead of PyCharm, Spyder or others) because it's free, runs on Windows and is one of the mostly used IDE
- Document and automate as many production steps as possible including linting (flake8), formatting (black), packaging (setup.py, setup.cfg), versionning (git), testing (pytest, pytest-cov, tox), documenting (sphinx, readthedocs), building (setuptools) and distributing (twine, keyring)
- Include IPython Notebooks and have them tested (pytest-nbval)