Skip to content

Instantly share code, notes, and snippets.

View kragniz's full-sized avatar
🥀
🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓

Louis Taylor kragniz

🥀
🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓🥀⛓
View GitHub Profile
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
trial = {}
def make_time_temp(string_to_parse):
first_time = None
last_time, last_temp = 0, 0
@kragniz
kragniz / _
Last active August 29, 2015 14:02
sail_sponsors
_
@kragniz
kragniz / long_distance.py
Created June 12, 2014 18:33
Race courses
[
(38.067489220, -122.232032748),
(38.065881344, -122.236984956),
(38.064899836, -122.246668872),
(38.065863818, -122.255217433),
(38.067685000, -122.258500000),
(38.067134502, -122.254282434),
(38.066696337, -122.246312682),
(38.066932947, -122.237118528),
(38.067221000, -122.232100000),
import sys, tty, termios
def read_char():
'''
Read a single character from a unix terminal and immediately return it.
'''
# grab a file descriptor
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
@kragniz
kragniz / images.py
Created August 26, 2014 08:18
glance/api/v1/images.py
if (image_size_store and
image_size_store != image_size_meta):
msg = (_LW("Provided image size must match the stored"
" image size. (provided size: %(ps)d, "
"stored size: %(ss)d)") % {
"ps": image_size_meta,
"ss": image_size_store})
LOG.warn(msg)
raise HTTPConflict(explanation=msg,
request=req,
@kragniz
kragniz / keystone
Created August 28, 2014 13:21
Keystone traceback
[Thu Aug 28 13:14:55.023769 2014] [:error] [pid 1534:tid 139830384756480] 1534 DEBUG keystone.middleware.core [-] Auth token not in the request header. Will not build auth context. process_request /opt/stack/keystone/keystone/middleware/core.py:276
[Thu Aug 28 13:14:55.025097 2014] [:error] [pid 1534:tid 139830384756480] 1534 DEBUG keystone.common.wsgi [-] arg_dict: {} __call__ /opt/stack/keystone/keystone/common/wsgi.py:183
[Thu Aug 28 13:14:55.025592 2014] [:error] [pid 1534:tid 139830384756480] 1534 WARNING keystone.common.wsgi [-] Could not find version: v2.0
[Thu Aug 28 13:14:55.029426 2014] [:error] [pid 1530:tid 139830384756480] 1530 DEBUG keystone.middleware.core [-] Auth token not in the request header. Will not build auth context. process_request /opt/stack/keystone/keystone/middleware/core.py:276
[Thu Aug 28 13:14:55.030977 2014] [:error] [pid 1530:tid 139830384756480] 1530 DEBUG keystone.common.wsgi [-] arg_dict: {} __call__ /opt/stack/keystone/keystone/common/wsgi.py:183
[Thu Aug 28 13:14:55.0343
@kragniz
kragniz / keybase.md
Created November 3, 2014 11:35
keybase.io

Keybase proof

I hereby claim:

  • I am kragniz on github.
  • I am kragniz (https://keybase.io/kragniz) on keybase.
  • I have a public key whose fingerprint is CCBE 4586 336F E1BF BC64 5050 8E81 A6DA E13E 7098

To claim this, I am signing this object:

@kragniz
kragniz / gist:2dceb3aae6579522aa5f
Created November 21, 2014 17:18
glanceclient multiple upload
$ glance image-create --name non-queued --disk-format qcow2 --container-format bare --file files/images/cirros-0.3.2-x86_64-uec/cirros-0.3.2-x86_64-blank.img
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 4eada48c2843d2a262c814ddc92ecf2c |
| container_format | bare |
| created_at | 2014-11-21T16:56:14 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
@kragniz
kragniz / swift
Created January 14, 2015 13:54
Swift devstack
$ cd ~/devstack
$ cat localrc
ADMIN_PASSWORD=whatevs
MYSQL_PASSWORD=whatevs
RABBIT_PASSWORD=whatevs
SERVICE_PASSWORD=whatevs
SERVICE_TOKEN=whatevs
FLAT_INTERFACE=br100
HOST_IP=10.0.0.7
ubuntu in ~/git/searchlight on (detached from sjmc7/metadef-plugin)*
$ tox -e py27
py27 create: /home/ubuntu/git/searchlight/.tox/py27
py27 installdeps: -r/home/ubuntu/git/searchlight/requirements.txt, -r/home/ubuntu/git/searchlight/test-requirements.txt
py27 develop-inst: /home/ubuntu/git/searchlight
py27 runtests: PYTHONHASHSEED='2186359158'
py27 runtests: commands[0] | lockutils-wrapper python setup.py testr --slowest --testr-args=
running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \