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
package torneio; | |
import robocode.*; | |
import java.awt.Color; | |
/** | |
* Rosquinha - um robô carrossel! | |
* | |
* Robô utilizado no campeonato de Robocode do IFES, em 2008. | |
*/ | |
public class Rosquinha extends AdvancedRobot |
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
package prova; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.util.Scanner; | |
public class Arquivo { | |
private File arquivo; | |
private Scanner leitor; |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"image/png" | |
"os" | |
) | |
func main() { |
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 test_excluir_empresario_tambem_deve_excluir_empresa(self): | |
"""Excluir um empresário também deve excluir todas as suas empresas""" | |
empresario = Empresario.objects.get(pk=1) | |
id_empresa = empresario.empresa.id | |
empresario.delete() | |
# Verifica se a empresa foi deletada | |
self.assertRaises(Empresa.DoesNotExist, Empresa.objects.get, pk=id_empresa) |
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 contextlib | |
import os | |
import time | |
from fabric.api import cd, env, roles, run, settings, sudo | |
env.root = os.path.dirname(__file__) | |
env.app = os.path.join(env.root, 'manouche_us') | |
env.project_root = '/home/manouche/djangodash2011' |
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 gdata.contacts.client | |
import gdata.contacts.data | |
USER = "" | |
PASSWD = "" | |
PREFIX = '041' | |
def add_prefix_to_contacts(gd_client, prefix): |
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 <stdio.h> | |
#include <stdlib.h> | |
int main (int argc, char const* argv[]) { | |
div_t divmod = div(8, 3); | |
printf("%d - %d", divmod.quot, divmod.rem); | |
return 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
# -*- coding:utf-8 -*- | |
""" | |
Data-Factory | |
------------ | |
Data-Factory is a simple random data generator library that | |
aims to make easier to generate random data for databases | |
or object factories. | |
""" |
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 os | |
import sys | |
my_dir = os.path.dirname(__file__) | |
parent_dir = os.path.abspath(os.path.join(MY_DIR, '..')) | |
sys.path.append(parent_dir) |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
c := make(chan int, 4) | |
c <- 1 | |
c <- 2 |