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/bin/env python3 | |
from requests import post | |
from itertools import permutations | |
from string import ascii_lowercase, digits | |
import sys | |
from telethon import TelegramClient | |
from telethon.tl.functions.users import GetFullUserRequest | |
import asyncio | |
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
The things you own end up owning you | |
-- Tyler Durden | |
% | |
It's only after we've lost everything that we're free to do anything | |
-- Tyler Durden | |
% | |
Reject the basic assumptions of civilization—especially the importance of | |
material possessions | |
-- Tyler Durden | |
% |
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/bin/env python3 | |
from PIL import Image | |
img = Image.open('image.jpg').convert('L') | |
img.save('greyscale.jpg') |
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/bin/env python3 | |
def is_n_digit(number: int, digits: int) -> bool: | |
return len(str(abs(number))) == digits | |
file = open("17.txt", "r") | |
numbers = list(map(int, file.readlines())) | |
max_strange_num = 0 | |
for element in numbers: | |
if not str(element).endswith("15"): |
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/bin/julia | |
using Test | |
const EPS = 1e-11 | |
function log_core(base::Float64, n::Float64) | |
x = 1 | |
step = 1 | |
while step > EPS | |
while base ^ x < n |
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
*.md linguist-documentation=false | |
*.md linguist-detectable | |
*.adoc linguist-documentation=false | |
*.adoc linguist-detectable | |
*.rst linguist-documentation=false | |
*.rst linguist-detectable | |
*.sql linguist-documentation=false | |
*.sql linguist-detectable | |
*.creole linguist-documentation=false | |
*.creole linguist-detectable |
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
while [ 1 ] | |
do | |
p=$(date +%Y)/$(date +%m)/$(date +%d)/$(date +%H) | |
mkdir -p $p | |
out=$p/$(date +%s).txt | |
curl "http://api.open-notify.org/iss-now.json" > $out | |
git add -A | |
git commit -m "changed $(date +%s)" | |
git push | |
date |
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
for file in *.jpg.jpg; do | |
mv -- "$file" "${file%.jpg.jpg}.jpg" | |
done |
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/bin/julia | |
const eps = 1e-40; | |
function log_2(n::Int64) | |
x = 1; | |
previous = 0; | |
while abs(2 ^ x - n) > eps | |
println(x); | |
x = (x + n / x) / 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
#include <stdio.h> | |
#include <string.h> | |
char tracks[][80] = { | |
"I left my heart in Harvard Med School", | |
"Newark, Newark - a wonderful town", | |
"Dancing with a Dork", | |
"From here to maternity", | |
"The girl from Iwo Jima", | |
}; |
NewerOlder