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
// Get nth byte of integer | |
// https://stackoverflow.com/a/7787433/5526354 | |
int x = (number >> (8*n)) & 0xff; |
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
#!/usr/bin/env python3 | |
# FIXME: requirements.txt | |
# pip3 install python-telegram-bot --upgrade | |
# pip3 install pyscreenshot | |
# pip3 install pillow | |
from telegram.ext import Updater | |
from telegram.ext import CommandHandler |
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
// ==UserScript== | |
// @name 4ChReplies (Improve Replies) | |
// @namespace 4ChReplies | |
// @version 1.0 | |
// @description Make navigate on 4chan replies more comfortable with this script for tampermonkey. Now replies closes only by click on it. | |
// @author https://github.com/evdokimovm | |
// @match https://boards.4chan.org/* | |
// @match https://boards.4channel.org/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none |
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 numpy | |
import cv2 | |
import sys | |
import datetime | |
background = numpy.full((1080, 1920, 3), (0, 216, 255), numpy.uint8) | |
background_w, background_h = background.shape[1], background.shape[0] | |
cap = cv2.VideoCapture(sys.argv[1]) | |
count = 0 |
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
var saving_playlist = window.location.href.includes('/playlist?list=') | |
var all_contents = | |
saving_playlist ? | |
document.querySelectorAll('div#contents > ytd-playlist-video-renderer > div#content > div#container > div#meta') | |
: | |
document.querySelectorAll("#content > yt-lockup-view-model > div > div > yt-lockup-metadata-view-model > div.yt-lockup-metadata-view-model-wiz__text-container") | |
var format = '.txt' |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<script> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Pie Chart</title> | |
</head> | |
<body> | |
<div class="chart-container"> |
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
def check_space(matrix): | |
shape = [ | |
[1, 1, 0], | |
[1, 0, 0], | |
[1, 0, 0] | |
] | |
shape_height = len(shape) | |
shape_width = len(shape[0]) | |
matrix_height = len(matrix) |
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
async function promiseWrapper(options, callback) { | |
return new Promise((resolve, reject) => { | |
try { | |
callback(options, resolve) | |
} catch (err) { | |
reject(err) | |
} | |
}) | |
} |
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 matplotlib.pyplot as plt | |
import numpy as np | |
import mplcursors | |
x = np.linspace(0, 500, 1000) | |
plt.figure(figsize=(10, 6)) | |
plt.axhline(y=0, color='k', linestyle='-') |