src
stringlengths
721
1.04M
# Under MIT license, see LICENSE.txt """ Livre des stratégies. """ from .HumanControl import HumanControl from .SimpleDefense import SimpleDefense from .SimpleOffense import SimpleOffense from .DoNothing import DoNothing class StrategyBook(object): """ Cette classe est capable de récupérer les stratégies ...
#!/usr/bin/env python3 import re import json # turns out the dump function of the json5 module just calls the normal json module (╯°□°)╯︵ ┻━┻ INPUT = "cards-DevOpsAgainstHumanity.csv" META_NAME = "DevOps Against Humanity" DELIM = "," QUOTE = "\"" SKIPLINES = 2 def parse_csv(line): a = [] tmp = "" at_elem_start =...
# Copyright (C) 2010, One Laptop Per Child # # 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 2 of the License, or # (at your option) any later version. # # This program is distrib...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import fields, api, models class in...
import os, sys from PyQt5 import QtGui, QtWidgets from PyQt5.QtGui import QPalette, QColor, QFont from PyQt5.QtWidgets import QApplication, QFileDialog from PyQt5.QtGui import QIntValidator, QDoubleValidator from orangewidget import gui from orangewidget.settings import Setting from oasys.widgets import gui as oasys...
# coding=utf-8 # Copyright 2021 The Trax Authors. # # 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 a...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Criteria.created' db.add_column('dnstorm_criteria', 'crea...
#!/usr/bin/env python3 from collections import defaultdict import csv from operator import attrgetter import pathlib import pprint import re import sys import shutil import tempfile import ck2parser from ck2parser import (rootpath, vanilladir, is_codename, Obj, csv_rows, get_province_id_name_map...
from vsg import parser from vsg import rule from vsg import violation from vsg.rules import utils as rules_utils class single_space_before_token(rule.Rule): ''' Checks for a single space between two tokens. Parameters ---------- name : string The group the rule belongs to. identifi...
from mysqlConn import DbConnect import argparse import operator from math import log,fabs import pprint #DB connector and curosor db = DbConnect() db_conn = db.get_connection() cur2 = db_conn.cursor(); #Argument parser parser = argparse.ArgumentParser() parser.add_argument("GENRE1") parser.add_argument("GENRE2") par...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type # take a list of files and (optionally) a list of paths # return the first existing file found in the paths # [file1, file2, file3], [path1, path2, path3] # search order is: # path1/file1 # path1/file2 # path1/file3 # path2/file1 #...
# coding: utf-8 import time import json import urllib import urllib2 import logging from bs4 import BeautifulSoup as Soup logging.basicConfig(level=logging.DEBUG) url = 'https://play.google.com/store/getreviews?authuser=0' headers = { 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8', 'user-...
#Задача 12. Вариант 28. #1-50. Разработайте игру "Крестики-нолики". (см. М.Доусон Программируем на Python гл. 6). #Сароквашин Максим #29.05.2016 X="X" O="O" EMPTY=" " TIE="Ничья" NUM_SQUARES=9 def display_instruct(): print(''' Добро пожаловать на ринг грандиознейших интеллектуальных состязаний всех времён. Твой м...
# Copyright 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 requ...
import json from PyQt5.QtCore import pyqtSlot, pyqtSignal, QModelIndex, Qt from PyQt5.QtWidgets import QWidget, QSpacerItem, QSizePolicy, QShortcut from PyQt5.QtGui import QKeySequence from txplayagui.ui.library import Ui_LibraryWidget from txplayagui.library import LibraryModel from txplayagui.utilities import unwra...
__all__ = ['CostCalculator', 'EodMarketData', 'MarketDataColumns', 'TxnColumns', 'PositionColumns', 'PlColumns', 'TxnPlColumns'] class CostCalculator(object): """Define the methods necessary to be able to calculator the premium for a trade.""" def get_premium(self, qty, px, ts=None): raise...
from rtxlib.executionstrategy.ForeverStrategy import start_forever_strategy from rtxlib.executionstrategy.StepStrategy import start_step_strategy from rtxlib.executionstrategy.SelfOptimizerStrategy import start_self_optimizer_strategy from rtxlib.executionstrategy.SequencialStrategy import start_sequential_strategy fr...
''' Pipelined bi-directional LSTM model. This model stacked biLSTM NLU and biLSTM SAP separate models together, and its weights are initilized by the ones of seprate models. Besides, for the SAP task, the decision threshold on the output layer is tuned on dev data. Author : Xuesong Yang ...
# #!/usr/bin/env python # # -*- coding: utf-8 -*- import subprocess import sys import glob, os import shutil import cPickle import babel.messages.pofile as pofile # Path to calibre-web location with -> location of mo files FILEPATH="D:\\Desktop\\calibre-web\\" with open('iso639.pickle', 'rb') as f: need_iso = cP...
# Licensed under the GPLv3 - see LICENSE import numpy as np from astropy.utils import lazyproperty import astropy.units as u from ..vlbi_base.base import (make_opener, VLBIFileBase, VLBIFileReaderBase, VLBIStreamBase, VLBIStreamReaderBase, VLBIStreamWriterBas...
#! /usr/bin/python # -*- coding:utf-8 -*- """ Author: AsherYang Email: ouyangfan1991@gmail.com Date: 2018/5/6 Desc: 属性类,包括分类属性,商品详情属性 _id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, cate_id VARCHAR(50), goods_id VARCHAR(50), attr_market_year VARCHAR(20), attr_size VARCHAR(5), attr_color VARCHAR(10), foreign key (goo...
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2012 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxoo (info@vauxoo.com) ####################################...
import datetime import pytz import re try: import simplejson as json except ImportError: import json from functools import wraps from flask import request, g, current_app try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin from alerta.app import app, db from alert...
from otp.ai.AIBaseGlobal import * from otp.avatar import DistributedAvatarAI import SuitPlannerBase import SuitBase import SuitDNA from direct.directnotify import DirectNotifyGlobal from toontown.battle import SuitBattleGlobals class DistributedSuitBaseAI(DistributedAvatarAI.DistributedAvatarAI, SuitBase.SuitBase): ...
from steve.backend.sqlitedb import SDB from steve.system import System class Constellation(object): def __init__(self, universe, data): self.universe = universe self.regionID = data[0] self.uid = data[1] self.name = data[2] self.x ...
#!/usr/bin/python """Convert certbot private_key.json to manuale's account.json Source: https://gist.github.com/JonLundy/f25c99ee0770e19dc595 ./jwk_convert.py private_key.json > private-key.asn1 openssl asn1parse -genconf private-key.asn1 -noout -out private-key.der openssl rsa -inform DER -in private-key.der -outform...
#!/usr/bin/python # -*- coding: utf-8 -*- # ------------------------------------ # file: corpus.py # date: Wed February 26 21:29 2014 # author: # Maarten Versteegh # github.com/mwv # maartenversteegh AT gmail DOT com # # Licensed under GPLv3 # ------------------------------------ """corpus: interface functions to the ...
#!/usr/bin/env python import sys try: import readline except ImportError: import pyreadline as readline import os import code import rlcompleter lib_path = os.path.abspath(os.path.join('..', 'src')) sys.path.append(lib_path) lib_path = os.path.abspath(os.path.join('..', '..', 'ARSDKBuildUtils', 'Utils', 'Py...
from functools import partial from graphql.utilities import build_schema from graphql.validation.rules.unique_directive_names import UniqueDirectiveNamesRule from .harness import assert_sdl_validation_errors assert_errors = partial(assert_sdl_validation_errors, UniqueDirectiveNamesRule) assert_valid = partial(asser...
# The wifi world stage # # Copyright (C) 2015 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2 # import threading import subprocess from gi.repository import Gtk, GLib from kano_init_flow.stage import Stage from kano_init_flow.ui.scene import Scene, Placement from kano.logging import ...
# 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, software # distributed u...
#! /usr/bin/env python3.4 # -*- coding:utf-8 -*- # # Krypton - A little tool for GAMESS (US) users # # Copyright (C) 2012-20.. Mathias M. # # 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...
""" <Program> namespace.py <Started> September 2009 <Author> Justin Samuel <Purpose> This is the namespace layer that ensures separation of the namespaces of untrusted code and our code. It provides a single public function to be used to setup the context in which untrusted code is exec'd (that is, the ...
# -*- coding: utf-8 -*- from operator import itemgetter from uuid import uuid4 from typing import ( Set, List, Tuple, Iterable, Iterator, Optional ) from cadnano import ( app, setBatch, util ) from cadnano.addinstancecmd import AddInstanceCommand from cadnano.proxies.cnenum import ...
#!/usr/bin/env python """ Sad attempt at a drop-in replacement for KSB's excellent xapply """ import os import subprocess import signal import sys import argparse import time VERSION = 0.1 class Dicer(object): """ Emulate KSB's dicer Working on de-uglying it """ def __init__(self, fmat="", escape...
# -*- coding: utf-8 -*- import os import sys import textwrap import _pytest._code import pytest from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.nodes import Collector from _pytest.warnings import SHOW_PYTEST_WARNINGS_ARG class TestModule(object): def test_failing_import(self, testdir): modcol...
import os import io import textwrap import pytest import libconf CURDIR = os.path.abspath(os.path.dirname(__file__)) # Tests for load() and loads() ############################## def test_loads_maintains_dict_order(): config = libconf.loads(u'''l: 1; i: 5; b: 3; c: 1; o: 9; n: 0; f: 7;''') assert ''.join(...
#! /usr/bin/python # by edward silher for collecting gps data in conjuction with AIS data # edwardsihler@ursusonline.net import serial import subprocess import os from gps import * from time import * import time import threading gpsd = None #seting the global variable os.system('clear') #clear the terminal (option...
# # 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, software # ...
from rest_framework import authentication from rest_framework import exceptions from django.core.exceptions import ObjectDoesNotExist from django.conf import settings from jwt_auth.models import TokenBlackList, User import re import jwt def validate_token(token): """ Validate token """ # check whether...
#!/usr/bin/env python import sys, os, subprocess def nmapScriptsScan(ip, port): print "[-] Starting nmap ms-sql script scan for " + ip + ":" + port nmapCmd = "nmap -sV -Pn -v -p "+port+" --script=ms-sql* -oN reports/sql/"+ip+"_"+port+"_nmap "+ip+ " >> reports/sql/"+ip+"_"+port+"_nmapOutput.txt" subprocess...
''' This module should be run to recreate the files that we generate automatically (i.e.: modules that shouldn't be traced and cython .pyx) ''' from __future__ import print_function import os import struct import re def is_python_64bit(): return (struct.calcsize('P') == 8) root_dir = os.path.abspath(os.path.j...
import os import os.path from tempfile import mkdtemp from shutil import rmtree from evaluation_constants import MODEL_SUMMARIES_PATTERN, SYSTEM_SUMMARIES_PATTERN from pyrouge import Rouge155 """ Class that runs ROUGE to compare the output of a custom summarization tool comparing it to a 'gold standard' reference ...
#!/usr/bin/env python3 from cereal import car from selfdrive.car.subaru.values import CAR, PREGLOBAL_CARS from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint from selfdrive.car.interfaces import CarInterfaceBase class CarInterface(CarInterfaceBase): @staticmethod ...
#!/usr/bin/env python # # The wiringPi requires you to run as sudo. # This is needed for access to /dev/mem, which we don't use here. # There is no way around this though, so we start this code as a root user. # # import wiringpi as wp # # Define a function to decode BCD encoded numbers. def decBCD(num): return( (n...
# -*- coding: utf-8 -*- # Authors: Denis A. Engemann <denis.engemann@gmail.com> # simplified BSD-3 license import os.path as op import warnings import inspect import numpy as np from numpy.testing import assert_array_equal, assert_allclose from nose.tools import assert_true, assert_raises, assert_equal fr...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
""" Extend pandas with custom array types. """ from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Type, Union import numpy as np from pandas._typing import DtypeObj from pandas.errors import AbstractMethodError from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries if TYPE_CHECKIN...
# xfce4-rss-plugin - an RSS aggregator for the Xfce 4 Panel # Copyright (c) 2006 Adriano Winter Bess <adriano@xfce.org> # # 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 2 of the ...
import unittest from decimal import Decimal from httpretty import HTTPretty, httprettified import openexchangerates from datetime import date as Date class TestOpenExchangeRates(unittest.TestCase): _FIXTURE_CURRENCIES = """{ "AED": "United Arab Emirates Dirham", "AFN": "Afghan Afghani", "ALL": "Alb...
import math from itertools import zip_longest from typing import ( TYPE_CHECKING, Callable, Dict, Iterable, List, Optional, Tuple, TypeVar, Union, cast, ) from prompt_toolkit.application.current import get_app from prompt_toolkit.buffer import CompletionState from prompt_toolkit...
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2015 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under ...
""" Copyright (c) 2017 - Philip Paquette Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribu...
#!/usr/bin/env python # coding: utf-8 from salada import language from salada import segmenter class TestDefault: def test_segment_text_by_sequence_of_spaces(self): text = ' foo \n \n\n bar \t\n baz ' expectation = [ language.Segment('', True, False), language.Segmen...
#!/usr/bin/env python3 # Enforce header order in a given file. This will only reorder in the first sequence of contiguous # #include statements, so it will not play well with #ifdef. # # This attempts to enforce the guidelines at # https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes # with so...
#! /usr/bin/env python """ agilent4155_matlab_output_param.py Prarmeter extractor for matlab generated .xlsx idvd files Created by Jeremy Smith on 2015-10-29 University of California, Berkeley j-smith@eecs.berkeley.edu """ import os import sys import xlrd import numpy as np import myfunctions as mf from scipy import ...
# -*- coding: utf-8 -*- """ /*************************************************************************** maps2WinBUGS A QGIS plugin a tool to facilitate data processing for Bayesian spatial modeling ------------------- begin : 2015-...
# -*- coding: utf-8 -*- # pylint: disable=bad-continuation """ Tools to discover and modify content. """ # Copyright © 2015 1&1 Group <git@1and1.com> # # 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 Lic...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.compiler import Compiler, UnsupportedCompilerFlag from spack.version import ver class Intel(Compiler): # ...
class ListIterator: def __init__(self, obj): self.list = obj self.index = 0 self.length = len(obj) def __iter__(self): return self def __next__(self): if self.index == self.length: raise StopIteration index = self.index self.index = self...
from struct import Struct from mode import * from ichisize import * from incomdef import * class AtData(Struct): element = None maxvalence = None NUM_CHEM_ELEMENTS = 127 # well above number of known chem. elements AT_ISO_SORT_KEY_MULT = 32 # up to 32 identical hydrogen isotopes ...
import argparse, json from boto.mturk.connection import MTurkConnection from boto.mturk.qualification import * from jinja2 import Environment, FileSystemLoader """ A bunch of free functions that we use in all scripts. """ def get_jinja_env(config): """ Get a jinja2 Environment object that we can use to find te...
#!/usr/bin/python from xml.dom.minidom import parse from json import dumps def item_text(item,field): ret = item.getElementsByTagName(field) if ret is None: return "missing" if len(ret) < 1: return "missing" ret = ret[0] if ret is None: return "missing" ret = ret.childNodes if ret is None:...
# Copyright (c) 2014 Bull. # # 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, sof...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright 2013 # Author: Guewen Baconnier - Camptocamp # Augustin Cisterne-Kaas - Elico-corp # David Béal - Akretion # Sébastien Beau - Akretion # Chafique Delli -...
import functools import numpy as np import pandas as pd from . import ops from .combine import concat from .common import ( ImplementsArrayReduce, ImplementsDatasetReduce, _maybe_promote, ) from .pycompat import zip from .utils import peek_at, maybe_wrap_array, safe_cast_to_index from .variable import as_variable,...
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Tools.BoundFunction import boundFunction from Components.Sources.StaticText import StaticText from Components.ActionMap import ActionMap from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.co...
import random import unittest from vcii.sheet import * class TestSheet(unittest.TestCase): def test_key_to_indices(self): with self.assertRaises(ValueError): indices_from_label('1A') self.assertEqual(indices_from_label('A1'), (0, 0)) self.assertEqual(indices_from_label('zz99'...
""" A subset of the tests in tests/servers/tests exercising django.contrib.staticfiles.testing.StaticLiveServerTestCase instead of django.test.LiveServerTestCase. """ import os from urllib.request import urlopen from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.core.exceptions import...
import networkx as nx import random import scipy as sp from gat.core.sna import ergm def resilience(cliques_found, ergm_iters=3000): scaledResilience = {} scaledBaseline = {} toScale = [] baselinesToScale = [] traces = [] formatted_traces = {} cliques, selected = cliques_found # Find ...
from logging import getLogger logger = getLogger('update') import contextlib import io import os import platform import requests import tempfile from wxUI import commonMessageDialogs import widgetUtils import webbrowser try: import czipfile as zipfile except ImportError: import zipfile from platform_utils import pa...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# coding: utf-8 import os PROJECT_DIR = os.path.dirname(__file__) DATASET_COMPLETO = os.path.join(PROJECT_DIR, 'dataset/completo/youtube_comments_20120117.csv') DATASET_TREINO = os.path.join(PROJECT_DIR, 'dataset/treino/') DATASET_PREPARADO = os.path.join(PROJECT_DIR, 'dataset/preparado/') HOST_MONITOR = 'localhost'...
## ## Parse plotting configuration files for sashimi_plot ## import sys import os import ast import ConfigParser import misopy import misopy.miso_utils as miso_utils def get_default_settings(): """ Return default settings for sashimi_plot. """ settings = {"intron_scale": 30, "exon_sca...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import os import sys def warn(msg): print '[powerline-bash] ', msg class Powerline: symbols = { 'compatible': { 'lock': 'RO', 'network': 'SSH', 'separator': u'\u25B6', 'separator_thin': u'\u2...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Forsteri documentation build configuration file, created by # sphinx-quickstart on Fri Apr 24 16:09:15 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-26 16:11 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
#!/usr/bin/env python3 """ Detecting frequently repeating runs in a source file. Useful as some pairings or triplets of letters are well known to occur frequently in English. """ ################################################################################ from input_handling import read_file from collections im...
import os import argparse import logging import logging.handlers import urllib.request, urllib.parse, urllib.error import requests import datetime import json import re import time LOG_NAME = "logagg" APP_LOG = "app" PAGE_SIZE = 10000 #Number of records to reetrieve per request DEFAULT_CORE = "event_core" #name of...
""" Utility methods related to course """ import logging import six from django.conf import settings from django.utils.timezone import now from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers log = logging.getLogger(__name__) COURSE_SHARING_UTM_PARAMETERS = { 'facebook': { ...
#!/usr/bin/env python import json, os, sys import common def main(argv): # Command Line Arguments args = [{'arg':'--apigateway', 'dest':'apigateway', 'default':None, 'type':'boolean', 'help':'Call API Gateway endpoint'}] if '--apigateway' in argv: args.extend([{'arg':'--stack', 'dest':'stack', 'default':None, 'he...
# client.py # # Copyright 2002-2007 Wichert Akkerman <wichert@wiggy.net> __docformat__ = "epytext en" import select import socket import time import six from pyrad import host from pyrad import packet class Timeout(Exception): """Simple exception class which is raised when a timeout occurs while waiting for...
#!/usr/bin/env python3 # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2019 NIWA & British Crown (Met Office) & Contributors. # # 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...
# Copyright 2019 The Meson development team # 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 ...
# coding: utf-8 """ CMS-related job helpers. """ __all__ = ["CMSJobDashboard"] import time import socket import threading import six import law from law.job.base import BaseJobManager from law.job.dashboard import BaseJobDashboard class CMSJobDashboard(BaseJobDashboard): """ This CMS job dashboard inter...
# -*- coding: utf-8 -*- """Python API for Payson paymnents provider Copyright (c) 2012 Tomas Walch MIT-License, see LICENSE for details """ import datetime import decimal import logging import json import urllib import urllib2 import urlparse PAYSON_API_ENDPOINT = "https://api.payson.se" PAYSON_TEST_API_ENDPOINT = "...
# Copyright 2011 the Melange authors. # # 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 wr...
import time from datetime import date import numpy from PIL import Image import zbar import os,sys import wx # GUI # Handle time lapse! scanner = zbar.ImageScanner() # configure the reader scanner.parse_config('enable') #scanner.set_config(0, zbar.Config.ENABLE, 0) #scanner.set_conf...
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines classes, that describes C++ classes This modules contains definition for next C++ declarations: - c...
#!/usr/bin/env python from ansible.module_utils.hashivault import hashivault_auth_client from ansible.module_utils.hashivault import hashivault_argspec from ansible.module_utils.hashivault import hashivault_init from ansible.module_utils.hashivault import hashiwrapper ANSIBLE_METADATA = {'status': ['preview'], 'suppor...
# -*- coding: utf-8 -*- """ Created on Thu Apr 28 11:36:04 2016 @author: J. C. Vasquez-Correa """ import numpy as np import math from statsmodels.tsa.tsatools import lagmat from sklearn.metrics.pairwise import euclidean_distances as dist import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axe...
# 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 agreed to in writing, s...
# # Support for the API of the multiprocessing package using threads # # multiprocessing/dummy/__init__.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: ...
import unittest import os from src.day8 import create_node_tree SAMPLE_DATA = "2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2" class TestMemoryManeuver(unittest.TestCase): def test_sample_input_part_one(self): tree = create_node_tree(SAMPLE_DATA) self.assertEqual(str(tree), SAMPLE_DATA) self.assertEqual(tree.metad...
""" Methods related to aligning reads. This module was created because of a circular import issue with celery. ... File "/home/glebk/Projects/churchlab/genome-designer-v2/genome_designer/pipeline/read_alignment.py", line 9, in <module> from main.models import clean_filesystem_location File "/home/glebk/Proje...
import numpy as np from scipy.stats import sem from uncertainties import ufloat import uncertainties.unumpy as unp Zeiten = np.genfromtxt("Restdaten.txt", unpack = True) #print(Zeiten[2:]) Zeiten /= 5 #print(Zeiten[2:]) daten = np.genfromtxt("WRGdyn.txt", unpack = True) Mittelwerte = np.array([np.mean(row) for ro...
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# -*- coding: utf-8 -*- from collections import namedtuple import time import random from Crypto.PublicKey import RSA PrivateRing = namedtuple('PrivateRing', 'timestamp key_id pub_key priv_key') PublicRing = namedtuple('PublicRing', 'timestamp key_id pub_key owner_trust user_name key_legit') def import_keyring(type...
#!/usr/bin/env python3 # Copyright (c) 2016 The Oakcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test account RPCs. RPCs tested are: - getaccountaddress - getaddressesbyaccount - listaddressgr...