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
#include <julia.h> | |
#include <stdio.h> | |
int main() | |
{ | |
jl_init(NULL); | |
if (jl_exception_occurred()) { | |
printf("Exception occured?\n"); | |
} |
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
#coding: utf-8 | |
ROCK = 1 | |
PAPER = 2 | |
SCISSORS = 3 | |
DRAW = (0, 0) | |
FIRST_WIN = (1, -1) | |
SECOND_WIN = (-1, 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
1;"Reforma e adaptação do Estádio Magalhães Pinto (Mineirão)";1;6;;TRUE;TRUE;"O Estádio do Mineirão, Governador Magalhães Pinto, pertencente ao Governo do Estado de Minas Gerais, será reformado para a Copa 2014, adequando-se aos padrões definidos pela Fifa (Federação Internacional de Futebol). | |
De acordo com a Secretaria Extraordinária da Copa do Mundo (Secopa/MG), o projeto de reforma prevê obras para aumentar a segurança e o conforto do torcedor, tais como: rebaixamento do campo, proporcionando aumento da visibilidade; novos vestiários; recuperação estrutural do estádio, criação de novos acessos à arena, entre outras ações. Após a execução destas obras, o Mineirão apresentará os seguintes números referentes à sua estrutura: | |
- Capacidade: 64 mil torcedores. | |
- Cobertura: projeto da Cemig permitirá captação de energia solar e posterior geração de energia elétrica. | |
- Espaço VIP e Camarotes: restaurante panorâmico e 90 camarotes privativos. |
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
# -*- coding: utf-8 -*- | |
import six | |
import re | |
import hashlib | |
try: | |
from urllib2 import urlopen | |
except: | |
from urllib.request import urlopen |
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
#coding: utf-8 | |
import ctypes | |
import matplotlib | |
matplotlib.use('TkAgg') | |
import matplotlib.pyplot as plt | |
from Crypto.Random import random | |
libc = ctypes.CDLL("libc.dylib") |
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
from collections import deque | |
class Edge(object): | |
def __init__(self, _id, data): | |
self.id = _id | |
self.data = data | |
def __str__(self): | |
return "Edge {}".format(self.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
import heapq | |
import pprint | |
import sys | |
from collections import deque | |
inf = float('inf') | |
capacity = 'capacity' | |
flow = 'flow' |
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 logging | |
import sys | |
from graph import * | |
from residual import * | |
from dijkstras import Dijkstra | |
first_from_set = lambda s: list(s)[0] | |
excess_criteria = lambda x: x.supply > 0 | |
deficit_criteria = lambda x: x.supply < 0 |
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
no nginx.conf, dentro de http { } | |
upstream backs1 { | |
server 127.0.0.1:8001; | |
} | |
upstream backs2 { | |
server 127.0.0.1:8002; | |
} |
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
def bind_local_names(params): | |
'''create outer scope vars from a dict''' | |
import sys | |
for k, v in params.items(): | |
sys._getframe(1).f_locals[k] = v | |
params = dict(b='test', c=10) | |
bind_local_names(params) |
OlderNewer