text stringlengths 3.07k 22.1k |
|---|
import os
import random
import requests
from utils import Config, FileNames, Important, WebsiteData, log
def giphy(request):
giphy_url_list = []
giphy_usage = False
if Important.giphy_usage:
if WebsiteData.index["api_usage"]["giphy"]["usage"]:
giphy_usage = True
# Random
... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import abc
import pickle
from pathlib import Path
import warnings
import pandas as pd
from typing import Tuple, Union, List
from qlib.data import D
from qlib.utils import load_dataset, init_instance_by_config, time_to_slc_point
from qlib.log im... |
"""Classes that abstract writing to various types of filesystems.
Currently two types of 'filesystem' are supported:
* the local file system, via python's native file() objects
* Amazon's S3, using the boto library (only if boto is installed; boto is not a requirement)
For each filesystem, three types of writer cla... |
"""
@author: mweigert
A basic wrapper class around pyopencl.cl__array
"""
from __future__ import absolute_import, print_function
import numpy as np
import pyopencl.array as cl_array
import pyopencl as cl
from gputools import get_device
from gputools.core.oclprogram import OCLProgram
import pyopencl.clmath as cl_ma... |
import os
import struct
import numpy as np
import matplotlib.pyplot as plt
import torchvision
from torchvision.utils import save_image
from datasetloader import DatasetLoader
from datasetloader_gim import DatasetLoaderGIM
from dataloader_latent import DatasetLoaderLatent
import cv2
def filepath_is_not_valid(filepath):... |
#===- object.py - Python Object Bindings --------------------*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===---------------------------------------------------------------... |
# Copyright (c) [2022] Huawei Technologies Co.,Ltd.ALL rights reserved.
# This program is licensed under Mulan PSL v2.
# You can use it according to the terms and conditions of the Mulan PSL v2.
# http://license.coscl.org.cn/MulanPSL2
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KI... |
import cv2
import time
import numpy as np
from random import randint
import argparse
from predict import *
import glob
parser = argparse.ArgumentParser(description='Run keypoint detection')
parser.add_argument("--device", default="gpu", help="Device to inference on")
parser.add_argument("--image_file", default="group.... |
"""
Tools for managing data for use with `~windspharm.standard.VectorWind`
(or indeed `spharm.Spharmt`).
"""
# Copyright (c) 2012-2017 <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 Softwar... |
from functools import partialmethod
import numpy as np
from matplotlib import pyplot as plt
from astropy.time import Time
def _dates_on_top(ax):
ax1 = ax.twiny()
times = Time(ax.get_xticks() + 24e5, format='jd')
dates = [
'/'.join(d.split('T')[0].split('-')[::-1]) for d in times.isot
]
ax1... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... |
# Copyright (c) 2016, Manito Networks, LLC
# All rights reserved.
import sys, struct
from xdrlib import Unpacker
# Windows socket.inet_ntop support via win_inet_pton
try:
import win_inet_pton
except ImportError:
pass
from socket import inet_ntoa,inet_ntop
from protocol_numbers import *
from parser_modules import ... |
#!/usr/bin/env python3
# coding: utf-8
# Copyright 2022 <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 applic... |
# Subset optimization functions
#
# <NAME>, <NAME>, <NAME>, <NAME>,
# <NAME> and <NAME>. "Unconstrained Salient
# Object Detection via Proposal Subset Optimization."
# CVPR, 2016.
# Code written by <NAME>, 2020
import numpy as np
from tensorflow.keras.applications.vgg16 import preprocess_input
from tensorflow.keras.pr... |
"""
assorted useful functions
"""
import hangups
import shelve
import inspect
import pickle
import os.path
data_keys = {
"eco": {"economy_players": {}},
"2048": {"games_2048": {"current game": None}, "scores_2048": {}},
"rpg": {"rpg_players": {}, "rpg_parties": {}}
}
save_file_name = "save_data"
# hangou... |
"""Numpy version of euclidean distance, shortest distance, etc.
Notice the input/output shape of methods, so that you can better understand
the meaning of these methods."""
import numpy as np
def normalize(nparray, order=2, axis=0):
"""Normalize a N-D numpy array along the specified axis."""
norm = np.linalg.... |
from typing import Dict, Callable, Any
from collections.abc import Mapping
from .command import Command
from .. import resources, PycrittyError
from ..io import log, yio
from rich import print, pretty, inspect
import json, base64, os, sys
import distutils.spawn
class ConfigError(PycrittyError):
def __init__(self, ... |
readMe = """Python 3 script that auto-cycles a switch port if a particular device in
the same network is unreachable. For example, if a MG21 is unreachable, it cycles the
PoE port it is connected to.
Requires a YAML configuration file. You can find an example of such a file here:
https://github.com/meraki/automat... |
import ipaddress
import json
import os
import re
import time
from functools import lru_cache
from urllib.parse import parse_qs, urlencode, urlsplit, urlunsplit
import requests
import rdap
import rdap.bootstrap
from rdap.config import Config
from rdap.exceptions import RdapHTTPError, RdapNotFoundError
from rdap.object... |
import tensorflow as tf
import tensorflow.contrib.slim as slim
from AlexNet import AlexNet
from layers import pixel_dropout_avg, repair_res_layer, up_conv2d
from AutoEncoder import ae_argscope
from utils import montage_tf
DEFAULT_FILTER_DIMS = [64, 128, 256, 512, 1024]
_R_MEAN = 123.68
_G_MEAN = 116.78
_B_MEAN = 103.... |
from ...torch_core import *
from ...layers import *
from ..data import TextClasDataBunch
import matplotlib.cm as cm
__all__ = ['EmbeddingDropout', 'LinearDecoder', 'AWD_LSTM', 'RNNDropout',
'SequentialRNN', 'WeightDropout', 'dropout_mask', 'awd_lstm_lm_split', 'awd_lstm_clas_split',
'awd_lstm_lm_... |
# -*- coding: utf-8 -*-
"""
Python Flight Mechanics Engine (PyFME).
Copyright (c) AeroPython Development Team.
Distributed under the terms of the MIT License.
Atmosphere
----------
"""
from math import exp, sqrt
from abc import abstractmethod
import numpy as np
from pyfme.models.constants import GAMMA_... |
import socket
import time
import turtle
import keyboard
from os import path
import threading
from ipaddress import ip_address
from ctypes import windll
import Tkinter
Host = socket.gethostbyname(socket.gethostname())
running = True
my_places = []
others_places = []
MR_YESNO = 4
window = Tkinter.Tk()
wind... |
from django.db import models
from django.utils import timezone
from mighty.models.base import Base
from mighty.apps import MightyConfig
from mighty.applications.shop import generate_code_type, choices
from mighty.applications.shop.apps import ShopConfig
from schwifty import IBAN, BIC
from datetime import timedelta
c... |
# -*- coding: utf-8 -*-
"""
Use Vault secrets as a Pillar source
Example Configuration
---------------------
The Vault server should be defined in the master config file with the
following options:
.. code-block:: yaml
ext_pillar:
- vault:
url: https://vault:8200
config: Local path or ... |
# Authors: <NAME>, <NAME>
# Description: This class controls motion of the XY stage. It also contains
# a helper function for automatically recognizing and connecting
# to the stage.
import serial
import sys
import time
import threading
import code
from queue import SimpleQueue, Empty
#... |
import os
import random
import torch
import numpy as np
import imageio
import json
import torch.nn.functional as F
import cv2
import pdb
from tqdm import tqdm
from hash_utils import get_bbox3d_for_epickitchens, get_bbox3d_for_epickitchens_incameraframe
from run_nerf_helpers import get_rays_np, get_rays_incameraframe_... |
from ._utils import _gen_id, _task_type_for, _is_tuple
from ._serialisation import DefaultSerialiser
from ._types import _TaskEntry, _GroupEntry, RetryPolicy
from ._context import _TaskContext
from ._pipeline_utils import _get_initial_tasks, _mark_task_complete, _get_task_entry, _get_next_step_in_pipeline, \
_exten... |
"""Process control"""
import asyncio
import contextlib
import ctypes
import signal
import subprocess
import sys
import typing
from hat import aio
async def create_process(args: typing.List[str],
inherit_stdin: bool = True,
sigint_timeout: float = 5,
... |
"""Platform to retrieve Jewish calendar information for Home Assistant."""
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_NAME,
SUN_EVENT_SUNSET,
)
import homeassistant.helpers.co... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from gevent import monkey
monkey.patch_all()
try:
from mephisto.abstractions.architects.router.flask.mephisto_flas... |
"""Milestone 3. EAAA. L2_5 SIPE Image Filters. Release 1.0.0 December 1, 2019.
This code has been attributed from given files on cuLearn.
Authors: <NAME>, <NAME>, <NAME>, <NAME>.
Contact information may be obtained from Carleton University.
Group Leader: Anthony Luo"""
from Cimpl import load_image, create_color, set_c... |
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 22 20:10:10 2019
@author: rlk268
"""
#from jax import grad #we want to use jax's grad function
#import numpy as np #note using np and scipy functions shouldn't work; you have to use the jax versions
import numpy as np
import pickle
import scipy.interpolate as ... |
from matplotlib import pyplot as plt
import numpy as np, sys, os
from astropy import units as u
import math
from scipy.optimize import curve_fit
plt.rcParams.update({'font.size': 14})
from astropy.io import fits
def disect_name(name):
nums = []
strs = []
for s in name.split("_"):
i... |
# Utility to identify offset value for your sensor from a trail of 1000 + runs
# The offset hugely varies from sensor to sensor
#
#
import smbus # import SMBus module of I2C
import time
from mpu6050 import mpu6050
import math
bus = smbus.SMBus(1) # or bus = smbus.SMBus(0) for older version boards
Device_... |
from django.core.management.base import BaseCommand, CommandError
import django.core.exceptions as dce
from django.core.files import File
import clodius.tiles.bigwig as hgbi
import slugid
import tilesets.models as tm
import django.core.files.uploadedfile as dcfu
import logging
import os
import os.path as op
import til... |
"""
Utilities for filtering XML files by date range.
"""
import logging
import math
import os
import pickle
import time
import zipfile
from tqdm import tqdm
import pandas as pd
import gensim
from gensim.test import utils as gensim_test_utils
import spacy
import numpy as np
import spacy.lang.de
from nltk.stem.cistem im... |
#!/usr/bin/env python
import argparse
import os
import re
import sys
VERSION = "0.5"
HELP_TEXT = "pymarkdownsplitter.py -i <inputfile> -o <outputdir>"
EMPTY_LINE = '\n'
TEMPLATE_PREVIOUS_START = "#pymarkdown-previous-start#"
TEMPLATE_PREVIOUS_END = "#pymarkdown-previous-end#"
TEMPLATE_PREVIOUS_LINK = "#pymarkdown-p... |
from typing import List, Tuple, Union
import torch
from .constants import BEAM, BATCH
import logging
import ssl
from .utils import normalize_spaces_remove_urls
from glob import glob
import numpy as np
import uuid
import os
import yaml
from transformers import MarianTokenizer, MarianMTModel
from tacotron_pytorch.src.mod... |
from __future__ import annotations
from functools import cached_property
from typing import Iterable, List, Union
from nuplan.common.actor_state.agent import Agent
from nuplan.common.actor_state.car_footprint import CarFootprint
from nuplan.common.actor_state.dynamic_car_state import DynamicCarState, get_acceleration... |
import numpy as np
import torch
import torch.nn.functional as F
import torch.nn as nn
import sys
from torch.autograd import Variable
import math
import os
import urllib.request
from tqdm import tqdm
from wavencoder.layers import SincConvLayer
from wavencoder.utils import _reporthook
def act_fun(act_type):
if act_ty... |
# -*- coding: utf-8 -*-
import base64
import json
import os
import boto3
from botocore.config import Config
from bs4 import BeautifulSoup
import neologdn
import emoji
import re
from datetime import datetime, timedelta, timezone
import logging
import hashlib
from aws_xray_sdk.core import patch
patch(('boto3',))
compre... |
import contextlib
import collections
import json
import setuptools
import distutils.core
import numpy.distutils.core
import types
import sys
import os
_STDOUT_TERMINATOR = "\n{{ENDOUTPUT}}\n"
# Want a numpy + cython enabled docker image, since so many packages require one of them
DOCKER_IMAGE = "benfred/alpine_numpy"... |
# Copyright (c) 2013, <NAME> and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns, data = [], []
if filters:
columns = get_column(filters)
data = get_data(filters)
return columns, data
d... |
# ===============================================================================
# Copyright 2013 <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/... |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
import http
import re
import infra.e2e_args
import infra.network
import infra.consortium
import ccf.proposal_generator
from infra.proposal import ProposalState
import suite.test_requirements as reqs
from loguru impor... |
# Prepare file lists for VCTK and save in the data list directory
# columns: acoustic feature path | phones | #frames | #phones
#
# <NAME>, 2021-03-10
import os
import argparse
import glob
import numpy as np
import random
# change working dir if needed
import sys
sys.path.append('utils')
from utils import get_meta, ... |
import os.path
import random
import time
import options
from constants import NEWLINE_REPLACEMENT, SPACE_REPLACEMENT, VIRTUAL_TIME_INTERVAL
from definitions import Style
from lib.log import debug, info, warning
from lib.msgs import insert_silences, nb2msg
from paths import TMP_PATH
import res
import version
DEBUG_MOD... |
import enum
import json
import logging
import mimetypes
import pathlib
import pathspec # type: ignore
from collections import OrderedDict
from typing import List, Dict, Optional, Tuple, Any
from dsw_tdk.consts import VERSION, DEFAULT_ENCODING, METAMODEL_VERSION, PATHSPEC_FACTORY
mimetypes.init()
class TemplateFil... |
"""
Modified from https://github.com/pytorch/vision/blob/main/torchvision/models/mnasnet.py
"""
import math
import warnings
import oneflow as flow
import oneflow.nn as nn
from .utils import load_state_dict_from_url
from .registry import ModelCreator
__all__ = ["MNASNet", "mnasnet0_5", "mnasnet0_75", "mnasnet1_0", "m... |
import ast
import csv
import linecache
import sqlite3
from abc import ABC, abstractmethod
from collections import defaultdict
from datetime import datetime
from io import StringIO
from tweepy import Status, User
USER_HEADER = [
"id",
"name",
"screen_name",
"location",
"url",
"expanded_url",
... |
from datetime import date
from Domain.entities import Book, Client, Rental
from Repository.IterableData import filter_list, comb_sort
from Validator.myvalidators import LibraryException, ServiceException
# ------------------------------------------------------------------BOOKS
class ServiceBook:
def __init__(se... |
import json
import os
import numpy as np
import pytest
import tensorflow as tf
from .data_loader import DataLoader
from .evaluator import Evaluator
from .model_driver import beam_search
from .model_trainer import ModelTrainer
from .models import *
"""
data_loader
"""
@pytest.fixture(scope='module')
def d_l():
r... |
"""
Managing optimizer, scheduler, and end of training
"""
import inspect
import warnings
from torch.optim.lr_scheduler import ReduceLROnPlateau
class Controller:
"""
Class for controlling the training dynamics.
:param optimizer: pytorch optimizer (or compatible)
:param scheduler: pytorch scheduler ... |
import pytest
import numpy as np
import torch
import network
import flow
import variational
import time
import itertools
from torch import nn
torch.manual_seed(2)
use_gpu = True
device = torch.device('cuda:0' if use_gpu else 'cpu')
@pytest.fixture(params=[4])
def L(request):
return request.param
def conv2d... |
import time
import pandas as pd
# global variables
CITY_DATA = { 'chicago': 'chicago.csv',
'new york city': 'new_york_city.csv',
'washington': 'washington.csv' }
MONTHS = ['january', 'february', 'march', 'april', 'may', 'june']
def get_filters():
"""
Asks user to specify a city, mo... |
import os
from RLTest import Env
from includes import *
import shutil
import argparse
import signal
from redis import RedisError
terminate_flag = 0
parent_pid = os.getpid()
# this should capture user SIGINT signals (such as keyboard ctrl-c). Since we are using multi-processing,
# this handler will be inherited by a... |
# coding: utf-8
"""
joplin-web sauce starlette
"""
# starlette
from starlette.applications import Starlette
from starlette.config import Config
from starlette.responses import JSONResponse
from starlette.routing import Mount, Route, Router
from starlette.staticfiles import StaticFiles
from starlette.templating impor... |
# -*- coding: utf-8 -*-
import collections
from django import forms
from django.db import connections
from django.db.models.fields import Field
from django.urls import reverse, NoReverseMatch
from django.conf import settings
from django.forms.formsets import BaseFormSet, formset_factory
from importlib import import_mo... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... |
from . import common as common
from datetime import datetime
from flask import Flask, redirect, render_template, request, session
import json
import logging
import mongoengine as mongo
import random
from ccl_scratch_tools import Parser, Scraper, Visualizer
from werkzeug.exceptions import NotFound
from . import schema... |
# Copyright (C) 2021 Cancer Care Associates
# Copyright (C) 2020 Cancer Care Associates and <NAME>
# Copyright (C) 2019 Cancer Care Associates
# 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
... |
# *****************************************************************************
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistribution... |
import numpy as np
import cv2
import cv2.aruco as aruco
import serial
import sys, time, math
# ------------------------------------------------------------------------------
# define variables:
marker_size = 3.35 # - [cm]
sercon = True
port = 'COM3'
camera = 1
camX, camY = 1280, 720
armID = 11
pressed... |
#!/usr/bin/env python3
from __future__ import print_function
import os
from io import BytesIO
import numpy as np
import PIL.Image
from IPython.display import clear_output, Image, display
import tensorflow as tf
import time
import uuid
class DeepDream(object):
"""
DeepDream Image Processer
Please declare m... |
###########################################################################
#
# 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
#
# https://www.apache.org/l... |
"""
Copyright (c) 2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... |
#!/usr/bin/python
#
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unittests for the gs.py module."""
import functools
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from monai.networks.nets import AdaIN
from monai.networks.utils import *
import numpy as np
class StyleDecorator(torch.nn.Module):
def __init__(self):
super(StyleDecorator, self).__init__()
def kernel_normalize(sel... |
import numpy as np
import matplotlib.pyplot as plt
from api.static.visualization import draw_neural_net
from models.ml.visualization.neural_network import NeuralNetworkDrawer
import sklearn.metrics as metrics
np.random.seed(100)
'''
HOW TO USE:
Python
nn = NeuralNetwork()
nn.add_layer(Layer(2, 3, 'tanh'))
nn.add_laye... |
"""Handles the instrospection of REST Framework Views and ViewSets."""
from abc import ABCMeta, abstractmethod
import re
from django.utils import six
from django.contrib.admindocs.utils import trim_docstring
from rest_framework.views import get_view_name, get_view_description
def get_resolved_value(obj, attr, defau... |
from typing import *
from collections import defaultdict
import logging
import velocyto as vcy
class TransciptsIndex:
__slots__ = ["transcipt_models", "tidx", "maxtidx"]
"""Search help class used to find the transcipt models that a read is spanning/contained into"""
def __init__(self, trascript_models: Li... |
#Project: CDM2CSV
#Organization: SIUE Lovejoy Library, Digital Initiatives Department
#Programmers: <NAME>, <NAME>
#Contacts: <EMAIL>, <EMAIL>
#Description: A Python script to help mediate the transfer of library data between ContentDM and Omeka S
import requests, re
import sys, time
import csv, io, json
#function uses... |
import pygame
from pygame.locals import *
from sys import exit
import os
from random import randrange, choice
pygame.init()
pygame.mixer.init()
diretorio_principal = os.path.dirname(__file__)
diretorio_imagens = os.path.join(diretorio_principal, 'imagens')
diretorio_sons = os.path.join(diretorio_principal, 'sons')
L... |
#!/usr/bin/env python
import time
import logging
import traceback
import schedule
from random import shuffle, randint
from time import sleep
from datetime import datetime
from typing import List, Dict
from sqlalchemy.exc import IntegrityError
from sqlalchemy import func
from scraper.scholarly import search_author, se... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-"
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... |
import re
import os
import sys
import json
import collections
import logging
import argparse
from e2edutch import util
from e2edutch import conll
logger = logging.getLogger('e2edutch')
class DocumentState(object):
def __init__(self):
self.doc_key = None
self.text = []
self.sentences = []... |
import numpy as np
from .._common import messages, optimizer
from .._helpers import OptimizeResult, register
from ._constraints import _constraints_map
__all__ = [
"minimize",
]
def minimize(
fun,
bounds,
x0=None,
args=(),
maxiter=100,
popsize=10,
sigma=0.1,
muperc=0.5,
seed=... |
import os
import shutil
from tempfile import TemporaryDirectory
from typing import List, Tuple, Dict, Optional, Callable, Union
import numpy as np
from nebullvm.api.frontend.utils import (
inspect_dynamic_size,
ifnone,
QUANTIZATION_METRIC_MAP,
)
from nebullvm.base import (
InputInfo,
DeepLearningF... |
__author__ = 'saeedamen' # <NAME>
#
# Copyright 2016 Cuemacro
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
import logging
import os
from typing import List
from typing import Union
from flask import jsonify
from flask import request
from git import GitCommandError
from git.cmd import Git
from labler import errors
from labler.config import ProjectTypes
from labler.db.rdmbs.repr import LabelFields
from labler.server import ... |
from qtpy.QtCore import Qt, Slot, Property, QModelIndex, QSortFilterProxyModel
from qtpy.QtGui import QStandardItemModel, QColor, QBrush
from qtpy.QtWidgets import QTableView, QStyledItemDelegate, QDoubleSpinBox, \
QSpinBox, QLineEdit, QMessageBox
from qtpyvcp.actions.machine_actions import issue_mdi
from qtpyvc... |
import os
from typing import Iterable, Type, MutableMapping, Mapping, Any, Optional, Tuple, List
import numpy as np
import shutil
import logging
import csv
from collections import OrderedDict
import sys
import torch
from torch import nn
from torch.optim import lr_scheduler, SGD, Adam
from warmup_scheduler import ... |
'''
These are components of OpenAI's baselines.ppo1.pposgd_simple.learn
cut into individual functions for re-use in CERES
OpenAI Baselines is licensed under the MIT License, see LICENSE
'''
from baselines.ppo1.pposgd_simple import add_vtarg_and_adv
from baselines.common import Dataset, explained_variance, fmt_row, zip... |
import sqlite3 as sql
from glicko2 import Glicko2, WIN, DRAW, LOSS
import random
from scipy.optimize import differential_evolution, minimize
conn = sql.connect('nfl_stats.db')
c = conn.cursor()
current_teams = (
'San Francisco 49ers',
'Chicago Bears',
'Cincinnati Bengals',
'Buffalo Bills',
'<NAME... |
#!/usr/bin/env python3
from TelloSDKPy.djitellopy.tello import Tello
import cv2
import pygame
import numpy as np
import time
# Speed of the drone
S = 25
# Frames per second of the pygame window display
FPS = 30
class FrontEnd(object):
""" Maintains the Tello display and moves it through the keyboard keys.
... |
import argparse
import torch
from torch.utils import data
import time
from tqdm import tqdm
import open3d as o3d
import numpy as np
import matplotlib.pyplot as plt
from loader.train_loader_smooth import TrainLoader
from models.AE_sep import Enc, Dec
from utils.utils import *
parser = argparse.ArgumentParser()
parse... |
# (c) 2014, <NAME> <<EMAIL>>
# (c) 2018, Ansible Project
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... |
# Copyright 2019 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from AFSD.common.config import config
from .cls_loss import FocalLoss_Ori, EvidenceLoss, ActionnessLoss
def log_sum_exp(x):
"""Utility function for computing log_sum_exp while determining
This will be used to determine unaveraged confidence lo... |
import plotly.graph_objects as go
from numpy import random
from graphFromText.graphByEquals import graphByEquals2, graphByEqualsFxn1,\
graphByEquals3, graphByEquals4
from graphFromText.fxnFromText.fxnGraph import getRowsByKeyMulti
def graphEquations(myText):
graphOfLeft, err = graphByEquals2(myText)
####... |
"""
Copyright 2008 <NAME>
This file is part of PyCAM.
PyCAM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PyCAM is distributed in the ho... |
#========================================================
# functionality.py
#========================================================
# PublicPermissions: True
#========================================================
# Classes to represent the functionality of a site;
# level level Capabilities, SystemRequirements, a... |
# Copyright (c) 2011-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, publish, distrib... |
# module expint
import numpy as np
import scipy.linalg as la
##########################
# Matrix functions using scipy.linalg.funm
# Special care is given to small arguments for numerical stability (e.g.
# expm1 instead of exp and using leading order Taylor expansion when x
# is smaller than some threshold).
# Alter... |
##############################################################################
#
# Copyright (c) 2004 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
import tensorflow as tf
import tensorflow_probability as tfp
import numpy as np
from normalizing_flows.flows import Flow, Transform
from normalizing_flows.flows.affine import BatchNorm
from . import (
InvertibleConv,
ActNorm,
Squeeze,
Split,
AffineCoupling,
Parameterize,
Gaussianize,
cou... |
from functools import partial, wraps
from django.contrib import messages
from django.contrib.admin import helpers
from django.contrib.admin.utils import NestedObjects, quote
from django.contrib.auth import get_permission_codename
from django.core.urlresolvers import reverse, NoReverseMatch
from django.db import router... |
import json
import pyproj
import numpy
import pandas
import cv2
from urllib.parse import unquote, urlencode
from owslib.wmts import WebMapTileService
from PIL import Image
from matplotlib import pyplot
from shapely import geometry
from deepforest import main
from qgis.core import (
QgsApplication,
QgsProject,
... |
from ethereum.transactions import Transaction
import random
import logging
import sys
import rlp
import argparse
import os
from ethereum.utils import check_checksum, decode_hex, normalize_address, encode_hex, bytearray_to_int, sha3_256 # sha3_256 is same as Keccak256
from ethereum.exceptions import InvalidTransactio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.