src
stringlengths
721
1.04M
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j\-\a \d\e F Y' #...
#Fuzzy Algorithm to mark calcifications in mammography #I'm using Mandani Defuzzification #FutureBox Analytics from __future__ import division import numpy as np import matplotlib.cm as cm import matplotlib.pyplot as p from skimage.io import imread from skimage.measure import label, regionprops from skimage.exposure i...
# Copyright (C) 2014 BDT Media Automation GmbH # # Author: Stefan Hauser <stefan.hauser@bdt.de> # # 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...
from twisted.internet import defer, reactor from twisted.internet.endpoints import TCP4ClientEndpoint from twisted.python import usage from twisted.web.client import ProxyAgent, readBody from ooni.templates.process import ProcessTest, ProcessDirector from ooni.utils import log from ooni.errors import handleAllFailures ...
class BaseTextView(object): """ Api is as in gtk.TextView, additional here """ has_syntax_highlighting = False _doctype = None def get_doctype(self): """ Returns the pida.core.doctype.DocType object assigned to this view """ return self._doctype ...
""" Django settings for mmdb project. Generated by 'django-admin startproject' using Django 1.8.1. 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/ """ # Build paths i...
# Generated by Django 2.1.15 on 2020-09-11 20:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coursedashboards', '0013_auto_20190108_2238'), ] operations = [ migrations.CreateModel( name='CourseGradeAverage', ...
import sys import os sys.path.insert(1, os.path.join(sys.path[0], '..')) import unittest import numpy as np from base.least_square_estimator import LeastSquareEstimator class TestLeastSquareEstimator(unittest.TestCase): ''' NOTE: not testing the forgetting factor now. ''' VALUE_EQUAL_PLACE = 2 de...
"""Identity related views.""" from django.shortcuts import render from django.utils.translation import ugettext as _, ungettext from django.views import generic from django.views.decorators.csrf import ensure_csrf_cookie from django.contrib.auth import mixins as auth_mixins from django.contrib.auth.decorators import ...
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from random import randint from django.db import models from django.conf import settings from django.core.exceptions import ValidationError from django.urls import ...
#! /usr/bin/env python #-*- coding:utf-8 -*- # standard import os from IPython import embed # framework import tensorflow as tf from tensorflow.contrib import seq2seq, rnn from tensorflow.python.layers.core import Dense os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' class Seq2SeqModel: """ Seq2Seq model based on...
""" Drop-in replacement for i3status run_watch VPN module. Expands on the i3status module by displaying the name of the connected vpn using pydbus. Asynchronously updates on dbus signals unless check_pid is True. Configuration parameters: cache_timeout: How often to refresh in seconds when check_pid is True. ...
import pytest import dash._utils as utils def test_ddut001_attribute_dict(): a = utils.AttributeDict() assert str(a) == "{}" with pytest.raises(AttributeError): a.k with pytest.raises(KeyError): a["k"] assert a.first("no", "k", "nope") is None a.k = 1 assert a.k == 1 ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division import theano import theano.tensor as T import numpy as np from .. import activations, initializations, regularizers, constraints from ..utils.theano_utils import shared_zeros, floatX from ..utils.generic_utils import make_tuple from ..regulariz...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from colors import b...
# This file is part of gpycomplete. # gpycomplete 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. # gpycomplete is distributed in the...
# # Copyright (C) 2009 GSyC/LibreSoft # # This program 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 your option) any later version. # # This ...
import random import logging from selenium.common.exceptions import StaleElementReferenceException STRATEGIES = [ 'empty', 'long', 'text', 'integer', 'real', ] logger = logging.getLogger(__name__) def autofill(form): done = set() while 1: # Sometimes the form gets screwed up a...
""" Taken from djangoproject/django docs. Sphinx plugins for Django documentation. """ import re from sphinx import addnodes from sphinx.util.compat import Directive from sphinx.writers.html import SmartyPantsHTMLTranslator # RE for option descriptions without a '--' prefix simple_option_desc_re = re.compile( r'...
#!/usr/bin/env python """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 p...
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
""" This is some of the code behind 'cobbler sync'. Copyright 2006-2009, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> John Eckersberg <jeckersb@redhat.com> 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 Fo...
# Converts a CSV file (typically exported from individual .xls sheets) to a sqlite db as a new table # # - The CSV filename (without .csv extension) is used as the table name. # - The columns from the first row are used as column names in the table. # - You can store multiple tables (from multiple csv files) in the sam...
# Copyright (c) 2013 Institute of the Czech National Corpus # # 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; version 2 # dated June, 1991. # # This program is distributed in the hope that it wi...
# encoding: utf-8 from datetime import datetime from sqlalchemy import types, Column, Table, UniqueConstraint import meta import types as _types import domain_object __all__ = ['TaskStatus', 'task_status_table'] task_status_table = Table('task_status', meta.metadata, Column('id', types.UnicodeText, primary_key=...
# -*- coding:utf-8 -*- ''' 测试注册用户 ''' import sys import os sys.path.append(os.getcwd()) from pycate.model import MInfo import unittest class SimpleWidgetTestCase(unittest.TestCase): def setUp(self): # from model.info_model import MInfo # con = pymongo.Connection('localhost') ...
# Standard imports import os # Project imports from _BaseQuery import BaseQuery import NanoIO.Table import NanoIO.File class Alter(BaseQuery): name = None addColumns = None removeColumns = None modifyColumns = None addIndex = None removeIndex = None grammar = """ "table"...
# -*- coding: utf-8 -*- # # kos/views.py # # Copyright (C) 2011-19 Tomáš Pecina <tomas@pecina.cz> # # This file is part of legal.pecina.cz, a web-based toolbox for lawyers. # # This application is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Make a histogram using a logarithmic scale on X axis See: - http://stackoverflow.com/questions/6855710/how-to-have-logarithmic-bins-in-a-python-histogram """ import numpy as np import matplotlib.pyplot as plt # SETUP ###############################################...
#!/usr/bin/env python """JSON content-type support for Open Annotation.""" __author__ = 'Sampo Pyysalo' __license__ = 'MIT' import json # Default values for rendering options PRETTYPRINT_DEFAULT = True KEEPCONTEXT_DEFAULT = False # Short name for this format. format_name = 'json' # The MIME types associated with ...
# -*- coding: utf-8 -*- import numpy as np def compute_pairwise_distance_matrix(X, k): """Compute pairwise distances between each point in X and its k-nearest neighbors.""" from scipy.spatial import KDTree kdtree = KDTree(X) A = np.zeros((X.shape[0], X.shape[0]), dtype=np.float) for i, x in...
# # This source file is part of the EdgeDB open source project. # # Copyright 2018-present MagicStack Inc. and the EdgeDB 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...
import sys import pygame from pygame import gfxdraw from pygame import Color import cmath import random pygame.init() # The small size will help for future generation. unit = 75 width = 3 * unit height = 2 * unit # nb_sections represents the number of slice of each axis we are going # to consider for the zoom. Th...
# Copyright 2013 IBM Corp. # # 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 agree...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. codeauthor:: Cédric Dumay <cedric.dumay@gmail.com> """ import logging import argparse from .lib import from_local, from_remote class CommonParser(argparse.ArgumentParser): """CommonParser""" def __init__(self, **kwargs): argparse.ArgumentParser....
#!/usr/bin/env python ''' test_cluster.py - integration tests for a brozzler cluster, expects brozzler, warcprox, pywb, rethinkdb and other dependencies to be running already Copyright (C) 2016-2018 Internet Archive Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in co...
#!/usr/bin/env python """ NumPy is the fundamental package for array computing with Python. It provides: - a powerful N-dimensional array object - sophisticated (broadcasting) functions - tools for integrating C/C++ and Fortran code - useful linear algebra, Fourier transform, and random number capabilities - and much...
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from logging import getLogger from inspect import stack, getmodule import errno import os # modified from: # http://stackoverflow.com/questions/1444790/python-module-for-creating-pid- # based-lockfile class Pidfile(): def __in...
import numpy as np from matplotlib import pyplot import rft1d #(0) Set parameters: np.random.seed(0) nResponses = 10000 nNodes = 101 FWHM = 13.1877 ### generate a field mask: nodes_full = np.array([True]*nNodes) #nothing masked out nodes = nodes_full.copy() nodes[20:45] = False #thi...
from datetime import datetime from .exceptions import ParseError class DataField: def __init__(self, start, end, justification='r', fill_char=' ', pad_char=' '): self.start = start self.end = end self.justification = justification self.fill_char = fill_char self.pad_char =...
import json import re import random from urllib import urlretrieve from urllib2 import urlopen, URLError from pprint import pprint from bs4 import BeautifulSoup from retrying import retry # https://flightaware.com/live/flight/{flightcode} FLIGHTAWARE_URL = "https://flightaware.com/live/flight/{}" """ gets origin and ...
from django.shortcuts import render import datetime from models import Iris, SVMModels from forms import UserIrisData import sklearn from sklearn import svm from sklearn.cross_validation import train_test_split import numpy as np from django.conf import settings import cPickle import scipy from pytz import timezone imp...
# This file is part of the bapsflib package, a Python toolkit for the # BaPSF group at UCLA. # # http://plasma.physics.ucla.edu/ # # Copyright 2017-2018 Erik T. Everson and contributors # # License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full # license terms and contributor agreement. # import os impor...
# -*- coding: utf-8 -*- # ============================================================================= # Xpert Screen Recorder # Copyright (C) 2013 OSMAN TUNCELLI # # 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 ...
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from textwrap import dedent from pants.backend.native.targets.native_library import CLibrary from pants.backend.native.tasks.c_compile import CCompile from pants.backend.native.tasks.nati...
# 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 ...
#!/usr/bin/env python3 from selenium import webdriver import time from datetime import datetime import csv import thingspeak from githubkey import GITHUB_KEY, GITHUB_CHANID # ThingSpeak values write_key = GITHUB_KEY channel_id = GITHUB_CHANID # Set up browser browser = webdriver.PhantomJS() # Go to LaGuardia parkin...
from EventSystem import Event import utils class ActionSystem: def __init__(self, player, rooms, tuiSystem, eventQueue): self.__player = player self.__rooms = rooms self.__tuiSystem = tuiSystem self.__eventQueue = eventQueue # a mapping for input actions to functions ...
""" Contains al dictionaries and list from National Bridge Inventory Records""" __author__ = "Akshay Kale" __copyright__ = "GPL" __credit__ = [] __email__ = 'akale@unomaha.edu' # key: State code # Value: Abbreviation of the state code_state_mapping = { '25':'MA', '04':'AZ', ...
""" Support for D-Link motion sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.dlink_motion_sensor/ """ import asyncio import logging from datetime import timedelta, datetime import voluptuous as vol from homeassistant.components.b...
# This file is part of Checkbox. # # Copyright 2012, 2013 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Checkbox 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 ...
# -*- coding: utf-8 -*- import os import fnmatch from django.apps import apps from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.core.management.color import color_style from django.template.loader import get_template from django_extensions.compat import get...
from __future__ import print_function from permuta import * import permstruct import permstruct.dag from permstruct import * from permstruct.dag import taylor_dag import sys is_classical = True # -- Wilf-class 2 in http://wikipedia.org/wiki/Enumerations_of_specific_permutation_classes -- # # STATUS ================...
""" Operations on wrappers """ import array import __builtin__ import ctypes import collections import functools from ROOT import THStack, TGraphAsymmErrors import history import wrappers class OperationError(Exception): pass class TooFewWrpsError(OperationError): pass class TooManyWrpsError(OperationError): pass c...
'''uses methods from the ``gini`` library for flexible matching''' from gini.semantics import Bottle,Concept from gini import logic import padre as p import neural as nl import copy bottle = Bottle() p.subjects() bottle.vocab = [ # Direct objects Concept('atlas_do', ['atlases','templates']), Concept('subj...
# # 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...
from lib.vae.CVAE import CVAE import tensorflow as tf import numpy as np import lib.neural_net.kfrans_ops as ops class CVAE_3layers(CVAE): def __init__(self, hyperparams, test_bool=False, path_to_session=None): super(CVAE_3layers, self).__init__(hyperparams, test_bool=test_bool, ...
# Copyright 2014-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. from yotta.lib import lazyregex #pylint: disable=unused-import from yotta.lib import errors #pylint: disable=unused-import # NOTE: argcomplete must be first! # argcomplete, pip install argcomplete, tab...
#!/usr/bin/env python """ tests for mozfile.load """ import mozhttpd import os import tempfile import unittest import mozunit from mozfile import load class TestLoad(unittest.TestCase): """test the load function""" def test_http(self): """test with mozhttpd and a http:// URL""" def examp...
""".. Ignore pydocstyle D400. .. autoclass:: resolwe.flow.executors.docker.run.FlowExecutor :members: """ # pylint: disable=logging-format-interpolation import asyncio import copy import functools import json import logging import os import random import string import tempfile import time from contextlib import s...
from constants import * from scapy.all import * from veripy.assertions import * from veripy.models import ComplianceTestCase class OnLinkDeterminationTestCase(ComplianceTestCase): """ Router Advertisement Processing, On-link determination Verify that a host properly rejects an invalid prefix length, howe...
# Third-party import astropy.units as u from astropy.time import Time import numpy as np from thejoker.data import RVData def star_to_apogeervdata(star, clean=False): """Return a `twoface.data.APOGEERVData` instance for this star. Parameters ---------- """ jd = [] rv = [] rv_rand_err = [...
#-*- coding:utf-8 -*- from flask import g, render_template, request, url_for, redirect, session from chartnet import app from chartnet import setting from models import operatorDB from common import login_required from werkzeug import secure_filename import os import re import time from PIL import Image from StringIO ...
from abc import ABCMeta, abstractmethod from resources.objects import * from resources.utils import * from resources.scrap import * class FakeRomSetRepository(ROMSetRepository): def __init__(self, roms): self.roms = roms def find_by_launcher(self, launcher): return self.roms ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Profile.city' db.alter_column(u'user_profile', 'city', self.gf('django.db.models.fields.C...
import numpy as np def make_cubic(n_samples, x_min, x_max, a=1, b=0, c=0, d=0, noise=0.0, random_state=None): np.random.seed(random_state) x = np.linspace(x_min, x_max, n_samples) y = a*x**3 + b*x**2 + c*x + d + (2*noise*np.random.random(n_samples) - noise) return x.reshape(-1,1), y.reshape(-1,1) def ...
# Copyright 2016 Mirantis 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,...
''' updateBun bun to update bat_file update_file ''' __author__ = 'fyu' from config import * BUFFERING_SIZE=1048576 #BUFFERING_SIZE=10 def updateBATFast(bat_file_name,update_file_name): bat_file=open(bat_file_name,'r+') update_file=open(update_file_name,'r') for updateLine in update_file: (updateL...
# -*- coding: utf-8 -*- # Copyright (c) 2013 by Pablo Martín <goinnn@gmail.com> # # This software is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) a...
import atexit import base64 import json import math import os import random import socket import string import subprocess import sys import tempfile import time import alembic.config import gabbi.driver import gabbi.fixture import jwt import requests import requests.utils import sqlalchemy from cryptography.hazmat.pr...
import socket import struct from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, backref from structlog import get_logger from deployer.applications.models import Instance from deployer.utils import get_container_ip...
#----------------------------------------------------------------------------- # Name: Tray.py # Product: ClamWin Free Antivirus # # Author: alch [alch at users dot sourceforge dot net] # # Created: 2004/19/03 # Copyright: Copyright alch (c) 2005 # Licence: # This program is free softwa...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import csv html_beginning = '''<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.0/bootstrap-table.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitt...
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
import numpy as np class Optimizer: """ Optimizer class """ def __init__(self, net, cost, learning_rate, *args, **kwargs): self.net = net self.cost = cost self.learning_rate = learning_rate def compute_gradients(self, batch, y, *args, **kwargs): zs, as_ = self.net...
#!/usr/bin/python3 """ Matches birth, death and marriage records and writes one HTML file per family, including spouses, children and links to other families. """ from collections import defaultdict from jinja2 import Environment, FileSystemLoader, select_autoescape import glob import itertools import json import os ...
#!/usr/bin/env python # Copyright 2015 Google 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 ...
"""Test config utils.""" # pylint: disable=protected-access import asyncio from collections import OrderedDict import copy import os from unittest import mock from unittest.mock import Mock import asynctest from asynctest import CoroutineMock, patch import pytest from voluptuous import Invalid, MultipleInvalid import ...
""" An example web app that displays a list of devices, with links to a page for each device's data. The device page updates every 2 seconds with the latest heartbeat. Note: requires Flask """ from _examples import * from flask import Flask from ninja.api import NinjaAPI import json api = NinjaAPI(secrets.ACCESS...
#!/usr/bin/env python # # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of REDHAWK FrontEndController. # # REDHAWK FrontEndController is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesse...
import time import random from cloudbrain.connectors.ConnectorInterface import Connector from cloudbrain.utils.metadata_info import get_num_channels class MockConnector(Connector): def __init__(self, publishers, buffer_size, device_name, device_port='mock_port', device_mac=None): """ :return: """ ...
import io import argparse import codecs import os import re class DPStringExtractor: pattern_src_1 = re.compile("(?<=DPLocalizedString\(@\").*?(?=\")") pattern_src_2 = re.compile(".*?\.autolocalizationKey\s*=\s*@?\"(.*?)\"") pattern_src_3 = re.compile("\[.*?\ssetAutolocalizationKey:\s*@\"(.*?)\"\]") pa...
# This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB Inc. # # This program 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 your option) any later ver...
from setuptools import setup classifiers = [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Topic :: Software Development :: Libraries", ] setup( name='Swagxample', version='0.0.3.1', packages=['swagxample'], url='https://bitbucket.org/deginner/swagxample...
# Copyright 2012 Nebula, 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 agree...
import numbers import time import numpy as np from sklearn.utils import safe_indexing from sklearn.base import is_classifier, clone from sklearn.metrics.scorer import check_scoring from sklearn.externals.joblib import Parallel, delayed, logger from ambra.backports import _num_samples, indexable from sklearn.cross_val...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
class check_privileges_clr_assembly_permissions(): """ check_privileges_clr_assembly_permissions: Setting CLR Assembly Permission Sets to SAFE_ACCESS will prevent assemblies from accessing external system resources such as files, the network, environment variables, or the registry. """ # Ref...
# Copyright (c) 2016 Mirantis, 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...
import sys from setuptools import setup from setuptools import find_packages version = '0.5.0.dev0' # Please update tox.ini when modifying dependency version requirements install_requires = [ 'acme=={0}'.format(version), 'letsencrypt=={0}'.format(version), 'PyOpenSSL', 'pyparsing>=1.5.5', # Python3...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Andrés Aguirre Dorelo # # MINA/INCO/UDELAR # # module for finding the steps in the tutors # # 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; eith...
""" script for testing PRBS data in dir. This script can be used for testing data from the TBB, it will be used by TBB test scripts. Started by Gijs, 16 dec 07 Modified by Gijs on March 17 2009: -PRBS test bug fixed, when data is all 0 error did't count. -CRC test on files with RRBS errors. When a PRBS error and no C...
from account import Account from checking import Checking from savings import Savings def acc_type(): # initializes which account to create print print "Which account would you like to open?" print "[c] Checking Account" print "[s] Savings Account" print "[q] Quit" while True: account = raw_input("Enter an o...
import genpy from rospy.rostime import Time, Duration from python_qt_binding.QtCore import QTranslator from abstract_item import AbstractItem from helper_functions import prepare_number_for_representation, MAXIMUM_OFFLINE_TIME, ROUND_DIGITS class ConnectionItem(AbstractItem): """ A ConnectionItem reresents ...
#!/usr/bin/env python ## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2012 CERN. ## ## Invenio 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 op...
"""Module containing utility functions""" import base64 import hashlib import random import re import string from datetime import datetime from math import * def hashfunc( str ): """Returns a hash value of a given string Takes a string and returns its SHA512 hash value, encoded in base64 """ ...
from typing import List, Dict from Src.BioDataManagement.CrossCutting.Contracts.DnaMethylationSampleRepositoryBase import \ DnaMethylationSampleRepositoryBase from Src.BioDataManagement.CrossCutting.DTOs.DnaMethylationSampleDto import DnaMethylationSampleDto from Src.BioDataManagement.CrossCutting.Filters import F...
#!/usr/bin/python #------------------------------------------------------------------------------ # # Copyright (C) 2016 Cisco Systems, Inc. # # 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 Fou...
import calendar from datetime import ( date, datetime, time, ) import locale import unicodedata import numpy as np import pytest import pytz from pandas._libs.tslibs.timezones import maybe_get_tz from pandas.core.dtypes.common import ( is_integer_dtype, is_list_like, ) import pandas as pd from p...
""" Demo platform that has two fake switches. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ import logging from time import sleep import voluptuous as vol from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) from homeassis...