src
stringlengths
721
1.04M
import json import os from random import SystemRandom import shutil from uuid import UUID from devp2p.service import BaseService from ethereum.tools import keys from ethereum.slogging import get_logger from ethereum.utils import privtopub # this is different than the one used in devp2p.crypto from ethereum.utils impo...
"""Unit tests for host collections. :Requirement: Hostcollection :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: HostCollections :Assignee: swadeley :TestType: Functional :CaseImportance: High :Upstream: No """ from random import choice from random import randint import pytest from broker imp...
#!/usr/bin/python #Copyright (C) 2009 Gabes Jean, naparuba@gmail.com # #This file is part of Shinken. # #Shinken 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 Software Foundation, either version 3 of the License, or #(at yo...
#!/usr/bin/python # -*- coding: iso-8859-2 -*- import sys, os import re, string import time, datetime, calendar, locale import urllib import cPickle import xml.sax.saxutils locale.setlocale(locale.LC_TIME, 'en_GB') currenttimestamp = time.strftime(u'%a, %d %b %Y %H:%M:%S +0000', time.gmtime()) locale.setlocale(locale...
# -*- coding: utf-8 -*- import MySQLdb, time conn=MySQLdb.connect(host="localhost",user="root",passwd="xrt512",db="hz_bus", port=3306) cur = conn.cursor(); #创建alphaTable2 cur.execute(u''' create table alphaTable2 as select * from ( select lineid,linedir,stopInfo,AVG(internalTime) as averageInternalTime...
# Copyright (c) 2007-2009 The PyAMF Project. # See LICENSE.txt for details. """ `django.db.models` adapter module. :see: `Django Project <http://www.djangoproject.com>`_ :since: 0.4.1 """ from django.db.models.base import Model from django.db.models import fields from django.db.models.fields import related, files ...
import os import re import ast from setuptools import setup, find_packages _version_re = re.compile(r'__version__\s+=\s+(.*)') _root = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(_root, 'sea/__init__.py')) as f: version = str(ast.literal_eval(_version_re.search( f.read()).group(1)))...
from urllib import request from bs4 import BeautifulSoup import re from builtins import print from selenium import webdriver from selenium.webdriver.common.keys import Keys import time """ The source for the very first version of the web scrapper app. No classes or functions. Just codes. """ # Open the fil...
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ***************************************** Author: zhlinh Email: zhlinhng@gmail.com Version: 0.0.1 Created Time: 2016-01-05 Last_modify: 2016-01-05 ****************************************** ''' ''' Given a string, find the length of the lon...
from copy import copy, deepcopy from textwrap import dedent try: import cPickle as pickle except ImportError: import pickle try: import dask.array as da except ImportError: pass import numpy as np import pandas as pd from xray import (align, concat, conventions, backends, Dataset, DataArray, ...
import re import os import sys import json from subprocess import Popen, PIPE from os.path import basename, isdir, join __version__ = '1.2.1-modified' class CondaError(Exception): "General Conda error" pass class CondaEnvExistsError(CondaError): "Conda environment already exists" pass def _call_c...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
import cv, cv2 import numpy as np import os import ext from random import randint import subprocess from tools import get_patch, overlaps, intersect, contour_to_rect, merge, cv2num from tools import OpencvRecorder import json import string import time import sys import tesseract_sip as tesseract tessdata_prefix = os....
# Copyright (C) 2013 Korei Klein <korei.klein1@gmail.com> genericColor = None variableColor = None symbolColor = None andColor = None orColor = None callColor = None quantifierDividerColor = None notColor = None alwaysBackgroundColor = None maybeBackgroundColor = None relationColor = None iffColor = None applyC...
# -*- coding: utf-8 -*- # EditXT # Copyright 2007-2016 Daniel Miller <millerdev@gmail.com> # # This file is part of EditXT, a programmer's text editor for Mac OS X, # which can be found at http://editxt.org/. # # EditXT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
"""Tests for user profile""" from django import test from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.utils.translation import ugettext as __ from .models import Profile User = get_user_model() class TestProfileModel(test.TransactionTestCase): def se...
""" Copyright (C) <2010> Autin L. TSRI This file git_upy/blender/v257/blenderUI.py is part of upy. upy 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, o...
# Copyright (c) 2016-present, Facebook, Inc. # # 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...
import sys, time, os, socket import struct, binascii, re, csv from datetime import datetime, timedelta from twisted.protocols.basic import LineReceiver from twisted.internet import reactor from twisted.python import usage, log from twisted.internet.serialport import SerialPort from twisted.web.server import Site from ...
# Copyright 2017 Google Inc. 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 applicable law or ag...
# -*- coding: utf-8 -*- # Imports, sorted alphabetically. # Python packages import os import socket import subprocess import sys import datetime from math import sin, pi # Third-party packages import pyglet from pyglet.text import Label from pyglet.gl import * # Modules from this project import globals as G from gu...
import logging # from phantasy.library.model import flame as flameutils # from phantasy.library import channelfinder from phantasy.library import lattice from phantasy.library import layout from phantasy.library import misc from phantasy.library import model from phantasy.library import operation from phantasy.librar...
from tkinter import * class ExampleApp(Tk): def __init__(self): Tk.__init__(self) list2=["Data","Página","Tipo de Resuisição"] t = SimpleTable(self,list2) t.pack(side="top", fill="x") list=["abc","def","ghi"] t.insert_row(list) t.insert_row(list) t.se...
# 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...
# Copyright 2010-2011 OpenStack Foundation # 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 # # Unles...
#Url linked list handler import os.path from UrlLL import UrlList Path = "url.list" DLPath = "hlist/" def add(Url): if os.path.isfile(Path) == False: UrlFile = open(Path,"w") List = UrlList() List.add(Url) List.fWrite(UrlFile) List.printList() return else: ...
import os import time import subprocess from lutris.runners.runner import Runner from lutris.gui.dialogs import NoticeDialog from lutris.thread import LutrisThread from lutris.util.log import logger from lutris.util import system from lutris.util.steam import (get_path_from_appmanifest, read_config, ...
"""Module to convert JaCoCo coverage report into the report compatible with Pycov utility.""" import csv def format_coverage_line(text, statements, missed, coverage, missed_lines=False): """Format one line with code coverage report of one class or for a summary.""" format_string = "{:80} {:3d} {:3d} {:3...
import json import os import time import cPickle import numpy as np import sys import re import operator import fnmatch from gensim.models.keyedvectors import KeyedVectors from tensorflow.contrib import learn from keras.preprocessing import sequence # construc embedding vectors based on the google word2vec and vocabul...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt, getdate, add_months, get_last_day, fmt_money, nowdate from frappe.mode...
"""This module contains the general information for StorageFlexFlashVirtualDrive ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class StorageFlexFlashVirtualDriveConsts: ADMIN_ACTION_DISABLE_VD = "disable-vd" ADMIN_ACT...
import codecs import datetime import json import os import pprint import re import shutil import subprocess import time import traceback from urllib.parse import urlparse import semantic_version import yaml from docker import APIClient as DockerClient from docker.tls import TLSConfig as DockerTLSConfig from biokbase....
import unittest import cairo from osgeo.osr import SpatialReference import numpy as np from foldbeam.rendering import core from foldbeam.rendering.renderer import RendererBase, set_geo_transform from ..utils import surface_hash, output_surface class TestGeoTransform(unittest.TestCase): def setUp(self): ...
# This is a user supplied file with user credentials import config import habiticaapi import unittest2 import logger import copy class TestTask(unittest2.TestCase): def setUp(self): """Setup character.""" self.character = habiticaapi.Character( config.USERID, config.APIKEY ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# -*- coding: utf-8 -*- """ /*************************************************************************** QAD Quantum Aided Design plugin comando JOIN e DISJOIN per aggregare e disgregare le geometrie (multipoint, multilinestring, poligon e multipoligon) ------------------- be...
#!/usr/bin/env python import sys import csv import re import bisect access_log_pattern = re.compile('^(?P<ip>.*?) - - (?P<time>.*?) "(?P<page>.*?)" ' + \ '(?P<code>.*?) .*? "(?P<referrer>.*?)" ".*?"$') def open_database(): arr = [] with open('IP2LOCATION-LITE-DB1.CSV', 'r') as csvfile: reader...
import unittest """ A splay tree is a type of balanced binary search tree. Structurally, it is identical to an ordinary binary search tree; the only difference is in the algorithms for finding, inserting, and deleting entries. All splay tree operations run in O(log n) time _on_average_, where n is the number of entri...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Freezer Status - JSON Output # # Description: # This script reads the 1-wire freezer temperature and prints JSON # Additionally, this script will send SNS messages if temperature # rises above ALERTTEMP or above freezing. # # Jason A. Cox, @jasonacox # https:/...
# Copyright 2016 Virantha Ekanayake 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 applicable la...
# Copyright (c) 2019 UAVCAN Consortium # This software is distributed under the terms of the MIT License. # Author: Pavel Kirienko <pavel@uavcan.org> from __future__ import annotations import enum import dataclasses @dataclasses.dataclass(frozen=True) class DataSpecifier: """ The data specifier defines what ...
# question 2.4 from cracking the code interview 4th ed. # Look at LinkedList.py to understand the implementation of Linked List ''' You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s digit is at the head of the list. Wri...
from django_fsm.db.fields import FSMField from django_fsm.db.fields.fsmfield import FSMFieldDescriptor class ManyTransitions(AttributeError): """Raised when AutoFSMField has too many transitions to choose from""" class NoTransitions(AttributeError): """Raised when AutoFSMField can't find any matching transi...
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
# -*- coding: utf-8 -*- ''' Return data to a mongodb server Required python modules: pymongo This returner will send data from the minions to a MongoDB server. To configure the settings for your MongoDB server, add the following lines to the minion config files: .. code-block:: yaml mongo.db: <database name> ...
from unittest import TestCase, main import os import time import sys import tempfile import difflib import svtools.sv_classifier import gzip class IntegrationTest_sv_classify(TestCase): def test_chromosome_prefix(self): self.assertEqual(svtools.sv_classifier.chromosome_prefix('chrBLAH'), 'BLAH') s...
#!/usr/bin/env python # -*- coding: utf-8 -*- import wx from platform import Platform from openings import Opening_view from controllers.auth import Auth_controller # begin wxGlade: extracode # end wxGlade class Login_view(wx.Frame): def __init__(self, parent, id): # begin wxGlade: Login.__init__ ...
#!/usr/bin/env python """ pySTL2GC Copyright (C) 2016 Dionys Rosario This program comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions. Usage: "cat file.stl | stl.py > file.ngc" """ import ocl import logging import subproccess lo...
# Copyright (c) 2013 OpenStack Foundation # 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 ...
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
# -*- coding: utf-8 -*- import json import logging from string import Template from jsonschema import validate, ValidationError, FormatChecker from werkzeug.routing import Map, Rule, NotFound from werkzeug.http import HTTP_STATUS_CODES from functools import wraps __validate_kwargs = {"format_checker": FormatChecker(...
#!/usr/bin/env python import os from optparse import OptionParser import subprocess import sys #import commands class install_script(): def __init__(self): self.prog_installed = [] def obtaining_tar(self, prog, path): if (prog == 6): os.chdir(path) #Before obtaining tha tar file of the corresponding tool,...
# # Copyright (c) 2015 Intel Corporation # # 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 i...
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # 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 ...
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at ...
# flags.py # # Copyright (C) 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that...
""" This module runs tests on the ROACH2 in heterodyne mode using loopback. """ import numpy as np import time from kid_readout.roach.r2heterodyne import Roach2Heterodyne from kid_readout.settings import ROACH2_IP, ROACH2_VALON, ROACH2_HOST_IP, ROACH2_GBE_HOST_IP from kid_readout.roach.tests.mock_valon import MockValo...
#!/usr/bin/python # -*- encoding:utf-8 -*- # vim:ft=python """Validate XML file using Schematron.""" from __future__ import print_function, unicode_literals import os import sys import optparse from file_scraper.schematron.schematron_scraper import SchematronScraper from ipt.utils import concat from ipt.six_utils i...
# -*- coding: utf-8 -*- """ ======================================== A Minimal CSV writer for data collection ======================================== Problem ------- Write (a subset of) the data to a CSV file during data collection. Approach -------- Write a callback function that integrates Python's built-in csv ...
#!/usr/bin/env python # P.Donker ASTRON # and Arno Schoenmakers the Great import sys import pg from subprocess import Popen import os import getpass from optparse import OptionParser from database import getDBname, getDBhost, getDBport, getDBuser VERSION = '0.0.2' # version of this script default_targetdate='2009.5' ...
""" Eigenvector centrality. """ # Copyright (C) 2004-2011 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx __author__ = "\n".join(['Aric Hagberg (hagberg@lanl.gov)', ...
# coding=utf-8 """ Region will serve as an abstract base class (ABC) to implement a standard interface amongst both Map and Surface objects """ from __future__ import (absolute_import, division, print_function, unicode_literals) import abc import collections from future.utils import with_metaclass from builtins imp...
import numpy as np from random import * from scipy.special import gammaln from scipy import stats ######################################################################## ## PROPOSAL DISTRIBUTIONS FOR HYPERPARAMETER INFERENCE # proposal function for variables that can't go below zero def alter_0inf_var(ob): nb = ...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.absp...
import sys, os from numpy import * from scipy.integrate import odeint sys.path.append('/home/qiqi/git/fds') import fds def dudt(u): x, dxdt = u ddxdtt = (1 - x**2) * dxdt - x #ddxdtt = (1 - x**2 - dxdt**2) * dxdt - x return array([dxdt, ddxdtt]) def run(u, dt, nsteps): J = empty(nsteps) for i ...
# coding: utf8 from __future__ import unicode_literals from .doc import Doc from ..symbols import HEAD, TAG, DEP, ENT_IOB, ENT_TYPE def merge_ents(doc): """Helper: merge adjacent entities into single tokens; modifies the doc.""" for ent in doc.ents: ent.merge(ent.root.tag_, ent.text, ent.label_) ...
#!/usr/bin/env python import os,sys, pwd from datetime import timedelta, datetime from dateutil.parser import parse from fcntl import flock, LOCK_EX, LOCK_NB os.environ['DJANGO_SETTINGS_MODULE']='tacc_stats.site.tacc_stats_site.settings' import django django.setup() from tacc_stats.site.machine.models import Job, Host,...
""" sentry.utils.http ~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import six import urllib from django.conf import settings from urlparse import urlparse, urljoin def absolute_u...
#! /usr/bin/env python """ Deploys a .pth file in site-packages for easy importing """ import distutils.sysconfig import os def deploy(): """Deploy gauss""" site = distutils.sysconfig.get_python_lib() pth = os.path.join(site, 'gauss.pth') if os.path.exists(pth): print("[i] Module already exis...
#!/usr/bin/python # -*- coding: utf-8 -*- import wx import wx.lib.ogl as ogl class Tab_dialog(wx.Dialog): def __init__(self, parent, title): super(Tab_dialog, self).__init__(parent, title=title,size=(410,220)) self.parent = parent self.nombre = wx.TextCtrl(self,-1, pos=(10,10), size=(200,30),style=wx.TE_P...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class EventTypeTestCase(Integra...
#!/bin/python import evdev iDevices = {} iDeviceNo = 0 def updateInputDevices(force = False, init = False): global iDeviceNo if init: iDevices = {} iDeviceNo = 0 deviceFileList = evdev.list_devices() if not force: if len(deviceFileList) == iDeviceNo: return iDevic...
from osgeo import gdal import signal from osgeo import ogr import json gdal.UseExceptions() """ This module has a heavy dependency on the python GDAL package, which can be a total pain in the ass to install, depending on your platform. But it is needed for parsing the Mapinfo Interchange Format (MIF) files... ...
from django.test import TestCase from rolepermissions.permissions import PermissionsManager, register_object_checker from rolepermissions.exceptions import CheckerNotRegistered class PermissionsManagerTests(TestCase): def setUp(self): PermissionsManager._checkers = {} def test_register_checker(sel...
# -*- coding: utf-8 -*- """ Managing Gateway Groups and interactions with multiple channels. (c) 2008-2014, Holger Krekel and others """ import atexit import sys from functools import partial from threading import Lock from execnet import gateway_bootstrap from execnet import gateway_io from execnet import XSpec from...
# Copyright 2019 Apex.AI, Inc. # # 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 in writing...
import json import os import codecs import math #--------------------------------------- # inject decorator inserts the Utils object so it can be # used directly in your Execute, Init functions etc. #--------------------------------------- def inject(util): def injectfn(fn): def wrapped(*args, **kwargs): u...
""" A generic comment-moderation system which allows configuration of moderation options on a per-model basis. To use, do two things: 1. Create or import a subclass of ``CommentModerator`` defining the options you want. 2. Import ``moderator`` from this module and register one or more models, passing the model...
# -*- coding: utf-8 -*- """Processes GCP cloud disks using Turbinia.""" import getpass import os import tempfile # We import a class to avoid importing the whole turbinia module. from turbinia import TurbiniaException from turbinia import client as turbinia_client from turbinia import config as turbinia_config from t...
#! /usr/bin/env python # # Copyright 2011-2013 Jesse DeGuire # # This file is part of Projector Controller. # # Projector Controller 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 Lic...
#!/usr/bin/python # This file is part of Morse. # # Morse 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. # # Morse ...
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the rawtransaction RPCs. Test the following RPCs: - createrawtransaction - signrawtransacti...
#!/usr/bin/python import sys import getopt import re import random def main(argv): inputfile = '' outputfile = '' try: opts, args = getopt.getopt(argv,"hi:o:",["ifile=","ofile="]) except getopt.GetoptError: print 'test.py -i <inputfile> -o <outputfile>' sys.exit(2) for opt,...
import itertools from utils.utils import range_union # adapted from ips-util for python 3.2 (https://pypi.org/project/ips-util/) class IPS_Patch(object): def __init__(self, patchDict=None): self.records = [] self.truncate_length = None self.max_size = 0 if patchDict is not None: ...
# -*- coding: utf-8 -*- import pickle import math import os.path import shutil import datetime import time import random import json import re import chardet import string import base64 import requests from bs4 import BeautifulSoup from model import TradedHouse, DistricHouse, BidHouse, RentHouse, create_table, cle...
import unittest from app import Format class FormatViewMethods(unittest.TestCase): def setUp(self): self.formatter=Format({u'ABC084-S': {u'type': u'Windows 7 Professional', u'installDate': u'2011-08-31 11:07:00.000'}, u'GMC088-POS1': {u'type': u'Windows 7 Professional', u'installDate': u'2011-08-31 11:07:00.000'}}...
import json from typing import Union, Optional, List from service.ws_re.register._base import Register, _REGISTER_PATH from service.ws_re.register._typing import LemmaDict from service.ws_re.register.authors import Authors from service.ws_re.register.lemma import Lemma from service.ws_re.volumes import Volume, Volumes...
#!/usr/bin/env python import json, argparse parser = argparse.ArgumentParser() parser.description = '''Generate an RST list documenting PISM's diagnostics.''' parser.add_argument("FILE", nargs=1) options = parser.parse_args() def print_heading(title, label, decoration): heading = """ .. _{label}: {title} {under...
""" Class Name : Webhook Description: Contributors: - Patrick Hennessy License: Arcbot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v3; as published by the Free Software Foundation @webhook...
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-03-31 00:50 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depen...
class Visitor(object): def visit_identifier(self, identifier): pass def visit_assignment(self, identifier, expression): pass def visit_integer(self, expression_1): pass def visit_float(self, expression_1): pass def visit_add(self, expression_1, expression_2): ...
from functools import partial from .model import class_prepared, create_model from .mapper import Manager, LazyProxy from .fields import FieldError, Field, CompositeIdField RECURSIVE_RELATIONSHIP_CONSTANT = 'self' pending_lookups = {} def load_relmodel(field, callback): relmodel = None relat...
# coding: utf-8 from pretend import call_recorder, call from static_precompiler.compilers import LESS from static_precompiler.exceptions import StaticCompilationError from static_precompiler.utils import normalize_path import os import pytest def test_compile_file(): compiler = LESS() assert compiler.compile...
# -*- coding: utf-8 -*- # # Nitrate is copyright 2010 Red Hat, Inc. # # Nitrate 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 pr...
""" Single Channel Noise Reduction ============================== Collection of single channel noise reduction (SCNR) algorithms for speech: - :doc:`Spectral Subtraction <pyroomacoustics.denoise.spectral_subtraction>` [1]_ - :doc:`Subspace Approach <pyroomacoustics.denoise.subspace>` [2]_ - :doc:`Iterative Wiener Fil...
""" Django admin pages for student app """ from config_models.admin import ConfigurationModelAdmin from django import forms from django.contrib import admin from django.contrib.admin.sites import NotRegistered from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin as BaseUserAdmi...
# Copyright 2013, Michael H. Goldwasser # # Developed for use with the book: # # Data Structures and Algorithms in Python # Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser # John Wiley & Sons, 2013 # # This program is free software: you can redistribute it and/or modify # it under the terms of...
from os.path import dirname, abspath from .SignalHandler import * from ...providers.online.downloadable.list import online_downloadable_providers from ...providers.online.queryable.list import online_queryable_providers from ...providers.offline.list import offline_providers from ...tools.list import tools gi.requir...