text stringlengths 8.04k 46.5k |
|---|
"""figures of merit is a collection of financial calculations for energy.
This module contains financial calculations based on solar power and batteries
in a given network. The networks used are defined as network objects (see evolve parsers).
TODO: Add inverters: Inverters are not considered at the momen... |
import os
import sys
import pickle
import cv2
import numpy as np
#if os.path.realpath(os.getcwd()) != os.path.dirname(os.path.realpath(__file__)):
# sys.path.append(os.getcwd())
from collections import Counter
from sklearn.metrics import confusion_matrix
import deephar
from deephar.config import mpii_dataconf
from ... |
#!/usr/bin/env python
#
# Modified import_manifest to (mode 1) extract components & versions from a BD project/version created from a Detect scan of a Yocto project,
# then (mode 2) create a new project with manually added components which match the original.
#
# This script operates in 2 modes as follows:
# 1. Mode k... |
from scipy.spatial.distance import pdist, cdist, squareform, cosine, euclidean
import math as mt
import pandas as pd
import numpy as np
from datetime import datetime
from numba import njit,jit
from numba.typed import List
import numba as nb
import multiprocessing as mp
import pickle
import matplotlib.pyplot as plt
from... |
"""
Async Aptly Worker Task
"""
import asyncio
import operator
from launchy import Launchy
from sqlalchemy import or_
from molior.model.database import Session
from molior.model.build import Build
from molior.model.buildvariant import BuildVariant
from molior.model.project import Project
from molior.model.projectvers... |
import tensorflow as tf
def shape_list(x):
"""Deal with dynamic shape in tensorflow cleanly."""
static = x.shape.as_list()
dynamic = tf.shape(x)
return [dynamic[i] if s is None else s for i, s in enumerate(static)]
class PositionalEmbedding(tf.keras.layers.Layer):
def __init__(self, demb, **kwar... |
from ._arcgis_model import ArcGISModel
import tempfile
from pathlib import Path
import json
from ._codetemplate import code
import logging
logger = logging.getLogger()
import os, csv
import warnings
from warnings import warn
from . import _tracker_util
HAS_OPENCV = True
HAS_FASTAI = True
HAS_ARCPY = True
try:
im... |
import math
import numpy as np
import pandas as pd
from datetime import datetime, timedelta
import glob
import os
from itertools import combinations
import logging
import sys
dir_path = os.path.dirname(os.path.realpath(__file__))
###################
# GENERAL PURPOSE #
###################
def read_vari... |
# ------------------------------------------------------------------------------
#
# MIT License
#
# Copyright (c) 2021 nogira
#
# 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 restri... |
# -*- coding: utf-8 -*-
# Author: FengQiMin<<EMAIL>>
# Created on 2019-01-08 00:15:13
"""获取免费的高匿proxy
('HTTP', '172.16.31.10', '9999')
66ip.cn
data5u.com
ip181.com
xicidaili.com
goubanjia.com
xdaili.cn
kuaidaili.com
cn-proxy.com
proxy-list.org
www.mimiip.com
"""
import... |
r"""
Submodule for simulating Rouse polymers.
Contains routines for easily parameterizing Rouse polymer simulations and some
simple pre-built example simulators:
1. **with_integrator**: Example Rouse simulator. Uses a discrete Rouse
chain to approximate a semiflexible chain with parameters ``(N, L, b,
... |
#!/usr/bin/env python
# Author: <NAME>
# Description: This script auto_docks the openrover basic platform if it is in a 3m circle in front of the dock.
import numpy as np
import os
import time
import math
import rospy
import actionlib
from std_msgs.msg import Float32, String, Bool, Int32
from geometry_msgs.msg impor... |
#!/usr/bin/env python
# coding: utf-8
"""
Neural machine translation with attention
trains a sequence to sequence (seq2seq) model for Spanish to English translation.
input a Spanish sentence, such as *"¿todavia estan en casa?"*,
and return the English translation: *"are you still at home?"*
The translation quality i... |
from utils import *
import time, copy, os, glob, csv, ast
import pandas as pd
import numpy as np
from collections import defaultdict
from config import parameters
from PatternHandler import PatternHandler
from DependencyGraphHandler import DependencyGraphHandler
from SubsetHandler import SubsetHandler
from sklearn.feat... |
#!/usr/bin/env python
#
#--------------------------------------------------------------------------------
# Authors:
# - <NAME>: <EMAIL>
# - <NAME>: <EMAIL>
#
# MIT License
# Copyright (c) 2021 CORSMAL
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associate... |
#!/bin/python
#
#
# The MIT License (MIT)
#
# Copyright (c) 2016 <NAME> <EMAIL>
#
# 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
... |
import pdb
import math
import numpy as np
import functools
from scipy import linalg as la
from rl.tools.oracles import tfLikelihoodRatioOracle
from rl.oracles.oracle import rlOracle
from rl.policies import tfPolicy, tfGaussianPolicy
from rl.tools.normalizers import OnlineNormalizer
from rl.tools.utils.tf_utils import ... |
###
# Voxel-Based Variational Autoencoder GUI
# <NAME>, 2016
import imp
import argparse
import logging
from path import Path
# import sys
# sys.path.insert(0, 'C:\Users\Andy\Generative-and-Discriminative-Voxel-Modeling')
from utils import checkpoints, npytar
import numpy as np
import theano
import theano.tensor as T... |
import tensorflow as tf
import tensorflow.keras as keras
import tensorflow.keras.layers as keras_layers
import tools
from . import misc
from . import scopes
_sentinel = object() # Used to detect cycles in webs
class Knot:
"""Represents the vertex of a graph. Here we instead call them Knots in webs, however, t... |
# coding: utf-8
# # TensorFlow Tutorial #15
# # Style Transfer
#
# by [<NAME>](http://www.hvass-labs.org/)
# / [GitHub](https://github.com/Hvass-Labs/TensorFlow-Tutorials) / [Videos on YouTube](https://www.youtube.com/playlist?list=PL9Hr9sNUjfsmEu1ZniY0XpHSzl5uihcXZ)
# ## Introduction
#
# We saw in the previous Tuto... |
import numpy as np
import jax
import jax.numpy as jnp
from timemachine.lib import potentials
from ff.handlers import nonbonded, bonded
_SCALE_12 = 1.0
_SCALE_13 = 1.0
_SCALE_14 = 0.5
_BETA = 2.0
_CUTOFF = 1.2
class AtomMappingError(Exception):
pass
class HostGuestTopology():
def __init__(self, host_p, gue... |
import warnings
warnings.filterwarnings("ignore")
import os
#os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
#enforce_detection全由true改为false
import time
from os import path
import numpy as np
import pandas as pd
from tqdm import tqdm
import pickle
from deepface.basemodels import VGGF... |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import SwissCoinClassicTestFrame... |
# -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
"""
Methods for performing doing matrix factorization and factorization machines
for... |
import tkinter as tk
from tkinter import ttk
import serial # requires installing
import serial.tools.list_ports
from time import sleep, time
import threading
from PIL import Image, ImageTk # requires installing
import logging
import queue
import os
import subprocess
from tkinter import filedialog
import sys
from pygm... |
import torch
import torch.nn as nn
from up.utils.model.normalize import build_norm_layer
from up.utils.model.act_fn import build_act_fn
from up.utils.general.registry_factory import MODULE_ZOO_REGISTRY
from up.tasks.seg.utils import PatchEmbed, nlc_to_nchw, nchw_to_nlc
import math
import warnings
__all__ = ... |
# Copyright 2021 Google Research. 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 la... |
import os
import re
import json
import itertools
import time
import click
import shutil
import torch
import numpy as np
import pandas as pd
from glob import glob
from os.path import join
import MDAnalysis as mda
from torch.utils.data import DataLoader, Subset
from sklearn.neighbors import LocalOutlierFactor, NearestNei... |
import traceback
from pathlib import Path
from datetime import datetime
# remove this in a few days
with open(Path('interface', 'start-message.txt'), 'r') as file_:
print('\x1B[7m' + file_.read() + '\x1B[27m')
import gc
import torch
from getconfig import config, setting_info
from storymanager import Story
from ut... |
#
# A higher level module for using sockets (or Windows named pipes)
#
# multiprocessing/connection.py
#
# Copyright (c) 2006-2008, <NAME>
# Licensed to PSF under a Contributor Agreement.
#
__all__ = [ 'Client', 'Listener', 'Pipe', 'wait' ]
import io
import os
import sys
import socket
import struct
import errno
impor... |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... |
import asyncio
from weakref import ref
from decimal import Decimal
import re
import copy
import threading
import traceback, sys
from typing import TYPE_CHECKING, List, Optional, Dict, Any
from kivy.app import App
from kivy.cache import Cache
from kivy.clock import Clock
from kivy.compat import string_types
from kivy.p... |
# Copyright 2018-2020 Streamlit 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 wr... |
# pylint: disable=invalid-name,unused-variable,no-else-return
"""Conv2D schedule for ARM CPU"""
from __future__ import absolute_import as _abs
import numpy as np
import tvm
from tvm import autotvm
from ..generic import schedule_conv2d_nchw, schedule_conv2d_winograd_without_weight_transform
from ..util import travers... |
#!/usr/bin/python3
"""Perform multiple Android builds in a single repo.
This script cycles through a set of different build targets within an
Android repo, performs a build for each target, and captures the
output of the builds. It is intended to help with compiler toolchain
testing.
The process of setting up a given... |
# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot module containing various scrapers. """
import os
import time
import asyncio
import shutil
from bs4 import... |
from __future__ import absolute_import, division, print_function
import argparse
import csv
import logging
import os
import random
import sys
sys.path.append('..')
os.environ['CUDA_VISIBLE_DEVICES']='0'
import copy
import json
import numpy as np
import torch
from torch.utils.data import (DataLoader, RandomSampler, S... |
"""
1&1 Cloud Server Module
=======================
The 1&1 SaltStack cloud module allows a 1&1 server to be automatically deployed
and bootstrapped with Salt. It also has functions to create block storages and
ssh keys.
:depends: 1and1 >= 1.2.0
The module requires the 1&1 api_token to be provided. The server shoul... |
# !usr/bin/env python
# coding:utf-8
"""
author: prucehuang
email: <EMAIL>
date: 2019/01/19
"""
import numpy as np
import os
import matplotlib.pyplot as plt
from matplotlib.patches import FancyArrowPatch
from mpl_toolkits.mplot3d import proj3d
from sklearn.datasets import make_swiss_roll
from sklearn.decompositi... |
import copy
from collections.abc import Hashable
import pandas as pd
import woodwork as ww
from woodwork.column_schema import ColumnSchema
from woodwork.exceptions import ColumnNotPresentError
from woodwork.type_sys.utils import _get_ltype_class
from woodwork.utils import _convert_input_to_set
class TableSchema(obj... |
import ast
import contextlib
import inspect
import os
import os.path
import sys
import types
import weakref
import batou
import batou.c
import batou.template
import batou.utils
from batou import DuplicateComponent, SilentConfigurationError, output
from batou.utils import call_with_optional_args
def platform(name, co... |
# Copyright (c) 2015 Orange.
# 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 a... |
"""
concat.py
This function is for concatenating gct(x) files together. You can tell it to
find files using the file_wildcard argument, or you can tell it exactly
which files you want to concatenate using the input_filepaths argument. The
meat of this function are the hstack (i.e. horizontal concatenation of GCToo obj... |
"""
Kian's advice:
1. definitely train longer
2. tune regularization/dropout at different layers in network; try different combinations
3. check training set bad examples, does it correspond to any dev set error.
5. mix some test sets wtih training. I'm thinking maybe try several sets at a time as testing sets, and t... |
from sympy import cos, expand, Matrix, Poly, simplify, sin, solve, sqrt
from sympy import symbols, tan, trigsimp, zeros
from sympy.physics.mechanics import (cross, dot, dynamicsymbols, KanesMethod,
inertia, inertia_of_point_mass, Particle,
Point,... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ade:
# Asynchronous Differential Evolution.
#
# Copyright (C) 2018-19 by <NAME>,
# http://edsuom.com/ade
#
# See edsuom.com for API documentation as well as information about
# Ed's background and other projects, software and otherwise.
#
# Licensed under the Apache Li... |
"""Pronunciation dictionaries for use in alignment and transcription"""
from __future__ import annotations
import math
import os
import re
import subprocess
import sys
from collections import Counter, defaultdict
from typing import TYPE_CHECKING, Any, Collection, Dict, List, Optional, Set, Tuple
if TYPE_CHECKING:
... |
import numpy as np
import tensorflow as tf
import datetime
import ctr_funcs as func
import config_dstn as cfg
import os
import shutil
# config
str_txt = cfg.output_file_name
base_path = './tmp'
model_saving_addr = base_path + '/dstn_s_' + str_txt + '/'
output_file_name = base_path + '/dstn_s_' + str_txt + '.txt'
num_c... |
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
import io
import json
import os
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "... |
#!/usr/bin/env python
# Copyright 2017, 2018 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-... |
# coding=utf-8
# Copyright (c) 2019, NVIDIA 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 re... |
# Copyright 2012-2014 Amazon.com, Inc. or its 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... |
# coding: utf-8
from __future__ import unicode_literals
"""
This module provides classes to perform fitting of molecule with arbitrary
atom orders.
This module is supposed to perform exact comparisons without the atom order
correspondence prerequisite, while molecule_structure_comparator is supposed
to do rough compa... |
import asyncio
import functools
import os
import pathlib
import logging
import time
from types import MappingProxyType
from typing import Optional, Union, Type, Any, TypeVar, Protocol, cast
import hikari
import lightbulb
from saru import job
from saru import config
from .util import ack
from collecti... |
import os
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtCore import QObject, pyqtSlot, QThread, pyqtSignal, QLocale
from pymodaq.daq_utils.parameter import utils as putils
from pymodaq.daq_utils.daq_utils import ThreadCommand, set_param_from_param, set_logger, get_module_name, \
get_set_pid_path, get_models, fin... |
import pytest
import numpy as np
import torch
import torch.nn as nn
from nni.retiarii.nn.pytorch import ValueChoice, Conv2d, BatchNorm2d, Linear, MultiheadAttention
from nni.retiarii.oneshot.pytorch.base_lightning import traverse_and_mutate_submodules
from nni.retiarii.oneshot.pytorch.supermodule.differentiable import... |
from dataclasses import dataclass
from enum import Enum
import logging
import re
import sre_constants
import sre_parse
import typing
import z3 # type: ignore
# Z3 Node Constants
app_labels = z3.Function('app_labels', z3.StringSort(), z3.StringSort())
app_label_keys = z3.Function('app_label_keys', z3.Str... |
#!/usr/bin/env python
import argparse
import datetime
import git
import github as gh
import json
import os
import shutil
import subprocess
import sys
import tempfile
import urllib3
import yaml
import re
# HIVE_VERSION_PREFIX is the prefix of the Hive version that will be constructed by
# this script if we get (or def... |
# fmt: off
import logging
import os
import socket
import threading
from collections import UserDict
from datetime import datetime, timedelta, timezone
from operator import itemgetter
from pathlib import Path
from typing import (Any, Dict, Iterable, Iterator, List, Optional, TextIO,
Tuple, Union, ca... |
import re
import collections
from .. import util
from sqlalchemy import util as sqlautil
from ..util import compat
_relative_destination = re.compile(r'(?:(.+?)@)?(\w+)?((?:\+|-)\d+)')
_revision_illegal_chars = ['@', '-']
class RevisionError(Exception):
pass
class RangeNotAncestorError(RevisionError):
def... |
# 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... |
#! /usr/bin/env python3
# This code follows the NexStar Communication Protocol as described in NexStarCommunicationProtocolV1.2.pdf
# This code is forked from https://github.com/sidneycadot/nexstar
import sys, serial, datetime, pytz, time
from enum import Enum
class NexstarUsageError(Exception):
pass
class Nexs... |
# Copyright 2020 Google Research. 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... |
# (c) Copyright 2015, 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE 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... |
import itertools
import math
import random
from pprint import pprint
from enum import Enum
import os
import numpy as np
import pygame
import zope.event
from . import ball
from . import config
from . import cue
from . import cue_visible
from . import event
from . import graphics
from . import table_sprites
from .ball ... |
""" first big data test: data importing and manipulation"""
__author__ = "<NAME>"
__copyrights__ = "Copyright 2019, Marelli PWT"
__credits__ = ["<NAME>"]
__license__ = "MIT"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Development"
# from time import sleep
import numpy as np # pragma: no ... |
from django.db import transaction
from django.utils import timezone
from rest_framework import viewsets, status, permissions
from django.contrib.gis.geos import Polygon, GEOSGeometry
from rest_framework.response import Response
from rest_framework.decorators import action
from django.utils.translation import gettext as... |
# encoding: utf-8
"""
@desc:
"""
from typing import Any, Dict, List, Optional, NamedTuple
import torch
from fairseq.models import (
register_model,
register_model_architecture,
)
from fairseq.models.transformer import (
TransformerModel,
TransformerEncoder,
TransformerDecoder,
base_archit... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'chengzhi'
import json
import time
import requests
import asyncio
from .__version__ import __version__
from typing import Union
from datetime import date, datetime
from tqsdk.exceptions import BacktestFinished
from tqsdk.objs import Entity
import tqsdk.api
... |
from .constants import *
__author__ = 'Agka'
# This function formats decimal storyboard values up to 3 decimals, removing
# any pointless 0s and periods.
def _fmt(val):
return "{:.3f}".format(float(val)).rstrip("0").rstrip(".")
class Storyboard(object):
"""
Singleton instance of storyboard.
You can... |
# Copyright (C) 2010-2017 Apple 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:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and ... |
import pandas as pd
import numpy as np
from math import sqrt
from scipy import stats
from itertools import product, combinations
from data_access import GetData
from configs import conf, time_dimensions, alpha, day_of_year, time_indicator_accept_threshold, s_size_ratio, hyper_conf
from utils import *
def data_manipu... |
#!/usr/bin/env python3
"""LocalWx produces a local text wx report using the Harvest mongo database.
Produces a set of local weather printed out the the terminal for a set of
locations defined in :mod:`db.localwx.localwxConfig`.
Program usage: ::
usage: localwx.py [-h] [--fdc] [--airmet] [--nogairmet] [--nowinds... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... |
import logging as log
from inspect import signature
from collections import namedtuple
from wrapt import decorator
from tqdm import tqdm
import numpy as np
from qcodes.utils.deprecate import deprecate
from qcodes.instrument.visa import VisaInstrument
from qcodes.dataset.measurements import Measurement
from ..plot im... |
# pylint: disable=W0511,C0412
"""
Support for LinkPlay based devices.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.linkplay/
"""
import binascii
import json
import upnpclient
import netdisco.ssdp
import logging
import os
import tempfile
i... |
from . import cas
from .alarm import Severity, Alarm
import collections
import operator
import threading
import time
import sys
import logging
if sys.hexversion >= 0x02070000:
from logging import NullHandler
else:
class NullHandler(logging.Handler):
def emit(self, record):
pass
logging.getL... |
"""Command-line UI for SysCA.
"""
import argparse
import os.path
import subprocess
import sys
from datetime import datetime
from cryptography import x509
from .api import (
CRL_REASON, DN_CODE_TO_OID, FULL_VERSION, PRIVKEY_CLASSES, PUBKEY_CLASSES,
CertInfo, CRLInfo, as_bytes, autogen_config_file, create_x509... |
from array import array
import math
from ROOT import gPad, TCanvas, TH2D, TH1D, TFile, THStack, TLegend, gSystem, TLatex, TH1, gStyle, TGaxis
import os, sys
import CMS_lumi
#import tdrstyle
#TGaxis.SetMaxDigits(2)
TH1.SetDefaultSumw2()
gStyle.SetPaintTextFormat(".5f")
def setBotStyle(h, r=4, fixRange=True):
h.Get... |
#!/usr/bin/env python3
#
# Compare accounting of algod and indexer
#
# setup requires:
# pip install "msgpack >=1" py-algorand-sdk
import base64
import json
import logging
import os
import sqlite3
import sys
import time
import urllib.error
import urllib.request
import urllib.parse
import algosdk
from algosdk.v2clien... |
import os
import collections
import six
def _lowerFirst(s):
return s[0].lower()+s[1:]
_sampleName = {
"RelValMinBias": "Min Bias",
"RelValTTbar": "TTbar",
"RelValQCD_Pt_600_800": "QCD Pt 600 to 800",
"RelValQCD_Pt_3000_3500": "QCD Pt 3000 to 3500",
"RelValQCD_FlatPt_15_3000": "QCD Flat Pt 15 t... |
'''
Created on Oct 20, 2010
@author: Mark V Systems Limited
(c) Copyright 2010 Mark V Systems Limited, All rights reserved.
'''
import zipfile, tarfile, os, io, base64, gzip, zlib, re, struct, random, time
from lxml import etree
from arelle import XmlUtil
from arelle import PackageManager
from arelle.UrlUtil import is... |
# Software License Agreement (BSD License)
#
# Copyright (c) 2008, <NAME>, 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 copyri... |
import operator, types
from tests.utils.runtest import makesuite, run
from tests.utils.allocators import GetAllocatingTestAllocator
from tests.utils.cpython import MakeTypePtr
from tests.utils.gc import gcwait
from tests.utils.memory import OffsetPtr, CreateTypes
from tests.utils.testcase import TestCase, WithMapper... |
"""
This module contains functions to label satellite images, use the labels to
train a pixel-wise classifier and evaluate the classifier
Author: <NAME>, Water Research Laboratory, University of New South Wales
"""
# load modules
import os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm... |
import os.path
import numpy as np
import pandas as pd
import pickle
import random
import copy
import astropy.units as u
from sklearn.neighbors import KDTree, BallTree
from nexoclom.modelcode.ModelResult import ModelResult
from nexoclom.modelcode.Output import Output
import nexoclom.math as mathMB
from nexoclom.modelcod... |
import functools
import collections
from pymel.util.enum import Enum
import pymel.core as pymel
from omtk import constants
from omtk.core.classCtrl import BaseCtrl
from omtk.core.classModule import Module
from omtk.core.classNode import Node
from omtk.libs import libRigging
from omtk.libs import libAttr
from omtk.libs ... |
import os
import sys
import logging
import pickle
import justlogs
from random import shuffle
from functools import cache
from binteger import Bin
from optisolveapi.sat import CNF, ExtSolver, ConvexFormula
from optisolveapi.vector import Vector
from divprop import Sbox, SboxDivision
from divprop.ciphers import SSB_... |
import codecs
import json
import os
import shutil
import socket
import tempfile
from contextlib import contextmanager
from cStringIO import StringIO
from django.conf import settings
from django.core import mail
from django.core.files.storage import default_storage as storage
from django.core.urlresolvers import revers... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
'''
rpi_core.py
File containing functions used in flight
Distributed under the 3-Clause BSD License (below)
Copyright 2019 Rensselaer Polytechnic Institute
(Dr. <NAME>, <NAME>, <NAME>)
Redistribution and use in source and binary forms,
with or without modification, are pe... |
import torch
import numpy as np
from baseline.utils import lookup_sentence, get_version
from baseline.utils import crf_mask as crf_m
from torch.autograd import Variable
import torch.autograd
import torch.nn as nn
import torch.nn.functional
import math
import copy
PYT_MAJOR_VERSION = get_version(torch)
def sequence_m... |
#!/usr/bin python3
""" The script to run the convert process of faceswap """
import logging
import re
import os
import sys
from time import sleep
from threading import Event
import numpy as np
from tqdm import tqdm
from scripts.fsmedia import Alignments, Images, PostProcess, Utils
from lib import Serializer
from lib... |
#!/usr/bin/env python
import sys
import os
import os.path
import numpy as np
from scipy.io import loadmat,savemat
from sklearn.neighbors import NearestNeighbors
import random
import warnings
import argparse
#set random seed
random.seed(0)
#########################################################
# meshObj: Data stru... |
"""
Reconnaissance des personnages à partir d'un json
Vous ne devez modifier que ce fichier
Installation: voir le readme
TODO:
- Vérifier l'algo de recherche de la distance minimum
- Forger un vrai bon score de fraicheur/historique
- Vérifier les calculs de vitesse et d'accélération
"""
from functools import cmp_... |
import pytest
from rnalysis.utils import io
from rnalysis.utils.io import *
from rnalysis.utils.io import _format_ids_iter, _ensmbl_lookup_post_request
class MockResponse(object):
def __init__(self, status_code: int = 200, url: str = 'http://httpbin.org/get', headers: dict = {'blaa': '1234'},
tex... |
# -*- coding: utf-8 -*-
"""
Number Theoretic functions
@author: shakes
Also consists of numbthy module:
Note: Version 0.7 changes some function names to align with SAGE
Author: <NAME>, <<EMAIL>>
License: Simplified BSD (see details at bottom)
Also consists of a Gaussian Integer class
Based of Robert Campbell, but ad... |
import numpy as np
import pandas as pd
import subprocess as sp
import os
from scipy.stats import gaussian_kde
from numpy import random as r
import matplotlib.pyplot as plt
def get_psi_table(SJ_table_name, minJR=5, minCell=20, drop_duplicates = False):
'''
This functions splits this table into one individ... |
"""
Basic Equations for Solid Mechanics
###################################
References
----------
.. [Gray2001] <NAME> et al., "SPH elastic dynamics", Computer Methods
in Applied Mechanics and Engineering, 190 (2001), pp 6641 - 6662.
"""
from pysph.sph.equation import Equation
from textwrap import dedent
class M... |
# coding=utf-8
# Copyright (c) 2019, NVIDIA 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 re... |
from dataclasses import dataclass, field
from enum import Enum
from pathlib import Path
from typing import Any, Dict, List, Optional, Set, Tuple
from core.api.grpc import (
common_pb2,
configservices_pb2,
core_pb2,
emane_pb2,
services_pb2,
)
class ConfigServiceValidationMode(Enum):
BLOCKING =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.