Skip to content

Instantly share code, notes, and snippets.

View joshourisman's full-sized avatar

Josh Ourisman joshourisman

View GitHub Profile
class hashtable:
"""It's a hashtable..."""
__bucketuse = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
__table = {} # The actual hash table
__used = 0.0 # The number of entries in the table
def __init__(self, keys=None):
if keys:
for key in keys:
from invoke import task
from tablib import Dataset
from yaml import load
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader
from .base import set_gcloud_config, SERVICES
# Install only runtime dependencies.
FROM node:8.5-alpine AS base
RUN apk add --no-cache build-base python
COPY package.json.tmp ./package.json
COPY yarn.lock ./
ENV NODE_ENV production
RUN yarn --pure-lockfile --production=true
# Build the app.
FROM node:8.5-alpine AS build
class hashtable:
"""It's a hashtable..."""
__bucketuse = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
__table = {} # The actual hash table
__used = 0.0 # The number of entries in the table
def __init__(self, keys=None):
if keys:
for key in keys:
from celery_haystack.indexes import CelerySearchIndex
from celery_haystack.signals import CelerySignalProcessor
from celery_haystack.utils import enqueue_task
from haystack.exceptions import NotHandled
class CelerySignalProcessor(CelerySignalProcessor):
def enqueue(self, action, instance, sender, **kwargs):
using_backends = self.connection_router.for_write(instance=instance)
def test_bulk_create_timestamps(self):
provider = Provider.objects.create(**{
'url': 'http://www.google.com/',
'name': 'Google',
'names': json.dumps(['Google', ]),
'favicon_url': 'http://www.google.com/favicon.ico',
})
import_id = uuid4()
pre_create = utc.localize(datetime.datetime.utcnow())
from django.conf import settings
from django.db import models
class Project(models.Model):
editors = models.ManyToManyField(
settings.AUTH_USER_MODEL, through='EditorMap', related_name='editable')
viewers = models.ManyToManyField(
settings.AUTH_USER_MODEL, through='ViewerMap', related_name='viewable')
Уважаемые Граждане Еврейской Национальности!
В связи с тем, что лидеры еврейской общины Украины поддержали бандеровскую хунту в Киеве и враждебно
настроены в отношений православной Донецкой республики и её граждан, Главный Штаб Донецкой народной
республики постановил следующее:
Всем гражданам еврейской национальности старше 16 лет, проживающим на территории суверенной Донецкой
республики, необходимо в срок до 03 мая 2014г. явиться к и.о. комиссара по делам национальностей в здание
Донецкой ОДА каб. 514 для регистрации составляет 50 долларов США.
~ » brew doctor ~
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools for Xcode" package provided by Apple.
Warning: You are using Mac OS X 10.9.
We do not yet provide support for this (unreleased) version.
~ » brew --config ~ 1 ↵
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
class AsyncRegistrationTestCase(ResourceTestCase):
def setUp(self):
super(AsyncRegistrationTestCase, self).setUp()
self.resource = RegistrationResource()
self.resource.get_resource_uri()
def test_resource_uri(self):
self.assertNotEqual('', self.resource.get_resource_uri())
def test_resource_uri_2(self):