Skip to content

Instantly share code, notes, and snippets.

View yabebalFantaye's full-sized avatar

yabebal yabebalFantaye

View GitHub Profile
#!/bin/bash
#SBATCH
if [[ "$SLURM_PROCID" = "0" ]]; then
ssh -R 0.0.0.0:9999:localhost:8888 -f -N login-0-1
jupyter notebook
elif [[ "$SLURM_PROCID" = "1" ]]; then
ipcontroller --ip='*'
elif [[ "$SLURM_PROCID" = "2" ]]; then
mpirun --bind-to=none -n "$((SLURM_NTASKS-2))" ipengine
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active April 24, 2026 15:20
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@sloria
sloria / bobp-python.md
Last active April 24, 2026 09:24
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@pvieytes
pvieytes / read_tweets.py
Created May 18, 2011 07:16
Parsing Twitter's user time with Python
import Tweet
import simplejson
import urllib2
def read_tweets(user, num_tweets):
tweets = []
url = "http://api.twitter.com/1/statuses/user_timeline.json?\
screen_name=%s&count=%s&include_rts=true" % (user, num_tweets)
file = urllib2.urlopen(url)