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
| #Adapted from https://gist.github.com/tugberkugurlu/11212976 | |
| #Used in ARM template deployment | |
| configuration MongoDB { | |
| #param ( | |
| # [string[]]$ComputerName = $env:ComputerName | |
| #) | |
| Import-DSCResource -ModuleName xDisk | |
| Import-DSCResource -ModuleName cDisk |
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
| az network public-ip list --resource-group GW4 | jq -r '.[].ipAddress' | sed /null/d | |
| az network vnet-gateway list --resource-group GW4 | jq -r ".[].id | |
| az network public-ip list --resource-group GW4 | jq 'if (.[].id=="/subscriptions/7638783c-a1ee-47d6-a06e-cba7ffd4d6bb/resourceGroups/GW4/providers/Microsoft.Network/publicIPAddresses/GW4-IP") then .[].ipAddress else null end' | |
| #Get the IP Address from a AZR VPN Gateway | |
| id=$(az network vnet-gateway list --resource-group GW4 | jq -r '.[].ipConfigurations[].publicIpAddress.id') | |
| ip=$(az network public-ip list --resource-group GW4 | jq -r '.[] | select(.id=="'$id'") | .ipAddress') | |
| sed -e "s/right=[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/right=$ip/" ./ipsec.conf |
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
| #RFC 3947 ==> https://datatracker.ietf.org/doc/rfc3947/?include_text=1 | |
| echo -n Please type the Shared Key: | |
| read sharedKey | |
| echo $sharedKey | |
| activeInterface=$(ip route get 8.8.8.8 | awk '{print $5; exit}') | |
| activeSubnet=$(ip route | grep $activeInterface | grep kernel | awk '{print $1; exit}') | |
| leftip=$(ip route | grep $activeInterface | grep kernel | awk '{print $9; exit}') |
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
| ( | |
| sleep 30 | |
| hdparm -B 127 -S 120 /dev/sda | |
| ) & |
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
| import xml.etree.ElementTree as ET | |
| import glob | |
| from PIL import Image | |
| import operator | |
| """ | |
| """ | |
| class labelHelper: | |
| def __init__(self): |
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
| # import the necessary packages | |
| from tkinter import * | |
| from PIL import Image | |
| from PIL import ImageTk | |
| import tkinter.filedialog as tkFileDialog | |
| import cv2 | |
| import glob | |
| from shutil import copyfile | |
| import os |
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 time import sleep | |
| from picamera import PiCamera | |
| import datetime | |
| import os | |
| def log(inner_fucntion): | |
| def wrapper(*args, **kwargs): | |
| print('Entering {} with arguments {}, {}'.format(inner_fucntion.__name__, *args, **kwargs)) | |
| res = inner_fucntion(*args, **kwargs) |
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
| ''' | |
| logHelper : Helps logging | |
| ''' | |
| import logging | |
| import datetime | |
| import os | |
| def init(file_name, mod_name=__name__, level=logging.DEBUG) -> logging.Logger: | |
| ''' |
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
| name: cuda | |
| channels: | |
| - defaults | |
| dependencies: | |
| - cudatoolkit | |
| - tensorflow-gpu | |
| - matplotlib | |
| prefix: /home/jfsix/anaconda3/envs/cuda |
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
| # vim:ft=zsh ts=2 sw=2 sts=2 | |
| # | |
| # agnoster's Theme - https://gist.github.com/3712874 | |
| # A Powerline-inspired theme for ZSH | |
| # | |
| # # README | |
| # | |
| # In order for this theme to render correctly, you will need a | |
| # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
| # Make sure you have a recent version: the code points that Powerline |
OlderNewer