This file contains hidden or 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
# Install virtualbox | |
sudo apt install virtualbox | |
# Install Kubectl | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin | |
# Install Minikube | |
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.14.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ | |
# Launch Minikube | |
minikube start |
This file contains hidden or 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
# Install virtualbox | |
sudo apt install virtualbox | |
# Install Kubectl | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin | |
# Install Minikube | |
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.14.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ | |
# Launch Minikube | |
minikube start |
This file contains hidden or 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
from collections import OrderedDict | |
def fifo_cache(max_size=128): | |
def decorator(func): | |
cache = OrderedDict() | |
def _wrapper(*args, **kwargs): | |
key = (tuple(args), tuple(sorted(kwargs.items()))) | |
if key not in cache: | |
if len(cache) == max_size: |
This file contains hidden or 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
filetype plugin indent on | |
syn on se title | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:< | |
set list | |
set laststatus=2 | |
set statusline=%<%f\ %h%m%r\ %y%=%{v:register}\ %-14.(%l,%c%V%)\ %P |
This file contains hidden or 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
defmodule Test do | |
def duplicate(str, count) when count > 1 do | |
str <> duplicate(str, count - 1) | |
end | |
def duplicate(str, count) when count == 1, do: str | |
def duplicate(_, count) when count < 1, do: "" | |
end |
This file contains hidden or 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 -x | |
if [ $1 ] ; then | |
DIR=$1 | |
else | |
DIR=. | |
fi | |
find $DIR -name '*.py' | grep -v "static\|migrations\|media" > cscope.files | |
cat cscope.files | xargs isort | |
cat cscope.files | xargs yapf -i -p |
This file contains hidden or 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
Problem Description: | |
Docker service does not start | |
# systemctl status docker.service | |
● docker.service - Docker Application Container Engine | |
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) | |
Active: failed (Result: exit-code) since Sun 2016-04-24 13:18:25 UTC; 8s ago | |
Docs: https://docs.docker.com | |
Process: 31803 ExecStart=/usr/bin/docker daemon -H fd:// (code=exited, status=1/FAILURE) | |
Main PID: 31803 (code=exited, status=1/FAILURE) |
This file contains hidden or 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
class Correlation: | |
def __init__(self): | |
# self.x_start = int(input()) | |
# self.x_n = [ int(i) for i in raw_input().split(' ')] | |
self.x_start = 4 | |
self.x_n = [2, -1, 3, 7, 1, 2, -3, 0, 0] | |
def findrange(self): | |
self.x_max = len(self.x_n) - self.x_start | |
self.x_min = self.x_max - len(self.x_n) |
This file contains hidden or 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
class Conv: | |
def __init__(self): | |
# self.x_start = int(input()) | |
# self.x_n = [ int(i) for i in raw_input().split(' ')] | |
# self.h_start = int(input()) | |
# self.h_n = [ int(i) for i in raw_input().split(' ')] | |
self.x_start = 0 | |
self.x_n = [1, 2, 3, 1] | |
self.h_start = 1 | |
self.h_n = [1, 2, 1, -1] |
This file contains hidden or 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
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int poss_win(int *board,char choice) | |
{ | |
int val, check; | |
if(choice == 'X') | |
val = 18; | |
else | |
val = 50; |