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
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()) |
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 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) |
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
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: |
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
# 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 |
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 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 |
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
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: |
OlderNewer