Skip to content

Instantly share code, notes, and snippets.

def test_urls(self):
profiling_api_url = url_for('profiling_api')
urls = (
url_for('index'),
url_for('test_api'),
url_for('test_sentry'),
url_for('profiling'),
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@s1ider
s1ider / schemas.py
Created June 16, 2016 14:00
JSON schema validation with Trafaret
# -*- coding: utf-8 -*-
import trafaret as t
class SchemaValidationError(t.DataError):
pass
# /hotels/destination_lookup
https://confluence.jetbrains.com/display/YTD65/YouTrack+REST+API+Reference
@s1ider
s1ider / py
Created September 2, 2015 15:01
Feature: GetGoing API playground
Background:
Given I am on 'Playground' page
When Fill form:
| label | value | field_type |
| API KEY | 123132 | TextEdit |
| SECRET KEY | 123132 | TextEdit |
| Nonce | <random> | TextEdit |
| System | Mobile | Select |
from multiprocessing import Pool
from subprocess import call, Popen, PIPE
from glob import glob
from datetime import datetime
import logging
import argparse
import json
from functools import partial
logging.basicConfig(level=logging.INFO,
@s1ider
s1ider / git-prompt.sh
Last active August 29, 2015 13:58
Enables git prompt for bash.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
{
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"cucumber_code_keywords":
[
"given",
"when",
"then",
"and",
"but",
"und",
@s1ider
s1ider / gist:3879117
Created October 12, 2012 13:09
basic DB agent class
from sqlalchemy import create_engine, func
from sqlalchemy.orm import scoped_session, sessionmaker
from yaml import load
import urllib
import logging
# can be removed when using as a library
logging.basicConfig(format="%(asctime)s %(levelname)s\t%(message)s", level=logging.DEBUG)
class LSDB():
@s1ider
s1ider / gist:1780859
Created February 9, 2012 16:12
Word value calculator
word = input('say something: ')
value = 0
for char in word.upper():
value += ord(char) - 64
print("Your value is {}".format(value))