gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # -*- coding: utf-8 -*- """Invoke tasks. To run a task, run ``$ invoke <COMMAND>``. To see a list of commands, run ``$ invoke --list``. """ import os import sys import code import platform import subprocess import logging from time import sleep import invoke from invoke import run, Collection fr...
# -*- coding: utf-8 -*- # # 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 #...
#!/usr/bin/python import argparse import logging import time import sys import operator import random import getpass import os.path import POGOProtos.Enums.PokemonMove_pb2 as PokemonMove_pb2 from collections import Counter from custom_exceptions import GeneralPogoException from api import PokeAuthSession from locatio...
from globals import * import alife import logging import random import os def prettify_string_array(array, max_length): """Returns a human readable string from an array of strings.""" _string = '' _i = 0 for entry in array: if len(_string) > max_length: _string += ', and %s more.' % (_i+1) break ...
#! /usr/bin/env python # $Id: unicode2rstsubs.py 5618 2008-07-28 08:37:32Z strank $ # Author: David Goodger <goodger@python.org> # Copyright: This program has been placed in the public domain. """ unicode2subfiles.py -- produce character entity files (reSructuredText substitutions) from the W3C master unicode.xml fil...
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains from Selenium2Library import utils from Selenium2Library.locators import ElementFinder from keywordgroup import KeywordGroup class _ElementKeywords(KeywordGroup): def __init__(self): self._elem...
# Custom rate is calculated for unique events in the simulation # Author = Thomas Davis, email = txd283@bham.ac.uk / University of Birmingham # This rate calculator has a full implementation of the pair interaction method # for up to second nearest neighbours # Cu and Vacancies clustering works # Only first neighbour h...
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
# pylint: disable=invalid-name ##################################################################### #This software was developed by the University of Tennessee as part of the #Distributed Data Analysis of Neutron Scattering Experiments (DANSE) #project funded by the US National Science Foundation. #See the license tex...
#/u/GoldenSights import bot import bot3 import datetime import praw4 as praw import prawcore import random import requests import sqlite3 import string import sys import time import traceback import types USERAGENT = ''' /u/GoldenSights Usernames data collection: Gathering the creation dates of user accounts for visua...
"""Entry point for the server application.""" import logging import json import uuid # import time import redis from gevent.wsgi import WSGIServer from flask import request, Response, jsonify from datetime import datetime from pytz import timezone, utc from tzlocal import get_localzone from .config import configure_ap...
# The Admin4 Project # (c) 2013-2014 Andreas Pflug # # Licensed under the Apache License, # see LICENSE.TXT for conditions of usage import wx.lib.ogl as wxOgl import math import wx from wh import GetBitmap BMP_BORDER=3 ARROWMARGIN=5 wxOgl.OGLInitialize() def round(n): return int(n+.5) class ExplainText(wx.Text...
# # 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...
import csv import decimal from datetime import date from decimal import Decimal import random import json from django.http import QueryDict from pytest import mark from django.urls import reverse from django.conf import settings from django.utils import timezone from freezegun import freeze_time import responses fr...
#! /usr/bin/env python """Test script for the imageop module. This has the side effect of partially testing the imgfile module as well. Roger E. Masse """ from test.test_support import verbose, unlink, import_module, run_unittest imageop = import_module('imageop', deprecated=True) import uu, os, unittest SI...
""" ------------ PyMine 1.0.1 ------------ PyMine lets you integrate and visualize biological data used for drug discovery using PyMOL. ------------ REQUIREMENTS ------------ 1) Ubuntu 11.04 or above OR Mac OS X 10.7 or above 2) Pymol 1.7 or above 3) PyMine 1.0.1 ------------ INSTALLATION ------------ 1) Download an...
# # 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 us...
import os import re import warnings from ctypes import c_char_p from django.contrib.gis.geoip.libgeoip import GEOIP_SETTINGS from django.contrib.gis.geoip.prototypes import ( GeoIP_country_code_by_addr, GeoIP_country_code_by_name, GeoIP_country_name_by_addr, GeoIP_country_name_by_name, GeoIP_database_info,...
# Copyright 2012 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...
# -*- coding: utf-8 -*- # Copyright 2021 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 o...
# Copyright (c) 2016 IBM Corporation # 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 req...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Test the discrete_domain utilities. Caveat assumes that the MNI template image is available at in ~/.nipy/tests/data """ import numpy as np from numpy.testing import assert_almost_equal, assert_equal ...
""" Copyright 2017-present Airbnb, 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, sof...
# 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 ...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # 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...
# MathObject.py import copy import datetime from MathException import MathException class MathObject(object): TYPE_NUMERIC_SCALAR_CONSTANT = 'TYPE_NUMERIC_SCALAR_CONSTANT' TYPE_SYMBOLIC_SCALAR_CONSTANT = 'TYPE_SYMBOLIC_SCALAR_CONSTANT' TYPE_SYMBOLIC_VECTOR_CONSTANT = 'TYPE_SYMBOLIC_VECTOR_CONSTANT' T...
# Copyright 2013 dotCloud 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 t...
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014-2015 The Brain developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-bitcoinrpc to module se...
import numpy as NP import astropy.cosmology as CP import scipy.constants as FCNST import argparse import yaml import astropy from astropy.io import fits, ascii import progressbar as PGB import matplotlib.pyplot as PLT import matplotlib.colors as PLTC import matplotlib.cm as CM from matplotlib.ticker import FuncFormatte...
""" This module attempts to make it easy to create VTK-Python unittests. The module uses unittest for the test interface. For more documentation on what unittests are and how to use them, please read these: http://www.python.org/doc/current/lib/module-unittest.html http://www.diveintopython.org/roman_divein.h...
#------------------------------------------------------------------------------- # Copyright 2017 Cognizant Technology Solutions # # 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:...
# Copyright 2016 Quantopian, 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 writ...
""" The ArcREST API allows you to perform administrative tasks not available in the Portal for ArcGIS website. The API is organized into resources and operations. Resources are entities within Portal for ArcGIS that hold some information and have a well-defined state. Operations act on these resources and update their ...
""" BSD 3-Clause License Copyright (c) 2017, Gilberto Pastorello All rights reserved. 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, this list of ...
# 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 # d...
"""Unit tests for reviewboard.admin.views.dashboard.""" from __future__ import unicode_literals from django.utils import six from kgb import SpyAgency from reviewboard.admin.views import logger from reviewboard.admin.widgets import BaseAdminWidget, admin_widgets_registry from reviewboard.testing.testcase import Test...
#!/usr/bin/env python # # Copyright 2009 The Closure Library 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 ...
from Cocoa import NSStringPboardType, NSDragOperationMove, NSArray import vanilla from defconAppKit.windows.baseWindow import BaseWindowController from defconAppKit.windows.progressWindow import ProgressWindow from lib.scripting.codeEditor import CodeEditor from robofab.world import AllFonts class ProcessFonts(BaseWin...
# Copyright 2018 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) 2013 Huawei Technologies Co., Ltd. # Copyright (c) 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:/...
# # # ================================================================= # ================================================================= """VirtualIOServer interface.""" import xml.etree.ElementTree as ElementTree from xml.etree.ElementTree import Element from eventlet import greenthread import os import errno fr...
from django.db import transaction from django.conf import settings from django.contrib import admin from django.contrib.auth.forms import (UserCreationForm, UserChangeForm, AdminPasswordChangeForm) from django.contrib.auth.models import User, Group from django.contrib import messages from django.core.exceptions imp...
# -*- coding: utf-8 -*- """ flaskbb.forum.views ~~~~~~~~~~~~~~~~~~~~ This module handles the forum logic like creating and viewing topics and posts. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import datetime from flask import (Blueprint, redirec...
import errno import os import requests import sys import signal import webbrowser from contextlib import closing from distutils.version import StrictVersion from functools import partial from itertools import chain from time import sleep from streamlink import (Streamlink, StreamError, PluginError, ...
""" Results for VARMAX tests Results from Stata using script `test_varmax_stata.do`. See also Stata time series documentation, in particular `dfactor`. Data from: http://www.jmulti.de/download/datasets/e1.dat Author: Chad Fulton License: Simplified-BSD """ lutkepohl_dfm = { 'params': [ .0063728, .00660...
# Software License Agreement (BSD License) # # Copyright (c) 2010, Willow Garage, Inc. # All rights reserved. # # 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 (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' # 1st set up logging import logging import logging.config import time as _time import tempfile as _tempfile import os as _os from .queue_channel...
import tempfile import genonets.test.utils as utils import genonets.test.compare_result_files as comparator from genonets.cmdl_handler import CmdParser from genonets.interface import Genonets from genonets.constants import AnalysisConstants as Ac class TestPaths: @staticmethod def run_test(cmd_args, ground...
#!/usr/bin/env python # # Copyright 2012 The Closure Linter 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 # #...
""" mbed SDK Copyright (c) 2011-2015 ARM Limited 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 writin...
######## ######## # Hi there, curious student. # # # # This submission script downloads some tests, # # runs the tests against your code, # #and then sends the results to a server for g...
# -*- coding: utf-8 -*- import sys, traceback, time, threading, os, base64, logging import spotify import spotipy from spotify.manager import SpotifySessionManager, SpotifyPlaylistManager, \ SpotifyContainerManager from spotipy.core.basewrapper import BaseWrapper import spotifyplaylist from spotipy.backends.local...
# coding: utf8 import logging import os import sys from argparse import ArgumentParser, Namespace from datetime import datetime from pathlib import Path from appdirs import AppDirs from gphotos import Utils from gphotos.authorize import Authorize from gphotos.Checks import do_check, get_check from gphotos.GoogleAlbums...
# Copyright 2017 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...
""" Synthetic data loaders for testing. """ from bcolz import ctable from numpy import ( arange, array, float64, full, iinfo, uint32, ) from pandas import DataFrame, Timestamp from six import iteritems from sqlite3 import connect as sqlite3_connect from .base import PipelineLoader from .frame ...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
import datetime from bitmovin import Bitmovin, Encoding, S3Output, H264CodecConfiguration, AACCodecConfiguration, H264Profile, \ StreamInput, SelectionMode, Stream, EncodingOutput, ACLEntry, ACLPermission, MuxingStream, \ S3Input, FairPlayDRM, TSMuxing, HlsManifest, AudioMedia, VariantStream from bitmovin.error...
import math import datetime import json import vcr from dateutil.tz import tzutc from behave import when, then from hamcrest import assert_that, has_length, equal_to, has_item @when('a search for "{keywords}" keywords is performed') @vcr.use_cassette('fixtures/cassettes/search-keyword.yaml', record_mode='new_episodes...
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Jun 5 2014) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### impo...
import sys class rect: def __init__(self, x = 0, y = 0, w = 0, h = 0): self.x = x self.y = y self.w = w self.h = h def size(self): return self.w, self.h def pos(self): return self.x, self.y def xyxy(self): return self.x, self.y, self.get_right...
from __future__ import unicode_literals import io import os import subprocess import time from .common import AudioConversionError, PostProcessor from ..compat import ( compat_subprocess_get_DEVNULL, ) from ..utils import ( encodeArgument, encodeFilename, get_exe_version, is_outdated_version, ...
#!/usr/bin/env python # NoaArbel edited plot_training_log.py # There is an option to plot two graphs in the same image (such as training and test loss vs inters) import inspect import os import random import sys import matplotlib.cm as cmx import matplotlib.colors as colors import matplotlib.pyplot as plt import matplo...
import os import io import ctypes import struct import socket import logging import binascii import threading DOES_EXIST_RESPONSE_YES = 1 DOES_EXIST_RESPONSE_NO = 2 OPCODE_GET = 1 OPCODE_DOES_EXIST = 3 OPCODE_GET_LABEL = 12 OPCODE_LIST_LABELS = 13 OPCODE_ACK = 0xAC HASH_ALGORITHM_SHA1 = 2 class FakeServer(threading...
# # Module which supports allocation of ctypes objects from shared memory # # multiprocessing/sharedctypes.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # from __future__ import absolute_import import ctypes import sys import weakref from . import heap from . import get_co...
# Copyright 2012 10gen, 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...
# # Copyright 2015 LinkedIn 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/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
"""Terminal reporting of the full testing process. This is a good source for looking at the various reporting hooks. """ import argparse import datetime import inspect import platform import sys import warnings from collections import Counter from functools import partial from pathlib import Path from typing import An...
# Modified from https://github.com/lisa-lab/DeepLearningTutorials/blob/master/code/convolutional_mlp.py # (c) 2010--2015, Deep Learning Tutorials Development Team # added functionality for saving the parameteres, reloading and testing the model on custom images. """This tutorial introduces the LeNet5 neural network arc...
""" Cisco_IOS_XR_tunnel_vpdn_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR tunnel\-vpdn package configuration. This module contains definitions for the following management objects\: vpdn\: VPDN configuration Copyright (c) 2013\-2016 by Cisco Systems, Inc. All rights reserved. """ ...
#!/bin/env python #-*-coding:utf-8-*- import os import sys import string import time import datetime import MySQLdb import logging import logging.config logging.config.fileConfig("etc/logger.ini") logger = logging.getLogger("alert_os") path='./include' sys.path.insert(0,path) import functions as func import sendmail im...
"""Provide functionality for TTS.""" import asyncio import functools as ft import hashlib import io import logging import mimetypes import os import re from typing import Dict, Optional from aiohttp import web import mutagen from mutagen.id3 import ID3, TextFrame as ID3Text import voluptuous as vol from homeassistant...
# 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 applicable law or agreed to in...
# Copyright 2015-2017 Capital One Services, 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 ...
# # MythBox for XBMC - http://mythbox.googlecode.com # Copyright (C) 2011 analogue@yahoo.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 2 # of the License, or (at yo...
import collections import json import random import re def num(s): try: return int(s) except ValueError: return float(s) # load a json file into a dictionary def load_json(filename): f = json.load(open(filename), object_pairs_hook=collections.OrderedDict) return f # generate an ent...
# This code is Copyright 2014-2017 by Pier Carlo Chiodi. # See full license in LICENSE file. # See TRANSFORMATIONS.md file for details import json from pierky.p2es.errors import P2ESError # Parse list of conditions c against data d. # Returns: True | False (conditions matched / did not match). # Raises exceptions:...
''' Players are Python objects with a ``__call__`` method defined to accept a Game instance as the sole argument. Players return None, and leave the input Game unmodified, except for its valid_moves attribute. This value may be replaced with another tuple containing the same moves, but sorted in decreasing order of pre...
import errno import logging import os import shutil from contextlib import contextmanager from datetime import timedelta from io import StringIO from django.conf import settings from django.contrib.auth import SESSION_KEY, HASH_SESSION_KEY, BACKEND_SESSION_KEY from django.contrib.auth.models import User from django.c...
#!/usr/bin/env python3 # Copyright 2017 gRPC 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...
# -*- coding: utf-8 -*- """Redis merge reader.""" import codecs from plaso.lib import definitions from plaso.storage import identifiers from plaso.storage import interface from plaso.storage import logger from plaso.storage.redis import redis_store class RedisMergeReader(interface.StorageMergeReader): """Redis sto...
#!/usr/bin/env python __author__ = 'greghines' import datetime import pymongo from geoip import geolite2 from pytz import timezone import pytz import time import IP2Location from time import mktime import pygeoip import csv import geoip2.webservice import socket # connect to the mongodb server client = pymongo.MongoCl...
from __future__ import with_statement import binascii import datetime import pytest import redis import time from redis._compat import (unichr, u, b, ascii_letters, iteritems, iterkeys, itervalues) from redis.client import parse_info from redis import exceptions from .conftest import skip_i...
import os import sys PY3 = sys.version_info[0] == 3 class ShamirSecret(object): """ This performs Shamir Secret Sharing operations in an incremental way that is useful for PolyPasswordHasher. It allows checking membership, genering shares one at a time, etc. Creates an object. One must provide...
# Copyright 2015 Google 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 by applicable law or agreed...
# $Id: __init__.py 7320 2012-01-19 22:33:02Z milde $ # Authors: Chris Liechti <cliechti@gmx.net>; # David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ S5/HTML Slideshow Writer. """ __docformat__ = 'reStructuredText' import sys import os import re import do...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Nov 22 16:15:28 2016 @author: login """ import pandas as pd import numpy as np import sys, os from sklearn.decomposition import PCA, TruncatedSVD, LatentDirichletAllocation from sklearn.preprocessing import StandardScaler from copy import deepcopy from ...
import random from diofant.combinatorics import Permutation from diofant.combinatorics.permutations import Perm from diofant.combinatorics.tensor_can import (bsgs_direct_product, canonicalize, dummy_sgs, get_symmetric_group_sgs...
#!/usr/bin/env python """ Signal I/O classes ================== Classes for reading and writing numpy [1]_ arrays containing sampled or time-encoded signals from and to HDF5 files using PyTables [2]_. - ReadArray, WriteArray - I/O classes for basic types. - ReadSignal, WriteSignal ...
# Copyright (c) 2016 EMC Corporation # # 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 o...
''' The one parameter exponential family distributions used by GLM. ''' #TODO: quasi, quasibinomial, quasipoisson #see http://www.biostat.jhsph.edu/~qli/biostatistics_r_doc/library/stats/html/family.html # for comparison to R, and McCullagh and Nelder import numpy as np from scipy import special from scipy.stats impor...
# Copyright 2015 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...
#!/usr/bin/env python3 # # Copyright 2018 Red Hat, Inc. # # Authors: # Paolo Bonzini <pbonzini@redhat.com> # # This work is licensed under the MIT License. Please see the LICENSE file or # http://opensource.org/licenses/MIT. from collections import OrderedDict import json from django.contrib.auth.models import U...
# Copyright 2012 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 req...
""" Django settings for test_project project. Generated by 'django-admin startproject' using Django 1.11.8. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ from...
# Copyright 2015 Red Hat, 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 by...
""" Support for HydroQuebec. Get data from 'My Consumption Profile' page: https://www.hydroquebec.com/portail/en/group/clientele/portrait-de-consommation For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.hydroquebec/ """ import logging from datetime...
import random import tdl import dungeongenerator import game import instances import level import twitchchatmanager from scenes import scene class StartIntermissionEvent(object): def __init__(self): self.type = 'StartIntermission' class LevelScene(scene.Scene): instance = None def __init__(se...
import pandas as pd import glob import os import argparse import math import datetime as dt import numpy as np import shutil from string import Template def concatenate_csvs(path): all_files = glob.glob(os.path.join(path, "*.csv")) # advisable to use os.path.join as this makes concatenation OS independent ...
# Copyright 2011 OpenStack Foundation # Copyright 2013 Rackspace Hosting # 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/lice...
import prettytable import discord import os import re from urllib.parse import urlparse from PythonGists import PythonGists from discord.ext import commands from cogs.utils.checks import embed_perms, cmd_prefix_len '''Module for server commands.''' class Server: def __init__(self, bot): self.bot = bot ...