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
stdClass Object | |
( | |
[spotInstanceRequestSet] => stdClass Object | |
( | |
[item] => Array | |
( | |
[0] => stdClass Object | |
( | |
[createTime] => 2010-02-02T21:58:25.000Z | |
[launchGroup] => BraderTest |
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 bisect | |
class NFA(object): | |
EPSILON = object() | |
ANY = object() | |
def __init__(self, start_state): | |
self.transitions = {} | |
self.final_states = set() | |
self._start_state = start_state |
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 uuid | |
import time | |
import boto | |
import json | |
from boto.sqs.message import RawMessage | |
AWSKey = "{redacted}" | |
AWSSecret = "{redacted}" | |
testQueue = "testqueue" |
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 re | |
import nltk | |
from nltk.tokenize import RegexpTokenizer | |
from nltk import bigrams, trigrams | |
import math | |
stopwords = nltk.corpus.stopwords.words('portuguese') |
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 | |
from org.apache.pig.scripting import * | |
INIT = Pig.compile(""" | |
A = LOAD 'page_links_en.nt.bz2' using PigStorage(' ') as (url:chararray, p:chararray, link:chararray); | |
B = GROUP A by url; | |
C = foreach B generate group as url, 1 as pagerank, A.link as links; | |
STORE C into '$docs_in'; | |
""") |
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 boto | |
#type that you want to get pricing on | |
MY_TYPE = u'm1.small' | |
ec2 = boto.connect_ec2() | |
spots = ec2.get_spot_price_history(instance_type= MY_TYPE) | |
spot_prices = [i.price for i in spots] |
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
PS C:\Users\hiday> mysql -u root | |
Welcome to the MariaDB monitor. Commands end with ; or \g. | |
Your MariaDB connection id is 26 | |
Server version: 10.5.7-MariaDB-log mariadb.org binary distribution | |
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. | |
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. | |
MariaDB [(none)]> use test |
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 | |
from __future__ import print_function | |
from sys import exit | |
from logging import getLogger, DEBUG, INFO, basicConfig | |
from urllib2 import urlopen, HTTPError | |
from urllib import urlretrieve | |
from gzip import open as gzopen | |
from datetime import datetime | |
from collections import defaultdict | |
from zipfile import ZipFile, is_zipfile |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
# specs and cukes results are stored in JUnit format under test-reports | |
if (grep 'failures="[^0]"' test-reports/* || grep 'errors="[^0]"' test-reports/*); then | |
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "failure", "description": "Failed!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null | |
else | |
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "success", "description": "Success!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null | |
fi |
OlderNewer