zsh
terminal
Add these lines in your ~/.bash_profile
file
# Show current git branch name
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
import numpy as np | |
import matplotlib.pyplot as plt | |
def syntheticSeismogram(v, rho, d): | |
""" | |
function syntheticSeismogram() | |
syntheicSeismogram generates a synthetic seismogram for a simple 1-D |
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g} | |
require File.join(File.dirname(__FILE__), "downmark_it") | |
module WordPress | |
def self.import(database, user, password, table_prefix = "wp", host = 'localhost') | |
db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8') | |
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder} |
import numpy as np | |
from numba import jit, f8 | |
## Tri Diagonal Matrix Algorithm(a.k.a Thomas algorithm) solver | |
@jit(f8[:] (f8[:],f8[:],f8[:],f8[:] )) | |
def TDMAsolver(a, b, c, d): | |
''' | |
TDMA solver, a b c d can be NumPy array type or Python list type. | |
refer to http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm | |
and to http://www.cfd-online.com/Wiki/Tridiagonal_matrix_algorithm_-_TDMA_(Thomas_algorithm) |
#!/usr/bin/env python3 | |
from PIL import Image | |
import numpy as np | |
import tensorflow as tf | |
import tensorflow_hub as hub | |
# smooth values from point a to point b. | |
STEPS = 100 | |
pt_a = np.random.normal(size=(512)) |
There is already some gists talks about this topic using bash. However, Travis now support deploy
in .travis.yml
, which is super easy to set up. (Deploying to GitHub Pages is experimental now [2018.07.25])
I will show you an example of Python & Sphinx.
Here is a python example.