src
stringlengths
721
1.04M
""" Provides an asynchronous, crypto and compression aware socket for connecting to servers and processing incoming packet data. Coordinates with the Timers plugin to honor clock-time timers """ import logging import select import socket import time from Crypto.Cipher import AES from spock import utils from spock.mc...
#!/usr/bin/env python """[License: GNU General Public License v3 (GPLv3)] This file is part of FuMa. FuMa 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 opti...
# 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 ...
from const import * from shared.card import CARD_BLACK, CARD_WHITE, Card class CardPanel(wx.Panel): def __init__(self, parent, card_id=-1, size=(ELEMENT_SIZE, ELEMENT_SIZE), text="", card_type=CARD_WHITE): wx.Panel.__init__(self, parent=parent, size=size, na...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
#!/bin/python ############################# # Script to display test suite results ############################## import sys import os from sys import argv import xml.etree.ElementTree as ET def error(message): sys.stderr.write("error: %s\n" % message) #sys.exit(1) error_file = "resultados_error.log" f = op...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (C) 2015 The Sipwise Team - http://sipwise.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 Foundation, either version 3 of the License, or (at your option) # any later version. # This prog...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python # # Copyright (c) 2013 Greenhost VOF # https://greenhost.nl -\- https://greenhost.io # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Af...
#!/usr/bin/python from Adafruit_PWM_Servo_Driver import PWM from Adafruit_ADS1x15 import ADS1x15 import time, os, sys import Adafruit_DHT # HOW MANY CYCLES TO BE PERFORMED BEFORE SHOWING THE HIGH AND LOW SEQUENCE # SET TO 0 FOR OFF intervalHighLow = 60 # HOW LONG TO REST BETWEEN CYCLES - ZERO IS FINE intervalSleep = ...
"""Views for the embed app.""" import functools import json import logging import re from urllib.parse import urlparse from django.shortcuts import get_object_or_404 from django.template.defaultfilters import slugify from django.utils.functional import cached_property from docutils.nodes import make_id from pyquery i...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # Copyright (C) 2012 Doug Blank <doug.blank@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public...
""" This file is used to define classes that hold data for reading from the HDF5 files for MSD This code was provided by the MSD distributors to read the data. Thierry Bertin-Mahieux (2010) Columbia University tb2332@columbia.edu This code contains descriptors used to create HDF5 files for the Million Song Database Pr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # IkaLog # ====== # Copyright (C) 2015 Takeshi HASEGAWA, Junki MIZUSHIMA # # 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 psutil import re import os import time import logging from subprocess import check_call, STDOUT from shutil import copyfile from misc import Misc class DHClient: def __init__(self): self.logger = logging.getLogger("DNSWatch.DHClient") self.misc = Misc(self.logger) self.args = self...
# Generated by Django 3.2 on 2021-04-30 07:17 import django.core.validators from django.db import migrations, models import django.db.models.deletion import lucterios.framework.model_fields class Migration(migrations.Migration): dependencies = [ ('invoice', '0017_print_articlesituation'), ] ope...
''' Created on Apr 16, 2018 @author: Hendrik Rommeswinkel ''' import numpy as np from scipy.optimize import minimize from utility import Utility,Profit,GoodFactorUtility,CESUtility from technology import LinearTechnology from technology import DRSTechnology class Agent(object): ''' An agent conta...
# Copyright (C) 2011, 2012 Abhijit Mahabal # # 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 distribu...
import logging import sys from argparse import ArgumentParser from datetime import datetime from os import walk, path as op, listdir, access, X_OK, environ, pathsep from subprocess import check_call from sys import stdout from tempfile import mktemp from .settings import CFGNAME, TPLNAME, TPL_DIR, MOD_DIR from makesit...
import pandas as pd import geopandas as gpd import shapely as sp import numpy as np from scipy.spatial import Voronoi def convert_point_csv_to_data_frame(path, lat_key='lat', lon_key='lon', encoding='utf-8', separator='\t', decimal='.', index_col...
# Copyright 2012 OpenStack Foundation # # 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 w...
#!/usr/bin/env python """ MultiQC module to parse output from sequana""" import os import re import json from collections import OrderedDict # prevent boring warning (version 1.0) import logging logging.captureWarnings(True) from multiqc import config from multiqc.modules.base_module import BaseMultiqcModule from mul...
# -*- coding: utf-8 -*- # Entropy miscellaneous tools module """ @author: Fabio Erculiani <lxnay@sabayon.org> @author: Slawomir Nizio <slawomir.nizio@sabayon.org> @contact: lxnay@sabayon.org @copyright: Fabio Erculiani, Slawomir Nizio @license: GPL-2 B{Entropy dependency functions module}. ...
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from calibre.g...
# -*- coding: utf-8 -*- # © 2016 Esther Martín - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import api, fields, models from openerp.addons import decimal_precision as dp class MrpProductionProductLine(models.Model): _inherit = 'mrp.production.product.line' @api.de...
from __future__ import print_function from pytest import raises from test_pkg1.test_pkg2 import test_mod from aspectlib import PY2 from aspectlib.test import OrderedDict from aspectlib.test import Story from aspectlib.test import StoryResultWrapper from aspectlib.test import _Binds from aspectlib.test import _format_...
#!/usr/bin/env python #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl...
#!/usr/bin/env python import sys import numpy as np import argparse import matplotlib.pyplot as plt from spectraTools import timeSeriesFromFiles, spectraAnalysis from utilities import filesFromList ''' Kaimal & Finnigan: The requirements for averaging time T with T >> Tau_{\alpha} can then be expressed in terms of \si...
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
# Copyright 2010-2011 OpenStack Foundation # Copyright 2012-2013 IBM Corp. # 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/li...
import copy import random import time DEBUG = False inf = float("infinity") def adjacency_list_generator(): #adjacency_list adjacency_list = {} ij_list = [(i, j) for i in range(width) for j in range(height)] for (i, j) in ij_list: link_list = [] #link_list = {} for direction in...
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2007-2010 (ita) # Gustavo Carneiro (gjc), 2007 """ Support for Python, detect the headers and libraries and provide *use* variables to link C/C++ programs against them:: def options(opt): opt.load('compiler_c python') def configure(conf): conf.load('compile...
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import os import shutil import tempfile import unittest import six from mkdocs import config from mkdocs.config import config_options from mkdocs.exceptions import ConfigurationError from mkdocs.tests.base import dedent def ensure_utf(st...
# -*- coding: utf-8 -*- # Copyright 2015 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 requi...
# Copyright 2020 kubeflow.org. # # 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,...
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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...
import os import pytest from pyraat import PraatAnalysisFunction from pyraat.parse_outputs import parse_track_script_output, parse_point_script_output from pyraat.exceptions import PyraatError def test_short_formant_track(praat_path, praat_script_test_dir, vowel_sound_file): script_path = os.path.join(praat_scri...
# 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 ...
import os import sys from build_feature_files import build_feature_files sys.path.insert(0, os.path.join(os.path.dirname(__file__), "humanrl")) if __name__ == "__main__": import argparse from humanrl import frame from humanrl.classifier_tf import (SavedCatastropheClassifierTensorflow, ...
#!/usr/bin/env python # this script outputs coverage per strain in a file that can be merged with T_kin_C_matrix_full.txt # USE: cov_fix.py import re infile="/lscr2/andersenlab/kml436/git_repos2/Transposons2/results/kinship/T_kin_C_matrix_full.txt" cov_file="/lscr2/andersenlab/kml436/git_repos2/Transposons2/results/k...
#-*-coding:utf-8-*- #1¡¢×Öµä dict = {'name': 'Zara', 'age': 7, 'class': 'First'} print "dict" ,dict #×ÖµäתΪ×Ö·û´®£¬·µ»Ø£º<type 'str'> {'age': 7, 'name': 'Zara', 'class': 'First'} print type(str(dict)), str(dict) #×Öµä¿ÉÒÔתΪԪ×飬·µ»Ø£º('age', 'name', 'class') print tuple(dict.keys()) #×Öµä¿ÉÒÔתΪԪ×飬·µ»Ø£º(7, ...
# -*- coding: utf-8 -*- # 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. import optparse import os import sys from optp...
import os import glob import lib2to3 from py2exe.build_exe import py2exe as build_exe class MediaCollector(build_exe): """ This class Adds jsonschema files draft3.json and draft4.json lib2to3 files Grammar.txt and PatternGrammar.txt to the list of compiled files so it will be included in th...
import pyfits from pylab import * from startup import weighted_mean as WM def data_in(file): """read XMM spectra file with columns CHANNEL,FLUX,ERROR""" fred = pyfits.open(file) table = fred[1].data fred.close() wave = table.field("CHANNEL") flux_l = table.field("FLUX") err = table.field("...
""" Parser generator utility. This script can generate a python script from a grammar description. Invoke the script on a grammar specification file: .. code:: $ ppci-yacc test.x -o test_parser.py And use the generated parser by deriving a user class: .. code:: import test_parser class MyParser(test...
''' * Created by Zhenia Syryanyy (Yevgen Syryanyy) * e-mail: yuginboy@gmail.com * License: this code is under GPL license * Last modified: 2017-10-18 ''' import sys import os from copy import deepcopy from collections import OrderedDict as odict from itertools import cycle from io import StringIO import inspect import ...
# Copyright (c) 2011-2015 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). from os.path import join from .roots import JS_ROOT, PROJECT_ROOT PIPELINE_COMPILERS = ( 'huxley.utils.pipeline.PySCSSCompiler', 'pipeline_browserify.compiler.B...
# import pyglet # import sys # from random import randint # # # class Chip8(pyglet.window.Window): # # def __init__(self): # # # General use registers # self.vx = 0x00 # self.vy = 0x00 # self.vz = 0x00 # self.v0 = 0x00 # # # Register used as a flag # ...
import string from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ from ..utils import get_random_string, load_solution_function class Adventure(BaseAdventure): title = _('Capturing') dictionary = string.ascii_lowercase + string.digits def t...
"""Wraps the best available JSON implementation available in a common interface""" import sys VERSION = (0, 3, 1) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Rune Halvorsen" __contact__ = "runefh@gmail.com" __homepage__ = "http://bitbucket.org/runeh/anyjson/" __docformat__ = "r...
# Copyright 2014 Netflix, 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...
## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner ## ## 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 v...
"""Filter clusters and quotes to clean to MemeTracker dataset. This module defines the :class:`ClusterFilterMixin` mixin which adds filtering capabilities to :class:`~.db.Cluster`, and the :func:`filter_clusters` function which uses that mixin to filter the whole MemeTracker dataset. A few other utility functions are ...
# Copyright (c) 2009-2011, 2013-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2010 Daniel Harding <dharding@gmail.com> # Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com> # Copyright (c) 2013-2014 Google, Inc. # Copyright (c) 2014-2021 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 20...
#!/usr/bin/env python # Copyright (c) 2014 Sergey Bunatyan <sergey.bunatyan@gmail.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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# -*- coding: utf-8 -*- # Written (W) 2008-2012 Christian Widmer # Written (W) 2008-2010 Cheng Soon Ong # Written (W) 2012-2014 Daniel Blanchard, dblanchard@ets.org # Copyright (C) 2008-2012 Max-Planck-Society, 2012-2014 ETS # This file is part of GridMap. # GridMap is free software: you can redistribute it and/or m...
"""Main file for HassIO.""" import asyncio import logging import aiohttp import docker from .addons import AddonManager from .api import RestAPI from .host_control import HostControl from .const import ( SOCKET_DOCKER, RUN_UPDATE_INFO_TASKS, RUN_RELOAD_ADDONS_TASKS, RUN_UPDATE_SUPERVISOR_TASKS, RUN_WATCHDOG_H...
#!/usr/bin/env python3 import getpass import argparse import shutil from core.databaseManager import DatabaseManager from core.securityModule import SecurityModule def processFile(file_in_name, file_out_name, encrypt_flag): user = input("CLOUD-IN-ONE Username: ") password = getpass.getpass() databaseMa...
""" Second-Hand-Shop Project @author: Malte Gerth @copyright: Copyright (C) 2015 Malte Gerth @license: MIT @maintainer: Malte Gerth @email: mail@malte-gerth.de """ import re from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.sites.shortcuts ...
from cgen.blocks import * def test_basic_function(): src = SourceFile() with src.function('main', Type('int'), [Variable('argc', Type('int')), Variable('argv', Type('char').pointer().pointer())]) as f: f.variable('foo', Type('int'), value=42) f.return_statement(0) assert f.output() == \...
from __future__ import unicode_literals __author__ = 'luissaguas' import frappe from frappe import _ """ HOOKS: jasper_after_sendmail(data, url, file_name, file_path); jasper_before_sendmail(data, file_name, output, url, **kargs); jasper_after_get_report(file_name, file_output, url, filepath); jasper_before_get_...
""" Instruction: 0 = Forwards 1 = Backwards 2 = left 3 = right 4 = pause 5 = finished """ class DanceProgram(object): instructionSequence = "" instructionPointer = 0 loopIterationCounters = [] loopLimits = [] loopJumpBackIndices = [] def __init__(self, instructionSequence): self.instr...
import logging import time import os from virttest import utils_misc, aexpect, utils_net, openvswitch, ovs_utils from virttest import versionable_class, data_dir from autotest.client.shared import error def allow_iperf_firewall(machine): machine.cmd("iptables -I INPUT -p tcp --dport 5001 --j ACCEPT") machine....
# -*- coding: utf-8 -*- from __future__ import unicode_literals from ..interface import BrokerInterface from distributed_task import settings from distributed_task.core.serializer import serialize, deserialize from distributed_task.models import Message import time class DatabaseMessageBroker(BrokerInterface): ...
# setup.py for planar # # $Id$ import os import sys import shutil from distutils.core import setup, Extension try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: if sys.version_info >= (3, 0): raise ImportError("build_py_2to3 not found in distutils - it is require...
#!/usr/bin/python """ Google AJAX Search Module http://code.google.com/apis/ajaxsearch/documentation/reference.html Needs Python 2.6 or later """ try: import json except ImportError, e: print e exit() import sys import urllib import logging import argparse __author__ = "Nikhil. R" __version__ = "0.2" URL ...
from django.test import TestCase from mock import patch from sample_app.models import TestRealm from ..models import Generator, GenerationTime, Ready, Pause class TimedGenerationTestCase(TestCase): def setUp(self): from .. import tasks self.timed_generation = tasks.timed_generation self....
import re import time import itertools from datetime import datetime import lxml.html from billy.scrape.bills import BillScraper, Bill from .actions import Categorizer class MABillScraper(BillScraper): jurisdiction = 'ma' categorizer = Categorizer() def __init__(self, *args, **kwargs): super(M...
"""Support for LED lights.""" import logging from typing import Any, Callable, List, Optional, Tuple from wled import WLED, Effect, WLEDError from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_HS_COLOR, ATTR_TRANSITION, ATTR_WHITE_VALUE, SUPPOR...
import os import pytest from res.enkf.enums import EnkfRunType from res.enkf import ErtRunContext from res.enkf.config import CustomKWConfig from res.enkf.data import CustomKW from res.enkf.enkf_simulation_runner import EnkfSimulationRunner from res.enkf.export import custom_kw_collector from res.enkf.export.custom_k...
# Copyright 2014-2015 SpendRight, 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 wri...
#!/usr/bin/env python #import RPIO as GPIO import RPi.GPIO as GPIO from RPIO import PWM import RPIO import rospy from geometry_msgs.msg import Twist class MotorDriverL9110S: # Broadcom pin outs # https://www.element14.com/community/servlet/JiveServlet/previewBody/73950-102-10-339300/pi3_gpio.png le...
#!/usr/bin/env python3 # # Copyright (c) 2015 - 2021, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, th...
#!/usr/bin/env python #Copyright (C) 2009-2010 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # #This file is part of Shinken. # #Shinken is free software: you can redistribute it and/or modify...
#!/usr/bin/env python # A plugin to check gamma radiation levels in Iceland # It fetches eurdep messages from opid-ftp.gr.is # You need to have eurdep module installed (pip install eurdep) import sys from ftplib import FTP import os import eurdep import datetime import time datadir="/tmp/eurdep-data" ftp = FTP('opid...
import data.model import function import kernel.action class controller(function.function): def list(self): datasource = self.get_data_source() sql = """ SELECT * FROM function_contact_entities WHERE deleted IS NUL...
# Copyright 2018-2019 RedHat Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
#! /usr/bin/env python2.4 # -*- coding: utf-8 -*- # Flrn-gtk: fenêtre principale # Rémy Oudompheng, Noël 2005 import os import sys import time, re import socket # Modules GTK import pygtk pygtk.require('2.0') import gtk import gtk.gdk import gobject import pango from tempfile import mkstemp # Modules from grp_buffe...
# -*- coding: utf-8 -*- # (c) 2017 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, api class HrContract(models.Model): _inherit = 'hr.contract' @api.multi def _generate_calendar_from_wizard(self, year): analytic_line_obj...
import os.path import sys import numpy as np import pandas as pd import random import collections from sklearn.feature_selection import SelectKBest, chi2 sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from github_analysis_tool.services.database_service import DatabaseSer...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
#!/usr/bin/env python import paho.mqtt.client as mqtt from pyA10Lime import i2c import time ''' Overall design of the program: Set up mqtt set up the PCA9685 sub to relevent channels how do channels work? devID/controllerID/pinNum maybe? so A10-1/0x42/4 would reference pyA10 number 1, with a controller addresse...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from matplotlib.colors import ( ColorConverter, LinearSegmentedColormap, ListedColormap) __author__ = "Yuji Ikeda" def create_colors_inter...
import codecs from functools import wraps import re import textwrap from typing import Dict, List import warnings import numpy as np import pandas._libs.lib as lib import pandas._libs.ops as libops from pandas.util._decorators import Appender, deprecate_kwarg from pandas.core.dtypes.common import ( ensure_object...
# sysprep.py - utility functions for system prep # # Copyright (C) 2012 Red Hat 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 Foundation; either version 2 of the License, or # (at your option) any ...
import os from uuid import UUID import pytest from notifications_utils.base64_uuid import ( base64_to_bytes, base64_to_uuid, bytes_to_base64, uuid_to_base64, ) def test_bytes_to_base64_to_bytes(): b = os.urandom(32) b64 = bytes_to_base64(b) assert base64_to_bytes(b64) == b @pytest.mark...
# -*- coding: utf-8 -*- """ Created on Fri Nov 28 17:28:20 2014 @author: xavi783 """ import json import numpy as np import pandas as pd import pandas.io.data as web import datetime as dt from tornado.web import RequestHandler START_DATE=dt.datetime(2000,1,1) NAMES = ['AAPL','XOM','MSFT','JNJ','BRK.B','WFC','GE','PG'...
import re import requests,time import base64 import xbmc,xbmcaddon from ..scraper import Scraper from ..common import clean_search, clean_title,send_log,error_log dev_log = xbmcaddon.Addon('script.module.universalscrapers').getSetting("dev_log") from ..modules import cfscrape class cinemamega(Scraper): domains = ...
""" Copyright (C) <2010> Autin L. TSRI This file git_upy/cinema4d/r14/c4dUI.py is part of upy. upy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
from citrination_client.models.design.constraints.base import BaseConstraint from citrination_client.base.errors import CitrinationClientError class ElementalInclusionConstraint(BaseConstraint): """ Constraint class which allows the assertion that a set of elements is included in the candidate composition...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ proofchecker ~~~~~ :copyright: (c) 2014-2015 by Halfmoon Labs, Inc. :copyright: (c) 2016 blockstack.org :license: MIT, see LICENSE for more details. """ import os import sys import json import unittest import requests # Hack around absolute paths c...
# -*- coding: utf-8 -*- from openerp import api, models from openerp.addons.training_management.models.model_names import ModelNames from openerp.addons.training_management.utils.date_utils import DateUtils class TrainerWorkloadAnalyzer(models.AbstractModel): _name = ModelNames.TRAINER_WORKLOAD_ANALYZER @ap...
from __future__ import division class SummaryStats(): def __init__(self, players_stats, cost_baseline, sample_size, sample_trim): self.players_stats = players_stats self.cost_baseline = cost_baseline self.sample_size = sample_size self.sample_trim = sample_trim self.sample_...
# -*- coding: utf-8 -*- # Copyright © 2013-2016 Damián Avila, Chris Warrick and others. # 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 #...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). """Support for both Java and Scala.""" from pants.backend.jvm.artifact import Artifact from pants.backend.jvm.ossrh_publication_metadata import ( Developer, License, OSSRHPubl...
#!/usr/bin/env python """Utilities to generate HTML from an image. Can be called from commandline. Usage: gen_html.py image.png """ from PIL import Image import os import sys import image, dmc_colors import color_map import color def _GetTextColor(bg_color): average = sum(bg_color) / float(len(bg_color)) aver...
from __future__ import division # -*- coding: utf-8 -*- """ Written by Daniel M. Aukes. Email: danaukes<at>seas.harvard.edu. Please see LICENSE.txt for full license. """ import popupcad import numpy from popupcad.filetypes.popupcad_file import popupCADFile try: import itertools.izip as zip except ImportError: ...
import unittest from roman_numerals import RomanNumber class RomanNumeralsTest(unittest.TestCase): def testConvertOneFromDecimalToRoman(self): self.__decimalToRoman("I", 1) def testConvertTwoFromDecimalToRoman(self): self.__decimalToRoman("II", 2) def testConvertThreeFromDecimalToRoman(self): se...