code
stringlengths
1
199k
data = """ State Abbreviation FIPS Code State Name AK 02 ALASKA AL 01 ALABAMA AR 05 ARKANSAS AS 60 AMERICAN SAMOA AZ 04 ARIZONA CA 06 CALIFORNIA CO 08 COLORADO CT 09 CONNECTICUT DC 11 DISTRICT OF COLUMBIA DE 10 DELAWARE FL 12 FLORIDA GA 13 GEORGIA GU 66 GUAM HI 15 HAWAII IA 19 IOWA ID 16 IDAHO IL 17 ILLINOIS IN 18 INDI...
from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.iff" result.attribute_template_id = -1 result.stfName("string_id_table","") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
from unittest import TestCase import numpy as np from pysas import waveread, World from pysas.mcep import estimate_alpha, spec2mcep_from_matrix, mcep2coef from pysas.synthesis.mlsa import MLSAFilter from pysas.synthesis import Synthesis from pysas.excite import ExcitePulse class SynthesisTest(TestCase): def setUp(s...
""" GUI progressbar decorator for iterators. Includes a default (x)range iterator printing to stderr. Usage: >>> from tqdm_gui import tgrange[, tqdm_gui] >>> for i in tgrange(10): #same as: for i in tqdm_gui(xrange(10)) ... ... """ from __future__ import division, absolute_import import sys from time import t...
EQUALS = 'equals' GT = 'gt' LT = 'lt' IN = 'in' OPERATOR_SEPARATOR = '__' REVERSE_ORDER = '-' ALL_OPERATORS = {EQUALS: 1, GT: 1, LT: 1, IN: 1} def split_to_field_and_filter_type(filter_name): filter_split = filter_name.split(OPERATOR_SEPARATOR) filter_type = filter_split[-1] if len(filter_split) > 0 else None ...
__all__ = ['checker', 'transformer', 'codegen', 'common', 'numsed','numsed_lib','opcoder', 'sedcode', 'snippet_test']
from __future__ import (division, absolute_import, print_function, unicode_literals) from beets.plugins import BeetsPlugin from beets.dbcore import types from beets.util.confit import ConfigValueError from beets import library class TypesPlugin(BeetsPlugin): @property def item_types(self...
from __future__ import absolute_import, unicode_literals from gaegraph.business_base import NodeSearch, DeleteNode from classificacaodtm_app.commands import ListClassificacaodtmCommand, SaveClassificacaodtmCommand, UpdateClassificacaodtmCommand, \ ClassificacaodtmPublicForm, ClassificacaodtmDetailForm, Classificaca...
from django.forms import ModelForm,forms from django import forms from appPortas.models import * from django.forms.models import inlineformset_factory class PortaForm(ModelForm): class Meta: model = Porta fields = ('descricao',) class GrupoForm(ModelForm): class Meta: model = Grupo ...
"""Support for interface with a Gree climate systems.""" from __future__ import annotations from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import...
from django.db import models from django.contrib.auth.models import User from django.utils.html import escape from django.db.models import Q from datetime import date from datetime import datetime from MessagesApp.models import Thread from BlockPages.models import BlockPage, BlockEvent, EventComment from SpecialInfoApp...
""" Experiment for XGBoost + CF Aim: To find the best tc(max_depth), mb(min_child_weight), mf(colsample_bytree * 93), ntree tc: [13, 15, 17] mb: [5, 7, 9] mf: [40, 45, 50, 55, 60] ntree: [160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360] Averaging 20 models Summary Best loss ...
from distutils.version import StrictVersion if __name__ == '__main__': import ctypes import sys if sys.platform.startswith('linux'): try: x11 = ctypes.cdll.LoadLibrary('libX11.so') x11.XInitThreads() except: print("Warning: failed to XInitThreads()") from ...
from runner.koan import * class AboutIteration(Koan): def test_iterators_are_a_type(self): it = iter(range(1,6)) fib = 0 for num in it: fib += num self.assertEqual(__ , fib) def test_iterating_with_next(self): stages = iter(['alpha','beta','gamma']) tr...
"""Control switches.""" from datetime import timedelta import logging from ProgettiHWSW.relay import Relay import async_timeout from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_pla...
from keystoneclient.v2_0 import client from keystoneclient.v3 import client as keystoneclient_v3 from keystoneclient.auth import token_endpoint from keystoneclient import session, exceptions from charmhelpers.core.decorators import retry_on_exception if hasattr(exceptions, 'ConnectionRefused'): econnrefused = excep...
""" Test p2p addr-fetch connections """ import time from test_framework.messages import msg_addr, CAddress, NODE_NETWORK, NODE_WITNESS from test_framework.p2p import P2PInterface, p2p_lock from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal ADDR = CAddress() ADDR....
import httplib import urllib import socket class ToolProtocolHTTP(object): """ HTTP/HTTPS client for TEMA MBT protocol. Discusses with the TEMA test engine. """ # is client connected to the server isConnected = False def __init__(self): self.host = "localhost" self.port = 80 ...
import re import os.path from io import open from setuptools import find_packages, setup try: from azure_bdist_wheel import cmdclass except ImportError: from distutils import log as logger logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} PACKAGE_NAME = "azure-cognitiveserv...
import unittest from blocks import KeyValueOption, KeyOption, Block ''' s = """server { nameserver 123; }""" s = """server 123;""" a = NginxConfig() a.load(s) print(a.server) ''' class NgKVB(Block): kv = KeyValueOption('kv_value') class Test(unittest.TestCase): def test_base(self): """ B...
import os bundleFilesDir = 'tmp/bundleSizeDownloads' yarnLockFile = 'yarn.lock' packagesFile = 'package.json' def isDividerLine(line): # At least 80 chars, all slashes except the last (which is newline). The number is inconsistent for some reason. return (len(line)>=80 and line.endswith("\n") an...
from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/poi/shared_tatooine_evil_nomad_small2.iff" result.attribute_template_id = -1 result.stfName("poi_n","base_poi_building") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
__all__ = ["get_info","show"] lapack_opt_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]} blas_opt_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', ...
class IDObject(): """ Base class for all objects having unique id within the application """ def __init__(self, objectId): """ Constructor method for building IDObject objectId - the unique objectId of the object in the application """ self._objectId = objectId ...
'''Support module for translating strings. This module provides several functions for definitions, keys, and transforms.''' __version__ = 1.3 import random def definition(name=None): 'Returns a valid definition.' random.seed(name) definition, list_one, list_two = str(), range(256), range(256) for index ...
from __future__ import print_function import argparse import glob import os import platform import shutil import subprocess import sys from lib.util import get_electron_branding, rm_rf, scoped_cwd PROJECT_NAME = get_electron_branding()['project_name'] PRODUCT_NAME = get_electron_branding()['product_name'] SOURCE_ROOT =...
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 'Calendar.slug' db.add_column('schedule_calendar', 'slug', self.gf('django.db.models.fields.SlugFi...
from dodotable import __version__, __version_info__ import sys import os import shlex extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'dodotable' copyright = '2016, Spoqa, Inc' author = 'Kang Hyojun' version =...
""" A library of useful helper classes to the saxlib classes, for the convenience of application and driver writers. $Id: saxutils.py,v 1.19 2001/03/20 07:19:46 loewis Exp $ """ import types, sys, urllib, urlparse, os, string import handler, _exceptions, xmlreader try: _StringTypes = [types.StringType, types.Unicod...
from System.IO import * from System.Drawing import * from System.Runtime.Remoting import * from System.Threading import * from System.Windows.Forms import * from System.Xml.Serialization import * from System import * from Analysis.EDM import * from DAQ.Environment import * from EDMConfig import * def saveBlockConfig(pa...
model_search = "http://api.nytimes.com/svc/search/v2/" + \ "articlesearch.response-format?" + \ "[q=search term&" + \ "fq=filter-field:(filter-term)&additional-params=values]" + \ "&api-key=9key" """http://api.nytimes.com/svc/search/v2/articlesearch.json?q=terrorism+OR+te...
from __future__ import unicode_literals from flask import session from indico.core.db import db from indico.modules.events.logs import EventLogKind, EventLogRealm from indico.modules.events.tracks import logger from indico.modules.events.tracks.models.groups import TrackGroup from indico.modules.events.tracks.models.tr...
from pytest import approx, raises from fastats.maths.gamma import gammaln def test_gamma_ints(): assert gammaln(10) == approx(12.801827480081469, rel=1e-6) assert gammaln(5) == approx(3.1780538303479458, rel=1e-6) assert gammaln(19) == approx(36.39544520803305, rel=1e-6) def test_gamma_floats(): assert ...
from i3pystatus import IntervalModule from i3pystatus.core.util import internet, require from datetime import datetime from urllib.request import urlopen import json import re GEOLOOKUP_URL = 'http://api.wunderground.com/api/%s/geolookup%s/q/%s.json' STATION_QUERY_URL = 'http://api.wunderground.com/api/%s/%s/q/%s.json'...
""" NBConvert Preprocessor for sanitizing HTML rendering of notebooks. """ from bleach import ( ALLOWED_ATTRIBUTES, ALLOWED_STYLES, ALLOWED_TAGS, clean, ) from traitlets import ( Any, Bool, List, Set, Unicode, ) from .base import Preprocessor class SanitizeHTML(Preprocessor): # B...
class Solution: def containVirus(self, grid: List[List[int]]) -> int: current_set_number = 1 grid_set = [[0 for i in range(len(grid[0]))] for j in range(len(grid))] set_grid = {} threaten = {} def getAdjacentCellsSet(row, col) -> List[int]: answer = [] ...
class Solution(object): def validWordSquare(self, words): """ :type words: List[str] :rtype: bool """ if words is None or len(words) == 0: return True ls = len(words) for i in range(ls): for j in range(1, len(words[i])): ...
""" The NfsCollector collects nfs utilization metrics using /proc/net/rpc/nfs. * /proc/net/rpc/nfs """ import diamond.collector import os class NfsCollector(diamond.collector.Collector): PROC = '/proc/net/rpc/nfs' def get_default_config_help(self): config_help = super(NfsCollector, self).get_default_co...
from __future__ import unicode_literals from sqlalchemy.ext.declarative import declared_attr from indico.core.db import db from indico.util.locators import locator_property from indico.util.string import format_repr, return_ascii class SessionType(db.Model): __tablename__ = 'session_types' @declared_attr de...
""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit from pyqode.core.backend import server from pyqode.core.modes import RightMarginMode if __name__ == '__main__': app...
import os import json from nose.tools import assert_equal from .project import load_lsdsng from .utils import temporary_file SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) def _test_load_store_instrument(source_lsdsng, lsdinst_path, original_index): proj = load_lsdsng(source_lsdsng) proj.song.instrumen...
""" WHERE2 is a near-linear time top-down clustering alogithm. WHERE2 updated an older where with new Python tricks. """ from __future__ import division,print_function import sys sys.dont_write_bytecode = True from lib import * from nasa93 import * """ Project data.dat in N dimensions down to a single dimension connec...
from .sub_resource import SubResource class VirtualNetworkPeering(SubResource): """Peerings in a virtual network resource. :param id: Resource ID. :type id: str :param allow_virtual_network_access: Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virt...
import xml.etree.ElementTree as ET tree = ET.parse('project_hierarchy_graph.xml') root = tree.getroot() f = open('project_hierarchy_graph.dot', 'w') f.write("digraph PROJECT_HIERARCHY_GRAPH {\n") for project in root: for reference in project: f.write(project.attrib['name']) f.write(" -> ") f.write(reference.attr...
import datetime import os import time import subprocess import tacticenv from pyasm.common import Environment from pyasm.security import Batch ZIP_EXE = "zip" BACKUP_DIR = "/spt/tactic/tactic_temp/" DB_DIR = "backup_db" PROJECT_DIR = "backup_tactic" ASSETS_DIR = "backup_assets" TACTIC_DIR = "/spt/tactic/tactic/" class ...
"""A library of helper functions for the CherryPy test suite.""" import datetime import io import logging import os import re import subprocess import sys import time import unittest import warnings import portend import pytest import six from cheroot.test import webtest import cherrypy from cherrypy._cpcompat import t...
__doc__ = """Random number array generators for numarray. This package was ported to numarray from Numeric's RandomArray and provides functions to generate numarray of random numbers. """ from RandomArray2 import *
"""Unit tests for nss_cache/util/timestamps.py.""" __author__ = 'jaq@google.com (Jamie Wilkinson)' import os import shutil import tempfile import time import unittest import mox from nss_cache.util import timestamps class TestTimestamps(mox.MoxTestBase): def setUp(self): super(TestTimestamps, self).setUp() se...
def getUniqueLinks( sReadFile, sOutFile ): # from File.Get import getListFromFileLines from File.Write import QuickDumpLines # from Web.Address import getHostPathTuple, getDomainOffURL from Web.Test import isURL # lLines = getListFromFileLines( sReadFile ) # s...
import BaseHTTPServer import cgi import ctypes import os import sys import threading from PySide import QtGui import MaxPlus PORT = 8000 class MyThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.exiting = False address = ('localhost', PORT) self.serve...
""" WWW: http://4suite.com/4DOM e-mail: support@4suite.com Copyright (c) 2000 Fourthought Inc, USA. All Rights Reserved. See http://4suite.com/COPYRIGHT for license and copyright information """ import string from xml.dom import Node from xml.dom.html.HTMLElement import HTMLElement class HTMLButtonElement(H...
""" Common MouseTrap Functions. """ __id__ = "$Id$" __version__ = "$Revision$" __date__ = "$Date$" __copyright__ = "Copyright (c) 2008 Flavio Percoco Premoli." __license__ = "GPLv2" import os import re def get_py_list(dirlist): """ Checks for .py files on directories in dirlist and removes t...
import ppc_commands ppc_model = 'ppc440gx' funcs = {} ppc_commands.setup_local_functions(ppc_model, funcs) class_funcs = { ppc_model: funcs } ppc_commands.enable_generic_ppc_commands(ppc_model) ppc_commands.enable_4xx_tlb_commands(ppc_model) ppc_commands.enable_440_tlb_commands(ppc_model)
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('eighth', '0036_eighthscheduledactivity_administrative'), ('eighth', '0037_auto_20160307_2342'), ]
import weakref from twisted.application import internet from twisted.application import service from twisted.internet import defer from twisted.python import failure from twisted.python import log from twisted.spread import pb from zope.interface import implements from buildbot import config from buildbot import interf...
""" Tests for error handling """ import unittest import nest import sys class ErrorTestCase(unittest.TestCase): """Tests if errors are handled correctly""" def test_Raise(self): """Error raising""" nest.ResetKernel() try: raise nest.NESTError('test') self.fail('an...
''' Crawl the running Docker site and verify all links give a 200 OK ''' import unittest import subprocess class BasicTests(unittest.TestCase): ''' Base class for testing ''' def setUp(self): ''' Define some unique data for validation ''' pass def tearDown(self): ''' Destroy unique d...
import os import glob import web langmaps = { 'en_US': u'English (US)', 'sq_AL': u'Albanian', 'ar_SA': u'Arabic', 'hy_AM': u'Armenian', 'az_AZ': u'Azerbaijani', 'bs_BA': u'Bosnian (Serbian Latin)', 'bg_BG': u'Bulgarian', 'ca_ES': u'Català', 'cy_GB': u'Cymraeg', 'hr_HR': u'Croatia...
from __future__ import absolute_import import os import time from bzrlib import ( controldir, errors, osutils, registry, trace, ) from bzrlib.i18n import gettext from bzrlib.branch import ( Branch, ) from bzrlib.revision import ( NULL_REVISION, ) format_registry = registry.Regist...
from tasks import func func.delay(1, 2)
"""Unit tests for the search engine.""" __revision__ = \ "$Id$" from invenio.testutils import InvenioTestCase from invenio import search_engine from invenio.testutils import make_test_suite, run_test_suite from invenio.config import CFG_CERN_SITE class TestMiscUtilityFunctions(InvenioTestCase): """Test whatever...
from Screens.Screen import Screen from Screens.Standby import TryQuitMainloop from Screens.MessageBox import MessageBox from Components.ActionMap import NumberActionMap from Components.Pixmap import Pixmap from Components.Sources.StaticText import StaticText from Components.MenuList import MenuList from Plugins.Plugin ...
""" /*************************************************************************** Name : Dockable MirrorMap Description : Creates a dockable map canvas Date : February 1, 2011 copyright : (C) 2011 by Giuseppe Sucameli (Faunalia) email : brush.tyler@gmail...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='StaticPage', fields=[ ('id', models.AutoField(serialize=False, auto_created=...
from django.db import models from django.utils import timezone class Hcmeta(models.Model): hcver = models.IntegerField(blank=True, null=True) org_id = models.CharField(max_length=50, blank=True, null=True) details = models.TextField(blank=True, null=True) class Meta: managed = False db_t...
import math import numpy as np from . import oeqCorrelation as oeq def get(*xin): # OeQ autogenerated correlation for 'Window to Wall Ratio in Southern Direction' A_WIN_S_BY_AW= oeq.correlation( const= 20818.6194135, a= -42.6513518642, b= 0.0327511835635, c= -1.11718058834e-05, d...
from __future__ import absolute_import import collections from cStringIO import StringIO from bzrlib import ( debug, errors, ) from bzrlib.trace import mutter class MessageHandler(object): """Base class for handling messages received via the smart protocol. As parts of a message are received, the co...
from __future__ import absolute_import from Plugins.Plugin import PluginDescriptor from Components.PluginComponent import plugins from enigma import eDBoxLCD from .qpip import QuadPipScreen, setDecoderMode def main(session, **kwargs): session.open(QuadPipScreen) def autoStart(reason, **kwargs): if reason == 0: setD...
import wx from service.fit import Fit import gui.mainFrame from gui import globalEvents as GE from .calc.fitRemoveImplant import FitRemoveImplantCommand from .calc.fitAddImplant import FitAddImplantCommand from .calc.fitRemoveBooster import FitRemoveBoosterCommand from .calc.fitAddBooster import FitAddBoosterCommand fr...
import logging from atracker.models import Event from atracker.util import create_event from django.conf.urls import url from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from tastypie.authentication import ( MultiAuthentication, Authentication, Sessio...
''' virtualbox_const_support.py Constants for VirtualBox. ''' __author__ = "Karol Będkowski <karol.bedkowski@gmail.com>" __version__ = '0.3' VM_STATE_POWEROFF = 0 VM_STATE_POWERON = 1 VM_STATE_PAUSED = 2 VM_START_NORMAL = 1 VM_START_HEADLESS = 2 VM_PAUSE = 3 VM_POWEROFF = 4 VM_ACPI_POWEROFF = 5 VM_REBOOT = 6 VM_RESUME ...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import base64 import subprocess import sys import time import traceback from ansible.compat.six import iteritems, string_types, binary_type from ansible import constants as C from ansible.errors import AnsibleError, AnsibleParserErr...
import os from cloudinit.settings import PER_INSTANCE from cloudinit import util frequency = PER_INSTANCE HELPER_TOOL_TPL = '%s/cloud-init/write-ssh-key-fingerprints' def _get_helper_tool_path(distro): try: base_lib = distro.usr_lib_exec except AttributeError: base_lib = '/usr/lib' return HE...
type = "passive" def handler(fit, ship, context): fit.ship.boostItemAttr("maxVelocity", ship.getModifiedItemAttr("shipBonusMI"), skill="Minmatar Industrial")
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Group.is_open' db.delete_column('askbot_group', 'is_open') def backwards(self, orm): # Adding field 'Grou...
from __future__ import with_statement import os import sys import traceback if sys.version_info < (2, 7) and os.name != "nt": import errno import subprocess def _eintr_retry_call(func, *args): while True: try: return func(*args) except OSError, e: ...
"""CLI tests for Insights part of RH Cloud - Inventory plugin. :Requirement: RH Cloud - Inventory :CaseAutomation: Automated :CaseLevel: System :CaseComponent: RHCloud-Inventory :Assignee: jpathan :TestType: Functional :CaseImportance: High :Upstream: No """ import pytest from broker.broker import VMBroker from robotte...
import li_boost_shared_ptr import gc debug = False class li_boost_shared_ptr_runme: def main(self): if (debug): print "Started" li_boost_shared_ptr.cvar.debug_shared = debug # Change loop count to run for a long time to monitor memory loopCount = 1 #5000 for i in range (0,loopCount): s...
""" The basic module about log readers """ import os import re from ..utils.gzip2 import GzipFile __author__ = 'chenxm' __all__ = ["FileReader"] class FileReader(object): @staticmethod def open_file(filename, mode='rb'): """ open plain or compressed file @return file handler """ parts = os.path.basename(filen...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: aci_access_port_to_interface_policy_leaf_profile short_descrip...
import locale import sys from matplotlib import pylab as plt from scipy.interpolate import interp1d import numpy def parse_pRDF(f): pRDFs={} count=0 for line in open(f).readlines(): words=line.split() if words[0]=="dstep": dstep=locale.atof(words[1]) continue elif words[0]=="nstep": nstep=locale.atof(...
"""Tests for Lib/fractions.py.""" from decimal import Decimal from test.support import run_unittest import math import numbers import operator import fractions import unittest from copy import copy, deepcopy from pickle import dumps, loads F = fractions.Fraction gcd = fractions.gcd class DummyFloat(object): """Dumm...
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...
"""User preferences for KlustaViewa.""" import logging import numpy as np loglevel = logging.INFO loglevel_file = logging.INFO prompt_save_on_exit = True delay_timer = .05 delay_buffer = .1 similarity_measure = 'gaussian' # or 'kl' for KL divergence waveforms_nspikes_max_expected = 100 waveforms_nspikes_per_cluster_mi...
import re import lxml.html from billy.scrape.committees import CommitteeScraper, Committee from openstates.utils import LXMLMixin class NYCommitteeScraper(CommitteeScraper, LXMLMixin): jurisdiction = "ny" latest_only = True def _parse_name(self, name): """ Split a committee membership string...
HOSTNAME = 'localhost' DATABASE = 'r' USERNAME = 'web' PASSWORD = 'web' DB_URI = 'mysql://{}:{}@{}/{}'.format( USERNAME, PASSWORD, HOSTNAME, DATABASE)
import sys import time import espresso import mpi4py.MPI as MPI import logging from espresso import Real3D, Int3D from espresso.tools import lammps, gromacs from espresso.tools import decomp, timers, replicate steps = 1000 rc = 1.12 skin = 0.3 nvt = True timestep = 0.01 sys.stdout.write('Setting up simulation ...\n') b...
""" Tests for serial.py. """ import cPickle from cStringIO import StringIO import gzip import shutil import tempfile import unittest from rdkit import Chem from rdkit.Chem import AllChem from vs_utils.utils.rdkit_utils import conformers, serial class TestMolIO(unittest.TestCase): """ Base test class for molecul...
""" A portaudio module. """ __all__ = ['_portaudio']
../../../../../../share/pyshared/ubuntu-sso-client/ubuntu_sso/xdg_base_directory/windows.py
from __future__ import absolute_import import requests from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.simplejson import dumps, loads from common.models import Singleton from lock_manager import Lock, LockError from .literals import FORM_SUBMIT_URL, FORM_KEY, FORM_...
from six import BytesIO from pathod.language import actions, parse_pathoc, parse_pathod, serve def parse_request(s): return next(parse_pathoc(s)) def test_unique_name(): assert not actions.PauseAt(0, "f").unique_name assert actions.DisconnectAt(0).unique_name class TestDisconnects: def test_parse_pathod...
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides methods and Pythonic idioms that make it easy to navigate,...
from nose import with_setup from tests.utils import * @with_setup(usual_setup_func, usual_teardown_func) def test_negative(): create_file('xxx', 'b.png') create_file('xxx', 'a.png') create_file('xxx', 'a') head, *data, footer = run_rmlint('-i') assert footer['total_files'] == 3 assert footer['to...
"""Copyright (c) 2009 Sergio Gabriel Teves All rights reserved. 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 program is ...
from __future__ import with_statement from collections import OrderedDict import datetime import io import os.path import re from . import helpers as metadata_helpers from .. import logger import sg_helpers from ..indexers import indexer_config from ..indexers.indexer_config import TVINFO_TVDB, TVINFO_TMDB from lib.tvi...
"""External Python Shell widget: execute Python script in a separate process""" import sys import os import os.path as osp import socket from spyderlib.qt.QtGui import QApplication, QMessageBox, QSplitter, QMenu from spyderlib.qt.QtCore import QProcess, SIGNAL, Qt from spyderlib.qt.compat import getexistingdirectory fr...
from __future__ import absolute_import, division, unicode_literals import argparse as _argparse import os import sys import tempfile from mo_dots import coalesce, listwrap, unwrap, to_data from mo_logs import Log class _ArgParser(_argparse.ArgumentParser): def error(self, message): Log.error("argparse error...
{ "name": "MPS - Sale forecast", "version": "1.0", "depends": [ "base", "product", "sale", "stock", ], "author": "OdooMRP team", "contributors": [ "Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>", "Ainara Galdona <ainaragaldona@avanzosc.es>", ...
import webnotes def execute(): webnotes.conn.sql("""drop table if exists `tabDocType Mapper`""") webnotes.conn.sql("""drop table if exists `tabTable Mapper Detail`""") webnotes.conn.sql("""drop table if exists `tabField Mapper Detail`""") webnotes.delete_doc("DocType", "DocType Mapper") webnotes.delete_doc("DocTyp...