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
graphitestatsd: | |
image: hopsoft/graphite-statsd | |
expose: | |
- 80 | |
- 8125/udp | |
ports: | |
- 8080:80 | |
nsqlookupd: |
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
#List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
#Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
#Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(value_list)] |
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
nsq = require 'nsqjs' | |
TOPIC = 'test_topic' | |
# Publish 10 messages | |
writer = new nsq.Writer '127.0.0.1', 4150 | |
writer.connect() | |
writer.on 'ready', -> | |
writer.publish TOPIC, ("#{i}" for i in [0...10]) |
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
[nsqd] 2014/11/18 13:05:34.381160 CLIENT(127.0.0.1:53199): desired protocol magic ' V2' | |
[nsqd] 2014/11/18 13:05:34.382909 [127.0.0.1:53199] IDENTIFY: {ShortId:tookis-7 LongId:tookis-7.local ClientID:tookis-7 Hostname: HeartbeatInterval:30000 OutputBufferSize:0 OutputBufferTimeout:0 FeatureNegotiation:true TLSv1:false Deflate:false DeflateLevel:6 Snappy:false SampleRate:0 UserAgent:nsqjs/0.6.0 MsgTimeout:0} |