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
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] | |
mode = input("What mode? (c)ipher / (d)ecipher: ") | |
if mode == "c": | |
offset = input("Enter offset: ") | |
if not offset.isdigit(): | |
print("\nOffset must be a positive Integer! Exiting...") | |
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
with open('contacts.csv', 'a') as newF: | |
newF.write('Name,"E-mail 1 - Value"\n') | |
newF.close() | |
with open('contacts.txt') as f: | |
for line in f: | |
name, email = line.split('<') | |
name = name[:-1] | |
email = email[:-3] | |
print("Name:" + name + ", Email: " + email + "\n") | |
with open('contacts.csv', 'a') as newF: |
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
unit Unit1; | |
{$mode objfpc}{$H+} | |
interface | |
uses | |
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls; | |
type |
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 | |
cd /tmp/ | |
curl -O https://download.java.net/java/GA/jdk13/5b8a42f3905b406298b72d750b6919f6/33/GPL/openjdk-13_linux-x64_bin.tar.gz | |
tar xvf openjdk-13_linux-x64_bin.tar.gz | |
sudo mv jdk-13 /opt/ | |
sudo tee /etc/profile.d/jdk13.sh <<EOF | |
export JAVA_HOME=/opt/jdk-13 | |
export PATH=\$PATH:\$JAVA_HOME/bin | |
EOF | |
source /etc/profile.d/jdk13.sh |
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 DataBuffer { | |
constructor() { | |
this.bytearr = []; | |
} | |
write(byte) { | |
this.bytearr.push(byte) | |
} | |
writeByteArray(byteArray) { |
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
writeUTF8(str) { | |
let utf8 = [] | |
let utflen = str.length; // optimized for ASCII | |
for (let i = 0; i < str.length; i++) { | |
let c = str.charAt(i); | |
if (c >= 0x80 || c === 0) | |
utflen += (c >= 0x800) ? 2 : 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
class DataBuffer { | |
constructor() { | |
this.bytearr = [] | |
} | |
write(byte) { | |
this.bytearr.push(byte) | |
} | |
writeByteArray(byteArray) { |
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
[Unit] | |
Description=Chime | |
After=multi-user.target | |
[Service] | |
WorkingDirectory=%h/chime | |
ExecStart=%h/chime/venv/bin/chime | |
Type=idle | |
User=root | |
Group=root | |
Restart=always |
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
GREEN='\033[0;32m' | |
NC='\033[0m' | |
echo -e "${GREEN}> Adding Ubuntu Universe to repositories & Updating package lists${NC}" | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository universe | |
sudo apt-get update | |
echo -e "${GREEN}> Installing nodejs & npm${NC}" |
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 decimal import * | |
getcontext().prec = 1000 | |
# simple and beautiful but diverges slowly. | |
def leibniz(): | |
prefactor = -1 | |
pre_result = 1 | |
current_index = 3 |
OlderNewer