- Download & Install Sublime Text 3.2.2 Build 3211
- Visit https://hexed.it/
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "shell", | |
"label": "Build and run", | |
"command": "g++ -g ${file} -o ${fileDirname}/${fileBasenameNoExtension} && ${fileDirname}/${fileBasenameNoExtension}", | |
"options": { | |
"cwd": "${workspaceFolder}" | |
}, |
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 pygame | |
import math | |
def findnoise2(x,y): | |
n = int(x) + int(y) * 57 | |
allf = 0xFFFFFFFF | |
an = (n << 13) & allf | |
n = (an ^ n) & allf | |
nn = (n*(n*n*60493+19990303)+1376312589)&0x7fffffff | |
return 1.0-(float(nn)/1073741824.0); |
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 math | |
class Vector(object): | |
def __init__(self, *args): | |
""" Create a vector, example: v = Vector(1,2) """ | |
if len(args)==0: self.values = (0,0) | |
else: self.values = args | |
def norm(self): | |
""" Returns the norm (length, magnitude) of the vector """ |
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
""" | |
Show the proper way to organize a game using the a game class. | |
Sample Python/Pygame Programs | |
Simpson College Computer Science | |
http://programarcadegames.com/ | |
http://simpson.edu/computer-science/ | |
Explanation video: http://youtu.be/O4Y5KrNgP_c | |
""" |
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
{ | |
BasedOnStyle: LLVM, | |
IndentWidth: 4, | |
TabWidth: 4, | |
AccessModifierOffset: -4 | |
} |
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
async function loadImageFromUrl(url: string): Promise<HTMLImageElement> { | |
return new Promise(resolve => { | |
const img = new Image(); | |
img.onload = () => { | |
resolve(img); | |
} | |
img.src = url; | |
}); | |
} |
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 pyautogui, time | |
# tempo pra respirar antes de começar a clicar tlg | |
time.sleep(3) | |
# clicador automático by magoninho gamer, todos os direitos reservados (MIT license) | |
while True: # pra sempre | |
time.sleep(0.8) # espera um tempinho | |
pyautogui.click() # clica |
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
AAAAIGZ0eXBtcDQyAAACAG1wNDJpc28yYXZjMW1wNDEAABvmbW9vdgAAAGxtdmhkAAAAAN/0WbHf9FmxAAAD6AAAKboAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAC2V0cmFrAAAAXHRraGQAAAAD3/RZsd/0WbEAAAABAAAAAAAAKaEAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAH/HHABkAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAACmhAAA6mAABAAAAAArdbWRpYQAAACBtZGhkAAAAAN/0WbHf9FmxAAFfkAAOonxVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAAKiG1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAACkhzdGJsAAAA1XN0c2QAAAAAAAAAAQAAAMVhdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAGQAZABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAOGF2Y0MBTUAf/+EAH2dNQB/so5/PP/4ALgAk1AQEBQAAAwABAAK/IA8YMZYBAAZo6uBlLIAAAAATY29scm5jbHgAAQABAAEAAAAAEHBhc3AAAAAXAAAAEgAAABRidHJ0AAAAAAAAELUAABC1AAABiHN0dHMAAAAAAAAALwAAAAUAAB1MAAAAAQAAJqwAAAAIAAAdTAAAAAEAACDQAAAAAQAAHUwAAAABAAApBAAAAAIAAB1MAAAAAQAAJ9gAAAABAAAqMAAAAAoAAB1MAAAAAQAALIgAAAACAAAdTAAA |
https://wiki.archlinux.org/title/Gamepad#Mimic_Xbox_360_controller
xboxdrv --evdev /dev/input/event* --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=y2,ABS_Z=x2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y --evdev-keymap BTN_THUMB2=a,BTN_TOP=x,BTN_TRIGGER=y,BTN_THUMB=b,BTN_TOP2=lb,BTN_BASE=lt,BTN_PINKIE=rb,BTN_BASE2=rt,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE5=tl,BTN_BASE6=tr --mimic-xpad
- (*) put the event number
use
evtest
to find your controller
OlderNewer