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/python | |
__author__ = 'Diego Garcia' | |
from threading import Thread | |
from time import sleep | |
from random import randint | |
class MinhaThread(Thread): | |
def __init__(self, identificador, vezes): |
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
net use \\%Machine% [PasswordOfRemoteMachine] /USER:[UserOfRemoteMachine] | |
sc \\%Machine% %Action% %Service% |
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
#based on: https://github.com/sixohsix/twitter | |
__author__ = 'Diego Garcia' | |
from twitter import * | |
from my_twitter_tokens import * # TOKENS CONSTS | |
t = Twitter( | |
auth=OAuth(ACCESS_TOKEN, | |
ACCESS_TOKEN_SECRET, | |
API_KEY, |
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 subprocess import Popen, PIPE | |
import os | |
import sys | |
PROG_NAME = 'tesseract' | |
TEMP_IMAGE = 'tmp.bmp' | |
TEMP_FILE = 'tmp' | |
PSM_OSD_ONLY = 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
unit Strategy.Concrete.Lower; | |
interface | |
uses | |
Strategy.Interfaces; | |
type | |
TFormatterLower = class(TInterfacedObject, IFormatter) | |
public | |
function GetFormattedText(AText: IText): string; |
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
unit TestUntORM; | |
interface | |
uses | |
TestFramework, | |
untORM, | |
untDB, | |
untLog, | |
Delphi.Mocks; |
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
__author__ = 'Diego Garcia' | |
from pymongo import MongoClient | |
import ptracking | |
def make_tracking(cod, user, package): | |
t = ptracking.PyTracking(ptracking.BRAZIL) | |
p = t.tracking(cod) | |
p['package'] = package |
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
program Project1; | |
{$APPTYPE CONSOLE} | |
{$R *.res} | |
uses | |
System.SysUtils, | |
uSingletonGeneric in 'uSingletonGeneric.pas', | |
uMyClass in 'uMyClass.pas'; |
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
__author__ = 'diego.garcia' | |
import datetime | |
dt = datetime.datetime.strptime('February 28, 2014, 7:05 AM', '%B %d, %Y, %I:%M %p') | |
print(dt.strftime("%d/%m/%Y %I:%M %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
// ************************************************************************ // | |
// The types declared in this file were generated from data read from the | |
// WSDL File described below: | |
// WSDL : http://www.webservicex.net/CurrencyConvertor.asmx?WSDL | |
// >Import : http://www.webservicex.net/CurrencyConvertor.asmx?WSDL>0 | |
// Encoding : utf-8 | |
// Version : 1.0 | |
// (27/06/2013 19:13:01 - - $Rev: 45757 $) | |
// ************************************************************************ // |