text stringlengths 6.04k 39.5k |
|---|
#!/usr/bin/python3
'''
Created on 01.05.2015
@author: kinders
'''
import sys
import os
dire = os.path.dirname(__file__)
dire = os.path.dirname(dire)
dire = os.path.join(dire,"lib")
dire = os.path.join(dire,"lotto")
if dire not in sys.path:
sys.path.append(dire)
del dire
import dialogs # @UnresolvedImport
from... |
"""
# Tuple with keys (
# (input_ids, attention_mask, token_type_ids),
# (start_position, end_position, cls_index, p_mask, is_impossible)
g4dn can do evaluation w/ batch32 with 9GB memory. 1.08 it/s
1.61 it/s when performing inference on single-GPU.
Multi-gpu single-node throws an error, probably OOM.
"""
import ar... |
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 12 16:04:45 2019
@author: 13383861
"""
import sys
sys.path.append('.')
import os
import time
from abc import ABC, abstractmethod
import numpy as np
from OccupancyGrid.Agents.BaseOccupancyGridAgent import BaseGridAgent
from Utils.Vector3r import Vector3r
from Utils.UE4G... |
"""OATS
OATS is a commandline tool for easy transcoding of audio albums. It effectively
parallelizes transcodes, is cross-platform, and makes torrents if directed.
Usage:
oats mkconfig [<file>]
oats mktorrent [options] <target> ...
oats [options] <target> ...
oats (--help | --version | --show-formats... |
# -*- coding: UTF-8 -*-
# Code generated by lark suite oapi sdk gen
from typing import List, Dict, Any
from ....utils.dt import to_json_decorator
import attr
@to_json_decorator
@attr.s
class AuditWebContext(object):
user_agent = attr.ib(type=str, default=None, metadata={'json': 'user_agent'})
i_p = attr.ib... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# code is far away from bugs with the god animal protect
# I love animals. They taste delicious.
# ┌─┐ ┌─┐
# ┌──┘ ┴───────┘ ┴──┐
# │ │
# │ ─── │
# │ ─┬┘ └┬─ │
# │ │
# │ ─... |
from .adt import ADT
from .adt import memo as ADTmemo
from .prelude import *
from . import atl_types as T
from .frontend import AST
from fractions import Fraction
from math import gcd as _gcd
def _lcm(x,y):
return (x*y)//_gcd(x,y)
# notes on symbols to use
# Note that BOOL is a type and Bool a formula constructo... |
import datetime
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder
from tensorflow.python.keras.callbacks import EarlyStopping, ModelCheckpoint
import tensorflow as tf
from tensorflow.python.keras import Sequential, Model
from tensorflow.python.keras.layers import Ti... |
#!/usr/bin/python3
# Copyright (c) 2018-2021 Bluespec, Inc.
# See LICENSE for license details
# ================================================================
usage_line = (
"Usage:\n"
" $ CMD <repo> <arch> <privs> <cache_org> <sim> <debug?> <tohost?> <tv?>\n"
" where\n"
" (Required)... |
#############################################
# Author: <NAME>
# Date: 7/21/2018
# dockeyeM_getpose.py
# extract pose from dockeye logfile
# add generation of movie file of ligand
# branch off dockeye_getpose.py to read models from input pdb file
# and best model out of logfile
####################################... |
#!/usr/bin/python3.5
from time import time
from datetime import datetime
import requests
import logging
import coloredlogs
from bs4 import BeautifulSoup
# import tldextract
from urllib.parse import urljoin # , urlparse
from tld import get_tld
from pytrie import StringTrie
from multiprocessing import Pool # processes... |
"""Art creation utilities."""
from __future__ import annotations
# stdlib
from typing import Any, Dict, Tuple, Optional, List, Union
import logging
# external
import matplotlib
matplotlib.use("pdf")
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# tdub
import tdub.config
import tdub.hist
im... |
import h5py
import numpy as np
import os
import time
import tensorflow as tf
from tensorflow.keras.layers import Input, Dense, Lambda
from tensorflow.keras.models import Model
from tensorflow.keras import backend as K
from tensorflow.keras.losses import mse
from tensorflow.keras import optimizers
import preprocess as ... |
# This is a sample Python script.
import math
import random
import torch
import torch.nn as nn
import fasttext
import numpy as np
from torch import optim
import pickle
import time
torch.backends.cudnn.enabled = False
# Global Variables
N_VECTOR = 20
# Use GPU or not
device = torch.device('cuda') if ... |
import re
import regex
from . import request as LeetCodeRequest
from .argument import Argument
from .prettify import CodeSnippet, Description
class SolutionAbstract:
def __init__(self, id: int, content: str):
self._type: Argument = None
self._id: int = id
self._name: str = ""
self.... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Author: kingofwolf
# @Date: 2018-11-20 18:34:53
# @Last Modified by: kingofwolf
# @Last Modified time: 2019-03-21 10:45:17
# @Email: <EMAIL>
'Info: a Python file '
__author__ = 'Wang'
TASK_FILE_MODE=1
# when this equals 0:
#task file like:
# # 0
# 1 1774760
# 8 341... |
import time
import math
import zmq
import os
import numpy as np
import tensorflow as tf
from tensorflow.keras.models import Model, load_model
from tensorflow.keras.layers import Input, Dense, Lambda, Add, Conv2D, Flatten, LSTMCell
from tensorflow.keras.optimizers import Adam, RMSprop
from tensorflow.keras import backen... |
import os
import sys
import pkg_resources
import numpy as np
from matplotlib.image import imread
import obrero.cal as ocal
import obrero.plot as oplot
import obrero.experimental.enso as oenso
# path where stored logo
DATA_PATH = pkg_resources.resource_filename('obrero', 'data/')
def _add_text_axes(axes, text):
... |
# Originally made by <NAME> (https://github.com/crowsonkb, https://twitter.com/RiversHaveWings)
# The original BigGAN+CLIP method was by https://twitter.com/advadnoun
import math
import random
# from email.policy import default
from urllib.request import urlopen
from tqdm import tqdm
import sys
import os
import flask
... |
# %%
import os
import math
import datetime
from itertools import chain
from collections import defaultdict
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.dates as mdates
from matplotlib.ticker import MaxNLocator
matplotlib.use("Agg")
import matplotlib.pyplot as plt
matplotlib.rc("font", *... |
#!/usr/bin/env python3
"""Convert a set of weights (probably sparse weights) into a set of equations
describing what those weights do."""
import argparse
import joblib
import numpy as np
import tensorflow as tf
from asnets.prob_dom_meta import UnboundAction
def load_weights(weight_path):
# use throw-away sessi... |
# Copyright 2022 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, ... |
import os
import json
from copy import deepcopy
import indra.tools.assemble_corpus as ac
from indra.statements import Concept, Event, Influence
from indra.statements.concept import get_top_compositional_grounding
from indra.pipeline import AssemblyPipeline
from indra.statements import stmts_from_json_file
from indra.s... |
"""
SPI: Number of rolling months depends on the timescale of interest, where 3 month SPI
is used for a short-term or seasonal drought index, 12 month SPI for an
intermediate-term drought index, and 48 month SPI for a long-term drought index.
TODO:
- An addition parameter should be the output timestep, as e.g. input d... |
from unittest import mock
import pytest
from broqer import Value, Publisher, Subscriber, Sink, op
import operator
def test_operator_with_publishers():
v1 = Value(0)
v2 = Value(0)
o = v1 + v2
assert isinstance(o, Publisher)
assert isinstance(o, Subscriber)
assert o.get() == 0
v1.emit(1)
... |
import itertools
import cirq
import numpy as np
import random
from openfermion import (
FermionOperator,
QubitOperator,
count_qubits,
InteractionOperator,
PolynomialTensor,
number_operator,
normal_ordered,
get_sparse_operator,
get_interaction_operator,
)
from openfermion import expe... |
import sys, traceback
import datetime
import subprocess
import json
import logging
import re
import stats
import downloader_common
def run():
downloader = Downloader()
logging.basicConfig(filename='downloader_zaxid.log', level=logging.INFO,
format='%(asctime)s %(levelname)s\t%(module)s\t%(message)s', ... |
# -*- coding: utf-8 -*-
import os
import sqlite3
import sys
try:
from StringIO import StringIO
except ImportError:
from io import StringIO # New stdlib location in 3.0
from . import _unittest as unittest
from .common import TempDirTestCase
from toron._gpn_node import Node
from toron.connector import _schema... |
"""Jayk-specific chatbot modules, with extended configuration reloading."""
from typing import Optional
from .config import JaykConfig
from . import util
from ..chatbot import IRCChatbot, ChatbotModule
from .. import common
from .. import irc
from ..util import LogMixin
class JaykState:
"""
Represents a chat... |
from __future__ import annotations
import json
from abc import ABC, abstractmethod
from asyncio import Task, Queue, Future, sleep, shield
from asyncio.events import get_event_loop
from dataclasses import dataclass
from logging import getLogger
from random import randint, choice, sample, Random
from typing import Dict,... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Main function to compute the randomForest QPE estimate
<NAME>
MeteoSwiss/EPFL
<EMAIL>
December 2019
"""
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import datetime
import os
import logging
logging.basicConfig(level=logging.INFO)
from pathl... |
import warnings
from collections import OrderedDict
from textwrap import dedent
from typing import Union, Optional, List
import logging
import pandas as pd
from red_panda.pandas import PANDAS_TOCSV_KWARGS
from red_panda.aws import (
REDSHIFT_RESERVED_WORDS,
REDSHIFT_COPY_KWARGS,
)
from red_panda.utils import ... |
# -*- coding: utf-8 -*-
"""Utilities for generating OpenAPI spec (fka Swagger) entities from
marshmallow :class:`Schemas <marshmallow.Schema>` and :class:`Fields <marshmallow.fields.Field>`.
OpenAPI 2.0 spec: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
"""
from __future__ import absolute_i... |
# -*- coding: utf-8 -*-
# Author:<NAME> <<EMAIL>>
"""
Time dependent Hartree (TDH) solver for vibronic coupling problem
"""
import copy
import logging
import numpy as np
import scipy
from renormalizer.mps.tdh import mflib
from renormalizer.mps.tdh.propagation import unitary_propagation
from renormalizer.utils import... |
#!/usr/bin/env python3
# Copyright 2017 <NAME>. 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 ... |
import pytest
import tempfile
import os
import paths_cli
from openpathsampling.tests.test_helpers import make_1d_traj
from paths_cli.parameters import *
import openpathsampling as paths
def pre_monkey_patch():
# store things that get monkey-patched; ensure we un-patch
stored_functions = {}
CallableCV = ... |
# -*- coding: utf-8 -*-
"""
Utility functions used by other scripts
Created on Tue Jun 18 23:09:08 2019
@author: lbechberger
"""
from math import sqrt
# distance functions to use in compute_correlations
distance_functions = {'InnerProduct': {'precompute': lambda x, y: [-1 * x_i * y_i for x_i, y_i in zip(x, y)],
... |
# -*- coding: utf-8 -*-
"""
Created on 2018-12-04 10:23:06
@author: <NAME>
"""
# TODO: add connection form input to the first num_dense_layer layers in NEAT!
import sys,os
curPath = os.path.abspath(os.path.dirname(__file__))
parentPath = os.path.split(curPath)[0]
rootPath = os.path.split(parentPath)[0]
sys.path.appen... |
import collections
import copy
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.exceptions import NotFittedError
import torch
from torch.utils.data.dataloader import DataLoader
from fastai.basic_data import DataBunc... |
import streamlit as st
import numpy as np
import pandas as pd
import torch
from torchvision import transforms
import models
import yaml
from skimage import io, transform, filters
import cv2 as cv
from scipy import ndimage
from pathlib import Path
from argparse import Namespace
from PIL import Image, ImageFilter
from o... |
import argparse
import collections
import faiss
import json
import logging
import numpy as np
import os
import time
import torch
import tensorflow as tf
import tensorflow_hub as hub
import tensorflow_text
from elasticsearch import Elasticsearch
from transformers import BertConfig, BertTokenizer, BertModel, BertPreTrai... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# rfclass.py - <NAME> (<EMAIL>) - Dec 2017
# License: MIT. See the LICENSE file for more details.
'''Does variable classification using random forests. Two types of
classification are supported:
- Variable classification using non-periodic features: this is used to perfo... |
"""
Python parser and validator of configs.
The first part of this file defines `PythonConfig`, which I recommend all config classes should inherit.
The second part of this file defines how `PythonConfig` can be written in yaml and command line arguments.
"""
import dataclasses
import inspect
import json
import os
im... |
#!/usr/bin/env python
"""
CMSC733 Spring 2020: Classical and Deep Learning Approaches for
Geometric Computer Vision
Homework 0: Alohomora: Phase 1 Starter Code
Author(s):
<NAME> (<EMAIL>)
PhD Candidate in Computer Science,
University of Maryland, College Park
<NAME> (<EMAIL>)
PhD Student in Computer... |
'''
@FileName : init_guess.py
@EditTime : 2021-12-13 13:37:50
@Author : <NAME>
@Email : <EMAIL>
@Description :
'''
from core.utils.recompute3D import recompute3D
import torch
import numpy as np
from core.utils.umeyama import umeyama
import cv2
from core.utils.visualization3d import Visualization
... |
import logging
from typing import Any, Callable, Union
from .conditions import render
from .exceptions import (
InvalidModel,
InvalidStream,
InvalidTemplate,
MissingObjects,
)
from .models import BaseModel, Index, subclassof, unpack_from_dynamodb
from .search import Search
from .session import SessionW... |
import asyncio
import contextlib
import hashlib
import re
from typing import (
Any,
AsyncGenerator,
AsyncIterator,
Generator,
Optional,
)
from wcpan.logger import INFO, DEBUG, EXCEPTION, WARNING
from wcpan.drive.core.abc import (
RemoteDriver,
ReadableFile,
WritableFile,
Hasher,
)
f... |
""" inputgen class
Create an APBS input file using psize data
Written by <NAME> based on original sed script by <NAME>
----------------------------
Version: $Id$
----------------------------
"""
# User - Definable Variables: Default values
# cfac = 1.7 # Factor by which to e... |
import src.my_globals as my_globals
pd, np, plt, sns, _ = my_globals.make_initial_imports()
def analyse_feature(df_, feature_name, feature_type, num_gr=10):
print()
if feature_type == 'categorical':
fig, axes = plt.subplots(2, 1,
figsize=(15, 6),
... |
'''
This module defines the atom class, which is a class which contains very
general descriptions of a single atom.
'''
try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping
from futile.Utils import write as safe_print
#: Conversion between Atomic Units and ... |
#!/usr/bin/env python
# coding: utf-8
# ## Music Recommendation System (Data Processing and Analysis)
# ### Framing the Problem
# This project is aimed upon building a music recommendation system that gives the user recommendations on music based on his music taste by analysing his previously heard music and playlis... |
from numpy.testing import TestCase, assert_array_equal, \
assert_array_almost_equal, assert_almost_equal
import numpy as np
import os
from parameterized import parameterized
from .. import environments
from ..auction_data import AuctionData, moment_matrix, FilterTies
from ..analytics import (
IsNonCompetitive,... |
import glob
import itertools
import os
from datetime import datetime
from itertools import chain
import chart_studio.plotly as py
import matplotlib.pyplot as plt
import missingno as msno
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import seaborn as sns
from sklearn.ensemble import RandomFo... |
from base.urlop import UrlRequestOp
import json
import math, time
from random import randint
import traceback
from bs4 import BeautifulSoup
from base import delayer
from handler import Pool
from handler.Error import TakerBasicException, UrlOpTimeOutError, PullerBasicException
import llogger
import gui
ITEM_EACH_PA... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Available variables and functions:
PATH: croot, mroot
DATA: res, TABLine, TABand
FUNC: partuning, calexpansion, calextraction
"""
import os
import numpy as np
## Path of current file
croot = os.path.dirname(os.path.abspath(__file__))+'/'
## MILES root path
... |
import pickle
import torch
import torchvision.transforms as transforms
import torch.nn.functional as F
import numpy as np
import os
import clip
from PIL import Image
from sklearn.decomposition import PCA
from ZSSGAN.utils.text_templates import imagenet_templates, part_templates, imagenet_templates_small
class Dire... |
"""The WaveBlocks Project
IOM plugin providing functions for handling
homogeneous Hagedorn wavepacket data.
@author: <NAME>
@copyright: Copyright (C) 2010, 2011, 2012, 2013, 2016 <NAME>
@license: Modified BSD License
"""
import numpy as np
def add_wavepacket(self, parameters, timeslots=None, blockid=0, key=("q", "... |
'''
https://www.kaggle.com/jbuchner/synthetic-speech-commands-dataset
'''
import torch
import clutils
from clutils import monitors
from clutils.experiments import Trainer
from clutils.metrics import accuracy
from clutils.strategies import EWC, MAS, Rehearsal, LWF, GEM, AGEM
def words_exp(args):
N_MELS = 40
... |
# Copyright (c) 2009-2019 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
# Maintainer: joaander / All Developers are free to add commands for new features
r""" Update particle properties.
When an updater is specified, it acts on the p... |
from __future__ import unicode_literals
import logging
import os
import sys
import getpass
from six import reraise
from io import StringIO
from functools import wraps
from collections import defaultdict
import sprinter.lib as lib
from sprinter.core import PHASE, load_global_config, Directory, Injections, Manifest, loa... |
#!/usr/bin/env python
from . import main
import random as rng
from datetime import datetime
import app.defaults as AppDefaults
from app import db, pages
from app.models import Annotation, Source, Author, Tag, Collection
from app.tools import home_url, SortIt
from app.main.tools import SearchAnnotations, paginated_a... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.autograd as autograd
import torch.optim as optim
import numpy as np
import os
from torch.autograd import Variable
from torch.utils import data
import copy
import sys
import pandas as pd
import shap
import math
class Dataset(data.Dataset):
... |
# -*- coding: utf_8 -*-
"""Windows Analysis Module."""
import base64
# Local analysis
import configparser
import json
import logging
import os
import platform
import re
import subprocess
# Binskim/Binscope analysis
import xmlrpc.client
from os.path import expanduser
import rsa
from lxml import etree
from django.con... |
import re
import os
import sys
import ast
import pytest
import typing
import logging
from git import Repo
from importlib import import_module
from chardet import UniversalDetector
ListOrNone = typing.Union[list, None]
StrOrNone = typing.Union[str, None]
ListOfString = typing.List[str]
DictOfListOfString = typing.Dict[... |
import re
from rest_framework import generics
from rest_framework import permissions
from rest_framework import exceptions
from rest_framework import status
from rest_framework.response import Response
from django.shortcuts import get_object_or_404
from django.contrib.auth.models import User
from django.db.models imp... |
# -*- coding: utf-8 -*-
"""
Created on Tue May 31 16:57:03 2016
@author: rmondoncancel
"""
from stateManagement import \
getBuff, applyBuff, removeBuff, applyDebuff, getResistance, addAction, \
nextAction, applyDamage, applyTpChange
from dpsCalculation import \
baseDamage, basePotency, critChance, critBon... |
# -*- coding: utf-8 -*-
"""
Function to save laminate design set-up
- save_objective_function_BELLA:
saves the objective function parameters on Sheet [Objective function]
- save_multipanel:
saves the data of the multipanel structure:
- panel geometry
- panel thickness targets
... |
import numpy as np
import warnings
from time import time
import pandas as pd
from itertools import count
from scipy.optimize import OptimizeWarning
from scipy.linalg import LinAlgWarning
from sklearn.exceptions import ConvergenceWarning
from sklearn import linear_model as LM
from sklearn.svm import SVC, LinearSVC
fro... |
import json
import yaml
import os
from collections import OrderedDict
import re
def get_extension(file):
return os.path.splitext(file)[1]
def load(input_file_path):
''' Load schema file based on extension and return resulting dictionary. '''
ext = get_extension(input_file_path).lower()
if (ext == '.j... |
# -*- coding: utf-8 -*-
"""
Copyright (C) 2012-2021 https://github.com/pytube/pytube/
SPDX-License-Identifier: Unlicense
Copyright (C) 2021 plugin.video.youtube
SPDX-License-Identifier: GPL-2.0-only
See LICENSES/GPL-2.0-only for more information.
"""
import re
from copy import copy
from ....kod... |
'''
Copyright 2019 Tobii Pro AB
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... |
import torch
from torch import nn
from torch import optim
from torch.optim.lr_scheduler import ReduceLROnPlateau, MultiStepLR
import os
import wandb
import inspect
import numpy as np
from tqdm import tqdm
from pprint import pprint
from copy import deepcopy
import matplotlib.pylab as plt
from .datasets import *
from .... |
# -*- coding:utf-8 -*-
from __future__ import division, unicode_literals
import math
from django.core.exceptions import (
ImproperlyConfigured,
ObjectDoesNotExist,
ValidationError,
)
from django.core.validators import MaxValueValidator, EMPTY_VALUES
from django.db import models
from django.db.models.fiel... |
from __future__ import print_function
import re
from warnings import warn
from scss.cssdefs import CSS2_PSEUDO_ELEMENTS
# Super dumb little selector parser.
# Yes, yes, this is a regex tokenizer. The actual meaning of the
# selector doesn't matter; the parts are just important for matching up
# during @extend.
# ... |
# coding: utf-8
# YYeTsBot - fansub.py
# 2019/8/15 18:30
__author__ = 'Benny <<EMAIL>>'
import contextlib
import hashlib
import json
import logging
import os
import pickle
import re
import sys
import fakeredis
import pymongo
import redis
import requests
from bs4 import BeautifulSoup
from config import (CK180_SEARCH... |
import re
from django.conf import settings
from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations,
)
from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.gdal import GDALRaster
from django.contrib.gis.measure import Distance
from django.core.... |
"""
Trie based Entity Matcher, for Exact matching of Normalized text.
Ref: https://github.com/google/pygtrie
"""
import dataclasses
from datetime import datetime
import os
from pathlib import Path
from typing import Dict, Iterable, List, NamedTuple, Optional, Sequence, Set, Tuple
import pygtrie
import numpy as np
... |
# Databricks notebook source
# MAGIC %md
# MAGIC ## Problem formulation
# MAGIC A common problem in computer vision is estimating the fundamental matrix based on a image pair. The fundamental matrix relates corresponding points in stereo geometry, and is useful as a pre-processing step for example when one wants to pe... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import Tkinter as tk
from mycobot_ros.srv import (
GetCoords, SetCoords, GetAngles, SetAngles, GripperStatus)
import rospy
import time
from rospy import ServiceException
class Window:
def __init__(self,handle):
self.win = handle
self.win.resizable(... |
# 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, ... |
#
# 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... |
# 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... |
# -*- coding: utf-8 -*-
"""
Functionality for exporting Skype data to external files.
------------------------------------------------------------------------------
This file is part of Skyperious - a Skype database viewer and merger.
Released under the MIT License.
@author <NAME>
@created 13.01.201... |
from __future__ import absolute_import
import numpy as np
from scipy.interpolate import griddata
from plotly.graph_objs import graph_objs as go
import warnings
def _pl_deep():
return [[0.0, 'rgb(253, 253, 204)'],
[0.1, 'rgb(201, 235, 177)'],
[0.2, 'rgb(145, 216, 163)'],
[0.3, '... |
"""
Binning process sketch.
"""
# <NAME> <<EMAIL>>
# Copyright (C) 2021
import numbers
import time
from warnings import warn
import numpy as np
import pandas as pd
from sklearn.base import BaseEstimator
from ...binning.binning_process import _check_selection_criteria
from ...binning.binning_process import _METRIC... |
from coldtype.renderer.winman.passthrough import WinmanPassthrough
import time as ptime
from subprocess import Popen, PIPE
from pathlib import Path
from coldtype.color import rgb
try:
import glfw
except ImportError:
glfw = None
try:
import skia
import coldtype.fx.skia as skfx
except ImportError:
... |
# -*- test-case-name: twisted.web.test.test_template -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
HTML rendering for twisted.web.
@var VALID_HTML_TAG_NAMES: A list of recognized HTML tag names, used by the
L{tag} object.
@var TEMPLATE_NAMESPACE: The XML namespace used to identi... |
import math
import numpy as np
import subprocess
import numbers
import importlib
import sys
import re
from itertools import chain, combinations
import numba
from numba import prange, njit, unittest_support as unittest
from numba.targets import cpu
from numba.compiler import compile_isolated, Flags
from .support import... |
#!/usr/bin/env python3
"""
A script that imports and analyzes Garmin health device data into a database.
The data is either copied from a USB mounted Garmin device or downloaded from Garmin Connect.
"""
import logging
import sys
import argparse
import datetime
import os
import tempfile
import zipfile
import glob
fr... |
"""
Components/File Manager
=======================
A simple manager for selecting directories and files.
Usage
-----
.. code-block:: python
path = '/' # path to the directory that will be opened in the file manager
file_manager = MDFileManager(
exit_manager=self.exit_manager, # function called wh... |
"""
devl.py -- The more cross-platform makefile substitute with setup tools
Usage
=====
For first-time setup of this file, type 'python devl.py'
How to Add Functionality
========================
User Variables
--------------
To add a new user variable, you should
- Update the ``user_variables`` dict in this modul... |
import os
import re
from fs_helpers import *
import tweaks
def randomize_items(self):
print("Randomizing items...")
if not self.options.get("keylunacy"):
randomize_dungeon_items(self)
randomize_progression_items(self)
# Place unique non-progress items.
while self.logic.unplaced_nonprogress_ite... |
#!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Pelix remote services: Specifications handling utility methods
:author: <NAME>
:copyright: Copyright 2020, <NAME>
:license: Apache License 2.0
:version: 1.0.1
..
Copyright 2020 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
... |
"""
Author: vigarbuaa
"""
import hashlib
import hmac
import sys
import time
from copy import copy
from datetime import datetime, timedelta
from urllib.parse import urlencode
import pytz
from vnpy.api.rest import Request, RestClient
from vnpy.api.websocket import WebsocketClient
from vnpy.event import Event
from vnpy.... |
# Author: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# License: BSD (3-clause)
import numpy as np
import pytest
from numpy.testing import (assert_array_almost_equal, assert_array_equal)
from mne import io
from mne.time_frequency import psd_array_welch
from mne.decoding.ssd import SSD
from mne.utils import requires_sk... |
from __future__ import print_function
from __future__ import division
import time
from utils import *
def dncnn(input, is_training=True, output_channels=3):
with tf.variable_scope('block1'):
output = tf.layers.conv2d(input, 64, 3, padding='same', activation=tf.nn.relu)
for layers in xrange(2, 19 + 1)... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# iutest_compiler_error_test.py
#
# Copyright (C) 2015-2016, <NAME>
# This software is released under the new BSD License,
# see LICENSE
#
import os
import sys
import re
import copy
from argparse import ArgumentParser
from argparse import FileType
from subprocess import... |
# -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... |
import copy
import enum
import json
import os
import iwp.labels
# module for all things related to Scalabel frames.
# NOTE: we encode slice parameters in the Scalabel frame's name to support a
# full round trip during labeling. without this, we do not have a way to
# convey metadata about the frame that... |
import fnmatch
import os
from collections import OrderedDict, defaultdict
from conans.client.conanfile.configure import run_configure_method
from conans.client.generators.text import TXTGenerator
from conans.client.graph.build_mode import BuildMode
from conans.client.graph.graph import BINARY_BUILD, Node, CONTEXT_HOST... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.