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: utf-8 -*- | |
def dec_to_base(N, base): | |
if not hasattr(dec_to_base, 'table'): | |
dec_to_base.table = '0123456789ABCDEF' | |
x, y = divmod(N, base) | |
return dec_to_base(x, base) + dec_to_base.table[y] if x else dec_to_base.table[y] | |
num = 16**20+2**30-32 | |
base = 4 |
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 requests | |
import lxml.html | |
from collections import OrderedDict | |
import os | |
from tqdm import tqdm | |
cls = lambda: os.system('cls' if os.name=='nt' else 'clear') | |
safe_string = lambda s: ("".join(x for x in s if (x.isalnum() or x in "._-[] "))).strip() | |
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 dec2bin(dec): | |
return str(bin(dec))[2:] | |
def cnt_ones(num, zeros=False): | |
binform = dec2bin(num) | |
vtc = "1" | |
if zeros: | |
vtc = "0" | |
return sum([1 for i in binform if i == vtc]) |
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
/* | |
## Как? | |
1. Переходим на страницу человека, у которого нет стикеров (https://vk.com/{whatever}) | |
2. Открываем меню подарков, переходим в раздел стикеров | |
3. F12, Ctrl+V, Enter | |
*/ | |
let sum = 0; | |
document.querySelectorAll("#gifts_box_stickers .gift_cell").forEach(x => { | |
let price = (+x.outerHTML.split(/'/)[1].split(/ /)[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
// ==UserScript== | |
// @name NoTwitch | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author ЕБЛАН | |
// @include http://*.twitch.tv/* | |
// @include https://*.twitch.tv/* | |
// @include http://*.youtube.com/* | |
// @include https://*.youtube.com/* |
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
/[\\/:*?"<>|]/g |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Bezier : MonoBehaviour { | |
public Transform firstObject; | |
public Transform secondObject; | |
Vector2 P0; |
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
public string GenerateStrangeString(int ccount = 18) | |
{ | |
var output = ""; | |
for (var i = 0; i < ccount; i++) | |
{ | |
output = string.Concat(output, Convert.ToChar(new Random(i).Next(0, 255))); | |
} | |
return output; |
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
""" | |
Input: start_int end_int | |
Output: Simple numbers in range from start_int to end_int | |
""" | |
k, n = map(int, input().split()) | |
a = list(range(n+1)) | |
a[1] = 0 | |
lst = [] | |
i = 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
#coding:utf-8 | |
# python3 tdmp.py | |
from bs4 import BeautifulSoup as bs | |
import requests | |
import jsonpickle | |
import re | |
import os | |
proxyurl = "http://nuark.xyz/proxy.php?h&l=" |