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
| #!/bin/sh | |
| docker rm -f $(docker ps -qa) | |
| docker volume rm $(docker volume ls -q) | |
| cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
| for dir in $cleanupdirs; do | |
| echo "Removing $dir" | |
| rm -rf $dir | |
| done |
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
| #!/bin/bash | |
| user=$EUID | |
| if [ "${user}" != "0" ]; then | |
| echo | |
| echo "$0 must be run as root - you are running as $EUID" | |
| echo | |
| exit 1 | |
| fi | |
| echo | |
| echo "About to clean Rancher 2.x custom node" |
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
| --- | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: nfs-provisioner | |
| --- | |
| kind: ClusterRole | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| metadata: | |
| name: nfs-provisioner-runner |
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
| . |
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
| # create and name a new mode: "1366x768-0" | |
| /usr/bin/xrandr --newmode "1366x768-0" 75.61 1366 1406 1438 1574 768 771 777 800 -hsync -vsync | |
| # attach the new mode to an output (LVDS-1) | |
| /usr/bin/xrandr --addmode LVDS-1 "1366x768-0" | |
| # turn on the output using the new mode | |
| /usr/bin/xrandr --output LVDS-1 --mode "1366x768-0" |
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
| # calculating RSI (gives the same values as TradingView) | |
| # https://stackoverflow.com/questions/20526414/relative-strength-index-in-python-pandas | |
| def RSI(series, period=14): | |
| delta = series.diff().dropna() | |
| ups = delta * 0 | |
| downs = ups.copy() | |
| ups[delta > 0] = delta[delta > 0] | |
| downs[delta < 0] = -delta[delta < 0] | |
| ups[ups.index[period-1]] = np.mean( ups[:period] ) #first value is sum of avg gains |
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 tehran_stocks import Stocks,db,get_asset | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| '''tseStock handle basic operations on TSE data fetch from | |
| tehran-stocks library | |
| usage: | |
| mystock = tseStock('خودرو') # Load IKCO ticker | |
| mystock.plot() # Plot the close price column with pandas.plot function | |
| ''' | |
| #TODO Import adjusted data form Tehran stock exchange |
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
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| default_type text/html; | |
| access_log /dev/stdout; | |
| sendfile on; | |
| keepalive_timeout 65; |
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
| { | |
| "packages":[ | |
| { | |
| "name":"digistump", | |
| "maintainer":"Digistump", | |
| "websiteURL":"http://digistump.com", | |
| "email":"support@digistump.com", | |
| "help":{ | |
| "online":"https://digistump.com/board" | |
| }, |
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
| #!/bin/python3 | |
| from multiprocessing import Pool | |
| from urllib.request import Request, urlopen | |
| from urllib.error import URLError, HTTPError | |
| import sys,time | |
| from socket import timeout | |
| def geturls(ufilename): | |
| ulist = [] |
NewerOlder