code
stringlengths
1
199k
import logging def setup_logging(): logger = logging.getLogger() # Clear any old handlers old_handlers = logger.handlers for handler in old_handlers: logger.removeHandler(handler) logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) # ch.setLevel...
import os try: from setuptools import setup, find_packages, Extension except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages, Extension import os.path src_folder= os.path.join( os.path.split(os.path.abspath(__file__))[0], 'src') setup( ...
import numpy import os import numpy import os from nmt import train def main(job_id, params): print params validerr = train(saveto=params['model'][0], reload_=params['reload'][0], dim_word=params['dim_word'][0], dim=params['dim'][0], ...
import os PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) PROJECT_NAME = os.path.split(PROJECT_ROOT)[-1] DEBUG = True TEMPLATE_DEBUG = DEBUG INTERNAL_IPS = () if DEBUG: TEMPLATE_STRING_IF_INVALID = '' CACHE_BACKEND = 'locmem://' CACHE_MIDDLEWARE_KEY_PREFIX = '%s_' % PROJECT_NAME CACHE_MIDDLEWARE_SECONDS =...
from gdb_test import AssertEquals import gdb_test def test(gdb): gdb.Command('break leaf_call') gdb.ResumeAndExpectStop('continue', 'breakpoint-hit') result = gdb.Command('-stack-list-frames 0 2') AssertEquals(result['stack'][0]['frame']['func'], 'leaf_call') AssertEquals(result['stack'][1]['frame']['func'], ...
import sys, os, os.path from subprocess import call cur_dir = os.path.dirname(os.path.realpath(__file__)) parent_dir = os.path.dirname(cur_dir) statuses = [ call(["echo", "Running python unit tests via nose..."]), call([os.path.join(parent_dir, "manage.py"), "test", "lab.tests"], env=os.environ.copy()), cal...
""" Class for easily interacting with virtual machines (c) 2015 Massachusetts Institute of Technology """ import multiprocessing import os import logging logger = logging.getLogger(__name__) from subprocess import call import lophi.globals as G from lophi.machine import Machine from lophi.sensors.memory.virtual...
from nose.plugins.attrib import attr from microscopes.irm.definition import model_definition as irm_definition from microscopes.irm.model import ( initialize as irm_initialize, bind as irm_bind, ) from microscopes.mixture.definition import model_definition as mm_definition from microscopes.mixture.model import ...
from sys import version_info as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise RuntimeError("Python 2.7 or later required") if __package__ or "." in __name__: from . import _bilinearform else: import _bilinearform try: import builtins as __builtin__ except ImportError: imp...
import os, ConfigParser class Configuration(object): """General settings for niprov. Individual settings are documented as follows; **setting** *= default_value* *type* - Explanation. The settings can be changed in the configuration file, or in code. All settings: """ database_type =...
import requests class Cachet(object): def __init__(self, url, apiToken): self.url = url self.apiToken = apiToken def __getRequest(self, path): return requests.get(self.url + path) def __postRequest(self, path, data): return requests.post(self.url + path, data, headers={'X-Cac...
__author__ = 'v-lshen' from dev.python.Serverlet import * from EchoCodeDefinition import * from dev.python.RpcStream import * class EchoServer: def open_servive(self): Serverlet.register_rpc_handler(RPC_ECHO, 'RPC_ECHO', self.on_echo) @staticmethod def on_echo(rpc_request_content, rpc_response): ...
"""Various utility functions for dealing with images, such as reading images as numpy arrays, resizing images or making them sharper.""" import os.path import cv2 import numpy import exifread from utils import file_cache @file_cache def read_image(image_path, ROI=None): """Read an image from a file in grayscale ...
from __future__ import unicode_literals import os from arpeggio import * from arpeggio import RegExMatch as _ def comment(): return [_("//.*"), _("/\*.*\*/")] def literal(): return _(r'\d*\.\d*|\d+|".*?"') def symbol(): return _(r"\w+") def operator(): return _(r"\+|\-|\*|\/|\=\=") d...
from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import User class EmailBackend(ModelBackend): """A django.contrib.auth backend that authenticates the user based on its email address instead of the username. """ def authenticate(self, email=None, password=None): ...
"""Create and parse 'send'-type messages.""" import struct from . import (util, config, exceptions, czarcoin, util) FORMAT = '>QQ' LENGTH = 8 + 8 ID = 0 def validate (db, source, destination, asset, quantity): problems = [] if asset == config.CZR: problems.append('cannot send czarcoins') # Only for parsing. ...
import Cookie import os from datetime import datetime, timedelta import time from beaker.crypto import hmac as HMAC, hmac_sha1 as SHA1, sha1 from beaker import crypto, util from beaker.cache import clsmap from beaker.exceptions import BeakerException, InvalidCryptoBackendError from base64 import b64encode, b64decode __...
import re from helpers.common import * class Parser: """ Parses tag references and tag definitions. Used for ranking """ @staticmethod def extract_member_exp(line_to_symbol, source): """ Extract receiver object e.g. receiver.mtd() Strip away brackets and operators. TO...
""" TxHandler This class should be instantiated once per client. It takes an InvCollector and a TxStore, and an optional Tx validator. When a new Tx object is noted by the InvCollector, this object will fetch it, validate it, then store it in the TxStore and tell the InvCollector to advertise it to other peers. When a ...
from math import sqrt, exp from CoolProp.CoolProp import Props import numpy as np import matplotlib.pyplot as plt from scipy.odr import * from math import log E_K = {'REFPROP-Ammonia': 386, 'REFPROP-Argon': 143.2 } SIGMA = {'REFPROP-Ammonia': 0.2957, 'REFPROP-Argon': 0.335 } E_K['REFPROP...
import CatalogItem from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import * class CatalogNametagItem(CatalogItem.CatalogItem): sequenceNumber = 0 def makeNewItem(se...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Note.content' db.alter_column('notes_note', 'content', self.gf('tinymce.models.HTMLField')()) def backwards(self,...
import vim # pylint: disable=import-error import shlex import os import clang.cindex as cindex LOG_FILENAME = "grayout.log" DB_CACHE = {} ARGS_CACHE = {} DEBUG = False DEBUG_FILE = False def printdebug(*args, info=False): text = " ".join(map(str, args)) if DEBUG: print(text) elif info: prin...
""" heat exchangers """ from math import log, ceil import pandas as pd import numpy as np from cea.constants import HEAT_CAPACITY_OF_WATER_JPERKGK from cea.technologies.constants import MAX_NODE_FLOW from cea.analysis.costs.equations import calc_capex_annualized, calc_opex_annualized __author__ = "Thuy-An Nguyen" __cop...
import unittest import sqlite3 as sqlite def func_returntext(): return "foo" def func_returnunicode(): return u"bar" def func_returnint(): return 42 def func_returnfloat(): return 3.14 def func_returnnull(): return None def func_returnblob(): return buffer("blob") def func_raiseexception(): ...
""" %prog [options] modules_or_packages Check that module(s) satisfy a coding standard (and more !). %prog --help Display this help message and exit. %prog --help-msg <msg-id>[,<msg-id>] Display help messages about given message identifiers and exit. """ from __future__ import print_function import collec...
"""Thread module emulating a subset of Java's threading model.""" import sys as _sys try: import thread except ImportError: del _sys.modules[__name__] raise import warnings from collections import deque as _deque from time import time as _time, sleep as _sleep from traceback import format_exc as _format_exc...
from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/structure/naboo/shared_nboo_imprv_lattice_wall_long_s01.iff" result.attribute_template_id = -1 result.stfName("obj_n","unknown_object") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
from __future__ import print_function class Solution(object): def ladderLength(self, beginWord, endWord, wordList): """ :type beginWord: str :type endWord: str :type wordList: List[str] :rtype: int """ distance, cur, visited, lookup = 0, [beginWord], set([begi...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class RedditAccount(ProviderAccount): def to_str(self): dflt = super(RedditAccount, self).to_str() name = self.account.extra_data.get("name", dflt) retu...
""" """ from qtpy.QtWidgets import QListWidget, QListWidgetItem
from rpython.jit.metainterp.test.test_virtual import VirtualTests, VirtualMiscTests from rpython.jit.backend.x86.test.test_basic import Jit386Mixin class MyClass: pass class TestsVirtual(Jit386Mixin, VirtualTests): # for the individual tests see # ====> ../../../metainterp/test/test_virtual.py _new_op =...
""" Premium Question """ from bisect import bisect_left from collections import defaultdict import sys __author__ = 'Daniel' class WordDistance(object): def __init__(self, words): """ initialize your data structure here. :type words: list[str] """ self.word_dict = defaultdict...
r""" .. dialect:: mysql+pyodbc :name: PyODBC :dbapi: pyodbc :connectstring: mysql+pyodbc://<username>:<password>@<dsnname> :url: https://pypi.org/project/pyodbc/ .. note:: The PyODBC for MySQL dialect is **not tested as part of SQLAlchemy's continuous integration**. The recommended MySQL dia...
""" Functional test Deletion Epic Storyboard is defined within the comments of the program itself """ import unittest from flask import url_for from biblib.tests.stubdata.stub_data import UserShop, LibraryShop from biblib.tests.base import TestCaseDatabase, MockEmailService class TestDeletionEpic(TestCaseDatabase): ...
import sys try: # Python 2 str_cls = unicode except (NameError): # Python 3 str_cls = str class NonCleanExitError(Exception): """ When an subprocess does not exit cleanly :param returncode: The command line integer return code of the subprocess """ def __init__(self, returnco...
from __future__ import unicode_literals from .. import Provider as BaseProvider class Provider(BaseProvider): jobs = [ "هنر‌پیشه", "ناخدا", "بخشدار", "خیاط", "گله‌دار", "باغ‌دار", "مؤذن", "ساربان", "آشپز", "دندان‌پزشک", "نجار", ...
from granoclient import Grano client = Grano(api_key='7a8badec6052a81d5') project = client.get('openinterests') for schema in project.schemata: #if schema.name == 'person': # schema.label = 'Natural person' # schema.save() print schema.label for entity in project.entities: print entity
BOT_NAME = 'go_fun_with_tiger' SPIDER_MODULES = ['go_fun_with_tiger.spiders'] NEWSPIDER_MODULE = 'go_fun_with_tiger.spiders' ITEM_PIPELINES = {'scrapy.pipelines.images.ImagesPipeline': 1} IMAGES_STORE = '/Calvin_and_Hobbes'
from conans.model.ref import PackageReference, ConanFileReference import os from conans.util.files import rmdir import shutil from conans.errors import ConanException from conans.client.loader_parse import load_conanfile_class from conans.client.proxy import ConanProxy def _prepare_sources(client_cache, user_io, remote...
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/wearables/base/shared_base_skirt.iff" result.attribute_template_id = 11 result.stfName("wearables_name","skirt_s03") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
"""D3D retracer generator.""" import sys from dllretrace import DllRetracer as Retracer from specs.stdapi import API from specs.d3d import ddraw, HWND from specs.ddraw import DDCREATE_LPGUID class D3DRetracer(Retracer): def retraceApi(self, api): print('// Swizzling mapping for lock addresses') prin...
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Test the ability to configure the $GSCOM construction variable. """ import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() test.write('mygs.py', """ import sys outfile = open(sys.argv[1], 'wb') for f in sys.argv[2:]: infile = ope...
import os, sys, argparse import numpy as np from tabulate import tabulate import moving from cvguipy import cvgui, trajstorage if __name__ == "__main__": parser = argparse.ArgumentParser(description="A script to compute CLEAR MOT tracking performance metrics.") parser.add_argument('databaseFilename', nargs='+',...
from django.test import TestCase from django.contrib.auth.models import User from pinax.apps.tasks.models import Task, TaskHistory, Nudge class TestTask(TestCase): fixtures = ["test_tasks.json"] def setUp(self): self.task = Task.objects.get(pk__exact=1) self.other_task = Task.objects.get(pk__exa...
from __future__ import division from decimal import Decimal import yaml import datetime from flask import (current_app, request, render_template, Blueprint, jsonify, g, session, Response, abort) from flask.ext.babel import gettext from .models import (Block, ShareSlice, UserSettings, make_upper_lower...
import site import getopt, glob, sys from PIL import Image if len(sys.argv) == 1: print "PIL File 0.4/2003-09-30 -- identify image files" print "Usage: pilfile [option] files..." print "Options:" print " -f list supported file formats" print " -i show associated info and tile data" print " ...
from toee import * from utilities import * from Co8 import * def OnBeginSpellCast( spell ): print "Disintegrate OnBeginSpellCast" print "spell.target_list=", spell.target_list print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level game.particles( "sp-transmutation-conjure", spell.caster ) def On...
import asyncio import pytest from pydf import AsyncPydf from .utils import pdf_text def test_async_pdf_gen(): apydf = AsyncPydf() loop = asyncio.get_event_loop() pdf_content = loop.run_until_complete(apydf.generate_pdf('<html><body>Is this thing on?</body></html>')) assert pdf_content[:4] == b'%PDF' ...
import re def get_inputs(inputFile="encoded.txt"): f = open(inputFile, 'r') temp = f.readline().strip().split() key = {} for x, y in zip(temp[::2], temp[1::2]): key[y] = x return (f.read(), key) def decode(args): message, key, output = args[0], args[1], [] start, finish, keys = 0, 1,...
"""Test trait types of the widget packages.""" from unittest import TestCase from traitlets import HasTraits from traitlets.tests.test_traitlets import TraitTestBase from ipywidgets import Color, EventfulDict, EventfulList class ColorTrait(HasTraits): value = Color("black") class TestColor(TraitTestBase): obj =...
import sqlite3 import postgresql.driver as pg_driver import optparse def copy(name, lite, pg, src, dst): print("[+] {0}".format(name)) pg.execute("DELETE FROM {0}".format(dst['table'])) offset = 0 limit = 10000 insert = pg.prepare(dst['query']) while True: result = lite.execute(src['quer...
import heapq import itertools import struct import weakref from ctypes import * from ctypes.wintypes import HANDLE from comtypes import IUnknown, IServiceProvider, COMError import comtypes.client import comtypes.client.lazybind import oleacc import UIAHandler from comInterfaces.Accessibility import * from comInterfaces...
import urllib2 import urllib from socket import error as SocketError from ase.test import NotAvailable dest = 'demo.ascii' src = 'http://inac.cea.fr/L_Sim/V_Sim/files/' + dest try: e = urllib2.urlopen(src) urllib.urlretrieve(src, filename=dest) except (urllib2.URLError, SocketError): raise NotAvailable('Ret...
from enum import IntEnum, auto class YoungLaplaceParam(IntEnum): BOND = 0 RADIUS = auto() APEX_X = auto() APEX_Y = auto() ROTATION = auto()
""" Boolean geometry utilities. """ from __future__ import absolute_import import __init__ from fabmetheus_utilities.vector3 import Vector3 from fabmetheus_utilities import archive from fabmetheus_utilities import euclidean from fabmetheus_utilities import gcodec from fabmetheus_utilities import settings import math im...
from bkr.server.model import RetentionTag, Product from bkr.server.widgets import ProductWidget from sqlalchemy.orm.exc import NoResultFound import logging log = logging.getLogger(__name__) class Utility: _needs_product = 'NEEDS_PRODUCT' _needs_no_product = 'NEEDS_NO_PRODUCT' _needs_tag = 'NEEDS_TAG' @c...
""" Controllers """ import copy import logging import os from monty.json import MontyDecoder from pymatgen.io.vasp.outputs import Vasprun from pymatgen.analysis.transition_state import NEBAnalysis from pymatgen.core.structure import Structure from abipy.flowtk.utils import Directory, File from abipy.flowtk import event...
import attr from cfme.infrastructure.config_management.config_systems import ConfigSystemsCollection from cfme.modeling.base import BaseCollection from cfme.modeling.base import BaseEntity from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.pretty import Pretty from cfme.utils.wait import wa...
"""A class to help start/stop the PyWebSocket server used by layout tests.""" import logging import os import sys import time from webkitpy.layout_tests.servers import http_server from webkitpy.layout_tests.servers import http_server_base _log = logging.getLogger(__name__) _WS_LOG_NAME = 'pywebsocket.ws.log' _WSS_LOG_N...
import sys import os import tempfile import shutil from os.path import dirname, join, abspath, splitext this_dir = abspath(dirname(__file__)) bb_root_dir = abspath(join(this_dir, "..", "..")) from distutils.core import setup includes = [] for package in ["buildbot.changes", "buildbot.process", "buildbot.status"]: _...
bl_info = {"name": "blendmaxwell", "description": "Maxwell Render exporter for Blender", "author": "Jakub Uhlik", "version": (0, 4, 5), "blender": (2, 77, 0), "location": "Info header > render engine menu", "warning": "Alpha", "wiki_url": "htt...
import sys import httplib if ( len(sys.argv) != 5 ): print "usage tinyWebClient.py [host] [port] [method] [path]" else: host = sys.argv[1] port = sys.argv[2] method = sys.argv[3] path = sys.argv[4] info = (host, port) print("%s:%s" % info) conn = httplib.HTTPConnection("%s:%s" % info) conn.request(method, path...
__author__ = 'Tom Schaul, tom@idsia.ch' from pylab import figure, savefig, imshow, axes, axis, cm, show from scipy import array, amin, amax class ColorMap: def __init__(self, mat, cmap=None, pixelspervalue=20, minvalue=None, maxvalue=None): """ Make a colormap image of a matrix :key mat: the matrix ...
""" *************************************************************************** SelectByLocation.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************************************...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('feature', '0009_remove_feature_user_detail'), ('changeset', '0029_suspiciousfeature_timestamp'), ] operations = [ migrations.AlterUniqueTogether( ...
import os import netifaces from mss.agent.lib.utils import grep, get_config_option from mss.agent.managers.translation import TranslationManager _ = TranslationManager().translate def get_config_info(): args = [] for interface in netifaces.interfaces(): if interface.startswith("eth"): args.a...
import unittest import doctest from trytond.model import descriptors def suite(): suite = unittest.TestSuite() suite.addTest(doctest.DocTestSuite(descriptors)) return suite
"""A demo of ankura functionality""" from __future__ import print_function import ankura @ankura.util.memoize @ankura.util.pickle_cache('newsgroups.pickle') def get_newsgroups(): """Retrieves the 20 newsgroups dataset""" datadir = '/local/jlund3/data/' news_glob = datadir + 'newsgroups-dedup/*/*' engl_s...
""" Template file used by the OPF Experiment Generator to generate the actual description.py file by replacing $XXXXXXXX tokens with desired values. This description.py file was generated by: '~/nta/eng/lib/python2.6/site-packages/nupic/frameworks/opf/expGenerator/ExpGenerator.py' """ from nupic.frameworks.opf.expdescr...
from __future__ import division import argparse import esc_tools as et DEBUG=1 SPECIAL="h" elements = { 1 : "H", 2 : "He", 3 : "Li", 4 : "Be", 5 : "B", 6 : "C", 7 : "N", \ 8 : "O", 9 : "F", 10 : "Ne", 11 : "Na", 12 : "Mg", 13 : "Al", 14 : "Si", \ 15 : "P", 16 : "S", 17 : "Cl", 18 : "Ar", 19 : "K...
from ..filter import Filter from ..filter_descriptor import FilterDescriptor from ..io_descriptor import IODescriptor from ...IO.image import Image from ...IO.compressed_image import CompressedImage class CompressImage(Filter): descriptor = FilterDescriptor("CompressImage", "Compresses an image.", ...
"""Unit test for the SNES nonlinear solver""" from __future__ import print_function """Solve the Yamabe PDE which arises in the differential geometry of general relativity. http://arxiv.org/abs/1107.0360. The Yamabe equation is highly nonlinear and supports many solutions. However, only one of these is of physical rele...
from distutils.core import setup, Extension vtc_scrypt_module = Extension('vtc_scrypt', sources = ['scryptmodule.c', 'scrypt.c'], include_dirs=['.'], extra_compile_args=['-O2']) setup (name = 'vtc_scrypt', ver...
""" tkRAD - tkinter Rapid Application Development library (c) 2013+ Raphaël SEBAN <motus@laposte.net> 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 Li...
__license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import time from functools import partial from PyQt5.Qt import QTimer, QDialog, QDialogButtonBox, QCheckBox, QVBoxLayout, QLabel, Qt from calibre.gui2 import error_dialog from calibre.gui2.actions i...
test = { 'name': 'Question 3', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> connection.execute(query_q3).fetchall() == [('BERNIE 2016', 3),('CARSON AMERICA', 958),('CRUZ FOR PRESIDENT', 2000),('JEB 2016, INC.', 2000),('MARCO RUBIO FOR PRESIDENT', 2460),('KASICH F...
from itertools import product import numpy as np import bpy from bpy.props import BoolVectorProperty, EnumProperty from mathutils import Matrix from sverchok.node_tree import SverchCustomTreeNode from sverchok.utils.nodes_mixins.recursive_nodes import SvRecursiveNode from sverchok.data_structure import dataCorrect, upd...
import json from collections import ChainMap CONFIG_DEFAULTS = {"verbose": "info", "backend": "local", "check_updates": True} class FileConfig: def __init__(self, path, data, defaults=None): self.path = path if defaults is None: defaults = {} self._data = ChainMap(data, defaults)...
""" This module contains experimental code for using the (extend) UHSDR API 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 your option) any later version. This...
""" Django settings for wikicoding project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY...
import unittest from totalopenstation.formats import Point from totalopenstation.formats.polar import BasePoint, PolarPoint class TestPolar(unittest.TestCase): def setUp(self): self.bp0 = BasePoint(x='0', y='0', z='0', ih='1.0', b_zero_st='0.0') self.bp1 = BasePoint(x='0', y='0', z='0', ih='1.324', ...
from .exceptions import ReadError from .parsers import ebml from .mkv import MKV from .parsers import ebml import logging import codecs import os import io __all__ = ['Subtitle'] logger = logging.getLogger(__name__) class Subtitle(object): """Subtitle extractor for Matroska Video File. Currently only SRT subtit...
from configargparse import ArgParser from tupa.scripts.export import load_model def main(): argparser = ArgParser(description="Load TUPA model and save again to a different file.") argparser.add_argument("models", nargs="+", help="model file basename(s) to load") argparser.add_argument("-s", "--suffix", def...
import unittest import numpy from safe.common.geodesy import Point class TestCase(unittest.TestCase): def setUp(self): self.eps = 0.001 # Accept 0.1 % relative error self.RSISE = Point(-35.27456, 149.12065) self.Home = Point(-35.25629, 149.12494) # 28 Scrivener Street, ACT sel...
from .anime import ConfigAnime from .backup import ConfigBackupRestore from .general import ConfigGeneral from .index import Config from .notifications import ConfigNotifications from .post_processing import ConfigPostProcessing from .providers import ConfigProviders from .search import ConfigSearch from .shares import...
from constant import * from lang import __, getDefaultLanguage from pprint import pprint from utils import * import Queue as Q import apt import apt_pkg import errno import glib import hashlib import optparse import os.path import subprocess import sys import textwrap import threading as td import time import urllib im...
""" MAP Client, a program to generate detailed musculoskeletal models for OpenSim. Copyright (C) 2012 University of Auckland This file is part of MAP Client. (http://launchpad.net/mapclient) MAP Client is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lice...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.errors import AnsibleError from ansible.plugins.action import ActionBase from ansible.template import Templar from ansible.utils.boolean import boolean class ActionModule(ActionBase): TRANSFERS_FILES = False def...
import IMP.core import IMP.container import IMP.algebra import IMP.display import sys IMP.setup_from_argv(sys.argv, "Optimize balls example") if IMP.get_is_quick_test(): num_balls = 2 num_mc_steps = 10 else: num_balls = 20 num_mc_steps = 1000 m = IMP.Model() bb = IMP.algebra.BoundingBox3D(IMP.algebra.Ve...
""" AMP passport - grant abilities to a server. Quickly checks permissions to operate in specific capacities. * Storage (proof & key-trust check) * Encrypted Storage (longer proof & key-trust check) * Publish (hidden server storing data) * Subscribe (hidden server looking for...
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 lat...
from django.db.models import ImageField from weblate.utils.validators import validate_bitmap class ScreenshotField(ImageField): """File field which forces certain image types.""" default_validators = [validate_bitmap]
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
import BoostBuild t = BoostBuild.Tester() t.write("c.cpp", "\n") t.write("r.cpp", """ void helper(); int main( int ac, char * av[] ) { helper(); for ( int i = 1; i < ac; ++i ) std::cout << av[ i ] << '\\n'; } """) t.write("c-f.cpp", """ int """) t.write("r-f.cpp", """ int main() { return 1; } """) t.writ...
import json from os import path import pytest from ethereum.tools.tester import Chain, ABIContract from ethereum.tools._solidity import ( get_solidity, compile_file, solidity_get_contract_data, ) SOLIDITY_AVAILABLE = get_solidity() is not None CONTRACTS_DIR = path.join(path.dirname(__fil...
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class AttachmentsConfig(AppConfig): """ The Django App Config class to store information about the users app and do startup time things. """ name = 'kuma.attachments' verbose_name = _('Attachments') def...
"""Module providing a factory for instantiating a temporal memory instance.""" import inspect from nupic.research.temporal_memory import TemporalMemory from nupic.bindings.algorithms import TemporalMemory as TemporalMemoryCPP from htmresearch.algorithms.extended_temporal_memory import ( ExtendedTemporalMemory) from n...
""" symenc.py """ import six from cryptography.exceptions import UnsupportedAlgorithm from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import Cipher from cryptography.hazmat.primitives.ciphers import modes from .errors import PGPDecryptionError from .errors import PGP...
{ 'name': 'Account Invoice Line Stock Move Info', 'version': "8.0.1.0.0", 'license': "AGPL-3", 'author': 'OdooMRP team,' 'AvanzOSC,' 'Serv. Tecnol. Avanzados - Pedro M. Baeza', 'website': "http://www.odoomrp.com", "contributors": [ "Pedro M. Baeza <pedro.baeza...