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 tqdm | |
def get_values(count): | |
for x in range(count): | |
yield x*count | |
for x in tqdm.tqdm(get_values(10000000)): | |
pass |
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
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': |
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 uiDrawFontFamiliesNumFamilies(ff: uiDrawFontFamilies): | |
""" | |
Describe the function. | |
:param args: arguments | |
:return: value | |
""" | |
return clibui.uiDrawFontFamiliesNumFamilies(ff) |
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
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 |
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/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) |
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
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) |
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
include base | |
import random, sequtils | |
randomize() | |
proc call*(api: VkApi, msg: Message) = | |
let args: seq[string] = msg.cmd.arguments |
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 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 |
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
{.noforward: on.} | |
import math, strutils | |
type | |
NimGame = ref object | |
players: seq[string] | |
board: seq[int] | |
proc initGame(): NimGame = |
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
{.noforward: on.} | |
import math, strutils | |
type | |
NimGame = ref object | |
players: seq[string] | |
board: seq[int] | |
proc initGame(): NimGame = |
OlderNewer