Skip to content

Instantly share code, notes, and snippets.

View pta2002's full-sized avatar
💻
Aaaaaaaaaaa

Pedro Alves pta2002

💻
Aaaaaaaaaaa
View GitHub Profile
import time
class Node(object):
def __init__(self, name, weight, children):
self.name = name
self.weight = weight
self.children = children
def __str__(self):
return self.name + " " + str(self.children)
class Node(object):
def __init__(self, name, weight, children):
self.name = name
self.weight = weight
self.children = children
def parse(content):
queue = {}
for l in content.split('\n'):
if l.strip() != '':
bank = [5,1,10,0,1,7,13,14,3,12,8,10,7,12,0,6]
seenCombos = []
seen = False
cycles = 0
while not seen:
seenCombos.append(bank.copy())
maxindex = bank.index(max(bank))
b = bank[maxindex]
def parse(s):
n = []
for l in s.split('\n'):
if l != '':
n.append(int(l))
return n
with open('d5in.txt') as f:
nums = parse(f.read())
pos = 0
Section "Monitor"
Identifier "HDMI"
EndSection
Section "Monitor"
Identifier "DVI"
Option "RightOf" "HDMI"
EndSection
section .text
global _start
_start:
mov eax,1
int 80h
@pta2002
pta2002 / -
Created September 10, 2017 14:27
Linking hello ...
/usr/bin/ld: cannot find -lHSbase-4.9.1.0
/usr/bin/ld: cannot find -lHSinteger-gmp-1.0.0.1
/usr/bin/ld: cannot find -lHSghc-prim-0.5.0.0
/usr/bin/ld: cannot find -lHSrts
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
import $ from 'jquery'
let keys = {}
$(document).keydown((e) => {
keys[e.key] = true
})
$(document).keyup((e) => {
keys[e.key] = false
L_nil = None
class LispType(object):
def get_val(self, env, vars={}):
return L_nil
class Lisp_Int(LispType):
def __init__(self, num):
self.val = num
def get_val(self, env, vars={}):
! ############
! # COLORS #
! ############
! special
*.foreground: #d3d0c8
*.background: #2d2d2d
*.cursorColor: #d3d0c8
! black
*.color0: #2d2d2d