code
stringlengths
1
199k
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() mobileTe...
import sys from java.util import Vector def addSpawnArea(core): dynamicGroups = Vector() dynamicGroups.add('yavin4_black_sun') dynamicGroups.add('yavin4_choku') dynamicGroups.add('yavin4_skreeg') dynamicGroups.add('yavin4_klinik') core.spawnService.addDynamicSpawnArea(dynamicGroups, 5500, 0, 3500, 'yavin4') retu...
"""Test function :func:`iris._lazy data.is_lazy_data`.""" import iris.tests as tests import dask.array as da import numpy as np from iris._lazy_data import is_lazy_data class Test_is_lazy_data(tests.IrisTest): def test_lazy(self): values = np.arange(30).reshape((2, 5, 3)) lazy_array = da.from_array(...
import sys def setup(core, actor, buff): return def add(core, actor, buff): core.skillModService.addSkillMod(actor, 'dot_bleed', 90) return def remove(core, actor, buff): core.skillModService.deductSkillMod(actor, 'dot_bleed', 90) return
from weboob.browser import AbstractBrowser, URL from .pages import LoginPage class HumanisBrowser(AbstractBrowser): PARENT = 'cmes' login = URL('epsens/(?P<client_space>.*)fr/identification/authentification.html', LoginPage) client_space = '' def __init__(self, login, password, baseurl, subsite, *args, ...
import heapq import threading import itertools class PriorityQueue(object): """ Threadsafe priority queue based on the python heapq module. Ties are resolved by popping the element that was added first. If the elements are tuples (p1, p2, ..., element), the elements are never considered for comparis...
try: import ujson as json except: #print('ujson not found, using json') import json import logging import threading import time import zmq from sensorika.tools import getLocalIp class Worker(threading.Thread): def __init__(self, name, configFile=None, *args, **kwargs): self.Estop = threading.Eve...
from .module import OpenEDXModule __all__ = ['OpenEDXModule']
"""Memory watchdog: periodically read the memory usage of the main test process and print it out, until terminated.""" import os import sys import time try: page_size = os.sysconf('SC_PAGESIZE') except (ValueError, AttributeError): try: page_size = os.sysconf('SC_PAGE_SIZE') except (ValueError, Attr...
"""Test for the BigQuery tornadoes example.""" import logging import unittest import apache_beam as beam from apache_beam.examples.cookbook import bigquery_tornadoes from apache_beam.testing.test_pipeline import TestPipeline from apache_beam.testing.util import assert_that from apache_beam.testing.util import equal_to ...
"""Triggers.""" from __future__ import annotations import asyncio from collections.abc import Callable import logging from typing import Any import voluptuous as vol from homeassistant.const import CONF_ID, CONF_PLATFORM from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback from homeassistant.exceptions...
from __future__ import absolute_import, division, print_function, unicode_literals import argparse import os import shlex import subprocess import sys try: from shlex import quote as shellquote except ImportError: from pipes import quote as shellquote class BuildOptions(object): def __init__(self, num_jobs,...
import datetime import sys import unittest import test_env test_env.setup_test_env() from google.appengine.ext import ndb from components import auth from components import config from support import test_case class ConfigTest(test_case.TestCase): def setUp(self): super(ConfigTest, self).setUp() # Disable in-...
from __future__ import absolute_import, division, print_function, unicode_literals from amaascore.core.amaas_model import AMaaSModel class Link(AMaaSModel): def __init__(self, linked_asset_id, *args, **kwargs): self.linked_asset_id = linked_asset_id super(Link, self).__init__(*args, **kwargs)
from tkinter import * from factory import Factory Config = Factory.get('Config') from ark.thread_handler import ThreadHandler from ark.gui.tasks import GuiTasks from ark.gui.control import Control import time class PyArcGui(Frame): gui_title = "pyarc - Rcon for Ark Survival" gui_size = "1200x700" def __init...
from openstack import resource class SecurityGroupRule(resource.Resource, resource.TagMixin): resource_key = 'security_group_rule' resources_key = 'security_group_rules' base_path = '/security-group-rules' # capabilities allow_create = True allow_fetch = True allow_commit = False allow_d...
from neutron_lib import context from neutron_lib.db import api as db_api from oslo_config import cfg from oslo_db import options as db_options from oslo_log import log as logging from neutron.api import converters as n_converters from neutron.objects import ports as port_obj from neutron.objects.qos import binding as q...
import os import subprocess import time import client import swagger_client import v2_swagger_client try: from urllib import getproxies except ImportError: from urllib.request import getproxies class Server: def __init__(self, endpoint, verify_ssl): self.endpoint = endpoint self.verify_ssl =...
import sys import os import ast from pprint import pprint from collections import defaultdict from collections import OrderedDict from operator import itemgetter import matplotlib.pyplot as plt from matplotlib import rcParams import matplotlib stage_names = ["CreateMemoryDeltalist", "CreateDiskDeltalist", "DeltaDedup",...
import next.utils as utils from datetime import datetime,timedelta import celery from next.broker.celery_app import tasks as tasks from next.broker.celery_app.celery_broker import app import os import next.constants import redis import json import time import next.utils as utils class JobBroker: # Initialization me...
"""Run memtier_benchmark against Redis. memtier_benchmark is a load generator created by RedisLabs to benchmark Redis. Redis homepage: http://redis.io/ memtier_benchmark homepage: https://github.com/RedisLabs/memtier_benchmark """ import logging from perfkitbenchmarker import configs from perfkitbenchmarker import flag...
import os try: import pty except ImportError: # to support --cover-inclusive on Windows if os.name not in ['nt']: raise from subprocess import Popen from subprocess import STDOUT import time from .execute_process_nopty import _close_fds from .execute_process_nopty import _yield_data def _execute_pro...
from .EngineApiClient import EngineApiClient
""" The program reads an existing model file and generates models for different amounts of occlusions """ from __future__ import print_function from detector_model_pb2 import DetectorModel import detector_model_pb2 as dm import detections_pb2 as det import os, os.path#, glob from optparse import OptionParser from plot_...
"""一個字符集過濾的程式,篩選輸出指定字符集的行 輸入input.txt,輸出output.txt """ INPUT_NAME = "input.txt" #輸入input.txt OUTPUT_NAME = "output.txt" #輸出output.txt ENC = "utf-8" ENCODINGS = ["utf-8-sig", "utf-16", "gbk", "gb18030"] #嘗試編碼列表 def open_file(filename): "嘗試解碼文件" for enc in ENCODINGS: try: input_file = open(fil...
import time import sys import logging import signal import getopt from simulation import * from statistics import * from system import * def usage(arg): print arg, ": -h [--help] -l [--log] -m <mission_time> [--mission_time <mission_time>]" print "-i <num_iterations> [--iterations <num_iterations>] -r <raid_typ...
import logging import os import fixtures import testtools from diskimage_builder import element_dependencies logger = logging.getLogger(__name__) data_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), 'test-elements')) def _populate_element(element_dir, element_name, element_deps=[], provides=[]): ...
""" Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest import kubern...
"""A library of basic combiner PTransform subclasses.""" from __future__ import absolute_import import operator import random from apache_beam.transforms import core from apache_beam.transforms import cy_combiners from apache_beam.transforms import ptransform from apache_beam.transforms.display import DisplayDataItem f...
import json import logging import os import re import sys import tempfile import unittest BOT_DIR = os.path.dirname(os.path.abspath(__file__)) import test_env_bot test_env_bot.setup_test_env() from depot_tools import auto_stub from depot_tools import fix_encoding from utils import file_path from utils import subprocess...
"""Utilities for serializing Python objects.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import wrapt from tensorflow.python.framework import tensor_shape from tensorflow.python.util.compat import collections_abc from tensorflow.pyth...
"""Alexa HTTP interface.""" import logging from homeassistant import core from homeassistant.components.http.view import HomeAssistantView from homeassistant.const import ( CONF_CLIENT_ID, CONF_CLIENT_SECRET, ENTITY_CATEGORY_CONFIG, ENTITY_CATEGORY_DIAGNOSTIC, ) from homeassistant.helpers import entity_...
"""Windows Registry plugin for parsing the last shutdown time of a system.""" import os from dfdatetime import filetime as dfdatetime_filetime from dfdatetime import semantic_time as dfdatetime_semantic_time from plaso.containers import events from plaso.containers import time_events from plaso.lib import definitions f...
from typing import Any import pytest from aiohttp import web def test_entry_func_empty(mocker: Any) -> None: error = mocker.patch("aiohttp.web.ArgumentParser.error", side_effect=SystemExit) argv = [""] with pytest.raises(SystemExit): web.main(argv) error.assert_called_with("'entry-func' not in '...
import copy import mock from openstackclient.common import exceptions from openstackclient.image.v1 import image from openstackclient.tests import fakes from openstackclient.tests.image.v1 import fakes as image_fakes class TestImage(image_fakes.TestImagev1): def setUp(self): super(TestImage, self).setUp() ...
import unittest from azure import ( DEV_ACCOUNT_NAME, DEV_ACCOUNT_KEY, ) from azure.storage import AccessPolicy from azure.storage.sharedaccesssignature import ( SharedAccessPolicy, SharedAccessSignature, QueryStringConstants, ResourceType, ) from util import ( AzureTestCase, credentials...
from datetime import timedelta, datetime, date class ReadConf(object): def __init__(self, sc, split_size=None, fetch_size=None, consistency_level=None, metrics_enabled=None): self.jvm = sc._jvm self.split_size = split_size self.fetch_size = fetch_size self.consistency_level = consist...
"""This example demonstrates how to authenticate using OAuth2. This example is intended for users who wish to use the oauth2client library directly. Using a workflow similar to the example here, you can take advantage of the oauth2client in a broader range of contexts than caching your refresh token using the config.py...
"""Tests for the Sonos Media Player platform.""" from unittest.mock import PropertyMock import pytest from soco.exceptions import NotSupportedException from homeassistant.components.sonos import DATA_SONOS, DOMAIN, media_player from homeassistant.const import STATE_IDLE from homeassistant.core import Context from homea...
import sublime import logging import os from FSharp.fsac import server from FSharp.fsac.client import FsacClient from FSharp.fsac.request import CompilerLocationRequest from FSharp.fsac.request import ProjectRequest from FSharp.fsac.request import ParseRequest from FSharp.lib.project import FSharpFile from FSharp.lib.p...
from __future__ import (print_function) import os import sys import configparser if sys.version_info <= (3, 0): print("Error: Zulip is a Python 3 project, and cannot be run with Python 2.") print("Use e.g. `/path/to/manage.py` not `python /path/to/manage.py`.") sys.exit(1) BASE_DIR = os.path.dirname(os.path...
"""Pocketwalk context manager.""" import hashlib import pathlib import time from runaway import signals import pytoml as toml def get_context_manager(): """Get the context_manager plugin.""" return ContextManager() class ContextManager: """Context manager plugin for pocketwalk.""" # [ API ] def get_...
try: import json except ImportError: import simplejson as json from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request from product_spiders.items import Product, ProductLoader import logging class SkypeEnFiSpider(BaseSpider): store_ids = { ...
from __future__ import absolute_import, division, print_function, unicode_literals import logging from c7n.actions import ActionRegistry, BaseAction from c7n.filters import FilterRegistry from c7n.manager import resources from c7n.query import QueryResourceManager from c7n.utils import local_session, type_schema log = ...
''' 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 use this ...
""" Copyright (c) 2014-2015 F-Secure See LICENSE for details """ import json from datetime import datetime import isodate import requests from resource_api.errors import ValidationError, DoesNotExist, AuthorizationError, DataConflictError, Forbidden EXCEPTION_MAP = { 400: ValidationError, 403: AuthorizationErro...
"""Creates the embedded_tools.zip that is part of the Bazel binary.""" import contextlib import fnmatch import os import os.path import re import sys import zipfile from src.create_embedded_tools_lib import copy_tar_to_zip from src.create_embedded_tools_lib import copy_zip_to_zip from src.create_embedded_tools_lib impo...
""" Created on September, 2017 Restructured on April, 2020 @author: wangc """ import copy import numpy as np from numpy import linalg import time from .HybridModelBase import HybridModelBase import Files from utils import InputData, InputTypes, mathUtils from utils import utils from Runners import Error as rerror class...
import _random import unittest from iptest import run_test class _RandomTest(unittest.TestCase): def test_getrandbits(self): #the argument is a random int value rand = _random.Random() for i1 in xrange(1, 1984, 6): self.assertTrue(rand.getrandbits(i1) < (2**i1)) self....
'''Unit tests for the 'grit build' tool. ''' import os import sys import tempfile if __name__ == '__main__': sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) import unittest from grit import util from grit.tool import build class BuildUnittest(unittest.TestCase): def testFindTranslationsWithSubstit...
""" App that can be used to generate errors on the Python and JS side. These errors should show tracebacks in the correct manner (and not crash the app as in #164). """ from flexx import app, event, ui class ErrorsPy(app.PyComponent): def init(self): self.js = ErrorsJS(self) @event.action def do_som...
import os os.environ['REDASH_REDIS_URL'] = "redis://localhost:6379/5" os.environ['REDASH_CELERY_BROKER'] = "redis://localhost:6379/6" os.environ['REDASH_GOOGLE_CLIENT_ID'] = "dummy" os.environ['REDASH_GOOGLE_CLIENT_SECRET'] = "dummy" os.environ['REDASH_MULTI_ORG'] = "true" import logging from unittest import TestCase i...
import functools import json from django.conf import settings from django.db import transaction import commonware.log import happyforms from piston.handler import AnonymousBaseHandler, BaseHandler from piston.utils import rc from tower import ugettext as _ import waffle import amo from access import acl from addons.for...
import textwrap import sys import os import matplotlib.pyplot as plt lib_path = os.path.abspath(r'E:\Tamuz\Utils\RobotQAUtils') sys.path.append(lib_path) from Utils.RobotQAUtils.plateReader import * from Utils.RobotQAUtils.classes import * width = 0.35 def printRobotDeviationPercents(robotDeviationPercentTuppleUp,robo...
from __future__ import with_statement from fabric.api import * from fabric.contrib.console import confirm env.hosts = ["merchant.agiliq.com"] env.user = "agiliq" def describe(): print "This is a fab file to automate deployments for the merchant server." def deploy(): with cd("/home/agiliq/Work/merchant"): ...
import pickle import re from traceback import format_exception import pytest from jinja2 import ChoiceLoader from jinja2 import DictLoader from jinja2 import Environment from jinja2 import TemplateSyntaxError @pytest.fixture def fs_env(filesystem_loader): """returns a new environment.""" return Environment(load...
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Find-TrustedDocuments', # list of one ...
import sys import copy import logging from StringIO import StringIO from django.utils import six import django from django.conf import settings from django.core import serializers from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned,\ FieldError from django.db import models from django.db....
''' Created on Dec 4, 2012 @author: <a href="mailto:christian.grefe@cern.ch">Christian Grefe</a> ''' from __future__ import absolute_import, unicode_literals from pyLCIO import EVENT from sixlcio.moves import range from io import open import sixlcio as six class Reader( object ): ''' Generic reader class ''' de...
import itertools import random import khmer from khmer.khmer_args import estimate_optimal_with_K_and_f as optimal_fp from khmer import reverse_complement as revcomp from . import khmer_tst_utils as utils import pytest import screed K = 21 class Kmer(str): def __init__(self, value, pos=0): self.pos = pos ...
from __future__ import absolute_import, division, print_function from .core import (Bag, Item, from_sequence, from_filenames, from_url, to_textfiles, concat, from_castra, from_imperative, from_delayed, bag_range as range, bag_zip as zip) from .text import read_text from ..context i...
try: from setuptools import setup, find_packages except ImportError: import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages setup( name='django-roa', version='1.8.1', url='https://github.com/charles-vdulac/django-roa', download_url='https://github.com/charl...
import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() renWin = vtk.vtkRenderWindow() renWin.SetMultiSamples(0) renWin.SetSize(200, 200) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) wavelet = vtk.vtkRTAnalyticSource() wavelet.SetWholeExte...
""" Test lldb data formatter subsystem. """ from __future__ import print_function import os import time import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class CategoriesDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file...
"""Base TestCase classes for nbextensions tests.""" from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import logging import os from threading import Event, Thread from jupyter_contrib_core.notebook_compat import serverextensions from jupyter_contrib_core.testing_utils import ( ...
""" Deploy this project in dev/stage/production. Requires commander_ which is installed on the systems that need it. .. _commander: https://github.com/oremj/commander """ import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) from commander.deploy import task, hostgroups import commander_setti...
""" Absolute position layout demo Tested environment: Mac OS X 10.6.8 """ import sys try: from PySide import QtCore from PySide import QtGui except ImportError: from PyQt4 import QtCore from PyQt4 import QtGui class Demo(QtGui.QMainWindow): def __init__(self): super(Demo, self).__init__(...
import os import sys def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import ( get_info, system_info, lapack_opt_info, blas_opt_info) config = Configuration('linalg', parent_package, top_path) config.add...
from .history import History __all__ = ["History"]
from iepy.preprocess.ner.base import FoundEntity from .factories import SentencedIEDocFactory, GazetteItemFactory from .manager_case import ManagerTestCase class TestDocumentInvariants(ManagerTestCase): def test_cant_set_different_number_of_synparse_than_sentences(self): doc = SentencedIEDocFactory() ...
""" This file contains a contains the high-level functions to read a VOTable file. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ...extern import six import io import os import sys import textwrap import warnings from . import exceptions from . imp...
from __future__ import unicode_literals from django.db import migrations def make_recipients(apps): Recipient=apps.get_model('mailtrigger','Recipient') rc = Recipient.objects.create rc(slug='iesg', desc='The IESG', template='The IESG <iesg@ietf.org>') rc(slug='iab', desc='The IAB', ...
"""Scrapy settings""" from os.path import join, dirname EXTENSIONS = { 'scrapy.contrib.logstats.LogStats': None, 'scrapy.webservice.WebService': None, 'scrapy.telnet.TelnetConsole': None, 'scrapy.contrib.throttle.AutoThrottle': None } LOG_LEVEL = 'DEBUG' DATA_DIR = join(dirname(dirname(__file__)), 'data...
import logging from django.conf import settings from django.db import models from django.utils.translation import gettext import amo.models import amo.utils from addons.models import Addon from users.models import UserProfile log = logging.getLogger('z.abuse') class AbuseReport(amo.models.ModelBase): # NULL if the ...
from django.db.backends.postgresql_psycopg2.introspection import DatabaseIntrospection from django.contrib.gis.gdal import OGRGeomType class GeoIntrospectionError(Exception): pass class PostGISIntrospection(DatabaseIntrospection): # Reverse dictionary for PostGIS geometry types not populated until # introsp...
import os import base64 import shutil import gettext import unittest from test import support GNU_MO_DATA = b'''\ 3hIElQAAAAAGAAAAHAAAAEwAAAALAAAAfAAAAAAAAACoAAAAFQAAAKkAAAAjAAAAvwAAAKEAAADj AAAABwAAAIUBAAALAAAAjQEAAEUBAACZAQAAFgAAAN8CAAAeAAAA9gIAAKEAAAAVAwAABQAAALcD AAAJAAAAvQMAAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE...
"""warcextract - dump warc record context to standard out""" import os import sys import sys import os.path from optparse import OptionParser from contextlib import closing from .warctools import WarcRecord parser = OptionParser(usage="%prog [options] warc offset") parser.add_option("-I", "--input", dest="input_format"...
from __future__ import print_function DEBUG = 0 import copy, re from struct import unpack from .timemachine import * from .biffh import BaseObject, unpack_unicode, unpack_string, \ upkbits, upkbitsL, fprintf, \ FUN, FDT, FNU, FGE, FTX, XL_CELL_NUMBER, XL_CELL_DATE, \ XL_FORMAT, XL_FORMAT2, \ XLRDError e...
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.http import HttpResponseRedirect, Http404, HttpResponse, JsonResponse from django.core import serializers from rest_fr...
""" Now the user can read in a file I want to find what make a model which uses the price, class and gender Author : AstroDave Date : 18th September, 2012 """ import csv as csv import numpy as np csv_file_object = csv.reader(open('train.csv', 'rb')) #Load in the csv file header = csv_file_object.next() #Skip the fist l...
"""Code for sentences tokenization: Old Norse. Sentence tokenization for Old Norse is available using a regular-expression based tokenizer. >>> from cltk.sentence.non import OldNorseRegexSentenceTokenizer >>> from cltk.languages.example_texts import get_example_text >>> splitter = OldNorseRegexSentenceTokenizer() >>> s...
import sublime import sublime_plugin import os from .gotools_util import Buffers from .gotools_util import GoBuffers from .gotools_util import Logger from .gotools_util import ToolRunner from .gotools_settings import GoToolsSettings class GotoolsOracleCommand(sublime_plugin.TextCommand): def is_enabled(self): ret...
class Solution(object): def findItinerary(self, tickets): """ :type tickets: List[List[str]] :rtype: List[str] """ graph = collections.defaultdict(list) for p, q in sorted(tickets)[::-1]: graph[p].append(q) route = [] def dfs(airport): ...
"""" This file is part of python-tdbus. Python-tdbus is free software available under the terms of the MIT license. See the file "LICENSE" that was provided together with this source file for the licensing terms. Copyright (c) 2012 the python-tdbus authors. See the file "AUTHORS" for a complete list. """ import fnmatch...
def coordinates( fn, latlong=True ): ''' take a raster file as input and return the centroid coords for each of the grid cells as a pair of numpy 2d arrays (longitude, latitude) ''' import rasterio import numpy as np from affine import Affine from pyproj import Proj, transform # Read raster with rasterio.open...
import subprocess import os import sys import glob def merge(folder): flv_list = sorted(glob.glob('{folder}/*.flv'.format(folder = folder))) fid = open('%s/filelist.txt' % (folder), 'w') for idx in flv_list: fid.write("file '%s/%d.flv'\n" % (folder, idx)) fid.close() cmd = ['ffmpeg', '-f', '...
""" Development Settings Module """ from .dev import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'db.sqlite3', } }
""" Set of Tokens to be used when parsing. @label is a list describing the depth of a paragraph/context. It follows: [ Part, Subpart/Appendix/Interpretations, Section, p-level-1, p-level-2, p-level-3, p-level4, p-level5 ] """ import attr import six def uncertain_label(label_parts): """Convert a list of ...
""" *************************************************************************** ParameterTableField.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ********************************************...
from dataclasses import dataclass from typing import ( Mapping, Optional, Sequence, ) from pcs.common.interface.dto import DataTransferObject from pcs.common.types import ( CibRuleExpressionType, CibRuleInEffectStatus, ) @dataclass(frozen=True) class CibRuleDateCommonDto(DataTransferObject): id:...
from xva import Xva from threading import Thread import gtk class ProgressBarOXC: widget = None widget2 = None def __init__(self, widget, widget2): self.widget = widget self.widget2 = widget2 self.widget.show() def update_amount(self, new_amount = None): value = "%.2f" % ...
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig config = context.config fileConfig(config.config_file_name) import os parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) os.sys.path.insert(0, pare...
from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.Sources.List import List from Components.Sources.StaticText import StaticText from Components.Pixmap import Pixmap from enigma import ePicLoad from Components.config import config, getConfigListEntry, ConfigInteger from Compone...
__author__ = 'Koichi Takahashi <shafi@e-cell.org>' __license__ = 'GPL' __copyright__ = 'Copyright The Molecular Sciences Institute 2006-2007' import unittest import _greens_functions as mod import numpy class GreensFunction3DRadAbsTestCase(unittest.TestCase): def setUp(self): pass def tearDown(self...
""" An Object Editor widget. """ import sys from PyQt5 import QtCore from PyQt5.QtCore import QSettings from PyQt5.QtGui import QTextCursor from PyQt5.QtWidgets import ( QDoubleSpinBox, QLabel, QPushButton, QVBoxLayout, QWidget) import app import objecteditor from . import defineoffset class Widget(QWidget): de...
import bpy from bpy.props import StringProperty from sverchok.node_tree import SverchCustomTreeNode from sverchok.data_structure import (updateNode) class SvSortObjsNode(bpy.types.Node, SverchCustomTreeNode): ''' Sort Objects ''' bl_idname = 'SvSortObjsNode' bl_label = 'Object ID Sort' bl_icon = 'OUTLIN...
""" Python 'utf-16-le' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. encode = codecs.u...
""" MakePro.py By: Denver Coneybeare <denver@sleepydragon.org> Jan 03, 2012 Makes changes to the source code to convert the app to the "Pro" version """ from __future__ import print_function from __future__ import unicode_literals import io import re import sys import tempfile class FileFilter(object): def __init__...
from __future__ import print_function import datetime import dateutil.tz import os import shutil import zipfile from opinel.utils.console import printInfo from AWSScout2 import AWSCONFIG, EXCEPTIONS, HTMLREPORT, AWSRULESET, AWSCONFIG_FILE, EXCEPTIONS_FILE, HTMLREPORT_FILE, GENERATOR_FILE, REPORT_TITLE from AWSScout2.ou...
import os import threading import sys import sickbeard from sickbeard.webserve import LoginHandler, LogoutHandler, KeyHandler, CalendarHandler from sickbeard.webapi import ApiHandler from sickbeard import logger from sickbeard.helpers import create_https_certificates, generateApiKey from tornado.web import Application,...