Skip to content

Instantly share code, notes, and snippets.

View srikanthbojja's full-sized avatar

Srikanth Bojja srikanthbojja

  • Kavli Institute for Systems Neuroscience / Centre for Neural Computation
  • Trondheim
View GitHub Profile

Keybase proof

I hereby claim:

  • I am srikanthbojja on github.
  • I am srikanthbojja (https://keybase.io/srikanthbojja) on keybase.
  • I have a public key whose fingerprint is 7021 3278 DCFA C555 6990 C7D4 6CC8 4B68 55F1 332E

To claim this, I am signing this object:

# 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)]
@srikanthbojja
srikanthbojja / windowsInstallationOASIS.md
Last active May 6, 2022 01:30
OASIS installation on Windows
@srikanthbojja
srikanthbojja / anonymize-emails.py
Created February 6, 2018 13:13 — forked from Siddhartha90/anonymize-emails.py
A python script which anonymizes email addresses in all files in current directory and sub-directories.
# 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;
}
@srikanthbojja
srikanthbojja / youtube-dl-download-pluralsight-videos.md
Created December 28, 2020 00:31 — forked from ivanskodje/youtube-dl-download-pluralsight-videos.md
youtube-dl for downloading pluralsight videos

Downloading Videos from Pluralsight

Disclaimer

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.

youtube-dl for Windows

#
# 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
@srikanthbojja
srikanthbojja / get_sas_as_dask.py
Created September 12, 2022 23:16 — forked from kingfischer16/get_sas_as_dask.py
Functionality to read SAS data from a SAS server (or locally) and return dask.dataframe.
"""
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
@srikanthbojja
srikanthbojja / README.md
Created September 22, 2022 12:55 — forked from jfreels/README.md
d3js: Create an HTML table using d3.js

d3js: Create an HTML table using d3.js