I hereby claim:
- I am ishiy1993 on github.
- I am ishiy (https://keybase.io/ishiy) on keybase.
- I have a public key ASAOAzd0s4v7Qh4D-5L6PiRb8zjSFNXNqktSR9lpDaJuxAo
To claim this, I am signing this object:
dimension :: 1 | |
axes :: x | |
double :: h = 1/NX | |
double :: cfl = 0.1 | |
double :: dt = cfl*h*h | |
dd = fun(q) (q[i+1] + q[i-1] - 2*q[i])/(h**2) | |
begin function q = init() |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
import sys | |
import time | |
def read_cpu_info(): | |
with open("/proc/stat", 'r') as f: | |
cpu = next(f).split(' ') | |
cpu_busy = sum([int(b) for b in cpu[2:5]]) | |
cpu_total = cpu_busy + int(cpu[5]) | |
return (cpu_total, cpu_busy) |
#!/bin/bash | |
unzip hanshin.xlsx | |
cat xl/sharedStrings.xml | hxselect si -s '\n' | sed 's;</t.*;;' | sed 's;.*>;;' | awk '{print "s;s"(NR-1)";"$1";g"}' | tac > table | |
cat xl/worksheets/sheet1.xml | hxselect row -s '\n' | sed 's/<[^<]*>/ /g' | awk 'NR>1{print $1,"s"$2,"s"$3}' > temp | |
sed -f table temp |
main = do | |
ds <- lines <$> getContents | |
print $ map solve ds | |
solve :: String -> (String,String) | |
solve str = (key, value) | |
where | |
key = takeWhile (/=':') str | |
value = tail $ dropWhile (/=':') str |
set __fish_git_prompt_showdirtystate 'yes' | |
set __fish_git_prompt_showstashstate 'yes' | |
set __fish_git_prompt_showupstream 'yes' | |
set __fish_git_prompt_color_branch yellow | |
function fish_prompt --description 'Write out the prompt' | |
printf '%s%s%s@%s%s%s%s\n> ' (set_color --bold magenta) (whoami) (set_color normal) (set_color blue) (echo $PWD) (set_color normal) (__fish_git_prompt) | |
end |
import Data.List | |
import System.Environment | |
main :: IO () | |
main = do | |
[n] <- getArgs | |
let ans = solves (read n) | |
mapM_ print ans | |
print $ length ans |
FROM node:6.3 | |
RUN npm install -g elm | |
RUN useradd --user-group --create-home --shell /bin/false app | |
ENV HOME=/home/app | |
USER app | |
WORKDIR $HOME | |
CMD ["bash"] |
#!/bin/bash | |
arg1=${1:?Need arguments} | |
arg2=${2:-!!!} | |
echo Hello ${arg1}${arg2} |
import Graphics.UI.GLUT | |
import Data.IORef | |
display :: IORef GLdouble -> IORef GLdouble -> DisplayCallback | |
display rot1 rot2 = do | |
clear [ColorBuffer, DepthBuffer] | |
r1 <- get rot1 | |
r2 <- get rot2 | |
loadIdentity | |
rotate r1 $ Vector3 1 0 0 |