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
export function leggSammen(a, b) { | |
return a + b | |
} | |
export function multipliser(a, b) { | |
return a * b | |
} |
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
#!/usr/local/bin/python3 | |
""" | |
Requires you to install ffmpeg with all options (or at least the rubberband module): | |
https://gist.github.com/Piasy/b5dfd5c048eb69d1b91719988c0325d8#gistcomment-2571754 | |
Example usage: | |
$ ./convert_pitch_by_semitones.py /input.mp3 /output.mp3 -2 | |
""" | |
import sys |
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 | |
filename = "mv17.csv" | |
phone_column = 2 | |
with open(os.path.join(".", filename), "r") as f: | |
new_lines = [] | |
for i, l in enumerate(f.readlines()): | |
if i == 0: |
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
from PyPDF2 import PdfFileMerger | |
def merge(input_files, output_file): | |
merger = PdfFileMerger(strict=False) | |
for pdf in input_files: | |
merger.append(pdf) | |
output_file = "" | |
merger.write(output_file) |
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
from random import choice | |
available_numbers = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"] | |
numbers_to_letters = {"1":["."], | |
"2":["A", "B", "C"], | |
"3":["D", "E", "F"], | |
"4":["G", "H", "I"], | |
"5":["J", "K", "L"], | |
"6":["M", "N", "O"], |
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
from random import randint, sample | |
def enough_distance(m, t): | |
return not ((m + t) < 4 or ((12 - m) + (12 - t)) < 4) | |
def get_meeple_placements(): | |
""" | |
Generates and prints the board game arrangement | |
""" | |
occupied_temple_spaces = set() |