text stringlengths 2 999k |
|---|
import numpy as np
from bokeh.models import Legend, LegendItem
from bokeh.plotting import figure, output_file, show
from bokeh.sampledata.stocks import AAPL, MSFT
def datetime(x):
return np.array(x, dtype=np.datetime64)
p = figure(background_fill_color="#fafafa", x_axis_type="datetime",
plot_width=80... |
# 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, ... |
# Copyright 2017 Workiva
# 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
#... |
"""
This file runs the main training/val loop
"""
import os
import json
import math
import sys
import pprint
import torch
from argparse import Namespace
sys.path.append(".")
sys.path.append("..")
from options.train_options import TrainOptions
from training.coach import Coach
def main():
opts = TrainOptions().parse... |
#!/usr/bin/env python
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Copyright (c) 2018 The LightCoinPay developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_lit... |
# Baseline setting in which there are only two agents
# - no evolution
import pickle
import argparse
import sys
import torch
import os
import time
from torch.utils import data
from datasets.message_dataset import MessageDataset
from enums.dataset_type import DatasetType
from enums.image_property import ImageProperty... |
from multiprocessing import Pool, cpu_count, freeze_support
import numpy as np
import pandas as pd
import pyam
import silicone.database_crunchers as dc
"""
This script measures how accurate the different crunchers are at recreating known data.
We remove the data of interest, infill to find it and compare the true a... |
import copy
import datetime
from django.core.exceptions import FieldError
from django.db.backends import utils as backend_utils
from django.db.models import fields
from django.db.models.query_utils import Q
from django.utils import six
from django.utils.functional import cached_property
class Combinable(object):
... |
from setuptools import setup
from codecs import open
from os import path
setup_dir = path.abspath(path.dirname(__file__))
with open(path.join(setup_dir, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='rocky',
version='1.0.2.dev0',
description='Better command line progr... |
from flask_wtf import FlaskForm
from wtforms import ValidationError, Form
from wtforms.ext.sqlalchemy.fields import QuerySelectField
from wtforms.fields import (
PasswordField,
StringField,
SubmitField,
TextAreaField,
FieldList,
FormField
)
from wtforms.fields.html5 import (
EmailField,
... |
"""
This module is an abstraction on top of the low-level 7k records, which allows
the user to work in terms of "pings" with associated data, instead of thinking
in the traditional 7k records.
Expected order of records for a ping:
7000, 7503, 1750, 7002, 7004, 7017, 7006, 7027, 7007, 7008, 7010, 7011, 7012,
7013, 7018... |
# This file is part of the pyMOR project (http://www.pymor.org).
# Copyright 2013-2019 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
import numpy as np
from pymor.core.cache import cached
from pymor.grids.interfaces import AffineG... |
#-
# Copyright (c) 2011 Steven J. Murdoch
# Copyright (c) 2013-2016 Alexandre Joannou
# Copyright (c) 2014 Jonathan Woodruff
# All rights reserved.
#
# This software was developed by SRI International and the University of
# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
# ("CTSRD"), as part o... |
#!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL Python samples
# Purpose: Script to read coordinate system and geotransformation matrix
# from input file and report latitude/longitude coordinates for the
# specified pix... |
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
import ezc3d
from pyomeca import Markers
import numpy as np
class LoadEvent:
def __init__(self, c3d_path: str):
self.c3d_path = c3d_path
self.c3d = ezc3d.c3d(c3d_path)
def get_time(self, idx: int) -> np.ndarray:
"""
find the time corresponding to the event
Parameters:... |
"""Plugwise platform for Home Assistant Core."""
import asyncio
from datetime import timedelta
import logging
from typing import Dict
from Plugwise_Smile.Smile import Smile
import async_timeout
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CO... |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
# coding=utf-8
# --------------------------------------------------------------------------
# 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 ... |
import insightconnect_plugin_runtime
from .schema import AddAttributeInput, AddAttributeOutput
# Custom imports below
class AddAttribute(insightconnect_plugin_runtime.Action):
def __init__(self):
super(self.__class__, self).__init__(
name="add_attribute",
description="Add an attri... |
from ethereum.tools import tester
from ethereum.tools.tester import TransactionFailed
from utils import longToHexString, stringToBytes, twentyZeros, thirtyTwoZeros, bytesToHexString
from pytest import fixture, raises
def test_universe_creation(localFixture, mockReputationToken, mockReputationTokenFactory, mockUniverse... |
#!/usr/bin/python
# this script exports images from the plain image log to png files
import os
import sys
import getopt
import math
import numpy
from PIL import Image
from PIL import PngImagePlugin
import matplotlib.pyplot as plt
# for fast processing
import multiprocessing as mp
def image_from_data(data, width, h... |
import json
from hashlib import sha256
from collections import Counter
from inputimeout import inputimeout, TimeoutOccurred
import tabulate, copy, time, datetime, requests, sys, os, random
BOOKING_URL = "https://cdn-api.co-vin.in/api/v2/appointment/schedule"
BENEFICIARIES_URL = "https://cdn-api.co-vin.in/api/v2/appoin... |
# -* coding: utf-8 -*-
#
# profiler : a Wi-Fi client capability analyzer tool
# Copyright : (c) 2020-2021 Josh Schmelzle
# License : BSD-3-Clause
# Maintainer : josh@joshschmelzle.com
"""
profiler.helpers
~~~~~~~~~~~~~~~~
provides init functions that are used to help setup the app.
"""
# standard library imports
imp... |
#!/usr/bin/env python
"""
Copyright (c) 2009 Kevin Dunglas <dunglas@gmail.com>
"""
import sys
from twisted.internet import reactor
from twittytwister import twitter
import oauth
def gotUser(user):
print "User: %s (%s)" % (user.name, user.screen_name)
un=None
if len(sys.argv) > 5:
un=sys.argv[5]
consume... |
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... |
# ___________________________________________________________________________
#
# Prescient
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
# This software is ... |
import torch
import torchvision
from torch import optim,nn
import visdom
from torch.utils.data import DataLoader
from poken import Pokemon
from resnet import Resnet18
batchsz=32
lr=1e-3
epochs=10
device=torch.device('cuda' if torch.cuda.is_available() else 'cpu')
torch.manual_seed(1234)
train_db=Pokemon('D:\BaiduNetdi... |
from pyml.keywords import true
from pyml.widgets.item import Item
class Window(Item):
def _init_raw_props(self):
super()._init_raw_props()
self.color = '#ffffff'
self.visile = true
def _init_custom_props(self):
self.size = (0, 0)
|
from tests.helpers import add_component_to_file
from PySide2.QtGui import QVector3D
from nexus_constructor.component.component import Component
def test_linked_component_is_none_1(nexus_wrapper):
component1 = add_component_to_file(nexus_wrapper, "field", 42, "component1")
assert component1.transforms.link.lin... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 5 09:05:19 2019
@author: Rajiv Sambasivan
"""
class ManagedServiceConnParam:
@property
def DB_SERVICE_HOST(self):
return "DB_service_host"
@property
def DB_SERVICE_END_POINT(self):
return "DB_end_point"
@prop... |
# Training points selection
# Selects the points that will be used inside the gaussian process
# source: https://github.com/nestordemeure/tabularGP/blob/master/trainset_selection.py
from torch import Tensor, nn
import torch
from fastai.torch_basics import * # for pytorch to tensor conversion
__all__ = ['trainset_of_d... |
#
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
# @generated
#
from __future__ import absolute_import
import six
from thrift.util.Recursive import fix_spec
from thrift.Thrift import *
from thrift.protocol.TProtocol import TProtocolException
import includes.ttypes
i... |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
"""
Add multiscale image
====================
Displays a multiscale image
"""
from skimage import data
from skimage.transform import pyramid_gaussian
import napari
import numpy as np
# create multiscale from astronaut image
base = np.tile(data.astronaut(), (8, 8, 1))
multiscale = list(
pyramid_gaussian(base, do... |
# Model Params
model = 'robnet_large_v2'
model_param = dict(C=64,
num_classes=10,
layers=33,
steps=4,
multiplier=4,
stem_multiplier=3,
share=True,
AdPoolSize=1)
# Dataset Params
dataset ... |
"""
Constant definitions used by other modules
"""
from os import getenv, getcwd
import rascsi.common_settings
WEB_DIR = getcwd()
HOME_DIR = "/".join(WEB_DIR.split("/")[0:3])
AFP_DIR = f"{HOME_DIR}/afpshare"
MAX_FILE_SIZE = getenv("MAX_FILE_SIZE", str(1024 * 1024 * 1024 * 4)) # 4gb
ARCHIVE_FILE_SUFFIX = "zip"
# ... |
from .gui import GUI
import tkinter as tk
import configparser
from pathlib import Path
def main():
config_path = Path(__file__).parent / "config.ini"
config = configparser.ConfigParser()
config.read(config_path)
root = tk.Tk()
root.geometry("1280x700")
GUI(root, config)
root.mainloop()
i... |
from datetime import time
def run_example():
lessons_start = time(8, 15, 0)
print(f"Lekcje zaczynają się o {lessons_start}")
lessons_start = time(hour=8, minute=15, second=0)
print(f"Lekcje zaczynają się o {lessons_start}")
lessons_start = time(hour=8, minute=15)
print(f"Lekcje zaczynają się... |
# Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... |
# coding: utf-8
"""
Argo
Python client for Argo Workflows # noqa: E501
OpenAPI spec version: 2.5.0-rc10
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class V1alpha1RetryStrategy(object):
"""NOTE: This class is auto... |
#!/usr/bin/python
# -*- coding:utf-8 -*-
from com.obs.models.base_model import BaseModel,BASESTRING
from com.obs.models.expiration import Expiration,NoncurrentVersionExpiration
class Rule(BaseModel):
'''
classdocs
'''
allowedAttr = {'id': BASESTRING, 'prefix': BASESTRING, 'status': BASESTR... |
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "thor-explorer"
PROJECT_SPACE_DIR = "/... |
"Thread-safe in-memory cache backend."
import time
from contextlib import contextmanager
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.utils.synch import RWLock
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
# G... |
#coding:utf-8
# Copyright (c) 2019 PaddlePaddle 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 r... |
from django.urls import path
from common import views
app_name = "api_common"
urlpatterns = [
path("dashboard/", views.ApiHomeView.as_view()),
path("auth/register/", views.RegistrationView.as_view()),
path("auth/login/", views.LoginView.as_view()),
path("auth/companies-list/", views.OrganizationList... |
# 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 u... |
# material.py
# Parse MTL files.
import sys, os
matNameChars = "._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
def parseMaterialFile(matfile, textureNames):
f = open(matfile, "r")
lines = f.read().splitlines()
f.close()
materials = {}
currentMaterial = {}
currentMaterialName = ""
for line... |
def mul(cur_num,x):
cur_num=cur_num[::-1]
carry=0
for i in range(0,len(cur_num)):
temp=cur_num[i]*x+carry
cur_num[i]=temp%10
carry=temp//10
if i+1==len(cur_num) and carry!=0:
cur_num.append(carry)
return cur_num[::-1]
def fact(n):
cur_num=[1]
for i in... |
'''
After running forced_photom.py on a set of CCDs, this script merges
the results back into a catalog.
'''
from astrometry.util.fits import *
import numpy as np
from glob import glob
from collections import Counter
from legacypipe.survey import LegacySurveyData
fns = glob('forced/*/*/forced-*.fits')
F = merge_table... |
from flask_restplus.namespace import Namespace
from restplus.api.v1.users.all_users import AllUsers
from restplus.api.v1.users.single_user import SingleUser
from restplus.api.v1.users.single_user_all_posts import SingleUserAllPosts, post_model
from restplus.api.v1.users.single_user_single_post import SingleUserSingleP... |
'''
XlPy/MS1Quantitation/Extraction/core
____________________________________
Core module to extract and process MS1 scans to extracted ion
chromatograms, or XICs.
:copyright: (c) 2015 The Regents of the University of California.
:license: GNU GPL, see licenses/GNU GPLv3.txt for more details.
... |
# Copyright (c) Microsoft Corporation
# All rights reserved.
#
# MIT License
#
# 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... |
from functools import reduce
import numpy as np
from AnyQt import QtWidgets
from AnyQt.QtCore import Qt
import Orange.data
from Orange.util import Reprable
from Orange.statistics import distribution
from Orange.preprocess import Continuize, Normalize
from Orange.preprocess.transformation import Identity, Indicator, ... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import json
import boto3
import logger
from crhelper import CfnResource
helper = CfnResource()
try:
dynamodb = boto3.resource('dynamodb')
except Exception as e:
helper.init_failure(e)
@helper.creat... |
#!c:\Python27\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'gunicorn==18.0','console_scripts','gunicorn_paster'
__requires__ = 'gunicorn==18.0'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn_... |
'''Allows this folder to be recognized as one containing modules''' |
from django.contrib import admin
from nested_inline.admin import NestedStackedInline, NestedModelAdmin, \
NestedTabularInline
from commons.admin import CustomModelAdminMixin
from patients.models import *
class DrugAdmin(CustomModelAdminMixin, admin.ModelAdmin):
pass
class CategoryAdmin(Custom... |
# -*- coding: utf-8 -*-
"""
Created on Tue May 28 11:11:08 2019
@author: yoelr
"""
from biosteam import PowerUtility, HeatUtility, find, Flowsheet
import biosteam
__all__ = ('price',)
# %% Process settings
biosteam.CE = 567 # 2013
find.set_flowsheet(Flowsheet('sugarcane'))
PowerUtility.price = 0.065
_ha = HeatUtil... |
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from conductor.client.http.api_client import ApiClient
class AdminResourceApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class ... |
#
#################################################################
# Author: Sowjanya Karnati
#################################################################
#
# Purpose:To update dependencies list
#
# $Id: test_dependencies.py,v 1.5 2009/06/17 00:03:23 vareille Exp $
from mglutil.TestUtil.Tests.dependencieste... |
#!/usr/bin/env python3
"""
Test psycopg with CockroachDB.
"""
import time
import random
import logging
from argparse import ArgumentParser, RawTextHelpFormatter
import psycopg2
from psycopg2.errors import SerializationFailure
def create_accounts(conn):
with conn.cursor() as cur:
cur.execute(
... |
#!/usr/bin/python
# Copyright (c) 2016, Pierre Jodouin <pjodouin@virtualcomputing.solutions>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
... |
import pytest
import mock
from api.base.settings.defaults import API_BASE
from framework.auth.core import Auth
from osf_tests.factories import (
NodeFactory,
ProjectFactory,
OSFGroupFactory,
RegistrationFactory,
AuthUserFactory,
ForkFactory
)
from rest_framework import exceptions
from website i... |
"""
Utility function for parsing.
"""
from typing import Optional
from urllib.parse import urljoin, urlsplit, urlunsplit
from bs4 import BeautifulSoup # type: ignore
from httplink import parse_link_header # type: ignore
def parse_headers(target_url: str, headers: dict) -> Optional[str]:
"""
Searches the he... |
from datapackage_pipelines.wrapper import process
from datapackage_pipelines.utilities.resources import PROP_STREAMING
import logging, os, csv, shutil
from knesset_data.protocols.committee import CommitteeMeetingProtocol
from datapackage_pipelines_knesset.common import utils
import crcmod, base64
def get_crc32c(filen... |
from configshell_fb import ConfigNode, ExecutionError
from uuid import UUID
from rpc.client import JSONRPCException
import json
def convert_bytes_to_human(size):
if not size:
return ""
for x in ["bytes", "K", "M", "G", "T"]:
if size < 1024.0:
return "%3.1f%s" % (size, x)
si... |
import os
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
app.config.from_object(os.environ["APP_SETTINGS"])
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command("db", MigrateCommand)
if __name__ == "__main__":
manager.run()
|
"""
Semi-random access to bz2 compressed data.
"""
import bisect
from six import Iterator
from ._seekbzip2 import SeekBzip2
class SeekableBzip2File(Iterator):
"""
Filelike object supporting read-only semi-random access to bz2 compressed
files for which an offset table (bz2t) has been generated by `bzip-... |
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class SuiteSparse(Package):
"""
SuiteSparse is a suite of sparse matrix algorithms
"""
... |
"""
Utilities for reading & writing JVM method bytecode.
"""
import json
import enum
import pkgutil
from struct import unpack, pack, Struct
from itertools import repeat
from collections import namedtuple
Operand = namedtuple('Operand', ['op_type', 'value'])
_Instruction = namedtuple('Instruction', [
'mnemonic',
... |
# ##### 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 distri... |
# ---------------------------------------------------------------------------
# |
# | CreateSmtpMailer.py
# |
# | David Brownell (db@DavidBrownell.com)
# |
# | 11/29/2015 01:16:48 PM
# |
# ---------------------------------------------------------------------------
# |
# | Copyright David Brownel... |
import time
import threading
import asyncio
from typing import Optional
from sarge import run # type: ignore
def wait_respond(url: str, timeout: Optional[float] = None, retry_interval: float = 1):
test = f"curl --output /dev/null -k --silent --fail {url}"
stop_event = threading.Event()
def test_func():
... |
import voluptuous as vol
from esphome.components import sensor
from esphome.components.dallas import DallasComponent
import esphome.config_validation as cv
from esphome.const import CONF_ADDRESS, CONF_DALLAS_ID, CONF_INDEX, CONF_NAME, \
CONF_RESOLUTION
from esphome.cpp_generator import HexIntLiteral, get_variable
... |
################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. ... |
from django.db.models import Count
from apps.stream.models import StreamId
from apps.utils.data_helpers.manager import DataManager
from apps.utils.data_mask.mask_utils import get_data_mask_date_range
class StreamDataCountHelper(object):
"""
Creates a streams_totals dictionary with total data and event counts... |
from flask_restful import Resource, reqparse
from flask_jwt import jwt_required
from ..extraction.user import User
from uuid import uuid4
from .node import Node
from .blockchain import Blockchain
from ..authentication.IUP_Definition import InfectedUsersPool
from ..authentication.authentication_IUP import AuthorizedUser... |
from electrum_civx.i18n import _
fullname = 'TREZOR Wallet'
description = _('Provides support for TREZOR hardware wallet')
requires = [('trezorlib','github.com/trezor/python-trezor')]
registers_keystore = ('hardware', 'trezor', _("TREZOR wallet"))
available_for = ['qt', 'cmdline']
|
#!/usr/bin/env python
import argparse
import asyncio
import csv
import datetime
import matplotlib
import matplotlib.pyplot
import numpy
import os
import pathlib
import shutil
import subprocess
from pybricksdev.connections.pybricks import PybricksHub
from pybricksdev.connections.lego import REPLHub
from pybricksdev.b... |
# ---------------------------------------------------------------------
# Vendor: Vitesse (Vitesse Semiconductor)
# OS: VSC
# URL: http://www.microsemi.com/products/ethernet-solutions/ethernet-switches
# ---------------------------------------------------------------------
# Copyright (C) 2007-2021 The NOC Project
... |
import os
import sys
from datetime import datetime,timedelta
import logging
import pathlib
import tempfile
import subprocess
import shutil
from typing import Union
from time import time
import numpy as np
import scipy as sp
from numba import jit, prange
import netCDF4 as nc
from netCDF4 import Dataset
from matplotlib.... |
from nose.tools import assert_equal
from parking.room import Room
def test_room():
gold = Room("GoldRoom",
"""This room has gold in it you can grab.
There is a door to the north.""")
assert_equal(gold.name, "GoldRoom")
assert_equal(gold.paths, {})
|
"""
Copyright (c) 2019 - 2020 Jordan K. Pommerenck
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish... |
import os
import xml
#from xml.dom.ext.reader import Sax2
#from xml.dom import minidom
from xml.dom import xmlbuilder, minidom
class Preferences:
def set_defaults(self):
self.table['examples_path'] = os.path.abspath('../examples')
def __init__(self, filename):
self.filename = filenam... |
import time
from datetime import timedelta
from django.conf import settings
from django.core.exceptions import ValidationError
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from taggit.managers import TaggableManager
from clock.pages.utils import... |
# lool #
import sys, os
from setuptools import setup, find_packages
sys.path.insert(0, os.getcwd())
from src.loolclitools import __doc__, __version__
# SETUP
setup(
name="loolclitools",
version=__version__,
author="lool",
author_email="txhx38@gmail.com",
description=__doc__,
url="https://git... |
"""\
Constants.py: Constants for PyQuante
This program is part of the PyQuante quantum chemistry program suite.
Copyright (c) 2004, Richard P. Muller. All Rights Reserved.
PyQuante version 1.2 and later is covered by the modified BSD
license. Please see the file LICENSE that is part of this
distribution.
"""... |
"""653. Two Sum IV - Input is a BST"""
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution(object):
def findTarget(self, root, k):
"""
:... |
# 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 ... |
"""
Description
-----------
Implements query and status report functionality for TUBS use cases.
:Authors:
- Johannes Schlatow
"""
import logging
from mcc.framework import *
from mcc.model import SimplePlatformModel
from mcc import parser as cfgparser
from mcc import lib
from mcc.configurator import GenodeConfi... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitte... |
# -*- coding: utf-8 -*-
"""
Manager Swiper
==============
Copyright © 2010-2018 HeaTTheatR
For suggestions and questions:
<kivydevelopment@gmail.com>
This file is distributed under the terms of the same license,
as the Kivy framework.
Example
-------
import os
from kivy.app import App
from kivy.core.window impor... |
# Copyright (c) 2020-2021, NVIDIA 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 or agre... |
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Includes all the constants of module names, queue names, url paths, etc."""
import os
# Names of all modules.
WATERFALL_BACKEND = 'waterfall-backend'
... |
#!/usr/bin/env python
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 2008-2016 California Institute of Technology.
# Copyright (c) 2016-2020 The Uncertainty Quantification Foundation.
# License: 3-clause BSD. The full license text is available at:
# - https://github.com/uqfoundation/pa... |
default_app_config = 'emailhub.apps.EmailhubConfig'
|
import pyvisa
import numpy
class Fuente: # Esta clase describe cada neurona
def __init__(self, instrument, name=None):
self.fuente = instrument
self.name = name # Nombre para identificar en depuracion
def encender_canal(self, channel: int):
self.fuente.write(":OUTPUT CH{:n},ON".form... |
# Copyright 2020-2020 Biomedical Imaging Group Rotterdam, Departments of
# Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands
#
# 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 Licen... |
import numpy as np
import os
import decimal
# import pandas
from collections import OrderedDict
def write_wind(V_ref, alpha, Beta, Z_hub, filename, template_file):
Height=(np.array([np.arange(0,181,10)],dtype=float))
new_Height=(Height/Z_hub).T
Height=(np.array([np.arange(0,181,10)])).T
a=le... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.