Skip to content

Instantly share code, notes, and snippets.

View orsinium's full-sized avatar
🔥
orsinium.dev

Gram orsinium

🔥
orsinium.dev
View GitHub Profile
@orsinium
orsinium / game_of_life_generator.py
Last active May 4, 2017 09:41
Field generator for Conway's Game of Life
#author: Gram (master_fess@mail.ru)
#description: Field generation for Conway's Game of Life
from random import choice
n = int(input('Введите размер поля:\n> '))
r = input('Заполнить его случайно "живыми"?:\n> ').lower()
if 'д' in r or 'y' in r:
r = True
@orsinium
orsinium / vk_mutual_friends.py
Created May 4, 2017 09:32
Поиск общих друзей в vk между заданными пользователями
import vk
from time import sleep
from re import compile, sub
#http://vk.com/dev
token = input('ID приложения: ')
print('https://oauth.vk.com/authorize?client_id='+token+'&scope=wall,offline&display=page&response_type=token')
token = input('Токен: ')
vkapi = vk.API(access_token=token)
rex = compile(r'[^0-9]+')
@orsinium
orsinium / autolike.py
Created May 4, 2017 09:27
Скрипт для автоматического проставления лайков в вк по заданным поисковым критериям
from random import choice, randrange
from time import sleep
import vk
def strtoint(s):
try:
int(s)
except ValueError:
return s
else:
@orsinium
orsinium / pass_gen.py
Created May 4, 2017 09:18
Password generator
from sys import argv
from random import random, choice
a = 'AEIOUYaeiouy'
b = 'BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz'
try:
l = 10 if len(argv)<2 else int(argv[1])
except:
print('Bad length of password!')
@orsinium
orsinium / stack_overflow_search.py
Last active May 4, 2017 09:20
Search on stackoverflow from console
#!/usr/bin/env python3
from grab import Grab
g = Grab()
def myprint(text):
while len(text) > 80:
substr = text[:80]
endofline = max(substr.rfind('\n'), substr.rfind(' '))
if not endofline:
endofline = 80

Keybase proof

I hereby claim:

  • I am orsinium on github.
  • I am orsinium (https://keybase.io/orsinium) on keybase.
  • I have a public key ASDuWh4u66lzQrvNGtFu1YoxZSYWRPa3XMGUaJ6H8RypXwo

To claim this, I am signing this object: