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 datetime | |
from functools import partial | |
converter_data = lambda d: datetime.datetime.strptime( | |
d, '%Y-%m-%d %H:%M:%S' | |
) | |
DATAS = map(converter_data, | |
"""2012-09-13 11:30:46 | |
2013-01-28 19:36:31 |
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 -*- | |
import os | |
from Queue import Queue | |
from urlparse import urlparse | |
from threading import Thread, Lock | |
import requests | |
CHUNCK_SIZE = 8192 |
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 -*- | |
# NOQA # Baseado em http://pycurl.cvs.sourceforge.net/viewvc/pycurl/pycurl/examples/retriever-multi.py?view=markup | |
try: | |
import signal | |
from signal import SIGPIPE, SIG_IGN | |
signal.signal(signal.SIGPIPE, signal.SIG_IGN) | |
except ImportError: | |
pass |
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
git add . >> /dev/null | |
git commit -m "parcial commit (backup)" >> /dev/null | |
git push origin `git rev-parse --abbrev-ref HEAD`:backup -f >> /dev/null | |
git reset HEAD~1 >> /dev/null |
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
from __future__ import print_function | |
import sys | |
import time | |
def main(): | |
t0 = time.time() | |
while 1: |
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
WIDTH=32; | |
DEPTH=1024; | |
ADDRESS_RADIX=UNS; | |
DATA_RADIX=BIN; | |
CONTENT BEGIN | |
00: 00100000000010010000000000000000; |
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 os | |
import json | |
from pprint import pprint | |
from collections import defaultdict | |
import click | |
import numpy as np | |
import matplotlib.pyplot as plt | |
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
DECLARE @SQL varchar(max); | |
set @SQL = | |
' | |
SELECT ''TFA-2073-TR04-PIT-01'' as tag, MIN(ip_trend_time) FROM "TFA-2073-TR04-PIT-01" ORDER BY ip_trend_time UNION | |
SELECT ''TFA-2073-TR03-TIT-13'' as tag, MIN(ip_trend_time) FROM "TFA-2073-TR03-TIT-13" ORDER BY ip_trend_time UNION | |
SELECT ''TFA-2073-TR03-TIT-06'' as tag, MIN(ip_trend_time) FROM "TFA-2073-TR03-TIT-06" ORDER BY ip_trend_time UNION | |
SELECT ''TFA-2073-TR03-TIT-05'' as tag, MIN(ip_trend_time) FROM "TFA-2073-TR03-TIT-05" ORDER BY ip_trend_time UNION | |
SELECT ''TFA-2073-TR02-WIT-01'' as tag, MIN(ip_trend_time) FROM "TFA-2073-TR02-WIT-01" ORDER BY ip_trend_time UNION | |
SELECT ''TFA-2073-TR03-TIT-14'' as tag, MIN(ip_trend_time) FROM "TFA-2073-TR03-TIT-14" ORDER BY ip_trend_time UNION | |
SELECT ''TFA-2073-TR03-TIT-01'' as tag, MIN(ip_trend_time) FROM "TFA-2073-TR03-TIT-01" ORDER BY ip_trend_time UNION |
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 <cmath> | |
#include <cassert> | |
#include <iostream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
bool is_subseq(const string &str2, const string &str1) { | |
int m = str1.size(); |
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 <cmath> | |
#include <cassert> | |
#include <iostream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
bool is_subseq(const string &h, const string &n) { | |
int j = 0; |