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
#encoding: utf-8 | |
from pyftpdlib.authorizers import DummyAuthorizer | |
from pyftpdlib.handlers import FTPHandler | |
from pyftpdlib.servers import FTPServer | |
import sys | |
# importante: a biblioteca pyftpdlib não é padrão do python, precisa ser instalada | |
# link: https://code.google.com/p/pyftpdlib/downloads/list |
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 | |
from ftplib import FTP | |
import log | |
import logging | |
#log.criarLog() | |
log.atualizarLog() | |
# A função abaixa um arquivo definido por 'filename' na pasta definida por local com o nome | |
# especificado por 'name' | |
def download(handler, name, filename="musica1.mp3"): |
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
# CLI command line interface | |
# coding: utf-8 | |
# using: python 2.7 | |
import ftpClient as client | |
commands_list = ['Db', 'Q', 'L', 'Ub', 'H', 'Mv', 'Mk', 'Dl'] |
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 time | |
tempo = time.localtime() | |
dia = tempo.tm_mday | |
mes = tempo.tm_mon | |
ano = tempo.tm_year | |
seg = tempo.tm_sec | |
arquivo = open('logs/log.txt','a') | |
def criarLog(): | |
global arquivo,dia,mes,ano,seg |
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 urllib.request | |
import random | |
palavras = urllib.request.urlopen( | |
'http://www.puzzlers.org/pub/wordlists/unixdict.txt' | |
).read().decode('iso8859').lower().split() | |
def escolha(): |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Conteudo</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
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
f = lambda lista: len(lista) == True | |
i = 0 | |
def corrigirNome(nome): | |
nome=nome.strip() | |
prondliga=['dos','das'] | |
prondliga2=['de','do','da'] | |
if len(nome) > 3: | |
l = [i for i in range(len(nome)) if nome[i] in '0123456789'] | |
if f(l) == True: | |
print('Não pode conter numeros') |
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 java.util.List; | |
public class Teste { | |
public static void main(String[] args) { | |
Estoque e = new Estoque(); | |
//cadastrando carros |
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 java.applet.Applet; | |
import java.awt.BorderLayout; | |
import java.awt.Button; | |
import java.awt.Event; | |
import java.awt.GridLayout; | |
import java.awt.Label; | |
import java.awt.Panel; | |
public class Jogo extends Applet{ |
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 unittest | |
def fat(n): | |
if n == 1 or n == 0: | |
return n | |
return fat(n - 1) * n; | |
class Test(unittest.TestCase): |
OlderNewer