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
#!/bin/bash | |
ORIG="`zenity --file-selection --directory \ | |
--title "Pasta com as imagens originais"`" | |
echo "ORIG: $ORIG" | |
if [ -z "$ORIG" ]; then | |
exit 1 | |
fi |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import re | |
import locale | |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, GObject |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char *argv[]){ | |
int i; | |
// Vetor de subvetores de inteiros com tamanhos não definidos | |
int* A[] = {(int[]){4, 5}, (int[]){1}, (int[]){3, 6, 7}}; | |
// Vetor com o tamanho de cada subvetor | |
int An[] = {2, 1, 3}; |
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
arvore = [ | |
[0, False], | |
[1, True], | |
[1, False], | |
[2, False], | |
[2, True], | |
[2, False], | |
[3, False], | |
[3, True], | |
[2, False], |
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 java.security.KeyStore; | |
import java.security.PrivateKey; | |
import java.security.Signature; | |
import java.security.SecureRandom; | |
import java.util.Enumeration; | |
import javax.xml.bind.DatatypeConverter; | |
class Token { | |
public static void main(String[] a) { |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Dados sequenciais | |
# dados = range(1, 1 << 5) | |
# Dados aleatórios duplicados | |
from random import randint | |
dados = [randint(0, 9) for x in xrange(1, 1 << 7)] |
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
#include <Python.h> | |
/* Compilando: | |
* gcc -Wall -shared -fPIC -o intercalar.so intercalar.c -I /usr/include/python2.7 | |
* | |
* Usando: | |
* import intercalar | |
* intercalar.intercalar('AABBCCDDEE', '1', 2) | |
*/ |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
OPERADORES = (u'√^', '*/', '+-') | |
RE_OPS = '([\\' + '\\'.join(''.join(OPERADORES)) + '])' | |
def separar_operandos_e_operadores(expressao): |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def perguntar(texto, tipo, igual_a=None, maior_que=None, menor_que=None): | |
texto += ' ' if texto[-1] in [':', '?'] else ': ' | |
while True: | |
try: | |
digitado = tipo(raw_input(texto)) | |
valido = (igual_a is None |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
ciclos = int(input("Digite o número de ciclos: ")) | |
import time | |
t0 = time.time() | |
base = [1, 5, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41] |