text
stringlengths
17
737k
from __future__ import division import rstbx.viewer.display import wx from rstbx.slip_viewer.frame import XrayFrame from rstbx.viewer.frame import SettingsFrame, SettingsPanel class SpotFrame(XrayFrame) : def __init__ (self, *args, **kwds) : self.sweep_filenames = kwds["sweep_filenames"] self.reflections = k...
ec2c97e4-2e73-11e5-9284-b827eb9e62be
''' Created on Nov 7, 2011 @author: cryan ''' import unittest import numpy as np from scipy.constants import pi import matplotlib.pyplot as plt from PySim.SystemParams import SystemParams from PySim.PulseSequence import PulseSequence from PySim.Simulation import simulate_sequence_stack, simulate_sequence from PyS...
"""tot URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/dev/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
6c4a4fa8-2e73-11e5-9284-b827eb9e62be
134ddfae-2e74-11e5-9284-b827eb9e62be
# Copyright (C) 2006-2007 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is dis...
"""SunPy utility functions""" from __future__ import absolute_import from .util import * from .unit_conversion import * from .sysinfo import *
# coding: utf-8 import types import pandas as pd from .seidel import Triangulator def tesselate_shapes_frame(df_shapes, shape_i_columns): ''' Tesselate each shape path into one or more triangles. Return `pandas.DataFrame` with columns storing the following fields for each row (where each row corresp...
# Copyright (c) 2010-2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
import tensorflow as tf import os import time from tqdm import tqdm from src.utils import get_cli_params, process_cli_params, \ order_param_settings from src.lva import build_graph, measure_smoothness, build_vat_graph, VERBOSE from src.train import evaluate_metric_list, update_decays, evaluate_metric import numpy ...
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:Creative Commons GNU GPL v2 # (http://creativecommons.org/licenses/GPL/2.0/) """Simple-to-use Python interface to The TVDB's API (www.thetvdb.com) Example usage: >>> from tvdb_api import Tvdb >...
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:Creative Commons GNU GPL v2 # (http://creativecommons.org/licenses/GPL/2.0/) """ tvdb_api.py Simple-to-use Python interface to The TVDB's API (www.thetvdb.com) Example usage: >>> from tvdb_api ...
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2018 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
# Note: Even though this has Sphinx format, this is not meant to be part of the public docs """ ************ File Caching ************ Implements a cache on local disk for Synapse file entities and other objects with a `FileHandle <https://rest.synapse.org/org/sagebionetworks/repo/model/file/FileHandle.html>`_. This ...
02766586-2e72-11e5-9284-b827eb9e62be
42c8b65a-2e74-11e5-9284-b827eb9e62be
306a9732-2e72-11e5-9284-b827eb9e62be
9a0b0cd4-2e73-11e5-9284-b827eb9e62be
# Version control system repository manager. # # Author: Peter Odding <peter@peterodding.com> # Last Change: July 14, 2017 # URL: https://github.com/xolox/python-vcs-repo-mgr """ Python API for the `vcs-repo-mgr` package. .. note:: This module handles subprocess management using :mod:`executor`. This means ...
"""Version string parser and generator.""" import collections.abc import enum import itertools import logging import re import typing as t import packaging.version import pkg_resources import semver _LOG = logging.getLogger(__name__) @enum.unique class VersionComponent(enum.IntEnum): """Enumeration of standar...
f744713e-2e72-11e5-9284-b827eb9e62be
""" player.py Contains the definition of the Player class. Written by: Mohsin Rizvi Last edited: 09/28/17 """ import ability import item import bio import zone import random import damage # The Player character. class Player: # Purpose: Constructor for the Player class. # Parameters: A name for the Pla...
import os import ssl import string import sys import platform import re gam_author = 'Jay Lee <jay0lee@gmail.com>' gam_version = '5.05' gam_license = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' GAM_URL = 'https://git.io/gam' GAM_INFO = (f'GAM {gam_version} - {GAM_URL} / {gam_author} / ' ...
from django.shortcuts import get_object_or_404, redirect from django.db import transaction from rest_framework import viewsets from rest_framework.mixins import CreateModelMixin, ListModelMixin, RetrieveModelMixin from .serializers import GameSerializer, PlayerSerializer, TargetSerializer from .models import Game, Play...
# Downloads and uses the XML version of the US Code to extract a table of contents. # # Outputs JSON to STDOUT. Run and save with: # ./run structure_xml > structure.json # # options: # title: Do only a specific title (e.g. "5", "5a", "25") # sections: Return a flat hierarchy of only titles and sections (no inter...
# # # Copyright (C) 2006, 2007, 2008 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is ...
# -*- coding: utf-8 -*- from django.db import models from django.dispatch import Signal from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic #from datetime import datetime from vkontakte_api.utils import api_call from vkontakte_api import fields from vkontakte_api.m...
# encoding: UTF-8 from __future__ import print_function import requests import execjs from datetime import datetime, timedelta from vnpy.trader.app.ctaStrategy.ctaBase import CtaBarData, CtaTickData class UtilSinaClient(object): """ SINA数据客户端,主要使用requests开发 v1.1 增加start_dt参数,在这个时间点之前的bar全部忽略 """ ...
#-*- coding: utf-8 -*- import urllib2, time, re, random, json def _pic(url, title=None): if '?' in url: concat_char = '&' else: concat_char = '?' if title: return '<%s%scb=%s.jpg|%s>' % (url, concat_char, time.time(), title) else: return '<%s%scb=%s.jpg>' % (url, concat_char, time.time()) def piramida(us...
import hashlib import logging import os.path import time from collections import OrderedDict from contextlib import contextmanager from io import BytesIO from django.conf import settings from django.core import checks from django.core.cache import InvalidCacheBackendError, caches from django.core.files import File fr...
from contextlib import contextmanager from pathlib import Path import os from django.conf import settings from django.db import models from django.urls import reverse from django.utils import timezone from django.utils.translation import gettext_lazy as _ from tinymce.models import HTMLField from taggit.managers impor...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
# 6.00.1x Problem Set 7 # RSS Feed Filter import feedparser import string import time from project_util import translate_html from Tkinter import * #----------------------------------------------------------------------- # # Problem Set 7 #====================== # Code for retrieving and parsing RSS feeds # Do not ...
# -*- coding: utf-8 -*- # This file is part of Cockpit. # # Copyright (C) 2013 Red Hat, Inc. # # Cockpit is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your...
from __future__ import division from six.moves import map, zip import numpy as np from scipy.stats import poisson from scipy import optimize from scipy.misc import derivative from matplotlib import pyplot as plt import pymc import inspect class CompositeHypothesis(object): """A CompositeHypothesis translates a set...
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
import sys,os,re, math #[state, S0, Z0, S1, Z1] # S0:S0/S0,S1/Z1 transition = {} # Cell: {crossed-out, [(pairs)]} print("Implication chart calculator v0.1") print("MIT licensed.") print("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES O...
import re from lepl import (List, Token, Delayed, RuntimeLexerError, FullFirstMatchException, sexpr_to_tree) from errors import TypeIncorrectlySpecifiedError class PType: # Literals. INT = 0 FLOAT = 1 STRING = 2 UNICODE = 3 BOOL = 4 UNIT = 5 # Containers. LIST ...
import asyncio import traceback from httptools import HttpRequestParser, parse_url from httptools.parser.errors import HttpParserError from mach9.exceptions import ( RequestTimeout, PayloadTooLarge, InvalidUsage, ServerError) from mach9.response import ALL_STATUS_CODES class BodyChannel(asyncio.Queue): def ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Softwar...
#!/usr/bin/python3 import collections # for named tuple && Counter (multisets) import re # for regex from enum import Enum # for enumerations (enum from C) import logging # for logging functions import colorlog # colors log output import random # for stochastic chosing of programs import time # for time.time() #from...
# Copyright 2013, 2014 IBM Corp. # from cinderclient.v1 import client import cinder.db.sqlalchemy.models import sys import time import logging from oslo.config import cfg from cinder import db from cinder import context from cinder import service as taskservice from cinder.openstack.common import service from cinder ...
import os import hashlib from endian import Endian class Srp: """A class for using an edited SRP6, created to work with WoW Logon system.""" def __init__(self, N, g, I, p, s, B, k=3): """Initialize the class """ # N,g,s,B should be in bytestring format ("\x01\x10\x03") self.a...
## ## Copyright 2018 SRI International ## See COPYING file distributed along with the package for the copyright and license terms ## from __future__ import absolute_import, print_function from svn.local import LocalClient class UpdateActionTypes(): """ SVN 1.8 Update action types. """ added = 'A' broken...
''' Facts Checker Program This program checks for new Facts posted in /r/todayilearned ''' import praw, time r = praw.Reddit('TIL Facts monitor by u/kevgathuku v1.0' 'URL:https://github.com/kevgathuku/til-buffer') checked = [] content = [] facts = {} def factsChecker(): submissions = r.get_subr...
#!/usr/bin/env python import sys, os, getopt, md5, re, time, tempfile from os.path import expanduser # configuration # hopefully all of these will be ported to a .trkrc # and have command-line flags as well CONFIG=dict() # the configuration file # this can't really be changed in a config file, # but it can be changed...
#!/usr/bin/python3 # -*- coding: utf8 -*- r""" Convert usfm bibles to osis. Notes: * better handling of osisID's is probably needed. * no attempt has been made to process any \z tags or x- attributes in this script. * I can think of scenarios where this script may not work properly. However, it w...
import datetime from functools import wraps import os from urlparse import urljoin from flask import request, flash, redirect, render_template, abort, url_for from flask.ext.login import current_user, login_user, logout_user, login_required from foauth import OAuthDenied, OAuthError import config import forms import ...
#!/usr/bin/env python3 """ WEP cracking Automatization of MitM Attack on WiFi Networks Bachelor's Thesis UIFS FIT VUT Martin Vondracek 2016 #Implementation notes - Airodump-ng writes its Text User Interface to stderr, stdout is empty. - Airodump-ng has difficulties saving PRGA XOR based on some station vendors `"th...
import AXUV import surface, geometry, scipy import beam as beamin import scipy.interpolate import matplotlib.pyplot as plt import time import multiprocessing as multiproc import MDSplus import gc import plasma, eqtools def BPLY(temp, place=(1.87,0,.157277), angle=(0,.17453+scipy.pi/2,-1.62385+scipy.pi/2)): pos =...
import datetime import sqlite3 import peewee from peewee import * from playhouse.shortcuts import model_to_dict, dict_to_model import json import os #db = SqliteDatabase('bicycles.db') if 'VCAP_SERVICES' in os.environ: services = json.loads(os.getenv('VCAP_SERVICES')) credentials = services['mysql-dev'][0]['cr...
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not us...
"""Map all bindings to PySide2 This module replaces itself with the most desirable binding. Resolution order: - PySide2 - PyQt5 - PySide - PyQt4 Usage: >>> import sys >>> from Qt import QtWidgets >>> app = QtWidgets.QApplication(sys.argv) >>> button = QtWidgets.QPushButton("Hello Worl...
import os from types import ListType from pytz.gae import pytz from google.appengine.api import mail from google.appengine.api import users from google.appengine.api import memcache from google.appengine.ext import db from google.appengine.ext import webapp from google.appengine.ext.webapp import template from google.a...
import pyrtl #INCOMPLETE!!!!!! # ------------------------------------------------------- # |VC|HEAD|TAIL|SOURCE_ID|DEST_ID|PAYLOAD | # |1 |1 |1 |4 |4 |136 | # ------------------------------------------------------- # The above shows a Head or a tail flit. Each flit is 147 bits wide...
#! /usr/bin/env python import dendropy import sys, pickle alternate_names = {'ASPFC': 'ASPFU', 'BACT4': 'BACTN', 'CAEBR': 'CAEEL', 'CANAW': 'CANAL', 'CANAX': 'CANAL', 'CHLTA': 'CHLTR', 'CRYNE': 'CRYNJ', 'GEOSN': 'GEOSL', 'HALS3': 'HALSA', 'LEPIR': 'LEPIN', 'MYCTO': 'MYCTX', 'MYCTU': 'MYCTX', 'NEUCS': 'NEU...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
#!/usr/bin/env python """ setup.py file for compiling Infomap module """ from distutils.core import setup, Extension from distutils.file_util import copy_file import sysconfig import fnmatch import os import re cppSources = [] for root, dirnames, filenames in os.walk('.'): for filename in fnmatch.filter(filenames...
import os import re import sys import imp import copy import types import glob def allpath(name): "Convert a /-separated pathname to one using the OS's path separator." splitted = name.split('/') return os.path.join(*splitted) def get_path(mod_name,parent_path=None): """ Return path of the module. ...
""" Methods for impressing the changes in a VCF file onto an existing Genbank file. NOTES: * Look into insertion annotations being 1 off (specifically galk insertion at SIR.30.31i * Annotation of deletion d_mg1655_66564_66733 partial deletion of repeat region 66564 66733 seems to be one off. """ import copy ...
""" Test functions for the sparse.linalg._isolve module """ import itertools import platform import sys import numpy as np from numpy.testing import (assert_equal, assert_array_equal, assert_, assert_allclose, suppress_warnings) import pytest from pytest import raises as assert_raises from numpy import zeros, a...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # from __future__ import print_function import argparse import os import re import string import textwrap TEXT_WIDTH = 78 SEP_LINE = "-" * TEXT_WIDTH def wrap_print(msg): print(textwrap.fill(msg, width=TEXT_WIDTH)) def wrap_input(msg): return raw_input( ...
""" Orange Canvas main entry point """ import os import sys import gc import re import logging from logging.handlers import RotatingFileHandler import optparse import pickle import shlex import shutil import pkg_resources from PyQt4.QtGui import QFont, QColor, QDesktopServices, QMessageBox from PyQt4.QtCore import ...
from operator import attrgetter from django import forms from django.contrib import admin from django.db import transaction from django.forms import ModelForm from django.urls import reverse_lazy from django.utils import timezone from django.utils.html import format_html from django.utils.translation import gettext, g...
import copy import importlib import sys try: from unittest import mock except ImportError: import mock try: import starlette import rollbar.contrib.starlette STARLETTE_INSTALLED = True except ImportError: STARLETTE_INSTALLED = False import unittest2 import rollbar from rollbar.lib._async im...
import os import traceback from datetime import datetime from sqlalchemy import (Column, BigInteger, String, DateTime, Boolean, ForeignKey, Enum, inspect, bindparam, Index) from sqlalchemy.orm import relationship from sqlalchemy.sql.expression import false from inbox.sqlalchemy_ext.util import...
from interpreter.kmp_py import reader, evaluator, scheme, initialize, schemeExceptions def repl(): initialize.initialize() e = evaluator.SchemeEvaluator() r = reader.SchemeReader() while True: try: #print('> ', end='') toRead = input('> ') stream = scheme.Sc...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # Copyright 2018 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
import hashlib import hmac import time import urllib from inspect import signature, iscoroutinefunction from poloniex import constants from poloniex.error import PoloniexError, AddressAlreadyExist from poloniex.logger import getLogger from poloniex.utils import switch __author__ = "andrew.shvv@gmail.com" logger = ge...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2017 William Forde # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including w...
from uuid import uuid4 from social.utils import slugify, module_member USER_FIELDS = ['username', 'email'] def get_username(strategy, details, user=None, *args, **kwargs): if 'username' not in strategy.setting('USER_FIELDS', USER_FIELDS): return storage = strategy.storage if not user: ...
from . import base from . import mixins from datetime import date class TransformedRecord(mixins.GenericCompensationMixin, mixins.GenericDepartmentMixin, mixins.GenericIdentifierMixin, mixins.GenericJobTitleMixin, mixins.GenericPersonMixin, mixins.MembershipMixin, mixins.OrganizationMixin, mi...
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
from django.conf import settings from polyaxon.config_manager import config API_HTTP_URL = 'POLYAXON_API_HTTP_HOST' API_WS_HOST = 'POLYAXON_API_WS_HOST' def get_settings_external_http_api_url(): return '{}://{}:{}'.format(settings.PROTOCOL, settings.POLYAXON_K8S_API_HOST, ...
""" charger ===== Simulates a charging system (e.g. EV-charging, battery charging) Configurable parameters:: { <TODO> } Device properties created:: { pilot : A|B|C|F # Pilot signal indicates charging state (A=Available, B=Blocking, C=Charging, F=Fault) energy: ...
# Copyright (c) 2022, Manfred Moitzi # License: MIT License from __future__ import annotations from typing import Iterable, Tuple import sys import enum import itertools import functools import math from ezdxf.math import Vec3, Vec2, Matrix44, AbstractBoundingBox, AnyVec from ezdxf.path import Path from ezdxf.render ...
"""Auth related view functions""" import base64 from datetime import datetime import hashlib import hmac import json import requests from authomatic.adapters import WerkzeugAdapter from authomatic.exceptions import CancellationError from flask import Blueprint, jsonify, redirect, current_app, make_response from flask i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Define your Ansible inventory in structured YAML. Ansible is basically YAML # and python anyway. I never understood why they choose to introduce INI as # an inventory format. # # This script was written by Stefan Berggren <nsg@nsg.cc> from inspiration # from Anton Lindst...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Malte Ried. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the r...
# Copyright: # Copyright (c) 2010, Benjamin Reitzammer <http://github.com/nureineide>, # All rights reserved. # # License: # This program is free software. You can distribute/modify this program under # the terms of the Apache License Version 2.0 available at # http://www.apache.org/license...
"""prawcore.sessions: Provides prawcore.Session and prawcore.session.""" import logging from requests.compat import urljoin from requests.status_codes import codes from .auth import Authorizer from .rate_limit import RateLimiter from .exceptions import BadRequest, InvalidInvocation, NotFound, Redirect from .util impo...
from flask.ext.testing import TestCase from flask.ext.fillin import FormWrapper from mock import patch, MagicMock from dexter.core import app from dexter.models.support import db from dexter.models import Author from dexter.models.seeds import seed_db from dexter.processing.crawlers import MGCrawler from dexter.proce...
# -*- test-case-name:vertex.test.test_standalone -*- # Copyright 2005 Divmod, Inc. See LICENSE file for details import os from twisted.cred.portal import Portal from twisted.internet import defer from twisted.protocols.amp import AMP, Box, parseString from twisted.python.filepath import FilePath from vertex impor...
VERSION = '0.2.5'
from abc import ABCMeta, abstractmethod import os import shutil import subprocess import threading import unittest from xml.etree import ElementTree import time from jobTree.batchSystems.abstractBatchSystem import AbstractBatchSystem from jobTree.batchSystems.mesos import MesosBatchSystem from jobTree.batchSystems.sing...
__author__ = 'sergey' class AbstractDuck: def __init__(self, name): self.name = name print "I'm " + name def setFly(self, method): self.fly = method def setQuack(self, method): self.quack = method def swim(self): print "\tAll ducks float!" # to call a metho...
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Adriano Monteiro Marques <adriano@umitproject.org> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU Affero General Publi...
from __future__ import unicode_literals, print_function import uuid, json, six, os from collections import OrderedDict as _OrderedDict from collections import Mapping as _Mapping from mpcontribs.config import mp_level01_titles, replacements #from test_site.settings import BASE_DIR try: from propnet.core.quantity i...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
from rq import Queue from redis import Redis import json import os from src import cwenv from src.detection.box_walker import BoxWalker def enqueue_results(result_nodes, redis_connection): q = Queue('results', connection=redis_connection) q.enqueue_call(func=store, args=(result_nodes,), timeout=5400) for...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.tools.translate import _, html_translate from odoo.addons.website.models.website import slug class TrackTag(models.Model): _name = "event.track.tag" _description =...
# coding=utf-8 import json from flask import current_app import mock from six import iteritems from six.moves.urllib.parse import urlparse, parse_qs from lxml import html import re from ...helpers import BaseApplicationTest import pytest class TestApplication(BaseApplicationTest): def setup_method(self, method):...
import nltk from Bio import Entrez import time # We need this if we want to filter based on age from urllib2 import HTTPError import xml.etree.ElementTree as ET from collections import Counter import numpy as np import operator from os import path import random import settings import ncbiutilsTanya as ncbiutils import...
#!/usr/bin/python import os, sys, inspect import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) import common import config ...
import logging import requests from django.conf import settings from talks.old_talks.models import (OldTalk, OldSeries, event_to_old_talk, get_list_id, group_to_old_series) logger = logging.getLogger(__name__) def update_old_talks(event): if _old_talks_configured(): ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import pygame, math, sys, os from Entity import Entity from Player import Player from MainMenu import Button from BackGround import BackGround from Level import Level from wall import Block from wall import BgBlock from Shammy import ShammyTowel from towelHead import ShamFlap from levelChangeBlock import LevelChangeBlo...