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/env python2.7 | |
from xml.dom import minidom | |
import urllib2 | |
import os | |
import shutil | |
import random | |
import re | |
import sys |
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
zip 1836 | |
unity3d 603 | |
exe 435 | |
swf 302 | |
rar 165 | |
apk 122 | |
jar 64 | |
png 54 | |
gz 39 | |
jpg 37 |
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
select | |
jam_users.user_id, | |
games.title, | |
jam_users.rated_count - jam_games.rating_count as score, | |
(jam_users.rated_count - jam_games.rating_count)::float / (jam_games.rating_count + 1) as score2, | |
jam_users.rated_count as rated, | |
jam_games.rating_count as ratings | |
from jam_games | |
inner join games on games.id = jam_games.game_id | |
inner join jam_users on jam_users.user_id = games.user_id and jam_users.jam_id = jam_games.jam_id |
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
package.preload['moonscript.transform.names'] = function() | |
local build | |
do | |
local _table_0 = require("moonscript.types") | |
build = _table_0.build | |
end | |
local unpack | |
do | |
local _table_0 = require("moonscript.util") | |
unpack = _table_0.unpack |
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
httperf --uri=/ --port=8080 --num-conns=8 --num-calls=100000 | |
Connection rate: 203.5 conn/s (4.9 ms/conn, <=1 concurrent connections) | |
Connection time [ms]: min 4.7 avg 4.9 max 5.2 median 4.5 stddev 0.2 | |
Connection time [ms]: connect 0.0 | |
Connection length [replies/conn]: 100.000 | |
Request rate: 20550.3 req/s (0.0 ms/req) | |
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
socket = require "socket" | |
bm_mix = (tests, iterations=100, ...) -> | |
totals = {k, 0 for k in pairs tests} | |
print "Running with", ... | |
for i=1,iterations |
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 GamesSearch, JamGames from require "models" | |
import get_all_pages from require "util" | |
pager = GamesSearch\text "candy" | |
all_games = get_all_pages pager | |
game_ids = table.concat [game.id for game in *all_games], ", " | |
print "Games #{#all_games}" | |
jgs = JamGames\select "where jam_id = 1" |
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
(master) ~/code/sites/itch.io > moonc -l applications/downloads.moon | |
./applications/downloads.moon | |
line 146: accessing global storage | |
================================================================================= | |
> url: storage\signed_url bucket_name, @upload\bucket_key!, os.time! + 10 | |
line 146: accessing global bucket_name | |
================================================================================= | |
> url: storage\signed_url bucket_name, @upload\bucket_key!, os.time! + 10 |
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
package.preload['moonscript.transform.names'] = function() | |
local build | |
do | |
local _obj_0 = require("moonscript.types") | |
build = _obj_0.build | |
end | |
local unpack | |
do | |
local _obj_0 = require("moonscript.util") | |
unpack = _obj_0.unpack |
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
this.is.a.long.line | |
-- in coffee script we can do this: | |
this | |
.is.a | |
.long.line | |
-- but in moonscript, with's syntax uses the . as prefix for line | |
with something |