Standard commands
git clone git@github.com:[username]/[project-name].git
git pull
git fetch
git push
git status
git log
git diff file...
git commit -a -m "msg"
| #ifdef PYTHON | |
| #include <Python.h> | |
| #endif | |
| #include "cmongo.h" | |
| typedef int (*debug_func)(const char *, ...); | |
| #define BLOCK 20000000 | |
| struct BigStr { | |
| size_t buffer_size; |
| #!/bin/bash | |
| gfortran -o $2 -fno-underscoring $1 libhgraph.a libg2c.so -L/usr/X11R6/lib64 -lX11 |
Standard commands
git clone git@github.com:[username]/[project-name].git
git pull
git fetch
git push
git status
git log
git diff file...
git commit -a -m "msg"
| import os | |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| import numpy as np | |
| from datetime import datetime as dtdt | |
| pd.set_option('display.width', 160) | |
| pd.set_option('display.max_rows', 50) | |
| pd.set_option('display.max_info_rows', 20) | |
| pd.set_option('display.max_info_columns', 20) |
| versioninfo() | |
| using JSON | |
| tic() | |
| fio = open("test_data.json", "r") | |
| text = readall(fio) | |
| print("file loaded and read: ") | |
| toc() | |
| print("Parsing JSON from string: ") | |
| @time jjson_data = JSON.parse(text) | |
| fio = open("test_data.json", "r") |
| Previous performance: | |
| elapsed time: 7.237158689 seconds (2688899208 bytes allocated) | |
| Performance with indent implemented: | |
| elapsed time: 10.58000847 seconds (2789486440 bytes allocated) - indent set to 0 | |
| elapsed time: 11.382926355 seconds (3966498496 bytes allocated) - indent set to 2 |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="bokeh.css" type="text/css" /> | |
| <script type="text/javascript" src="bokeh.js"></script> | |
| <script type="text/javascript"> | |
| $(function() { |
| x = rand(1000,100) | |
| repeats = 1000 | |
| f1 = () -> cumprod(x,1) | |
| print(" f1: ") | |
| @time [f1() for i in 1:repeats] | |
| f2() = cumprod(x, 1) | |
| print(" f2: ") | |
| @time [f2() for i in 1:repeats] |
| # history length: | |
| HISTSIZE=10000 | |
| HISTFILESIZE=20000 | |
| # set by me | |
| export PS1='\u:\W || ' | |
| alias shortp="export PS1='\u:\W || '" | |
| alias longp="export PS1='\u@\h:\# \w || '" | |
| alias gs="git status" | |
| alias gl="git log" |