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
{ | |
int i; int j; float v; float x; float[100] a; | |
while( true ) { | |
do i = i+1; while( a[i] < v); | |
do j = j-1; while( a[j] > v); | |
if( i >= j ) break; | |
x = a[i]; a[i] = a[j]; a[j] = x; | |
} | |
} |
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 re | |
import shlex | |
from glob import glob | |
from subprocess import Popen, PIPE | |
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; |
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
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
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
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
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
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
# -*- 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 |
NewerOlder