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
int gcd(int a, int b) | |
{ | |
return (a%b==0)?b:gcd(b,a%b); //Jacob | |
} | |
int gcd2(int a, int b) | |
{ | |
//iterative version | |
int temp; | |
while (a) |
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
# Gonzalo Ciruelos | |
# Problem A | |
def intersection(set1, set2): | |
for a in set1: | |
if a in set2: | |
yield a | |
f = open('A-small-attempt0.in', 'r') |
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 Data.Maybe | |
import System.IO.Unsafe | |
import Debug.Trace | |
data P = T | F | Var Char | Or P P | And P P | If P P | |
deriving Eq | |
instance Show P where | |
show T = "T" |
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
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour136 #yellow | |
set-option -g status-attr default | |
#vewy importnat, puede freezear la terminal sin esto | |
set -g set-titles off | |
setw -g c0-change-trigger 10 | |
setw -g c0-change-interval 250 |
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
#------------------------------------------------------------------# | |
# File: .zshrc ZSH resource file # | |
# Version: 0.1.16 # | |
# Author: Øyvind "Mr.Elendig" Heggstad <[email protected]> # | |
#------------------------------------------------------------------# | |
#------------------------------ | |
# History stuff | |
#------------------------------ | |
HISTFILE=~/.histfile |
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
.text | |
.file "fact.c" | |
.section .rodata.cst16,"aM",@progbits,16 | |
.align 16 | |
.LCPI0_0: | |
.long 1 # 0x1 | |
.long 1 # 0x1 | |
.long 1 # 0x1 | |
.long 1 # 0x1 | |
.LCPI0_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
''' | |
Post: http://gciruelos.com/what-is-the-roundest-country.html | |
Compute and create table of the roundness of all the countries. | |
Needs file ne_10m_admin_0_sovereignty. | |
''' | |
import base64 | |
import io | |
import math | |
import operator |
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 python3 | |
asm = { | |
'AAA': {'name': 'AAA','url': 'http://www.felixcloutier.com/x86/AAA.html','description': 'ASCII Adjust After Addition'}, | |
'AAD': {'name': 'AAD','url': 'http://www.felixcloutier.com/x86/AAD.html','description': 'ASCII Adjust AX Before Division'}, | |
'AAM': {'name': 'AAM','url': 'http://www.felixcloutier.com/x86/AAM.html','description': 'ASCII Adjust AX After Multiply'}, | |
'AAS': {'name': 'AAS','url': 'http://www.felixcloutier.com/x86/AAS.html','description': 'ASCII Adjust AL After Subtraction'}, | |
'ADC': {'name': 'ADC','url': 'http://www.felixcloutier.com/x86/ADC.html','description': 'Add with Carry'}, | |
'ADD': {'name': 'ADD','url': 'http://www.felixcloutier.com/x86/ADD.html','description': 'Add'}, | |
'ADDPD': {'name': 'ADDPD','url': 'http://www.felixcloutier.com/x86/ADDPD.html','description': 'Add Packed Double-Precision Floating-Point Values'}, |
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 itertools | |
import pprint | |
pp = pprint.PrettyPrinter(depth=6) | |
def creciente_estricta(l): | |
return all(x<y for x, y in zip(l, l[1:])) | |
def generar_matrices(p): | |
lista = itertools.permutations(range(2*p), 2*p) |
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
ifndef $(CC) | |
CC = gcc | |
endif | |
WARNINGS = -Wall -Wextra -Werror -Wshadow -Wstrict-prototypes -Wpointer-arith \ | |
-Wcast-qual | |
OPT_FLAGS = -O2 -flto -ffast-math | |
CFLAGS = $(WARNINGS) -Werror -std=c99 -pedantic | |
LFLAGS = -lm | |
TEST_DIR = test/ | |
SRC_DIR = src/ |
OlderNewer