The use of __main__.py
to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py
:
print("Hello")
border: no | |
height: 960 | |
license: gpl-3.0 |
export HISTSIZE="" | |
HIST_FILE=~/.bash_history | |
BACK_FILE=~/.bash_history_backup | |
if [ ! -f $BACK_FILE ];then touch -d "2 hours ago" $BACK_FILE;fi | |
if test $(find $BACK_FILE -mmin +60); then | |
HIST_SIZE=$(cat $HIST_FILE|wc -l) | |
BACK_SIZE=$(cat $BACK_FILE|wc -l) | |
GROWTH=$(($HIST_SIZE - $BACK_SIZE)) |
The use of __main__.py
to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py
:
print("Hello")
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone [email protected]:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync [email protected]:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
"""making a dataframe""" | |
df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB')) | |
"""quick way to create an interesting data frame to try things out""" | |
df = pd.DataFrame(np.random.randn(5, 4), columns=['a', 'b', 'c', 'd']) | |
"""convert a dictionary into a DataFrame""" | |
"""make the keys into columns""" | |
df = pd.DataFrame(dic, index=[0]) |
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
from matplotlib import pyplot | |
import numpy as np | |
class ClickPlot: | |
""" | |
A clickable matplotlib figure |