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 9gag volume and controls | |
// @namespace https://greasyfork.org/en/scripts/382093 | |
// @match https://9gag.com/* | |
// @run-at document-start | |
// @grant none | |
// @version 1.1 | |
// @description Adds the controls to the videos ("gifs") and sets the default volume to 30% | |
// @author Artain | |
// @author xtotdam |
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
\documentclass[svgnames,x11names,tikz]{standalone} | |
\usepackage{xcolor} | |
\usetikzlibrary{calc,positioning,matrix,math} | |
\tikzset{ | |
nosep/.style={inner sep=0,outer sep=0} | |
} | |
\usetikzlibrary{decorations.pathreplacing} | |
\tikzset{% |
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 codecs | |
import datetime | |
import eyed3 | |
import json | |
from math import log | |
import os | |
import shutil | |
import sys | |
unit_list = zip(['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], [0, 0, 1, 2, 2, 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
--extract-audio | |
--prefer-ffmpeg | |
--audio-format mp3 | |
--audio-quality 4 | |
### VBR: between 0 (better) and 9 (worse) | |
--restrict-filenames | |
--output "C:\\Users\\Root\\Downloads\\youtube-dl\\%(title)s!%(id)s.%(ext)s" |
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
// counting lengths of chains | |
int *lengths = (int *)calloc(N, sizeof(int)); | |
int *zeros = (int *)calloc(N, sizeof(int)); | |
int len, j; | |
for (i = 0; i < N; i++) | |
{ | |
if (atoms[i] == 0) | |
{ | |
zeros[cnt] = i; |
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, random | |
class Annoyer(): | |
counts_default = [1, 1] | |
parts = [ | |
['bdt', 'dbt'], | |
['n', 'ntn', 'nbtn'] | |
] | |
head = 'gh' |
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/python2 | |
import os | |
from pprint import pprint # pretty printer | |
mainfile = 'todo.txt' | |
archive = 'done.txt' | |
tag = '+auto_merged' | |
trashbin = 'ccs' |
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
# -*- coding: utf8 | |
import string | |
a = 'ьшоивущдйфхюжкпэнерсцталызбгячм' # исходный | |
# b = 'оаетинслрвукпмдьябчзыжхшц' # Донцова - плохо | |
b = 'оеаинтсрлвкмдыпуяьгбхзчйжшюцщэ' # Марк Твен | |
b = 'оеаитнрлсвкпуымугьябхчзйжшюцщэ' # iteration 1 | |
b = 'оеаитнрлсвкпядмугьзбхчзйжшюцщэ' # iteration 2 | |
b = 'оеаитнрлсвкпудмягызьбчшйжхюцщэф' # final | |
text = u'(Рьдьвьл ыжх) Й вэышдеп йшщкгшп щшаидйэ э йьющьфьыковс пьшнь кщжно. Цедь ьхьдь тшвещшз тойьф куэ, хьнко пе южйвидийс ф южвс - Дшнщоу, Бюившщ, йьцохо и э. Бюившщ ушй хьйж и дьюове; ьу уойвьэд уо чвьп уш ьв ирцевхо дбцшруьйви иди ыш ющидшыоуиэ, уь, хох э юьдоноб, ир йвщозо кьфшщивс чви ьщжкиэ йфьшпж ньйюькиуж. Фик ж ушнь цед ющшжющэпел. "Тшщвьф ыжх!" - фьв шкиуйвфшууьш, твь э жйдеаод ьв ушнь ро фйш южвшашйвфиш. Пуш юьщжтиди кфо юьволуез мьуощэ. Дшнщоу ушй ыжхо. Ыжх цед ющифэроу х хьугж аужщо, ю Дшнщоу хщжвид шнь уо зькж, хох рохдиуовшдс. Хьнко э ропшвид чвь уьфьш эфуьш кьхоровшдсйвфь цшржпиэ пьшнь кщжно, э й вщжкьп жкшщыодйэ ьв йдшр. Вшп уш пшушш э юьхо щшаид |
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 print_attributes(obj, v=True): | |
'''v = verbose''' | |
m = {'instancemethod':'()', 'method-wrapper':'()', 'builtin_function_or_method':'()b'} | |
for i in dir(obj): | |
t = str(type(obj.__getattribute__(i))).split('\'')[1] | |
if not v: | |
if not i.startswith('__'): | |
print i+m[t] if t in m.keys() else i, '\t'*(4 - (len(i)+1)/8), '' if t in m.keys() else t |