This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import csv | |
import sys | |
def main(): | |
filename = sys.argv[1] | |
with open(filename) as f: | |
data = json.load(f) | |
if data.get("data") is not None: | |
data = data.get("data") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.0; | |
pragma experimental ABIEncoderV2; | |
interface Structs { | |
struct Val { | |
uint256 value; | |
} | |
enum ActionType { | |
Deposit, // supply tokens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table border="1" class="dataframe"> | |
<thead> | |
<tr style="text-align: right;"> | |
<th></th> | |
<th>inputs</th> | |
<th>payable</th> | |
<th>stateMutability</th> | |
<th>type</th> | |
<th>anonymous</th> | |
<th>name</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function status_say () { | |
echo "EXECUTING: " "$@" "& saying 'done' or 'failed'" | |
bash -c " $@ && say '$@ is done' || say '$@ has failed' " || echo "Quote the command to be executed status_say `command arg1 arg2`" | |
} | |
# add to .bashrc / source | |
# example: status_say "make install" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
command -v docker >/dev/null 2>&1 || { echo >&2 "I require docker but it's not installed. Aborting."; exit 1; } | |
read -p " | |
############################################################## | |
# WARNING! You are about to blow up all your docker stuff # | |
# By entering Y/y you will remove: # | |
# - all stopped containers # | |
# - all networks not used by at least one container # | |
# - all volumes not used by at least one container # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Usage: ./show_last_updated_hive_table.sh #tablename" | |
time_column=`hive -e "show create table $1" | egrep "transient_lastDdlTime"` | |
time_value=`echo $time_column | sed 's/[|,)]//g' | awk -F '=' '{print $2}' | sed "s/'//g"` | |
tran_date=`date -d @$time_value +'%Y-%m-%d %H:%M:%S'` | |
echo $tran_date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function post_to_slack () { | |
# format message as a code block ```${msg}``` | |
SLACK_MESSAGE="\`\`\`$1\`\`\`" | |
SLACK_URL= # [URL of The Channel you want to post to] | |
case "$2" in | |
INFO) | |
SLACK_ICON=':slack:' | |
;; | |
WARNING) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout -b <BRANCH-NAME-NEW> start^ | |
for commit in $(git rev-list --reverse <start-sha-commit>..<end-sha-commit>); do | |
git checkout $commit -- ((LIST OF FILES TO BRANCH OUT)) | |
git commit -C $commit | |
done(base) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour136 #yellow | |
set-option -g status-attr default | |
# set window split | |
bind-key v split-window -h | |
bind-key b split-window | |
# default window title colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018-11-15,144.05,144.89,129.83,138.44,208017000.00,1169319667.00 | |
2018-11-14,160.74,162.49,138.04,143.65,153849000.00,1213070013.00 | |
2018-11-13,163.01,164.42,159.37,161.17,155883000.00,1360714704.00 | |
2018-11-12,160.24,167.30,159.89,163.05,198078000.00,1376230076.00 | |
2018-11-11,161.77,162.24,158.42,160.11,317344000.00,1350880369.00 | |
2018-11-10,159.96,163.90,158.69,161.72,320383000.00,1364443572.00 | |
2018-11-09,164.16,165.21,159.58,159.99,210843000.00,1349561475.00 | |
2018-11-08,166.25,174.02,164.29,164.29,139714000.00,1385511418.00 | |
2018-11-07,170.12,171.32,164.27,166.45,190695000.00,1403421907.00 | |
2018-11-06,164.86,172.42,163.99,170.47,167367000.00,1428094259.00 |
NewerOlder