sudo apt-get update
sudo apt-get install -y git vim zsh
chsh -s $(which zsh)
| apiVersion: v1 | |
| data: | |
| default.conf: |- | |
| client_body_buffer_size 10M; | |
| client_max_body_size 10M; | |
| lua_shared_dict prometheus_metrics 50M; | |
| lua_package_path "/opt/nginx-lua-prometheus/?.lua"; | |
| init_by_lua ' | |
| prometheus = require("prometheus").init("prometheus_metrics") |
| function FindProxyForURL(url, host) { | |
| return "SOCKS localhost:54311"; | |
| } |
| function FindProxyForURL(url, host) { | |
| PROXY = "SOCKS localhost:54311" | |
| if (shExpMatch(host,"10.129.*")) { | |
| return PROXY; | |
| } | |
| // Everything else directly! | |
| return "DIRECT"; | |
| } |
| 2 git clone https://github.com/prat0318/flash.git | |
| 3 cd flash/ | |
| 4 sudo apt-get update | |
| 5 sudo apt-get install -y python-dev python-pip | |
| 6 sudo pip install -y pillow flask | |
| 7 sudo pip install pillow flask | |
| 8 ls | |
| 9 flask run | |
| 10 vi wsgi.py | |
| 11 ls |
| {{- range $_, $key := .Values | keys | sortAlpha -}} | |
| {{- $value := index $.Values $key -}} | |
| {{- if kindIs "map" $value -}} | |
| {{- range $_, $nested_key := $value | keys | sortAlpha -}} | |
| {{- $nested_value := index $value $nested_key -}} | |
| {{- if kindIs "map" $nested_value -}} | |
| {{- range $_, $nested_nested_key := $nested_value | keys | sortAlpha -}} | |
| {{- $nested_nested_value := index $nested_value $nested_nested_key -}} | |
| {{- if kindIs "map" $nested_nested_value -}} | |
| {{- range $_, $nested_nested_nested_key := $nested_nested_value | keys | sortAlpha -}} |
| times = int(raw_input()) | |
| for i in xrange(times): | |
| num_str = raw_input() | |
| num = list(num_str) | |
| old_num = list(num) | |
| for j in xrange(len(num) - 1): | |
| k = j + 1 | |
| if max(num[k:]) > num[j]: | |
| k1 = k + num_str[k:].rfind(max(num[k:])) |
| function options() { | |
| PLUGIN_PATH="$HOME/.oh-my-zsh/plugins/" | |
| for plugin in $plugins; do | |
| echo "\n\nPlugin: $plugin"; grep -r "^function \w*" $PLUGIN_PATH$plugin | awk '{print $2}' | sed 's/()//'| tr '\n' ', '; grep -r "^alias" $PLUGIN_PATH$plugin | awk '{print $2}' | sed 's/=.*//' | tr '\n' ', ' | |
| done | |
| } |
| Turn = 1000. | |
| 012345678901234567890123456789012345678901234567890123456789012345678901 | |
| 0 r....................................................................... | |
| 1 ........................................................................ | |
| 2 ........................................................................ | |
| 3 ........................................................................ | |
| 4 ........................................................................ | |
| 5 ........r..r............................................................ | |
| 6 ..........r............................................................. | |
| 7 ........................................................................ |
| def cycle_sort(arr): | |
| writes = 0 | |
| for cycle_start in xrange(len(arr)): | |
| item = arr[cycle_start] | |
| print "Item picked :%s index: %s [A: %s]" % (item, cycle_start, arr) | |
| pos = cycle_start | |
| for i in xrange(cycle_start + 1, len(arr)): | |
| if arr[i] < item: |