Skip to content

Instantly share code, notes, and snippets.

View greggyNapalm's full-sized avatar

Gregory Komissarov greggyNapalm

  • Saint-Petersburg
View GitHub Profile
developers_groups:
- 'developres'
- 'ninjas'
ops_groups:
- 'ops'
- 'wheel'
robots_groups:
- 'robots'
with_items:
- developers_groups
- ops_groups
- robots_groups
- company_groups
developers_groups:
- 'developres'
- 'ninjas'
ops_groups:
- 'ops'
- 'wheel'
robots_groups:
- 'robots'
>>> from __future__ import print_function
>>>
>>> developers_groups = ['developres', 'ninjas']
>>> ops_groups = ['ops', 'wheel']
>>> robots_groups = ['robots']
>>> company_groups = ['company']
>>>
>>> do_somth = lambda g: print(g)
>>> all_groups = developers_groups + ops_groups + robots_groups + company_groups
>>> for g in all_groups:
developers_groups:
- developres
- ninjas
ops_groups:
- ops
- wheel
robots_groups:
- robots
$ go get github.com/greggyNapalm/katyusha/katyusha
# cd .; git clone https://github.com/greggyNapalm/katyushalib /Users/gkomissarov/.gvm/pkgsets/go1.2.1/global/src/github.com/greggyNapalm/katyushalib
Cloning into '/Users/gkomissarov/.gvm/pkgsets/go1.2.1/global/src/github.com/greggyNapalm/katyushalib'...
remote: Repository not found.
fatal: repository 'https://github.com/greggyNapalm/katyushalib/' not found
package github.com/greggyNapalm/katyushalib: exit status 128
In [15]:
print type(df_with_tags.tags)
print type(df_with_tags.tags.values)
print df_with_tags.tags.head(10)
np.searchsorted(df_with_tags.tags[0], 'wizz_x')
<class 'pandas.core.series.Series'>
from raven import Client
from raven.conf import setup_logging
from raven.handlers.logging import SentryHandler
from raven.contrib.celery import register_signal
from celery import Celery
celery = Celery()
celery.config_from_object(celeryconfig)
sentry_client = Client(worker_cfg['sentry_dsn'])
>>> dst_addr = '127.0.0.1'
>>> dst_port = 80
>>> 'http://{:s}:{:d}'.format(dst_addr, dst_port)
'http://127.0.0.1:80'
package main
import (
"io"
"time"
"strconv"
"net/http"
"fmt"
"encoding/json"
"github.com/kr/pretty"