Skip to content

Instantly share code, notes, and snippets.

👑
Hunting arcs and orcs

Danil Yarantsev Yardanico

👑
Hunting arcs and orcs
  • Russia
View GitHub Profile
View test.py
import tqdm
def get_values(count):
for x in range(count):
yield x*count
for x in tqdm.tqdm(get_values(10000000)):
pass
View test.py
class PythonFunction:
def __init__(self, args):
self.rtype, self.name, self.params = args
def generate_python(self):
pure_arguments = []
arguments = []
for param in self.params:
name, type = param
if name == 'callback':
@Yardanico
Yardanico / test.py
Created Dec 10, 2016
generated example
View test.py
def uiDrawFontFamiliesNumFamilies(ff: uiDrawFontFamilies):
"""
Describe the function.
:param args: arguments
:return: value
"""
return clibui.uiDrawFontFamiliesNumFamilies(ff)
View trace
Thread 1 "csgo_linux64" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
58 ../sysdeps/unix/sysv/linux/raise.c: Нет такого файла или каталога.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1 0x00007f859a0733ea in __GI_abort () at abort.c:89
#2 0x00007f85995a558d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007f85995a3336 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007f85995a3381 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007f85995a3599 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
@Yardanico
Yardanico / heartbleed.py
Created Feb 9, 2017 — forked from eelsivart/heartbleed.py
Heartbleed (CVE-2014-0160) Test & Exploit Python Script
View heartbleed.py
#!/usr/bin/python
# Modified by Travis Lee
# Last Updated: 4/21/14
# Version 1.16
#
# -changed output to display text only instead of hexdump and made it easier to read
# -added option to specify number of times to connect to server (to get more data)
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc...
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port)
@Yardanico
Yardanico / bench.txt
Last active Mar 4, 2017
Python Hug http (runner.sh) benchmark
View bench.txt
I changed number of requests from 20,000 to 100,000 to have enough time for PyPy3 to warm-up
PyPy3 results:
Python 3.5.2 (2b8db666aa18, Mar 04 2017, 02:00:12)
[PyPy 5.6.0-alpha0 with GCC 4.8.2] on linux
hug_test:
Requests per second: 22699.22 [#/sec] (mean)
Complete requests: 100000
falcon_test:
Requests per second: 23432.88 [#/sec] (mean)
View sayrandom.nim
include base
import random, sequtils
randomize()
proc call*(api: VkApi, msg: Message) =
let args: seq[string] = msg.cmd.arguments
View types.nim
import json, httpclient, queues
# We export all types and fileds from there to other modules
type
LongPollData* = object
key*: string
server*: string
ts*: int
Flags* {.pure.} = enum
@Yardanico
Yardanico / nimgame.nim
Created Jul 25, 2017
Nim game ported from Python:
View nimgame.nim
{.noforward: on.}
import math, strutils
type
NimGame = ref object
players: seq[string]
board: seq[int]
proc initGame(): NimGame =
View nimgame.nim
{.noforward: on.}
import math, strutils
type
NimGame = ref object
players: seq[string]
board: seq[int]
proc initGame(): NimGame =
You can’t perform that action at this time.