Skip to content

Instantly share code, notes, and snippets.

View nipunsadvilkar's full-sized avatar
:octocat:
Focusing

Nipun Sadvilkar nipunsadvilkar

:octocat:
Focusing
View GitHub Profile
@nipunsadvilkar
nipunsadvilkar / index_creation_mysql.md
Created August 17, 2017 12:07
create index for mysql tables
ALTER TABLE `analytics` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY

SELECT count(distinct encounter_id) FROM `analytics`

CREATE INDEX registration_no ON analytics(registration_no(30));

CREATE INDEX subsection ON analytics(subsection(50));
curl -vX POST http://server/api/v1/places.json -d @testplace.json \
--header "Content-Type: application/json"

curl -vX REQUEST url -d @filepath -H "Content-Type:application/json"

Installation of Jupyterhub on remote server

  1. Linux Anaconda Installation (Anaconda conveniently installs Python, the Jupyter Notebook, and other commonly used packages for scientific computing and data science. )

@nipunsadvilkar
nipunsadvilkar / useful_pandas_snippets.py
Last active August 9, 2018 10:40 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
#unique number of values in a DataFrame column
df[column_name].nunique()
# 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)
(http://stackoverflow.com/questions/17071871/select-rows-from-a-dataframe-based-on-values-in-a-column-in-pandas)
# __author__: kapoorabhish, nipunsadvilkar
import requests
user_name = "uname"
password = "*******"
file_url = "url"
r = requests.post(file_url, data={"umlsuser": user_name, "umlspw": password},
stream=True)

create a new repository on the command line

echo "# sample_git_tweak" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:nipunsadvilkar/sample_git_tweak.git
git push -u origin master
@nipunsadvilkar
nipunsadvilkar / Superset.md
Last active March 28, 2017 11:58
Superset analysis

Superset (previously known as Caravel):

1) Responsiveness of Dashboard:

On Desktop:

alt-img


@nipunsadvilkar
nipunsadvilkar / Different_style_guide_python.md
Last active June 23, 2025 13:54
What is the standard Python docstring format?

Formats

Python docstrings can be written following several formats as the other posts showed. However the default Sphinx docstring format was not mentioned and is based on reStructuredText (reST). You can get some information about the main formats in that tuto.

Note that the reST is recommended by the PEP 287

There follows the main used formats for docstrings.

- Epytext

@nipunsadvilkar
nipunsadvilkar / Different_style_guide_python.md
Created March 23, 2017 07:10
What is the standard Python docstring format?

Formats

Python docstrings can be written following several formats as the other posts showed. However the default Sphinx docstring format was not mentioned and is based on reStructuredText (reST). You can get some information about the main formats in that tuto.

Note that the reST is recommended by the PEP 287

There follows the main used formats for docstrings.

- Epytext