code
stringlengths
1
199k
import math import inspect import numpy as np import numpy.linalg as linalg import scipy as sp import scipy.optimize import scipy.io from itertools import product import trep import _trep from _trep import _System from frame import Frame from finput import Input from config import Config from force import Force from co...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_wanopt_profile short_description: Configure WAN optim...
import MySQLdb as mdb import itertools from pprint import pprint import ConfigParser def db_connect(properties_file): config = ConfigParser.ConfigParser() #print properties_file #open(properties_file) config.read(properties_file) #print config.sections() host = config.get("Database", "host") ...
primes_set = set() primes_list = [] def is_prime(n): limit = int(round(sqrt(n))) i = 2 while True: if i > limit: return True if n % i == 0: return False def find_prime_permutations(n): "find the prime permutations including n" global primes_set assert n >=...
from majormajor.document import Document from majormajor.ops.op import Op from majormajor.changeset import Changeset class TestDocumentMissingChangesets: def test_missing_changesets(self): doc = Document(snapshot='') doc.HAS_EVENT_LOOP = False assert doc.missing_changesets == set([]) ...
import copy import re import sqlite3 import time, urllib from core import filetools from core import httptools from core import jsontools from core import scrapertools from core.item import InfoLabels from platformcode import config from platformcode import logger otmdb_global = None fname = filetools.join(config.get_d...
from indivo.lib import iso8601 from indivo.models import EquipmentScheduleItem XML = 'xml' DOM = 'dom' class IDP_EquipmentScheduleItem: def post_data(self, name=None, name_type=None, name_value=None, name_abbrev=None, scheduledBy=...
from pynsim import Node class Junction(Node): type = 'junction' _properties = dict( max_capacity=1000, ) class IrrigationNode(Node): """ A general irrigation node, with proprties demand, max and deficit. At each timestep, this node will use its internal seasonal water req...
from django.http import HttpResponse, Http404 from django.template.loader import get_template from django.template import RequestContext from django.core.paginator import Paginator, EmptyPage from django.utils.translation import ugettext as _ from tagging.models import Tag from messages.models import Message from setti...
from gnuradio import gr, atsc import math def main(): fg = gr.flow_graph() u = gr.file_source(gr.sizeof_float,"/tmp/atsc_pipe_2") input_rate = 19.2e6 IF_freq = 5.75e6 # 1/2 as wide because we're designing lp filter symbol_rate = atsc.ATSC_SYMBOL_RATE/2. NTAPS = 279 tt = gr.firdes.root_raised_cosin...
import os import numpy as np def test_make_dir(): assert os.path.exists("output") def test_data(): assert os.path.exists("data") def test_plot_fcc23(): assert os.path.exists("output/fcc23.png") def test_sample(): assert os.path.exists("output/sample.txt") def test_dataset(gstart): assert gstart["dat...
""" Copyright (C) 2012 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from datetime import datetime from hashlib import sha256 from json import dumps, loads from op...
from django.contrib import admin from geonode.base.admin import MediaTranslationAdmin, ResourceBaseAdminForm from geonode.layers.models import Layer, Attribute, Style from geonode.layers.models import LayerFile, UploadSession import autocomplete_light class LayerAdminForm(ResourceBaseAdminForm): class Meta: ...
import curses import os import signal from time import sleep stdscr = curses.initscr() curses.noecho() begin_x = 20; begin_y = 7 height = 5; width = 40 win = curses.newwin(height, width, begin_y, begin_x) count = 5 for x in range(0,20): for y in range (0,5): win.addstr(y, x, "a", curses.A_BLINK) win.refresh() s...
word = raw_input().lower() v = 'aeiouy' n = '' for c in word: if not c in v: n += '.' + c print n
from vsg.rule_group import length from vsg import violation class number_of_lines_between_tokens(length.Rule): ''' Checks the number of lines between tokens do not exceed a specified number Parameters ---------- name : string The group the rule belongs to. identifier : string uniqu...
import nir_algebraic a = 'a' b = 'b' c = 'c' d = 'd' optimizations = [ (('fneg', ('fneg', a)), a), (('ineg', ('ineg', a)), a), (('fabs', ('fabs', a)), ('fabs', a)), (('fabs', ('fneg', a)), ('fabs', a)), (('iabs', ('iabs', a)), ('iabs', a)), (('iabs', ('ineg', a)), ('iabs', a)), (('fadd', a, 0.0), a...
import os import csv import math import sys import gammalib import cscripts def generate_pull_distribution(model, obs='NONE', onsrc='NONE', onrad=0.2, \ trials=100, caldb='prod2', irf='South_50h', \ deadc=0.98, edisp=False, \ r...
"This module provides a set of common utility functions." __author__ = "Anders Logg" __copyright__ = "Copyright (C) 2009 Simula Research Laboratory and %s" % __author__ __license__ = "GNU GPL Version 3 or any later version" from math import ceil from numpy import linspace from dolfin import PeriodicBC, warning def is_...
import argparse import humanize import logging import os.path import time from sixoclock.config import Configuration from sixoclock.backends.file import FileBackend from sixoclock.file import File class Cli: def __init__(self): config = os.path.join(os.path.expanduser('~'), '.sixoclock.yml') self.co...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('persons', '0002_person_is_staff'), ] operations = [ migrations.AlterField( model_name='person', ...
respond_types = { 'echo': 'echo:', 'command': '//', 'error' : '!!', } class HostResponder: def __init__(self, config): self.printer = config.get_printer() self.reactor = self.printer.get_reactor() self.default_prefix = config.getchoice('default_type', respond_types, ...
from ...framework.platform import Architecture from ...framework.platform import Cpu from ...framework.platform import Register from ...framework.platform import register_cpu @register_cpu class GenericCpu(Cpu): def __init__(self, cpu_factory, registers): for group, register_list in registers.iteritems(): ...
""" Make a "Bias Curve" or perform a "Rate-scan", i.e. measure the trigger rate as a function of threshold. Usage: digicam-rate-scan [options] [--] <INPUT>... Options: --display Display the plots --compute Computes the trigger rate vs threshold -o OUTPUT --output=OUTPUT. Fol...
import sys import glob import numpy try: from setuptools import setup from setuptools import Extension except ImportError: from distutils.core import setup from distutils.extension import Extension from setuptools.dist import Distribution Distribution(dict(setup_requires='Cython')) try: from Cython....
from django.contrib import messages from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import F, Q from django.db.models.aggregates import Max from django.db.models.deletion import PROTECT from dj...
""" debug.py - Functions to aid in debugging Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. """ from __future__ import print_function import sys, traceback, time, gc, re, types, weakref, inspect, os, cProfile, threading from . import ptime from numpy import ndar...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('admin', '0007_vm_user'), ] operations = [ migrations.AddField( model_name='vm', name='system', field=models.CharField...
from distutils.core import setup setup( name='Harmony', version='0.1', author='H. Gökhan Sarı', author_email='th0th@returnfalse.net', packages=['harmony'], scripts=['bin/harmony'], url='https://github.com/th0th/harmony/', license='LICENSE.txt', description='Music folder organizer.', ...
from django.contrib import admin from .models import Lesson, Course, CourseLead, QA from ordered_model.admin import OrderedModelAdmin from core.models import User class UserAdminInline(admin.TabularInline): model = User @admin.register(Lesson) class LessonAdmin(admin.ModelAdmin): ordering = ['-start'] list_...
import re import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FiledropperCom(SimpleHoster): __name__ = "FiledropperCom" __type__ = "hoster" __version__ = "0.01" __pattern__ = r'https?://(?:www\.)?filedropper\.com/\w+' __description__ = """Filedro...
""" Copyright 2011 Yaşar Arabacı This file is part of packagequiz. packagequiz 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 i...
"""Assorted base data structures. Assorted base data structures provide a generic communicator with V-REP simulator. """ from vrepsim.simulator import get_default_simulator class Communicator(object): """Generic communicator with V-REP simulator.""" def __init__(self, vrep_sim): if vrep_sim is not None:...
import hashlib import httplib import os import socket import sys import time import urllib import mechanize import xbmcgui from resources.lib import common from resources.lib import logger, cookie_helper from resources.lib.cBFScrape import cBFScrape from resources.lib.cCFScrape import cCFScrape from resources.lib.confi...
import logging from urllib.request import urlopen from shutil import copyfileobj class MapDownloader(object): def __init__(self): self.__log = logging.getLogger(__name__) def to_file(self, top, left, bottom, right, file_path = 'map.osm'): self.__log.info('Downloading map data for [%f,%f,%f,%f]' ...
''' Files and renames your films according to genre using IMDb API supert-is-taken 2015 ''' from imdb import IMDb import sys import re import os import errno import codecs db=IMDb() def main(argv): for filename in sys.argv[1:]: print filename movie_list=db.search_movie( cleanup_movie_string(filename...
"""Client for discovery based APIs A client library for Google's discovery based APIs. """ __all__ = [ 'build', 'build_from_document' 'fix_method_name', 'key2param' ] import copy import httplib2 import logging import os import random import re import uritemplate import urllib import urlparse import ...
""" Class defining a production step """ from __future__ import absolute_import from __future__ import division from __future__ import print_function __RCSID__ = "$Id$" import json from DIRAC import S_OK, S_ERROR class ProductionStep(object): """Define the Production Step object""" def __init__(self, **kwargs):...
import numpy as np from displays.letters import ALPHABET class Writer: """Produce scrolling text for the LED display, frame by frame""" def __init__(self): self.font = ALPHABET self.spacer = np.zeros([8, 1], dtype=int) self.phrase = None def make_phrase(self, phrase): """Conv...
import typing from collections import MutableMapping from emft.core.logging import make_logger from emft.core.path import Path from emft.core.singleton import Singleton LOGGER = make_logger(__name__) class OutputFolder(Path): pass class OutputFolders(MutableMapping, metaclass=Singleton): ACTIVE_OUTPUT_FOLDER = ...
class Manipulator(object): KINDS=() SEPERATOR="$" def __call__(self, txt, **kwargs): data = {} splitted = txt.split("$") for kind, part in zip(self.KINDS, splitted): data[kind]=part for info, new_value in kwargs.items(): kind, position = info.rsplit("_...
""" Pymulator simulation objects """ import json import datetime from .serialize import PandasNumpyEncoderMixIn, hook def importmodel(s): """ Import model from string s specifying a callable. The string has the following structure: package[.package]*.model[:function] For example: foo.bar...
from distutils.core import setup setup( name='py-viitenumero', version='1.0', description='Python module for generating Finnish national payment reference number', author='Mohanjith Sudirikku Hannadige', author_email='moha@codemaster.fi', url='http://www.codemaster.fi/pyt...
import sys, time, scipy.optimize, scipy.ndimage.interpolation import scipy.ndimage.filters as filt import src.lib.utils as fn import src.lib.wsutils as ws import src.lib.Algorithms as alg import scipy.signal.signaltools as sig from src.lib.PSF import * from src.lib.AImage import * from src.lib.wavelet import * from src...
from django.test import TestCase, override_settings from merepresenta.models import Candidate, NON_WHITE_KEY, NON_MALE_KEY from merepresenta.tests.volunteers import VolunteersTestCaseBase from backend_candidate.models import CandidacyContact from elections.models import PersonalData, Election, Area from django.core.url...
import os import pytest import glob import ctypes, ctypes.util from PyInstaller.compat import is_darwin from PyInstaller.utils.tests import skipif, importorskip, \ skipif_notwin, xfail, is_py2 _MODULES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'modules') def test_nameclash(pyi_builder): # tes...
from robot import Robot class TheRobot(Robot): def initialize(self): # Try to get in to a corner self.forseconds(5, self.force, 50) self.forseconds(0.9, self.force, -10) self.forseconds(0.7, self.torque, 100) self.forseconds(6, self.force, 50) # Then look around and s...
class Solution(object): def inorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] """ res, stack = [], [] while True: while root: stack.append(root) root = root.left if not stack: ...
import math import numpy as np import pylab as pl import Scientific.IO.NetCDF as IO import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.ticker as mtick import matplotlib.lines as lines from mpl_toolkits.basemap import Basemap , addcyclic from matplotlib.colors import LinearSegmentedColormap impor...
from django import forms from faculty.event_types.base import BaseEntryForm from faculty.event_types.base import CareerEventHandlerBase from faculty.event_types.choices import Choices from faculty.event_types.base import TeachingAdjust from faculty.event_types.fields import TeachingCreditField from faculty.event_types....
from django.db import migrations def load_initial_data(apps, schema_editor): Grade = apps.get_model('courses', 'Grade') # add some initial data if none has been created yet if not Grade.objects.exists(): Grade.objects.create( name="8", value=8 ) Grade.objects....
import re import sys import traceback import copy import json from distutils import file_util from grammalecte.echo import echo DEF = {} FUNCTIONS = [] JSREGEXES = {} WORDLIMITLEFT = r"(?<![\w.,–-])" # r"(?<![-.,—])\b" seems slower WORDLIMITRIGHT = r"(?![\w–-])" # r"\b(?!-—)" seems slower def prepare_for...
"""Pygame event handler by J. This module consists of the EventHandler class, which is used to assign callbacks to events and keypresses in Pygame. Release: 12. Licensed under the GNU General Public License, version 3; if this was not included, you can find it here: http://www.gnu.org/licenses/gpl-3.0.txt """ impor...
import os import argparse from os.path import join, abspath from sh import which import sleuth_automation as sleuth from jinja2 import Environment, PackageLoader description = """ This script will create a condor submit file for a batch of SLEUTH runs. """ parser = argparse.ArgumentParser(description=description) parse...
import sys import os import imp from django.core.management.base import BaseCommand from optparse import make_option from django.core.paginator import Paginator from foo.offset.models import Log from foo.july.models import BigBook import logging from datetime import datetime from django.db import connection class Comma...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('anagrafica', '0049_auto_20181028_1639'), ] operations = [ migrations.CreateModel( name='Q...
import random import os from bitarray import bitarray from netzob.Common.Models.Types.AbstractType import AbstractType class Raw(AbstractType): """Raw netzob data type expressed in bytes. For instance, we can use this type to parse any raw field of 2 bytes: >>> from netzob.all import * >>> f = Field(Raw...
import libhfst transducers = [] istr = libhfst.HfstInputStream() while not istr.is_eof(): transducers.append(istr.read()) istr.close() if not len(transducers) == 3: raise RuntimeError('Wrong number of transducers read.') i = 0 for re in ['föö:bär','0','0-0']: if not transducers[i].compare(libhfst.regex(re))...
from gui import * import thread import color import time import os from PyQt4 import QtGui from PyQt4 import QtCore from PyQt4.QtGui import * from PyQt4.QtCore import * import YaoSpeech from dialogue import * class dialogue_thread(QThread): def __init__(self): QThread.__init__(self) self.voiceface = VoiceInterface...
from django.shortcuts import render from .models import GeoLocation from django.http import HttpResponse def log_location(request): """ :params :lat - latitude :lon - longitude :user_agent - useful for IOT applications that needs to log the client that send the location """ if request.method == 'GET'...
import io import os import pickle import sys import tempfile import unittest import numpy as np import pystan from pystan.tests.helper import get_model from pystan.experimental import unpickle_fit class TestPickle(unittest.TestCase): @classmethod def setUpClass(cls): cls.pickle_file = os.path.join(tempf...
from django import forms from django.core.validators import validate_email, ValidationError from slugify import slugify from django.utils.translation import ugettext as _ from modeltranslation.forms import TranslationModelForm from django.contrib.auth import get_user_model from geonode.groups.models import GroupProfile...
import guessit from rateItSeven.scan.legacy.filescanner import FileScanner from rateItSeven.scan.legacy.containers.movieguess import MovieGuess class MovieScanner(object): """ Scan file system directories for video files Find info for each file wrapped into a MovieGuess """ def __init__(self, dir_pa...
''' @author: Hung-Hsin Chen @mail: chenhh@par.cse.nsysu.edu.tw kelly multivariate investment ''' if __name__ == '__main__': pass
"""Database interface module. app/db.py """ import os import sqlite3 from sqlite3 import Error from ast import literal_eval from termcolor import cprint from app.room import Office, Living from app.person import Staff, Fellow def create_connection(database): """Create a database connection to a given db.""" try...
""" Django settings for app-framework project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ import os ...
name = 'Ruby' file_patterns = ['*.ruby', '*.rb', '*.gemspec', '*.podspec', '*.thor', '*.irb'] keyword = """ and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsi...
import getpass import keyring def build_option_parser(parser): parser.add_argument( "--keyring-service", metavar="<service>", default="confluence-cli", help="Service entry", ) parser.add_argument( "--keyring-username", metavar="<username>", help="User ...
import sys import math import numpy import pylab import pyrap.tables import lofar.parmdb from . import solfetch def flag(msName, dbName, half_window, threshold, sources=None, storeFlags=True, updateMain=True, cutoffLow=None, cutoffHigh=None, debug=False): """ Solution based flagging. msName: nam...
from __future__ import (absolute_import, division, print_function) from mantid.kernel import logger import AbinsModules import six from mantid.kernel import Atom class GeneralAbInitioProgramName(type): def __str__(self): return self.__name__ @six.add_metaclass(GeneralAbInitioProgramName) class GeneralAbInit...
import pyautogui import os counter = 0 while True: try: print ("Be sure your active listings page is up and active") pyautogui.time.sleep(2) renewButtonLocationX, renewButtonLocationY = pyautogui.locateCenterOnScreen('renew.png') pyautogui.moveTo(renewButtonLocationX, renewButtonLoc...
import data from utils import assert_403, assert_404, assert_200, parse_xml, xpath PRD = 'prd' def test_sharing(IndivoClient): DS = 'ds' def get_datastore(obj): if hasattr(obj, DS): return getattr(obj, DS).values() return False def set_datastore(obj, **kwargs): if hasattr(obj, DS): ds = ge...
import numpy as np import matplotlib.pyplot as plt import matplotlib from matplotlib.patches import Polygon from matplotlib.collections import PatchCollection fig, ax = plt.subplots() polygons = [] color = [] c = (np.random.random((1, 3))*0.6+0.4).tolist()[0] my_seg = [[125.12, 539.69, 140.94, 522.43, 100.67, 496.54, 8...
from twisted.web import client from twisted.internet import defer, reactor from twisted.python import failure, log from twisted.protocols import basic from twisted.python.util import InsensitiveDict from cStringIO import StringIO from optparse import OptionParser from urlparse import urlsplit import base64 import sys i...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rules', '0057_auto_20180302_1312'), ] operations = [ migrations.AddField( model_name='source', name='public_source', field=models.CharField(blank=True, max_l...
from bitcoin import * from util import print_error import time import struct import struct import StringIO import mmap class SerializationError(Exception): """ Thrown when there's a problem deserializing or serializing """ class BCDataStream(object): def __init__(self): self.input = None self.re...
import os import io import ctypes import random import re import socket import stat import tempfile import time import traceback import urllib import urllib2 import hashlib import httplib import urlparse import uuid import base64 import zipfile import datetime import errno import ast import operator import platform imp...
from .superposer import Superposer from .matrix import Matrix from .atomgroup import AtomGroup from .atom import Atom from .functions import load_msgpack from .position import Position from .error import BrInputError import os import math import re import logging logger = logging.getLogger(__name__) class Modeling: ...
def kvadraticka(a, b, c): return 20 def kubicka(a, b, c, d): return 77 x = 16 y = 'ahoj' print 'Inicializuji se'
"""Business logic for all URLs in the ``main`` application. For details on what each function is responsible for, see ``main/urls.py``. That module documents both URL-to-function mappings and the exact responsiblities of each function. """ from django.core import urlresolvers from django import http def index(request):...
"""Copyright (C) 2013 COLDWELL AG 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 distributed in the hope that i...
""" Test cases for the commissaire.handlers.status module. """ import json import mock import etcd import falcon from . import TestCase from mock import MagicMock from commissaire.handlers import status from commissaire.middleware import JSONify class Test_Status(TestCase): """ Tests for the Status model. "...
import os from iotile.core.dev import ComponentRegistry from iotile.ship.recipe import RecipeObject from iotile.ship.exceptions import RecipeNotFoundError class RecipeManager: """A class that maintains a list of installed recipes and recipe actions. It allows fetching recipes by name and auotmatically building ...
from __future__ import unicode_literals import re import unittest import sickrage from sickrage.core.tv.show import TVShow from tests import SiCKRAGETestDBCase class XEMBasicTests(SiCKRAGETestDBCase): def loadShowsFromDB(self): """ Populates the showList with shows from the database """ ...
from django.db import models from django.utils.timezone import now class Pagina(models.Model): titulo = models.CharField(max_length=200, unique=True) contenido = models.TextField() imagen = models.ImageField(upload_to='pagina_img', default='media/default.png') orden = models.PositiveIntegerField() publicar = model...
import numpy as np import exceptions import healpy from file import read def read_map(filename, HDU=0, field=0, nest=False): """Read Healpix map all columns of the specified HDU are read into a compound numpy MASKED array if nest is not None, the map is converted if need to NEST or RING ordering. this f...
from __future__ import (absolute_import, division, print_function) import unittest import sys from sans.gui_logic.models.beam_centre_model import BeamCentreModel from sans.common.enums import FindDirectionEnum, SANSInstrument if sys.version_info.major == 3: from unittest import mock else: import mock class Beam...
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 'Hardwarerelease.medium' db.add_column('ashop_hardwarerelease', 'medium', self.gf('django.db.models.fields.CharField')(d...
import kivymd.snackbar as Snackbar from kivy.app import App from kivy.lang import Builder from kivy.metrics import dp from kivy.properties import ObjectProperty from kivy.uix.image import Image from kivymd.bottomsheet import MDListBottomSheet, MDGridBottomSheet from kivymd.button import MDIconButton from kivymd.label i...
''' Construct and manipulate multilayer representations of configuration vectors Created by: Ankit Khambhati Change Log ---------- 2016/02/03 - Implement functions to construct multilayer networks ''' import numpy as np import scipy.sparse as sp from ....Common import errors from ...Transforms import configuration def ...
import sys import unittest as ut import unittest_decorators as utx import numpy as np import math import espressomd import espressomd.interactions import espressomd.shapes import tests_common @utx.skipIfMissingFeatures(["LENNARD_JONES_GENERIC"]) class ShapeBasedConstraintTest(ut.TestCase): box_l = 30. system = ...
""" Setup Module This module is used to make a distribution of the game using distutils. """ from distutils.core import setup setup( name = 'Breakout', version = '1.0', description = 'A remake of the classic video game', author = 'Derek Morey', author_email = 'dman6505@...
import threading import socket import os import re import requests import json from hashlib import sha256 from urlparse import urljoin from urllib import quote from PyQt4.QtGui import * from PyQt4.QtCore import * import electrum from electrum import bitcoin from electrum.bitcoin import * from electrum.mnemonic import M...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [('config', '0026_hardware_id_not_unique')] operations = [ migrations.AlterField( model_name='device', name='last_ip', field=models.GenericIPAddressField( bl...
from mongodict import MongoDict from nltk import word_tokenize, sent_tokenize from pypln.backend.celery_task import PyPLNTask class Tokenizer(PyPLNTask): def process(self, document): text = document['text'] tokens = word_tokenize(text) sentences = [word_tokenize(sent) for sent in sent_tokeni...
"""Tests for the unified diff parser process.""" import os.path import unittest2 from nlg4patch.unidiff import parser class TestUnidiffParser(unittest2.TestCase): """Tests for Unified Diff Parser.""" def setUp(self): samples_dir = os.path.dirname(os.path.realpath(__file__)) self.sample_file = os...
# -*- coding: utf-8 -*- from resources.lib.parser import cParser from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.gui.guiElement import cGuiElement from resources.lib.gui.gui import cGui from resources.lib.util import cUtil from resources.lib.handler.ParameterHandler import Parameter...
import maya.cmds;mc = maya.cmds import pymel.core;pm = pymel.core from pytaya.core.general import listForNone from pytd.util.logutils import logMsg from pytd.util.sysutils import grouper def fileNodesFromObjects(oObjList): return fileNodesFromShaders(shadersFromObjects(oObjList)) def fileNodesFromShaders(oMatList):...
""" """ def main_wf(current): current.task_data['from_main'] = True current.output['from_jumped'] = current.task_data.get('from_jumped') assert current.workflow.name == 'jump_to_wf' def jumped_wf(current): current.output['from_main'] = current.task_data['from_main'] current.task_data['from_jumped'] ...
TestNet = False Address = "1MjeEv3WDgycrEaaNeSESrWvRfkU6s81TX" workerEndpoint = "3333" DonationPercentage = 0.0 Upnp = True BitcoindConfigPath = "/opt/bitcoin/bitcoindata/bitcoin.conf" WORKER_STATUS_REFRESH_TIME = 10 dbService = {} workerStatus = {} NodeService = { 'authentication': 'http://127.0.0.1:8080/service/n...