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
# [START gae_quickstart_yaml] | |
runtime: nodejs10 | |
env: standard | |
instance_class: F1 | |
automatic_scaling: | |
min_idle_instances: 1 |
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
if [ $# -ne 2 ] | |
then | |
echo "Usage: $(0) <port> <ip>" | |
fi | |
iptables -t nat -A PREROUTING -p tcp --dport $1 -j DNAT --to-destination $2 |
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
Show hidden characters
{ | |
"shell_cmd": "javac --module-path %JAVAFX% --add-modules ALL-MODULE-PATH *.java && java --module-path %JAVAFX% --add-modules ALL-MODULE-PATH $file_base_name", | |
"selector": "source.java" | |
} |
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 os | |
import ntpath | |
from shutil import copyfile | |
from PIL import Image | |
banned = ["html", "json"] | |
q = [] | |
toMove = [] | |
q.append(input("First dir: ")) |
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 imageio | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from skimage.transform import resize | |
# from IPython.display import HTML | |
import warnings | |
warnings.filterwarnings("ignore") | |
source_image = imageio.imread(input("Point to source picture: ")) |
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
% -- new column type L | |
% -- allows for scaled multiline blocks of texts in regular tabular env | |
\newcolumntype{L}{>{\centering\arraybackslash}m{5.5cm}} |
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
#Python 3 code to demonstrate the | |
# working of MD5 (byte - byte) | |
import hashlib | |
import sys | |
def hash(name): | |
cont = open(name, "rb").read() | |
result = hashlib.md5(cont) |
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 hashlib | |
import time | |
start_time = time.time() | |
s = input("Input string: ") | |
for i in range(1000000): | |
s = hashlib.sha256(s.encode()).digest().hex() | |
end_time = time.time() |