text stringlengths 6.04k 39.5k |
|---|
"""
Tests for course_modes views.
"""
import decimal
import unittest
from datetime import datetime, timedelta
from unittest.mock import patch
import ddt
import freezegun
import httpretty
import pytz
from django.conf import settings
from django.urls import reverse
from common.djangoapps.course_modes.models import Co... |
# SPDX-FileCopyrightText: 2009 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
#
# Project:
# glideinWMS
#
# File Version:
#
# Description:
# Frontend config related classes
#
import os.path
import urllib.error
import urllib.parse
import urllib.request
from glideinwms.creation.lib.matchPolicy ... |
from flask import Flask, make_response
from data_util import *
from slackclient import SlackClient
app = Flask(__name__)
keys=[]
messages = []
childele = []
searchText=""
jobdetails={}
configdata=[]
slack_auth=load_authentication()
slackconfig = configparser.ConfigParser()
slackconfig.read("config.ini")
filter_servic... |
import tensorflow as tf
import numpy as np
import hparams as hp
hp.add("num_layers", 1, help="Num transformer layers")
hp.add("dropout_rate", 0.1, help="Dropout rate")
hp.add("d_model", 128, help="d-model")
hp.add("num_heads", 4, help="Num self attention heads")
hp.add("dff", 512, help="dff")
hp.add("embedding_init_va... |
import ephem
import scipy as sp
import numpy as np
import pandas as pd
import pickle
from scipy import signal,stats
from datetime import datetime
from datetime import timezone
from maria import tools
#import tools
from importlib import resources
import weathergen
print('local objects')
# an array object desc... |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 30 15:05:09 2020
@author: Oscar
"""
from numba import jit, prange
import numpy as np
import random
import time
import argparse
##############################################
######### PARÁMETROS FÍSICOS ################
###################################... |
# MIT License
#
# Copyright (c) 2020 <NAME>
#
# 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, publi... |
#!/usr/bin/env python
"""dse_shell_ext module for a dse user package.
You can add custom commands and basically whatever you want inside here."""
import sys
import traceback
from re import match, IGNORECASE
import dselib
# I need to generalize the exception handling for this module to simplify
# pylint: disable=W0... |
"""
Make a VoD file look like infinite live DASH content. The timing is synchronized with wall clock.
The rewrites which are done are
MPD:
@MPD
remove mediaPresentationDuration
set type dynamic
set publishTime
set timeShiftBufferDepth
set availabilityStartTime
set minimumUpdate... |
# Copyright (c) 2021 NVIDIA Corporation. All rights reserved.
# This work is licensed under the NVIDIA Source Code License - Non-commercial.
# Full text can be found in LICENSE.md
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
import numpy as ... |
# -*- coding: utf-8 -*-
"""
Support for reboot, shutdown, etc on POSIX-like systems.
.. note::
If you have configured a wrapper such as ``molly-guard`` to
intercept *interactive* shutdown commands, be aware that calling
``system.halt``, ``system.poweroff``, ``system.reboot``, and
``system.shutdown`` w... |
import os
import random
import sys
import warnings
import numpy as np
import pandas as pd
from itertools import chain
from skimage.io import imread, imshow, imread_collection, concatenate_images
from skimage.transform import resize
from skimage.morphology import label
from keras.utils import Progbar
from keras.model... |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
#!/usr/bin/env python3
import sys, os
# Check to make sure we are running the correct version of Python
assert sys.version_info >= (3,7), "This script requires at least Python 3.7"
import character
import json
import gameutil
import gameenemy
import gameitem
# The game and item description files (in the same folder a... |
# -*- encoding: utf-8 -*-
#
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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
#
# ... |
# -*- coding: utf-8 -*-
u'''
This module was copied (with modifications) from the webhelpers library,
which is distributed with the following license:
Copyright (c) 2005-2009 <NAME>, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>,
and other contributors.
All rights reserved.
R... |
# 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... |
"""
https://github.com/xingyizhou/CenterTrack
Modified by <NAME>
"""
import os
import numpy as np
import json
import cv2
try:
import xml.etree.cElementTree as ET # 解析xml的c语言版的模块
except ImportError:
import xml.etree.ElementTree as ET
import matplotlib.pyplot as plt
import os
import numpy as np
import cv2
import... |
'''
Script for preprocessing in single machine
'''
import os
from typing import Dict, List, Set, Tuple, Union
import re
import json
import datetime as dt
from collections import Counter
from tqdm.auto import tqdm
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.f... |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
import math
import os.path as osp
import tempfile
import xml.etree.ElementTree as ET
from ctypes import byref
import numpy as np
import rllab.config as config
from rllab.misc import logger
from rllab import spaces
from rllab.core.serializable import Serializable
from rllab.envs.proxy_env import ProxyEnv
from rllab.envs... |
import os
import numpy as np
import tensorflow as tf
from utils import reduce_sum
from utils import softmax
from utils import get_shape
import config as cfg
import time
from keras.utils import np_utils
import matplotlib.pyplot as plt
from sklearn import metrics
import seaborn as sns
from scipy import stats
from skle... |
import base64
import importlib
import inspect
import io
import os
import re
import sys
import textwrap
from pathlib import Path
import warnings
from redbaron import RedBaron
try:
from numpydoc.docscrape import FunctionDoc, ClassDoc
except ImportError as e:
print('Please install the numpydoc package to build th... |
import numbers
import warnings
import numpy as np
import torch
import torch.nn.functional as torchf
from phi.backend.backend import Backend
from phi.backend.backend_helper import split_multi_mode_pad, PadSettings, general_grid_sample_nd, combined_dim, symmetric_pad
class TorchBackend(Backend):
def __init__(se... |
# Copyright 2020-present <NAME>
#
# 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 ... |
import sys
import ctypes
from ctypes import *
import unittest
__all__ = ['PAI_CONTIGUOUS', 'PAI_FORTRAN', 'PAI_ALIGNED',
'PAI_NOTSWAPPED', 'PAI_WRITEABLE', 'PAI_ARR_HAS_DESCR',
'ArrayInterface',]
try:
c_ssize_t # Undefined in early Python versions
except NameError:
if sizeof(c_uint) == ... |
#!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: supplier_contact.py
@time: 2018-07-17 15:08
"""
from __future__ import unicode_literals
import json
from copy import deepcopy
from datetime import datetime
from flask import (
request,
flash,
render_template,
url_... |
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""HTML reporting for coverage.py."""
import collections
import datetime
import json
import os
import re
import shutil
import coverage
from coverage import env
fr... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 8 17:25:47 2018
@author: ablaas
v2: now with sparse method for LACKI and cv for POKI to make it more stable
"""
#%% 0. Import libraries + define necessary functions + weight
# 0.1 Load packages
import os
#os.chdir("~Documents/2 Oxford/Uni... |
import matrices as mat
import const
print("BITBOARDS INITIALIZING STARTING...")
def line(sq):
#x%(2^y) = x&(2^y-1) for x>0
return sq&7 #sq%8
def rank(sq):
#x/2^y = x>>y for x>0 (and y>0)
return sq>>3 #sq/8
def printBitboard(b):
#convert bitboard into array ... |
import sys
import os
import time
import json
from settings import Config
path = os.path.abspath('./sacred')
sys.path = [path] + sys.path
import torch
from builders import (scheduler_builder, dataloader_builder,
model_builder, optimizer_builder, loss_builder,
config_builder)
... |
# Copyright 2021 Xanadu Quantum Technologies 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 agre... |
#!/usr/bin/env python
from gppylib.gpparseopts import OptParser, OptChecker
from gppylib.operations.backup_utils import split_fqn, checkAndRemoveEnclosingDoubleQuote, removeEscapingDoubleQuoteInSQLString,\
escapeDoubleQuoteInSQLString
import re
import os
import sys
search_... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
import abc
import csv
import logging
from typing import Any, Tuple, Iterable, Dict, List
from arango import ArangoClient
from arango.collection import Collection, StandardCollection
from arango.database import Database
from phdTester import commons
from phdTester.common_types import KS001Str, PathStr, DataTypeStr
fro... |
# Copyright (c) 2021 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 required by appli... |
from stix_shifter_utils.stix_translation.src.patterns.pattern_objects import ObservationExpression, ComparisonExpression, \
ComparisonExpressionOperators, ComparisonComparators, Pattern, \
CombinedComparisonExpression, CombinedObservationExpression, ObservationOperators
from stix_shifter_utils.stix_translation.... |
#!/usr/bin/env python3
import configparser
import os
class Bunch(object):
def __init__(self, adict):
for key, value in adict.items():
setattr(self, key, value)
class Params(object):
def __init__(self, ini):
# Parse INI file
if not os.path.isfile(ini):
print("... |
from __future__ import with_statement
import atexit
import unittest
from datetime import datetime
import flask
from flask.ext import sqlalchemy
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import sessionmaker
def make_todo_model(db):
class Todo(db.Model):
__tablename__ = 'todo... |
"""
Automorphisms of Quadratic Forms
"""
from sage.interfaces.gp import gp
from sage.libs.pari.all import pari
from sage.matrix.constructor import Matrix
from sage.rings.integer_ring import ZZ
from sage.misc.mrange import mrange
from sage.misc.all import cython_lambda
from sage.modules.all import FreeModule
from sage.... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from __future__ import print_function
import logging
import os.path as op
import sys
from collections import defaultdict
from ete3 import Tree
from jcvi.apps.base import OptionParser, glob
from jcvi.formats.base import DictFile, LineFile
from jcvi.formats.sizes import S... |
from collections import OrderedDict
from contextlib import closing
import tempfile
import json
import io
import numpy as np
import pandas as pd
try:
import bbi
except ImportError:
bbi = None
try:
import pyBigWig
except ImportError:
pyBigWig = None
from ..util import run
from ..region import parse_re... |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... |
import csv
import io
from flask import (
current_app,
flash,
redirect,
render_template,
request,
Response,
url_for,
)
from flask_login import current_user
from . import admin_bp
from .forms import (
CancelCarpoolAdminForm,
DeleteDestinationForm,
DestinationForm,
ProfilePurgeF... |
import struct
from collections import deque
from logging import getLogger
import asyncio
import priority
from h2 import events
from h2 import settings
from h2.config import H2Configuration
from h2.connection import H2Connection
from h2.exceptions import NoSuchStreamError, StreamClosedError, ProtocolError
from . impor... |
# -*- coding:utf-8 -*-
# Copyright xmuspeech (Author: Snowdar 2019-11-25)
import os, sys
import logging
import math
import time
import traceback
import progressbar
import pandas as pd
import numpy as np
import torch
from torch.cuda.amp import autocast, GradScaler
from .reporter import Reporter
from .lr_scheduler imp... |
from aiida.common.exceptions import InputValidationError
from aiida.plugins import DataFactory
from aiida_lammps.calculations.lammps import BaseLammpsCalculation
from aiida_lammps.common.utils import convert_date_string, get_path, join_keywords
from aiida_lammps.validation import validate_against_schema
class MdMult... |
import json
import logging
import subprocess
from configparser import ConfigParser
from pathlib import Path, WindowsPath
from typing import Optional, Iterator
from .globals import RFACTOR_PLAYER, RFACTOR_DXCONFIG, RF2_APPID, RFACTOR_VERSION_TXT, RFACTOR_CONTROLLER
from .preset.preset import BasePreset, PresetType
from... |
"""
IEX limits:
UPCOMING_DIVIDENDS = 5,950 per call
OPTIONS_EOD_DATES (stable/stock/IHY/options for list of dates) =
STOCK_QUOTE (underlying quote) = 1 per call
FX_LATEST (currency converion list from tradeable divvies) = 500 per call
"""
import requests
import pickle
import logging
import re
from pathlib import Path... |
from __future__ import division
import numpy as np
import scipy as sp
import pandas as pd
import math
import scipy.stats
import scipy.special
import multiprocessing
import click
from .optimized import (find_nearest_matches as _find_nearest_matches,
count_num_positives, single_chromatogram_hypot... |
from tkinter import *
from tkinter import ttk
from queries import *
import re
import time
lista = []
# Search bar
# Use this as a flag to indicate if the box was clicked.
global clicked
clicked = False
class AutocompleteEntry(Entry):
def changed(self, name, index, mode):
if self.var.get() == '':
... |
#
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
import json
import pkgutil
import time
from abc import ABC
from datetime import datetime
from typing import Any, Dict, Iterable, List, Mapping, MutableMapping, Optional, Tuple
import jwt
import pendulum
import requests
from airbyte_cdk.sources import Abstr... |
# Copyright 2013 Red Hat, 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 agre... |
# set MacOS X specific options
from waflib import Configure, Options, Context, Errors, Utils
from waflib.Configure import conf
import os
import re
import sys
import plist_smalllib
from macholib import MachO
class Darwin(Configure.ConfigurationContext.Platform):
NAME = 'Darwin'
SDK_NAME = 'Darwin'
OS_NAME... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""bridgy
SSH + TMUX + SSHFS + CLOUD INVENTORY SEARCH.
Fuzzy search for one or more systems then ssh into all matches, organized
by tmux.
Usage:
bridgy init
bridgy ssh (-t | --tmux) [-adsuvw] [-l LAYOUT] [-i SOURCE] <host>...
bridgy ssh [-duv] [-i SOURCE] <host>
br... |
# Copyright (c) 2019-2020 <NAME>
# License: MIT License
# Created 2019-03-09
from typing import TYPE_CHECKING, Iterable, List, cast
from ezdxf.math import Vector
from ezdxf.lldxf.attributes import DXFAttr, DXFAttributes, DefSubclass, XType
from ezdxf.lldxf.const import SUBCLASS_MARKER, DXF2000, DXF2010, DXFTypeError
fr... |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
##
## lbx.py
##
## Created on: Jan 9, 2017
## Author: <NAME>
## E-mail: <EMAIL>
##
"""
===============
List of classes
===============
.. autosummary::
:nosignatures:
LBX
==================
Module description
========... |
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 23 14:18:41 2020
@author: Mitchell
Classifier GUI.py
~~~~~~~~~~~~~~~~~
An interactive GUI for classifying user inputted handwritten digits using simple
neural networks constructed using numpy. The GUI allows the user to draw an
image on the canvas and then select one of ... |
try:
import os, logging, sys, glob, webbrowser, time
import numpy as np
from collections import Iterable # used in the flatten function
from bisect import bisect_left
except:
print(
"ExceptionERROR: Missing fundamental packages (required: bisect, collections, os, sys, glob, logging, ... |
"""
Methods for dealing with residuals.
"""
# -----------------------------------------------------------------------------
# IMPORTS
# -----------------------------------------------------------------------------
from itertools import product
from math import fmod
from typing import Dict, List, Tuple, Union
from as... |
"""
OpenAI Gym compatible Driving simulation environment based on Carla.
Requires the system environment variable CARLA_SERVER to be defined and be pointing to the
CarlaUE4.sh file on your system. The default path is assumed to be at: ~/software/CARLA_0.8.2/CarlaUE4.sh
Chapter 7, Hands-on Intelligent Agents with OpenAI... |
"""Provides device triggers for Z-Wave JS."""
from __future__ import annotations
import voluptuous as vol
from zwave_js_server.const import CommandClass, ConfigurationValueType
from homeassistant.components.automation import AutomationActionType
from homeassistant.components.device_automation import DEVICE_TRIGGER_BA... |
# coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
#!/usr/bin/env python3
from ortools.constraint_solver import routing_enums_pb2
from ortools.constraint_solver import pywrapcp
import math
import numpy as np
def create_data_model():
data = {}
fuel_capacity = 30_000 # fuel_capacity in -ft
_locations = [
(2.5, 2.5), # start 0
((2.875, 3.3... |
"""
Module bundling all functions needed to scrape metadata from webpages.
This file is available from https://github.com/adbar/trafilatura
under GNU GPL v3 license
"""
import itertools
import logging
import re
from htmldate import find_date
from lxml import html
from .url_utils import url_normalizer, extract_doma... |
import random
from midiutil import MIDIFile
import training
appropriate_keys = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"]
minimum_notes = [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
batch_size = 32
directions = ["UP", "UR", "RI", "DR", "DO", "DL", "LE", "UL", "ST"]
# SETTINGS START #
sea... |
#!/usr/bin/env python3
# -*- coding: utf-8
import string
import operator
import functools
import re
import datetime
from .utils import parse_pathname, parse_tsv, progress, parse_pubid, find_files, get_args, memoize, parse_xdid
from .utils import log, error, warn
g_corpus = [] # list of xdfile
g_all_clues = [] # li... |
import os
import shutil
from functools import partial
from itertools import product
import argparse
import numpy as np
import seaborn as sns
import tensorflow as tf
from matplotlib import pyplot as plt
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import (accuracy_score, classification_repor... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import argparse
import builtins
import os
import sys
from datetime import timedelta
from tqdm import tqdm
import torch
import torchvision
import torchvision.datasets as datasets
from torch import autograd, nn, optim
from torch.nn i... |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import os
import json
import warnings
from io import open
import scipy
from monty.os.path import which
from pymatgen.electronic_structure.core import Spin
from pymatgen.electronic_structure.co... |
import time
import cv2
from queue import LifoQueue as Queue
from queue import Empty
import data_types
import datetime
from threading import Thread
from inspect import getframeinfo, stack
from config_v3_2 import *
import socket
import pickle
import _thread
import net_p3
from blocks_detection import Model
import numpy as... |
import logging
from datetime import date, datetime
import phonenumbers
import vobject
from django.core.exceptions import ValidationError
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from django.db import models
from django.utils.translati... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
from lib.resnets import ResNet50
class BasicConv2d(nn.Module):
def __init__(self, in_planes, out_planes, kernel_size, stride=1, padding=0, dilation=1):
super(BasicConv2d, self).__init__()
self.c... |
#!/usr/bin/python3
'''
Based on story https://pastebin.com/HN6hH1j0
This material is intended for research purposes only
BTC Donation address: bc1qxnf2y7a8t4nuxhr8k4u8ctyy4cmzzgyea2s2pp
'''
import websocket
import time, json
from datetime import datetime, timezone, timedelta
import dateutil, calendar
from telethon im... |
# -*- coding: utf-8 -*-
"""SQLite parser plugin for Google Hangouts conversations database files."""
from __future__ import unicode_literals
from dfdatetime import posix_time as dfdatetime_posix_time
from plaso.containers import events
from plaso.containers import time_events
from plaso.lib import definitions
from p... |
from __future__ import division
import warnings
import os
import sys
import math as m
import logging
import astropy.io.fits as pf
import pandas as pd
import numpy as np
import seaborn as sb
import matplotlib.pyplot as pl
from collections import namedtuple
from glob import glob
from os.path import join, exists, basen... |
import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import tensorflow as tf
from scipy.optimize import linear_sum_assignment
def calculate_iou_tf(truth_sid,
pred_sid,
truth_shower_sid,
pred_shower_sid,
... |
import urllib.request
import re
from pprint import pprint
def parseAirportCode(tokens, metar):
#print("Airport ICAO: %s" % tokens[0])
metar['airport'] = tokens.pop(0)
def parseTime(tokens, metar):
token = tokens[0]
if len(token) != 7:
raise ValueError('Time token wrong length')
date ... |
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is... |
"""
This implements the client credentials flow explained here -
https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow
Everything here refers to the current web api reference - https://developer.spotify.com/documentation/web-api/reference/
Sections of API covered:
... |
import logging
import yaml
from glob import glob
import os
import re
import inspect
import sys
import copy
from pprint import pprint
from deepmerge import Merger
import copy
DATA_DIR = (
os.path.abspath(os.path.dirname(__file__) + os.path.sep + "data") + os.path.sep
)
cls_lookup_table = {}
def special_list_merg... |
import cgi
import copy
import re
import marshal
from . import sanitizer
from .sanitizer import xmlescape, PY2
if PY2:
# python 2
import copy_reg
else:
# python 3
import copyreg as copy_reg
unicode = basestring = str
__all__ = [
"A",
"BEAUTIFY",
"BODY",
"CAT",
"CODE",
"DIV"... |
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2017 by <NAME> <<EMAIL>>
# All rights reserved. BSD 3-clause License.
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""Dictionary learning based on ADMM sparse co... |
import json
from cocotb_usb.descriptors import (Descriptor, EndpointDescriptor,
InterfaceDescriptor,
ConfigDescriptor, DeviceDescriptor,
StringDescriptorZero, StringDescriptor,
... |
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, print_function
import sys
from argparse import ArgumentParser, _ActionsContainer
from collections import OrderedDict, defaultdict
from pex.argpars... |
# -*- coding: utf-8 -*-
import hmac
import hashlib
import time
from . import utils
from .compat import urlquote, to_bytes, is_py2
from .headers import *
import logging
from .credentials import StaticCredentialsProvider
AUTH_VERSION_1 = 'v1'
AUTH_VERSION_2 = 'v2'
logger = logging.getLogger(__name__)
def make_auth(... |
# Copyright (c) <NAME>, <NAME>, and ZOZO Technologies, Inc. All rights reserved.
# Licensed under the Apache 2.0 License.
"""Class for Generating Synthetic Logged Bandit Feedback."""
from dataclasses import dataclass
from typing import Optional, Callable
import numpy as np
from scipy.stats import truncnorm
from sklea... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from PySide6.QtCore import Qt, Signal, QMimeData, QSize
from PySide6.QtGui import QTextCursor, QDrag, QKeySequence, QColor
from PySide6.QtWidgets import (
QWidget,
QTextEdit,
QHBoxLayout,
QVBoxLayout,
QListWidget,
QListWidgetItem,
QAbstractItem... |
import sys
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox
from tkinter import font
from collections import OrderedDict
import re
import math
import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import norm
class Model:
def __init__(self):
self.parameters = Orde... |
import pandas as pd
import numpy as np
import sandy
from sandy.core.endf6 import _FormattedFile
__author__ = "<NAME>"
__all__ = [
"Errorr",
]
pd.options.display.float_format = '{:.5e}'.format
class Errorr(_FormattedFile):
"""
Container for ERRORR file text grouped by MAT, MF and MT numbers.... |
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import six
import json
from collections import OrderedDict
from copy import deepcopy
from six.moves import zip_longest
from .profile imp... |
#!/usr/bin/env python
## -*- coding: utf-8 -*-
##
## <NAME> - 2018-11-02
##
## This code solve the angry-reverser from the HackCon 2016 CTF.
## The particularity of this sample is that we use an external solver to solve
## queries instead of using the internal Triton's solver (even if in both cases
## it uses z3).... |
import re
from datetime import datetime
from utils import get_player_input_type
import difflib
import os
from pathlib import Path
import discord
from discord.ext.commands import BadArgument
from rcon import instances, logs
from rcon.commands import Rcon
from rcon.connection import RconAuthError
from rcon.query import... |
# # Unity ML-Agents Toolkit
# ## ML-Agent Learning (PPO)
# Contains an implementation of PPO as described (https://arxiv.org/abs/1707.06347).
import logging
import os
from collections import deque
import numpy as np
import tensorflow as tf
from mlagents.envs import AllBrainInfo, BrainInfo
from mlagents.trainers.buff... |
import struct
import multiprocessing as mp
import os.path
import datetime
import os
import sys
bases = ["A", "C", "G", "U"]
def load_aa_codes(code="default"):
"""Loads in the aa_codes.txt file and finds the right codes"""
aa_code = {}
with open(os.path.join(sys.path[0], "aa_codes.txt"), "r") as f:
... |
import numpy as np
import random as rd
import math as mt
import sys
from collections import defaultdict
class Machine :
def __init__(self, setup, number):
self.index = 0 # Machine이 예정된 operation 중 현재 할당 할 Operation의 위치
self.isIdle = True # Idle 상태 여부
self.setup = setup # 2차원 List ... |
# Copyright 2013 UnitedStack Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... |
#!/usr/bin/env python
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from builtins import range,object
# -*- coding:UTF-8 -*-
"""
preparing the transcripts annotation files.
"""
import sys
if sys.version_info.major ==2:
import cPickle as pickle
else:
impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.