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
@srikanthbojja
srikanthbojja / project_config.md
Created May 29, 2023 13:12 — forked from maximlt/project_config.md
Creating a project base

Steps to create a good project base for developing in a conda environment

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)

Table of content

@srikanthbojja
srikanthbojja / GitHub-Forking.md
Created May 29, 2023 13:10 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

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.

Creating a Fork

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

@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

@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
#
# 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 / 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

function isChatMessage(message) {
if (message.__x_isSentByMe) {
return false;
}
if (message.__x_isNotification) {
return false;
}
if (!message.__x_isUserCreatedType) {
return false;
}
setTimeout(function() {
function getAllModules() {
return new Promise((resolve) => {
const id = _.uniqueId("fakeModule_");
window["webpackJsonp"](
[],
{
[id]: function(module, exports, __webpack_require__) {
resolve(__webpack_require__.c);
}
@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:
@srikanthbojja
srikanthbojja / windowsInstallationOASIS.md
Last active May 6, 2022 01:30
OASIS installation on Windows