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
// Get nth byte of integer | |
// https://stackoverflow.com/a/7787433/5526354 | |
int x = (number >> (8*n)) & 0xff; |
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 | |
# 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 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 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 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 all_contents = document.querySelectorAll('div#contents > ytd-item-section-renderer:nth-of-type(3) > div#contents > ytd-shelf-renderer > div#dismissible > div#contents > ytd-grid-renderer > div#items > ytd-grid-playlist-renderer > div#details > yt-formatted-string > a') | |
async function getFullTitle(item) { | |
var double_parent_node = item.parentNode.parentNode | |
var channel_name_container = double_parent_node.querySelector('ytd-video-meta-block > div#metadata > div#byline-container > ytd-channel-name > div#container > div#text-container > yt-formatted-string') | |
var playlist_title = double_parent_node.querySelector('h3 > a') | |
var _a = channel_name_container.querySelector('a') | |
if (_a) { | |
return playlist_title.title + ' | -> ' + _a.text + ' | -> ' + _a.href + '\n' | |
} else { |
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
<!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 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 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 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 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='-') |