This file contains hidden or 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
{ | |
inputs = { | |
utils.url = "github:numtide/flake-utils"; | |
nixgl.url = "github:nix-community/nixGL"; | |
}; | |
outputs = { self, nixgl, nixpkgs, utils }: | |
utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = import nixpkgs { | |
system = system; |
This file contains hidden or 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
SHELL := /bin/sh | |
export PATH := $(shell nix-shell -p openapi-generator-cli --run 'echo $$PATH') | |
output: | |
mkdir -p output && cd output && openapi-generator-cli generate -i $URL -g clojure | |
clean: | |
rm -r output |
This file contains hidden or 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
const dotCycler = (maxDots) => { | |
let dotCount = -1; | |
return () => { | |
dotCount = (dotCount + 1) % (maxDots + 1); | |
return '.'.repeat(dotCount); | |
} | |
} |
This file contains hidden or 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
{ | |
"clientId": "50144443643664262", | |
"gameId": "1454587428", | |
"language": "English", | |
"languages": [ | |
"en" | |
], | |
"name": "Fallout: New Vegas", | |
"overlaySupported": true, | |
"playTasks": [ |
This file contains hidden or 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
{ | |
"clientId": "49700451081649670", | |
"gameId": "1409964317", | |
"language": "English", | |
"languages": [ | |
"en" | |
], | |
"name": "SWAT 4 Gold Edition", | |
"playTasks": [ | |
{ |
This file contains hidden or 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 answer(y, x): | |
# Make sure we are always comparing the smaller list to the larger list. | |
if (sum(x) > sum(y)): | |
y,x = x,y | |
# The quotient of each one of the matching elements in an array | |
result = [b/a if a else 0 for a,b in zip(sorted(y), sorted(x))] | |
# Average percentage of increase, rounded up to one. | |
return int(100 - (sum(result) / float(len(result))) * 100) |
This file contains hidden or 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 mySqrt (a, precision): | |
curr_guess = a/2 | |
last_guess = curr_guess*2 | |
iterations = 1 | |
while (abs(last_guess - curr_guess) > precision): | |
last_guess = curr_guess | |
curr_guess = (a/curr_guess + curr_guess)/2 | |
iterations+=1 | |
print("Square root for {0} is {1}".format(a, curr_guess)) |
This file contains hidden or 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 java.awt.Robot | |
import java.awt.event.{InputEvent,KeyEvent} | |
class SimpleBot extends Robot{ | |
val lmb = InputEvent.BUTTON1_MASK | |
val rmb = InputEvent.BUTTON2_MASK | |
val min_delay = 200 | |
def leftClick(){ | |
this.mousePress(lmb) |
This file contains hidden or 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
PlayerModels = {} | |
PlayerModels["female"] = { | |
"models/player/group01/female_01.mdl", | |
"models/player/group01/female_02.mdl", | |
"models/player/group01/female_03.mdl", | |
"models/player/group01/female_04.mdl", | |
"models/player/group01/female_05.mdl", | |
"models/player/group01/female_06.mdl", | |
"models/player/group01/female_07.mdl", | |
"models/player/group03/female_01.mdl", |
This file contains hidden or 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 glob | |
import imp | |
from os.path import join, basename, splitext | |
def importModules(dir): | |
modules = [] | |
methods = [] | |
for path in glob.glob(join(dir, '[!_]*.py')): | |
name, ext = splitext(basename(path)) |
NewerOlder