def get_all_issue_events(issue_id):
url = 'https://app.getsentry.com/api/0/issues/%s/events/' % issue_id
all_data = get_all_data(url)
return all_data
def get_all_data(url):
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
get_tag_migrations () { | |
last_n=$1 | |
migrations_directory=$2 | |
tags=($(git tag --sort version:refname | egrep '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$')) | |
begin=`expr ${#tags[@]} - ${last_n}` | |
subset_tags=(${tags[@]:${begin}}) | |
for (( i=0; i< `expr ${#subset_tags[@]} - 1` ; i+=1 )) ; # forwards | |
do |
- First apply the
x if not pd.isnull(x) else 'NaN'
mapping function concept to columns which havenp.nan
in them. - (that might not be necessary in pandas
0.17.1
not sure yet. ) - This feels like a really obvious function combo now in retrospect.
Out[194]: (16037, 21)
- After writing custom ways to do it finally came across the
df[cols].groupby(by=colx).size().reset_index()
combo …
-
pip install remote-pdb
-
usage:
from remote_pdb import RemotePdb; RemotePdb('127.0.0.1', 4444).set_trace()
- Can modify query search with
__iregex
for some regex based querying.
In [713]: BlahModel.objects.filter(phone__iregex=r"\d\d\d\d\d\d\d\d\d\d\d\d").val
...: ues_list('phone')
Out[713]: [(u'51615415135135',), (u'3424234234234',), (u'0971557335940',), (u' 923006306666',), (u' 923006306666',), (u' 923006306666',), (u'491725152799',), (u'4921195799170',), (u'527821398854',), (u'860290084656',)]
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
* numpy bool | |
```python | |
ipdb> pp outdf | |
a b c d e | |
0 None a [] foo True | |
1 3.4 b [asdf] no False | |
2 34 0 [{}, 0] meh False | |
... | |
... | |
ipdb> pp type(outdf.ix[0,'e']) |
- foo
last_n=15
# tags=($(git tag | egrep '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'))
tags=($(git tag --sort version:refname | egrep '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'))
begin=`expr ${#tags[@]} - ${last_n}`
subset_tags=(${tags[@]:${begin}})
# for (( i=`expr ${#subset_tags[@]} - 1`; i>=0 ; i-=1 )) ; # reverse
for (( i=0; i< `expr ${#subset_tags[@]} - 1` ; i+=1 )) ; # forwards
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 multiprocessing import Process | |
# from multiprocessing import Pool | |
from multiprocessing import Process, Pipe | |
import cPickle | |
def foo(multiproc, chunk_ids, feature_names, child_conn): | |
child_conn.send([chunk_ids, feature_names]) |
OlderNewer