content
string
from pybars._compiler import ( Compiler, strlist, Scope, PybarsError ) __version__ = '0.9.7' __version_info__ = (0, 9, 7, 'final', 0) __all__ = [ 'Compiler', 'log', 'strlist', 'Scope', 'PybarsError' ] def log(value): return None
#!/usr/bin/env python # -*- coding: utf-8 -*- import brewery.utils as utils import heapq __all__ = ( "create_node", "node_dictionary", "node_catalogue", "get_node_info", "NodeFinished", "Node", "SourceNode", "TargetNode", "Stack" ) # FIXME: temporary dictionary to record displayed...
import arrow from dateutil.rrule import (rrulestr, rrule, rruleset, MO, TU, WE, TH, FR, SA, SU) from inbox.models.event import RecurringEvent, RecurringEventOverride from inbox.events.util import parse_rrule_datetime from inbox.log import get_logger log = get_logger() # How far in the fut...
__author__ = 'Patrick' import pygame import sys from pygame.locals import * from pygame import transform import snake from config import * pygame.init() display = pygame.display.set_mode((square_size * spaces, square_size * spaces)) candy_images = [{'image': pygame.image.load('./images/bean_purple.png').convert(), ...
import dbus import os parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) os.sys.path.insert(0,parentdir) from InterfaceHandler import InterfaceHandlerBase, InvalidSignalException, InvalidMethodException class DBusInterfaceHandler(InterfaceHandlerBase): def __init__(self, username): bus = dbus....
import collections import socket import time from ark.cli import * from ark.storage import Storage from ark.steam.steam_packet import SteamPacket from ark.steam.source_server_query import ArkSourceQuery from ark.server_control import ServerControl from factory import Factory from ark.event_handler import EventHandler ...
import os import csv import time from django.core.management.base import BaseCommand, CommandError from solver.models import Availability, SolverOptions, SolverRun from solver import solver from scheduler import settings class Command(BaseCommand): args = '<availability_id solver_options_id solver_run_id>' help =...
from setuptools import setup, find_packages import sys, os.path # Don't import gym module here, since deps may not be installed sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'gym')) from version import VERSION # Environment-specific dependencies. extras = { 'atari': ['atari_py>=0.0.17', 'Pillow', 'PyOp...
from distutils.core import setup with open('README.rst', 'r') as readme: long_description = readme.read() setup( name='pyvaru', version='0.3.0', description='Rule based data validation library for python.', long_description=long_description, author='Davide Zanotti', author_email='<EMAIL>',...
import pickle from unittest import TestCase from unittest.mock import patch from nose.tools import eq_, ok_ from wrapt import ObjectProxy from recommendation.memorize import memorize, MemorizedObject from recommendation.tests.memcached import mock_memcached PREFIX = 'my_prefix' class SampleObject(object): @me...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserGeoName.language' db.add_column('united_geonames_usergeoname', 'language', self.gf('dj...
""" news { 'daily_with_duplicates':[ {'id1':{'text':['word1', 'word2'...],"label":"positive"}}... ], 'daily_without_duplicates':[ {'id1':{'text':['word1', 'word2'...],"label":"negative"}}... ], 'weekly_with_duplicates':[ {'id1':{'text':...
""" Created on Dec 1, 2011 @author: thygrrr """ # CRUCIAL: This must remain on top. import sip sip.setapi('QString', 2) sip.setapi('QVariant', 2) sip.setapi('QStringList', 2) sip.setapi('QList', 2) sip.setapi('QProcess', 2) import os import sys if os.path.isdir("lib"): sys.path.insert(0, os.path.abspath("lib")...
""" InaSAFE Disaster risk assessment tool developed by AusAid - **Paragraph.** Contact : <EMAIL> .. note:: 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 Li...
from __future__ import unicode_literals import frappe import frappe.defaults from frappe.modules.import_file import get_file_path, read_doc_from_file from frappe.translate import send_translations from frappe.desk.notifications import delete_notification_count_for from frappe.permissions import reset_perms, get_linked_...
# -*- coding: utf-8 -*- """Android supports plurals. Make sure we can handle them properly. """ from __future__ import unicode_literals from io import StringIO, BytesIO from babel.messages.catalog import Catalog from android2po import xml2po, po2xml, read_xml from android2po.env import Language from babel.messages.m...
try: from gmpy2 import * except ImportError: from math import * from raytracer.mpfr_dummy import * from raytracer.matrix import * from raytracer.cartesian import * from copy import * """Support for transformations of points, vectors and rays""" class Transform: """A class to support matrix transform...
import minervashadow.utils.structures as structures import identify def _course_missing_avg(line): if len(line) < 8: return not identify._is_a_grade(line[-1]) else: return False def _course_missing_remarks(line): if 5 < len(line) and len(line) < 8: if identify._is_a_grade(line[-1]) and line[-2].isdigit(): ...
''' Using the Python language, have the function TexasHoldEm(hand) determine which is the winning player after reading the hand parameter being passed which will be written in the following format: ["a1,a2","b1,b2","c1,c2","d1,d2","Flop1,Flop2,Flop3"] where the elements "a1,a2","b1,b2","c1,c2","d1,d2" ,etc. are the...
import os import sys import itertools import json import subprocess import pipes from gitjoin import models from gitjoin import git from webapp import settings supported_hooks = ['update', 'post-receive'] hook_script = '''#!/bin/bash cd "$GIT_DIR" export GIT_DIR="$PWD" export DJANGO_SETTINGS_MODULE=webapp.settings ...
import os import logging from datetime import datetime, timedelta from openerp import models, fields from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT from openerp.tools.translate import _ from .job import STATES, DONE, PENDING, OdooJobStorage from .worker import WORKER_TIMEOUT, watcher from ..session import C...
"""Provides classes that help with creating Observer-Observable structures""" import functools __author__ = "Joeri Jongbloets <<EMAIL>>" class Observable(object): """An Observable will update it's observers whenever it is changed Notification can be triggered in two ways: 1. Call `notify_observers()` ...
import os import shutil import tempfile import unittest import cwltool.expression as expr import cwltool.factory import cwltool.pathmapper import cwltool.process import cwltool.workflow from cwltool.main import main from .util import get_data class TestListing(unittest.TestCase): def test_missing_enable_ext(sel...
#!/usr/bin/env python import optparse import os import sys import tempfile import shutil import subprocess import re from os.path import basename import logging assert sys.version_info[:2] >= ( 2, 6 ) log = logging.getLogger(__name__) working_directory = os.getcwd() tmp_stderr_name = tempfile.NamedTemporaryFile(dir ...
{ 'name': 'Product Untraslated on Website Sale', 'version': '13.0.1.0.0', 'category': 'Product', 'author': 'ADHOC SA', 'website': 'www.adhoc.com.ar', 'license': 'AGPL-3', 'depends': [ 'product_untranslated', 'website_sale', ], 'demo': [ ], 'data': [ ], ...
__author__ = "Felix Brezo, Yaiza Rubio <<EMAIL>>" __version__ = "2.0" import osrframework.utils.browser as browser from osrframework.utils.platforms import Platform class Vimeo(Platform): """A <Platform> object for Vimeo""" def __init__(self): self.platformName = "Vimeo" self.tags = ["socia...
from setuptools import setup, find_packages setup( name='django-xiti', version=__import__('xiti').__version__, description=__import__('xiti').__doc__, long_description=open('README.rst').read(), author='Emencia', author_email='<EMAIL>', url='https://github.com/emencia/django-xiti', lice...
# -*- coding: utf-8 -*- from json import loads import re as REGEX from string import ascii_lowercase import colander from colander import Invalid, SchemaNode, String from ines.convert import maybe_list, maybe_string, to_string from ines.exceptions import Error from ines.i18n import _ from ines.utils import find_next...
""" Choicelists for `lino.modlib.checkdata`. """ from __future__ import unicode_literals, print_function from builtins import str import six from django.utils import translation from lino.core.gfks import gfk2lookup from lino.core.roles import SiteStaff from django.utils.text import format_lazy from lino.api impor...
"""A subclass of the ipaddress library that includes comments for ipaddress.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import ipaddress import itertools from typing import Union import cap...
"""Utility methods for docstring checking.""" from __future__ import absolute_import # pylint: disable=import-only-modules from __future__ import unicode_literals # pylint: disable=import-only-modules import ast import os import re import sys import python_utils from scripts import common _PARENT_DIR = os.path.ab...
from core.himesis import Himesis import uuid class Hlayer2rule3(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule layer2rule3. """ # Flag this instance as compiled now self.is_compiled = True super(Hlayer2rule3, self).__init__(name='Hlayer2rule3', num_nodes=0, edg...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class operators(): ''' ┌─────────────────────────────────────┐ │ PostScript operators and categories │ └─────────────────────────────────────┘ ''' oplist = { '01. Operand Stack Manipulation Operators': [ 'pop', 'exch', 'dup', 'cop...
""" MulticastQuerier - command ``find /sys/devices/virtual/net/ -name multicast_querier -print -exec cat {} \;`` ============================================================================================================ This module provides processing for the output of the ``find -name multicast_querier ...`` comman...
#!/usr/bin/env python __author__ = "Mari Wahl" __copyright__ = "Copyright 2014" __credits__ = ["Mari Wahl"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = "Mari Wahl" __email__ = "<EMAIL>" import numpy as np import pylab as pl from sklearn import neighbors, linear_model, svm, ensemble, naive_bayes, lda...
""" Report CLI module. Copyright 2008, Red Hat, Inc Anderson Silva <<EMAIL> This software may be freely redistributed under the terms of the GNU general public license.: You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675...
"""Test primitives of commands parsing.""" from regraph.library.parser import parser from nose.tools import assert_equals class TestParser(object): """Class for testing parser with Python nose tests.""" # def __init__(self): # self.commands_ = {} # self.commands_.update({"delete": }) de...
"""Spam module.""" from flask import current_app from werkzeug.local import LocalProxy current_spam = LocalProxy( lambda: current_app.extensions['zenodo-spam'] )
# -*- coding: utf-8 -*- """ /*************************************************************************** VFRImporter A QGIS plugin Tool for import RUIAN data ------------------- begin : 2015-03-16 copyright : (C) 2...
# -*- coding: utf-8 -*- from os import listdir from underthesea.util.file_io import read, write from unittest import TestCase, skip from underthesea import chunk from os.path import dirname, join samples_dir = join(dirname(__file__), "samples") def load_input(input_file): lines = read(input_file).strip().split("...
#!/usr/bin/env python3 import re import sys import json import time import random sys.path.append('..') from define import * from utils import * from extractor import BasicExtractor _stream_ids = ('1300','1080p','1000','720p','350') class LETVExtractor(BasicExtractor): ''' 乐视视频下载器 ''' def __init__(self,c): supe...
# -*- coding: utf-8 -*- """ *************************************************************************** Dissolve.py --------------------- Date : Janaury 2015 Copyright : (C) 2015 by Giovanni Manghi Email : giovanni dot manghi at naturalgis dot pt **********...
import os from flask.ext.assets import Bundle, Environment import sass from webassets.filter import Filter class LibSass(Filter): name = 'libsass-output' options = { 'output_style': 'SASS_OUTPUT_STYLE' } def __init__(self, include_paths=[], *args, **kwargs): super(LibSass, self).__in...
# external control import datetime import time import string import urllib2 import math import redis import base64 import json import eto import py_cf import os import eto from eto.eto import * from eto.cimis_request import * import load_files from cloud_event_queue import Cloud_Event_Queue from watch_dog ...
""" This simply invokes DIRAC APIs for creating 2 jobDescription.xml files, one with an application that will end with status 0, and a second with status != 0 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from DIRAC.Core.Base.Script import parseCom...
from contextlib import contextmanager, closing import os import shelve import gevent from gevent.lock import RLock import yaml from ouimeaux.device import Device def in_home(*path): try: from win32com.shell import shellcon, shell except ImportError: home = os.path.expanduser("~") else: ...
#!/usr/bin/python from macaroon.playback import * import utils sequence = MacroSequence() # Work around some new quirk in Gecko that causes this test to fail if # run via the test harness rather than manually. sequence.append(KeyComboAction("<Control>r")) sequence.append(utils.StartRecordingAction()) sequence.appen...
#!/usr/bin/env python # -*- coding:utf-8 -*- # -*- author:北辰屏寒 -*- # -*- email:<EMAIL> -*- from recom_algorithm import RECOM from get_news_id import news_id_set from gevent import monkey;monkey.patch_socket() from flask import Flask, render_template, request, json, session from gevent.pywsgi import WSGIServer import r...
#!/usr/bin/python """ Tree of Savior IDAPython Script Find LuaInterface getters """ import idaapi import idautils import idc """ Getter example : .text:00FEE870 push offset aFast ; "FAST" .text:00FEE875 call LuaInterface__getInstance .text:00FEE87A ...
from datetime import datetime as dt import json import re import flask import sqlalchemy from sqlalchemy.orm import relationship from flask_sqlalchemy import SQLAlchemy, Model from werkzeug.security import generate_password_hash, \ check_password_hash db = SQLAlchemy() # TODO: this doesn't belong in models cla...
import os import pytest from unittest.mock import patch from PIL import Image from sigal import init_logging from sigal.image import (generate_image, generate_thumbnail, get_exif_tags, get_exif_data, get_size, process_image, get_iptc_data) from sigal.settings import create_settings, Status CU...
import datetime from ...place import Place from ...spec import Spec from .district import District from .structure import Structure from .restaurant import Restaurant class City(Place): """Cities can exist in territories or provinces, and can contain districts and structures... Attributes allowedChildEntities ...
""" Test case for module Options """ import os import sys import unittest import ConfigParser sys.path.append('.') import bleachbit.Options class OptionsTestCase(unittest.TestCase): """Test case for class Options""" def test_Options(self): """Unit test for class Options""" o = bleachbit.O...
from neutron_lib import exceptions as n_exc from oslo_db import exception as db_exc from oslo_log import log as logging from sqlalchemy import sql from neutron._i18n import _, _LE from neutron.api.v2 import attributes from neutron.callbacks import events from neutron.callbacks import registry from neutron.callbacks im...
import unittest class TestEntityAnnotation(unittest.TestCase): @staticmethod def _get_target_class(): from google.cloud.vision.entity import EntityAnnotation return EntityAnnotation def test_logo_annotation(self): from unit_tests._fixtures import LOGO_DETECTION_RESPONSE L...
import unittest import random import string import sys from pyokc import pyokc class TestSequenceFunctions(unittest.TestCase): @classmethod def setUpClass(cls): cls.u1 = pyokc.User(USERNAME1, PASSWORD1) cls.u2 = pyokc.User(USERNAME2, PASSWORD2) def test_search_and_visit(self): ...
import os.path import argparse import yaml import copy from pprint import pprint def data_merge(a, b): output = {} for item, value in a.iteritems(): if b.has_key(item): if isinstance(b[item], dict): output[item] = data_merge(value, b.pop(item)) else: output[item] = copy.deepcopy(value)...
# Change Return Program - The user enters a cost and # then the amount of money given. The program will figure # out the change and the number of quarters, dimes, nickels, # pennies needed for the change. if __name__ == '__main__': cost = input("What's the cost in dollars? ") given = input("What's the amount o...
""" Library for Web integration tests """ import json from django.test import Client from django.test.client import MULTIPART_CONTENT from django.core.urlresolvers import reverse from urllib import urlencode from omero.testlib import ITest class IWebTest(ITest): """ Abstract class derived from ITest whi...
# -*- coding: utf-8 -*- from functools import partial from tornado import stack_context from yyproto.util import pack_header_message from yyproto.constants import YYPROTO_HEADER_LENGTH from yyproto.header import Header from yyproto.message import Message from yyproto.unpacker import Unpacker class Connection(objec...
# -*- coding: utf-8 -*- """ mailproc.transports.smtp_sender_transport ~~~~~~~~~~~~~~~~~ This module implements the SMTP sender transport class for mailProc. :copyright: (c) 2018 Daxslab. :license: LGPL, see LICENSE for more details. """ try: from StringIO import StringIO except ImportError: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import time from email.mime.text import MIMEText import smtplib class simple_mailer: def __init__(self, smtp_server, login, password, from_addr): self.smtp_server = smtp_server self.login = login self.password = password self.from_addr = from_addr self.sign = No...
""" Container for Configuration Data """ ############################################################################## # The "git trac ..." command extension for git # Copyright (C) 2013 Volker Braun <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from copy import copy from itertools import product from pyLibrary.meta import use_settings, DataClass from pyLibrary.queries import qb from pyLibrary.queries.query import Query from pyLibrary.debugs.logs imp...
"""Following endpoints""" from flask import json, request, g, make_response, url_for from flask.views import MethodView from mongoengine import ValidationError from tentd.documents import Following from tentd.lib.flask import EntityBlueprint, jsonify from tentd.utils.auth import require_authorization from tentd.utils...
#!/usr/bin/env python """ Extract train set. """ import multiprocessing as mp import cv2 import numpy as np import os import random import argparse import functools def mine_image(detector, size, path): """ Run negative mining on image, and extract false positives. :param path: Path to image file :par...
import os import math import json _warnings = [] def convert(geostyler): global _warnings _warnings = [] if not isinstance(geostyler, list): geostyler = [geostyler] name = geostyler[0]["name"] if len(geostyler) == 1 else "Style" layers = [] for g in geostyler: layers.extend(pr...
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild import array import struct import zlib from enum import Enum from pkg_resources import parse_version from kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO if parse_version(ks_version)...
import sys if sys.version_info[0] != 2: print('Error: this project, "pyephem", is for Python 2.x;' ' try "ephem" for Python 3') sys.exit(1) import os from distutils.core import setup, Extension from glob import glob # Read the current version from ephem/__init__.py itself. path = os.path.join(os.pa...
""" Django settings for kaiju_libnow project. Generated by 'django-admin startproject' using Django 1.10.7. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ impo...
from openerp import models, fields, api from datetime import date import logging _logger = logging.getLogger(__name__) _RISK_STATE = [('draft', 'Draft'), ('active', 'Active'), ('closed', 'Closed')] class risk_management_risk_category (models.Model): _name = 'risk.management.category' _description = 'Risk lo...
from panda3d.core import LPoint3d, NodePath class SolarSystemComponent: def __init__(self, name='Solar System'): self.name = name self.root_node = NodePath(name) '''Types of bodies: solid: Planet, asteroid star: Star moon: moon (due to orbit information)''' TYPES = {'m...
from __future__ import print_function from builtins import object import matplotlib as mpl import matplotlib.pyplot as plt import contextlib import glob import os import yaml from threeML.io.package_data import get_path_of_data_file, get_path_of_user_dir from astromodels.utils.valid_variable import is_valid_variable_n...
from __future__ import print_function, absolute_import, division import math from functools import reduce import numpy as np from llvmlite import ir from llvmlite.llvmpy.core import Type, Constant import llvmlite.llvmpy.core as lc from .imputils import (lower_builtin, lower_getattr, lower_getattr_generic, ...
"""Tool for creating badge. """ import os from logging import getLogger from anybadge import Badge import click from cosmic_ray.config import load_config from cosmic_ray.tools.survival_rate import survival_rate from cosmic_ray.work_db import WorkDB, use_db log = getLogger() @click.command() @click.argument("config...
from pyx import * from numpy import linspace from math import * c = canvas.canvas() #c.stroke(path.line(1, 0, 5.2, 0), [style.linewidth.THICK]) c.stroke(path.line(3, 0, 4.5, 0), [deco.earrow([deco.stroked()])]) c.text(4.6, 0, r"$x$") c.stroke(path.line(3, 0, 3, 1.5), [deco.earrow([deco.stroked()])]) c.text(3, 1.65,...
import os import traceback from mock import Mock, patch import rospkg.os_detect def is_gentoo(): return rospkg.os_detect.Gentoo().is_os() def get_test_dir(): # not used yet return os.path.abspath(os.path.join(os.path.dirname(__file__), 'gentoo')) # Requires 2.7 @unittest.skipIf(not rospkg.os_detect.Ge...
""" WSGI config for pyrede project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` s...
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor import atexit import time class FTShield: maxSpeed = 204 dir = {} spe = {} mh = "" debug = True isLive = True left_motor = 1 right_motor = 2 def __init__(self): atexit.register(self.turnOffMotors) se...
#!/usr/bin/python import sys import gtk import gnomekeyring as gkey class Keyring(object): def __init__(self, name, server, protocol): self._name = name self._server = server self._protocol = protocol self._keyring = gkey.get_default_keyring_sync() def has_credentials(self): ...
""" IPMethods Use specified IPs to determine where the registry node is Author: Alpha <<EMAIL>> """ from servicediscovery.methods import Method class IPAddress(object): """A comparable IP address handler""" def __init__(self, ip_address): self.octets = [int(ip_oct) for ip_oct in ip_addre...
# -*- coding: utf-8 -*- """ RSS Handling!! If you do changes, please check if it still validates after your changes: http://feedvalidator.org/ @copyright: 2005-2007 Philip Neustrom <<EMAIL>>, @license: GNU GPL, see COPYING for details. """ # Imports import xml.dom.minidom import urllib ...
from django.contrib.postgres.aggregates import ArrayAgg from django.contrib.postgres.fields import ArrayField from django.db.models import CharField from django.db.models import IntegerField from django.db.models import Subquery from django.forms.fields import UUIDField from django.utils.datastructures import MultiValu...
title = 'Pmw.NoteBook demonstration (more complex)' # Import Pmw from this directory tree. import sys sys.path[:0] = ['../../..'] import Tkinter import Pmw class Demo: def __init__(self, parent, withTabs = 1): # Repeat random number sequence for each run. self.rand = 12345 # Default dem...
#!/usr/bin/env python """ Script to update the current edX iOS App with different names, resources, etc. Requirements: pip install pyyaml """ import argparse import logging import os import shutil import subprocess import sys import yaml class WhitelabelApp: """ Update the current edX iOS App using co...
#!/usr/bin/env python import paramiko from ciscoconfparse import CiscoConfParse import time import os import argparse import getpass import openpyxl # +++++++++++++++++++++++++++ # setup arg parser # +++++++++++++++++++++++++++ parser = argparse.ArgumentParser(description='get Int Office switchmap') parser.add_argume...
#!flask/bin/python """Alternative version of the ToDo RESTful server implemented using the Flask-RESTful extension.""" from flask import Flask, jsonify, abort, make_response from flask_restful import Api, Resource, reqparse, fields, marshal from flask_httpauth import HTTPBasicAuth app = Flask(__name__, static_url_pa...
from cStringIO import StringIO # Import from the Python Image Library try: from PIL import Image as PILImage except ImportError: PILImage = None # Import from itools from file import File from registry import register_handler_class class Image(File): class_mimetypes = ['image'] def _load_state_fr...
from datetime import datetime import json from dwca import DwCAReader class MeuhEngine(object): # Preferably, use 'with' to ensure proper cleanup at the end def __enter__(self): return self def __exit__(self, type, value, traceback): self.cleanup() def __init__(self, config, dwc...
""" Django settings for organizador_de_asados project. Generated by 'django-admin startproject' using Django 1.11.6. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ ...
# -*- coding: utf8 -*- """ This is part of shot detector. Produced by w495 at 2017.05.04 04:18:27 """ from __future__ import absolute_import, division, print_function import logging from shot_detector.filters.base import BasePlainFilter # # from .filter_operator import FilterOperator class FilterCastFeatu...
import pytest from gaphor.core.modeling import ElementFactory from gaphor.core.modeling.elementdispatcher import ElementDispatcher from gaphor.diagram.tests.fixtures import allow, connect, disconnect from gaphor.SysML import sysml from gaphor.SysML.modelinglanguage import SysMLModelingLanguage from gaphor.SysML.requir...
from pprint import pprint from twisted.internet.defer import inlineCallbacks from autobahn.twisted.wamp import ApplicationSession from autobahn.wamp.exception import ApplicationError # our user "database" USERDB = { 'joe': { # these are required: 'secret': 'secret2', # the secret/password to be used...
"""This example gets all active placements. """ # Import appropriate modules from the client library. from googleads import ad_manager def main(client): # Initialize appropriate service. placement_service = client.GetService('PlacementService', version='v201811') # Create a statement to select placements. st...
from random import randint from game_agent import ReflectionPlayer, CustomPlayer from sample_players import GreedyPlayer, RandomPlayer, open_move_score from agent_test import makeEvalTable if __name__ == "__main__": from isolation import Board h = 7 w = 7 value_table = [[0] * w for _ in range(h)] ...
from oslo_context import context from daisy.api import policy class RequestContext(context.RequestContext): """Stores information about the security context. Stores how the user accesses the system, as well as additional request information. """ def __init__(self, roles=None, ...
# this preset is used for automated testing of formhub # from formhub.settings import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'formhub_test', 'USER': 'travis', 'PASSWORD': '', 'HOST': '127.0.0.1', 'PORT': '3306', } } SECRET_KEY...
"""Plot to test text""" import matplotlib.pyplot as plt def main(): fig, ax = plt.subplots() ax.grid(color='gray') # test font sizes x = 0.1 for y, size in zip([0.1, 0.3, 0.5, 0.7, 0.9], [8, 12, 16, 20, 24]): ax.text(x, y, "size={0}".format(size), size=size, ha='left...
from optparse import OptionParser from configparser import RawConfigParser import os import pickle import subprocess import datetime # internal classes class Programme: def __init__(self): self.pid = None self.name = None self.episode = None self.desc = None self.downloaded = False self.filename = None ...
""" Unit tests for the malware analyzer """ import pytest from anchore_engine.analyzers import malware from anchore_engine.analyzers.malware import CLAMAV_CMD, UNKNOWN test_sig = "Unix.Trojan.MSShellcode-40" scanned_file = "/analysis_scratch/a5346cac-802a-4cb9-a0c5-756b9b51858b/squashed.tar" malware_matches = [ ...