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
set -g mouse on | |
set -g prefix C-s | |
set -g default-shell "/bin/bash" | |
set -g default-terminal "screen-256color" | |
bind-key | split-window -h | |
bind-key - split-window -v | |
bind-key r source-file ~/.tmux.conf \; display '~/.tmux.cof reloaded' | |
bind-key y set-window-option synchronize-panes |
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 pandas as pd | |
from pandas.io import json | |
from pandas.io.json import json_normalize | |
with open('data.json') as f: | |
data = json.loads(f.read()) | |
def normalize(o): | |
dict_obj = {} | |
items = [] |
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
/* | |
Copyright (c) 2019, Saleem Mirza | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright | |
notice, this list of conditions and the following disclaimer in the |
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
level = [ | |
[10000,0.1], | |
[20000,0.2], | |
[10000,0.1], | |
[None, 0.4] | |
] | |
def calculate_tax(level, income): | |
if income <= 0: | |
return (0, 0) |
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
package main | |
import ( | |
"crypto/hmac" | |
"crypto/sha256" | |
"encoding/base64" | |
"net/http" | |
"time" | |
"unicode/utf8" | |
"strconv" |
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
db.messages.find({$text:{$search:"Gillette"}}).limit(1).explain("allPlansExecution") |
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
{ | |
"queryPlanner" : { | |
"plannerVersion" : NumberInt(1), | |
"namespace" : "enron.messages", | |
"indexFilterSet" : false, | |
"parsedQuery" : { | |
"$text" : { | |
"$search" : "Gillette", | |
"$language" : "english", | |
"$caseSensitive" : false, |
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
winrm quickconfig -q | |
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="512"}' | |
winrm set winrm/config '@{MaxTimeoutms="1800000"}' | |
winrm set winrm/config/service '@{AllowUnencrypted="true"}' | |
winrm set winrm/config/service/auth '@{Basic="true"}' | |
Set-Service -Name WinRM -StartupType Automatic | |
#netsh firewall add portopening TCP 5985 "Port 5985" | |
#winrm set winrm/config/listener?Address=*+Transport=HTTP '@{Port="5985"}' |