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' | |
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
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
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
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
#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
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
#!/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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from flask import Flask, redirect, abort, jsonify, url_for, request | |
import string | |
import random | |
app = Flask("encolinks") | |
links = {} |
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
String.prototype.format = function() { | |
var formatted = this; | |
for (var i = 0; i < arguments.length; i++) { | |
var regexp = new RegExp('\\{'+i+'\\}', 'gi'); | |
formatted = formatted.replace(regexp, arguments[i]); | |
} | |
return formatted; | |
}; | |
var txt = "Nome: {0} | Sobrenome: {1}".format("Diego", "Garcia"); |