text stringlengths 3.07k 22.1k |
|---|
import numpy as np
from overcooked_ai_py.utils import rnd_int_uniform, rnd_uniform
from overcooked_ai_py.mdp.actions import Action, Direction
from overcooked_ai_py.mdp.overcooked_mdp import OvercookedGridworld
EMPTY = ' '
COUNTER = 'X'
ONION_DISPENSER = 'O'
TOMATO_DISPENSER = 'T'
POT = 'P'
DISH_DISPENSER = 'D'
SERVIN... |
#
# $Filename$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
... |
# -*- coding: utf-8 -*- #
# Copyright 2020 Google LLC. 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 requir... |
# This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, <NAME> and <NAME>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistribut... |
#!/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.
#
# <NAME> 07/25/21
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from dlrm_s_... |
# Copyright 2020 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... |
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
#!/usr/bin/env python3
# marketmaker.py
# Copyright (C) 2018 by CJP
#
# This file is part of Market Maker.
#
# Market Maker is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, version 3 of... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import os
import copy
import torch
import numpy as np
import math
import torch.utils.data
from opts import opts
from models.model import create_model, load_model, save_model
# from models.da... |
from types import SimpleNamespace
from code.classification.datafree_kd_system import DatafreeKDSystem
def main():
hparams = SimpleNamespace(
batch_size = 128,
batch_length = 50000//128,
# batch_length = 25000//128,
lr = 0.0001,
max_lr = 0.2,
... |
import datetime
import math
import numpy as np
import pandas as pd
import pickle as pk
import sys
# Want an accurate NPV valutation for your solar panels? Visit:
# www.greenassist.co.uk
# User command line inputs:
# sys.argv[0] - "solar_npv_estimator.py"
# sys.argv[1] - date in format "YYYY-MM-DD" - representative o... |
import os
import numpy as np
import shutil
from hapiclient import hapi
debug = False
def comparisonOK(a, b, nolength=False, a_name="First", b_name="Second"):
if a.dtype != b.dtype:
if debug:
print('---- dts differ.')
unicode_length_mismatch = False
for i in range(len(a.dtype)... |
import sys
import json
from datetime import datetime, timedelta
from awscli.arguments import CustomArgument
from awscli.customizations.commands import BasicCommand
from awscli.customizations.datapipeline import translator
DEFINITION_HELP_TEXT = """\
The JSON pipeline definition. If the pipeline definition
is in a f... |
#
# Author: <EMAIL>
# Date: 01/25/2019
#
from glob import glob
from collections import OrderedDict,defaultdict,Sequence
from bisect import bisect
import copy
import math
from scipy.special import softmax
import numpy as np
import pdb
import os
import sys
import csv
import random
import torch
import re
import ujson as... |
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2019, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... |
"""Implements the forward mode of automatic differentiation
This module implements the forward mode of automatic differentiation. It does this by
overloading the many math dunder methods that are provided in Python such as __add__,
__sub__, __mul__, etc. In addition to these primitive functions, this module also
defin... |
import os
import glob
import argparse
import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt
from analysis_utils import clean_prior_names, make_clean_method_names, build_table
# enable background tiles on plots
sns.set(color_codes=True)
def regression_subplot(alg, prior, ll_logger, data_logg... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import with_statement
import os, sys
import datetime
import operator
import re
import time
import pythoncom
from win32com.taskscheduler import taskscheduler
from winsys.constants import *
def _set(obj, key, value):
obj... |
from argparse import Namespace
from dataclasses import dataclass, fields
from typing import Optional, Callable, Union, Any
import torch
import torch.nn as nn
from torch import Tensor
from fairseq.models.transformer.transformer_config import TransformerConfig, EncDecBaseConfig, DecoderConfig, QuantNoiseConfig
from fai... |
import httplib2
import json
import requests
import nltk
import urllib.request
import regex
from json import JSONEncoder
from datetime import datetime
from sqlalchemy import desc
from patentsearch import db
from flask_login import UserMixin
from werkzeug.security import check_password_hash, generate_password_hash
impor... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: <NAME> (<EMAIL>)
# @Date: 2020-11-02
# @Filename: opsdb.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
import datetime
from peewee import (AutoField, BigIntegerField, DateTimeField,
DeferredThroughModel, Floa... |
# Defines the belief distribution and update for the 2D Multi-Object Search domain;
#
# The belief distribution is represented as a Histogram (or Tabular representation).
# Since the observation only contains mapping from object id to their location,
# the belief update has no leverage on the shape of the sensing regio... |
# coding: utf-8
from django.contrib.auth.models import User, Group
from django.db import models
from django.http import HttpRequest
from django.utils.safestring import mark_safe
from django_extensions.db.models import TimeStampedModel
from django_middleware_global_request.middleware import get_request
from mptt.models... |
"""A simple MNIST classifier which displays summaries in TensorBoard.
This is an unimpressive MNIST model, but it is a good example of using
tf.name_scope to make a graph legible in the TensorBoard graph explorer, and of
naming summary tags so that they are grouped meaningfully in TensorBoard.
It demonstrates the fun... |
import time
from math import ceil
from tests.common.helpers.assertions import pytest_assert
from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\
fanout_graph_facts
from tests.common.ixia.ixia_fixtures import ixia_api_serv_ip, ixia_api_serv_port,\
ixia_api_serv_user, ixia_api_serv_passwd, ixia_... |
from typing import AnyStr, BinaryIO, Dict, List, NamedTuple, Optional, Union
import matplotlib
import numpy as np
import pandas as pd
import pydicom as dicom
from skimage.exposure import rescale_intensity
def dcmread_image(
fp: Union[str, "os.PathLike[AnyStr]", BinaryIO],
view: str,
index: Optional[np.ui... |
import matplotlib.pyplot as plt
from astropy.io import fits
import numpy as np
import glob
import os
import pandas as pd
from matplotlib.colors import LogNorm
import vaex
class Spectra():
def __init__(self,files):
self.path = os.getcwd()
self.filenames = [filename for filename in glob.glob(self.pat... |
import numpy as np
import torch
from torch import nn
from torchvision.ops import nms
def pool_nms(heat, kernel = 3):
pad = (kernel - 1) // 2
hmax = nn.functional.max_pool2d(heat, (kernel, kernel), stride=1, padding=pad)
keep = (hmax == heat).float()
return heat * keep
def decode_bbox(pr... |
"""
.. module:: viewer
:synopsis: Viewing of sample data
"""
from __future__ import print_function
from __future__ import absolute_import
import time
import numpy as np
import nutsml.imageutil as iu
from six.moves import range
from nutsflow import NutFunction, nut_function
from nutsflow.common import as_tuple, a... |
from board import initialBoard
from random import randint, shuffle
from logger import log, log_event
from copy import deepcopy
from board import Horse, Trainer, Property, SuspensionField
from player import Player
def throw_die():
return randint(1, 6)
class Game:
"""
Class representing the whole game.
... |
#!/usr/bin/env python
# Copyright 2014-2020 The PySCF Developers. 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
#
# U... |
#!/usr/bin/env python
'''
brozzler-easy - brozzler-worker, warcprox, pywb, and brozzler-dashboard all
working together in a single process
Copyright (C) 2016-2018 Internet Archive
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may o... |
# -*- encoding:utf8 -*-
import os
import psutil
import sys
from collections import defaultdict
def get_available_memory():
"""It returns remained memory as percentage"""
mem = psutil.virtual_memory()
return 100 * mem.available / (mem.total)
def get_process_memory():
"""It returns the memory usage of... |
import uuid
import pytest
from rest_framework import status
from rest_framework.reverse import reverse
from datahub.company.models import OneListTier
from datahub.company.test.factories import AdviserFactory, CompanyFactory
from datahub.company.test.utils import address_area_or_none
from datahub.core.constants import... |
import numpy as np
import os
import cv2
from models import Wav2Lip
import face_detection
import torch
def get_smoothened_boxes(boxes, T):
for i in range(len(boxes)):
if i + T > len(boxes):
window = boxes[len(boxes) - T:]
else:
window = boxes[i: i + T]
boxes[i] = np.m... |
import os
import torch
import numpy as np
import skimage.measure
import matplotlib.pyplot as plt
from tqdm import tqdm
from astropy.io import fits
from astropy.wcs import WCS
from astropy.nddata import Cutout2D
from torchvision.utils import make_grid
def cond_mkdir(path):
if not os.path.exists(path):
os.... |
"""
Tests for the utils module
"""
import datetime
import operator as op
from math import ceil
from types import SimpleNamespace
import pytest
import pytz
from mitol.common.utils import (
is_near_now,
has_equal_properties,
first_or_none,
first_matching_item,
max_or_none,
partition_to_lists,
... |
from core.models import Item, Listing, PromoCode, Address, UserProfile
from core.zipcode import zipcodes
from datetime import datetime, timedelta
from decimal import *
from django import forms
from django.core.files.base import ContentFile
from django.core.files.images import get_image_dimensions
from io impor... |
from greedysnake import GreedySnake, Direction, Signal
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import backend as K
import configparser
from collections import deque
import sys
import warnings
warnings.filterwarnings("ignore")
np.set_printoptions(threshold=sys.maxsiz... |
#!/usr/bin/env python
# coding: utf-8
import numpy as np
import astropy.units as u
from astropy.time import Time, TimeDelta
from pint.residuals import resids
import pint.toa as toa
from pint import models
__all__ = ['make_ideal',
'createfourierdesignmatrix_red',
'add_rednoise',
'add_d... |
###############################################################################
# PyDial: Multi-domain Statistical Spoken Dialogue System Software
###############################################################################
#
# Copyright 2015 - 2017
# Cambridge University Engineering Department Dialogue Systems Grou... |
# -*- encoding: utf-8 -*-
"""
License: MIT
Copyright (c) 2019 - present AppSeed.us
"""
# Python modules
import fnmatch
import os, logging
# Flask modules
import threading
import requests
from flask import render_template, request, url_for, redirect, send_from_directory, session, Response, flash
from flask_login impo... |
import numpy as np
from kipoi_utils.external.torch.sampler import BatchSampler
import collections
from kipoi_utils.data_utils import (numpy_collate, numpy_collate_concat, get_dataset_item,
DataloaderIterable, batch_gen, get_dataset_lens, iterable_cycle)
from copy import deepcopy
from... |
import os
import sys
import logging
import pickle
import random
import argparse
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from datetime import datetime
from functools import partial
from torch.autograd import Variable
from tasks.data_loader impor... |
from CommonServerPython import *
import json
FAIL_STATUS_MSG = "Command send-mail in module EWS Mail Sender requires argument to that is missing (7)"
def send_reply(incident_id, email_subject, email_to, reply_body, service_mail, email_cc, reply_html_body,
entry_id_list, email_latest_message, email_cod... |
import re
import os
import socket
import time
import threading
import datetime
from six.moves.queue import Empty
#------------------------------------------------------------------------------
# JChip delimiter (CR, **not** LF)
CR = u'\r'
#---------------------------------------------------------------------------... |
# -*- coding: UTF-8 -*-
"""
Provides tasks to build documentation with sphinx, etc.
"""
from __future__ import absolute_import, print_function
import os
import sys
from invoke import task, Collection
from invoke.util import cd
from path import Path
# -- TASK-LIBRARY:
# PREPARED: from invoke_cleanup import cleanup_tas... |
"""
imutils/big/common_catalog_utils.py
Created On: Tuesday April 5th, 2022
Created By: <NAME>
"""
from functools import cached_property
from omegaconf import DictConfig
import os
import pandas as pd
from pathlib import Path
from typing import *
from dataclasses import dataclass, asdict
from imutils.ml.utils.etl... |
#!/usr/bin/env python3
"""
YATIB - Yet Another Twitter IRC Bot
Dependencies: requests python-irc python-twitter
apt-get install python3-requests python3-irc python3-twitter
Usage:
./yatib.py twitterbot_conf.ini
Configuration file:
[general]
robust=no # whether to not die on unknown error
[loggi... |
import json
import re
import os
import pytest
import requests
import pytz
import datetime as dt
import connaisseur.trust_data
import connaisseur.notary_api as notary_api
from connaisseur.image import Image
from connaisseur.tuf_role import TUFRole
from connaisseur.exceptions import BaseConnaisseurException
@pytest.fix... |
"""
Common functionality for model synchronization and version tracking.
"""
import zlib
import inspect
import contextlib
import logging
from dataclasses import dataclass, field
from typing import Dict, Optional, Set, Tuple, Union, Type, Any, Callable, List, Coroutine
from sqlalchemy.sql import Join
from sqlalchemy.s... |
import discord
from discord.ext import commands, menus, tasks
import asyncio
import datetime
from typing import Optional
from parsedatetime import Calendar, VERSION_CONTEXT_STYLE
from utilities import checks
from utilities.menu import Menu
def setup(bot):
bot.add_cog(Reminders(bot))
class Reminders(commands.Cog)... |
"""Support for Z-Wave fans."""
from __future__ import annotations
import math
from typing import Any, cast
from zwave_js_server.client import Client as ZwaveClient
from zwave_js_server.const import TARGET_VALUE_PROPERTY, CommandClass
from zwave_js_server.const.command_class.thermostat import (
THERMOSTAT_FAN_OFF_... |
"""
Dispersion
----------
The functions in this script compute the calibration factors for the LHC BPMs
using the dispersion method. The `get_calibration_factors_from_dispersion` is
intended to be used with the script `bpm_calibration.py`.
"""
from pathlib import Path
from scipy.optimize import curve_fit
import numpy... |
"""
Created on Tue Jul 22 00:47:05 2014
@author: alina, zzhang
"""
import time
import socket
import select
import sys
import string
import indexer
import json
import pickle as pkl
from chat_utils import *
import chat_group as grp
class Server:
def __init__(self):
self.new_clients = [] # list of new soc... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** 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 _utilities
fro... |
import json
import os
from typing import (
Any,
Dict,
List,
Optional,
Union,
)
import wandb
import wandb.data_types as data_types
from wandb.data_types import _SavedModel
from wandb.sdk.interface.artifacts import (
Artifact as ArtifactInterface,
ArtifactEntry,
)
def _add_any(
artifact... |
import pandas as pd
import numpy as np
import warnings
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from scipy import stats
# import dill
import numpy as np
from sklearn import datasets, preprocessing
warnings.filterwarnings('ignore')
import gc, sys
gc.enable()
class Data:
def __init__(self,pre... |
import warnings
import numbers
from collections.abc import Mapping, Iterable
import typing
import numpy
from hydep.typed import BoundedTyped
from hydep.internal import Isotope, ZaiTuple, getIsotope
from hydep.internal.registry import register, unregister
IsotopeLike = typing.Union[int, str, Isotope]
__all__ = ["Ma... |
""" Reading and writing models to/from files.
Supported file types:
* Comma separated values (.csv)
* JSON (.json)
* Tab separated values (.tsv)
* XLSX (.xlsx)
* YAML (.yml)
:Author: <NAME> <<EMAIL>>
:Date: 2016-12-05
:Copyright: 2016, Karr Lab
:License: MIT
"""
from wc_lang import core
from wc_utils.util.string im... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 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
#
# Unl... |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
#############################################################
# File: data_loader_modify.py
# Created Date: Saturday April 4th 2020
# Author: <NAME>
# Email: <EMAIL>
# Last Modified: Tuesday, 28th April 2020 10:42:50 pm
# Modified By: <NAME>
# Copyright (c) 2020 Shanghai J... |
import numpy as np
import scipy.sparse.csgraph
from tectosaur.util.geometry import tri_normal, unscaled_normals, normalize
from tectosaur.constraints import ConstraintEQ, Term
from tectosaur.stress_constraints import stress_constraints, stress_constraints2, \
equilibrium_constraint, constant_stress_constraint
def ... |
import os, itertools
import numpy as np
from weis.aeroelasticse.Util.FileTools import save_yaml
def save_case_matrix_direct(case_list, dir_matrix):
### assumes all elements of the list are dict for that case that has the same keys!
if not os.path.exists(dir_matrix):
os.makedirs(dir_matrix)
ofh ... |
import copy
import functools
import flask
import marshmallow
import sqlalchemy as sa
from marshmallow import ValidationError
from sqlalchemy import sql
from .exceptions import ApiError
# -----------------------------------------------------------------------------
# Field.missing is deprecated in favor of Field.loa... |
from collections import defaultdict
from . import (smooth_overlaps, build_rt_interval_tree)
def binary_search_with_flag(array, mass, error_tolerance=1e-5):
"""Binary search an ordered array of objects with :attr:`neutral_mass`
using a PPM error tolerance of `error_toler
Parameters
----------
arr... |
from __future__ import print_function
import argparse
import os
import sys
import shutil
import json
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import transforms
from torch.autograd import Variable
import torch.backends.cudnn as c... |
"""
This module provides a number of convenient general-purpose functions that
are useful for building more database-specific queries out of them.
"""
import itertools
import sqlite3
from distutils.version import LooseVersion
from typing import Any, List, Mapping, Optional, Sequence, Tuple, Union
import numpy as np
fr... |
# Copyright <NAME> for Artificial Intelligence 2017
"""
ai2thor.server
Handles all communication with Unity through a Flask service. Messages
are sent to the controller using a pair of request/response queues.
"""
import warnings
import numpy as np
from enum import Enum
from ai2thor.util.depth import apply_real_nois... |
# https://github.com/sunset1995/py360convert
import numpy as np
from scipy.ndimage import map_coordinates
def xyzcube(face_w):
'''
Return the xyz cordinates of the unit cube in [F R B L U D] format.
'''
out = np.zeros((face_w, face_w * 6, 3), np.float32)
rng = np.linspace(-0.5, 0.5, num=face_w, ... |
"""
Title: Timeseries forecasting for weather prediction
Authors: [<NAME>](https://prabhanshu.com/github), [<NAME>](https://github.com/yashika51), [<NAME>](https://github.com/ktakattack), [<NAME>](https://github.com/falaktheoptimist)
Date created: 2020/06/23
Last modified: 2020/07/20
Description: This notebook demonstr... |
# Copyright 2012 Viewfinder Inc. All Rights Reserved.
"""Parses the cities1000.txt geonames database and builds a tiered
set of data structures for efficiently mapping placename prefixes to
latitude and longitude coordinates.
Datafile sourced from: http://download.geonames.org/.
IMPORTANT, Copyright: This work is li... |
"""
Goal: Run many BLP cases, save results to a dict
to access these results later
"""
import pyblp
import numpy as np
import pandas as pd
import pathlib
from scipy.stats import zscore
main_dir = pathlib.Path.cwd().parent
data_dir = main_dir / 'data'
dict_dir = data_dir / 'dict'
raw_dir = data_dir / 'raw'
pyblp.opti... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals, print_function
import re
from lxml import etree
from .exceptions import AntiSpiderException, WeixinSogouException
from ..model import article_list, article_detail, profile_list, profile_detail
from ..config import WEIXIN_BASE_URL, SOGO... |
# Copyright 2020 DataStax, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
import argparse
import os
from copy import deepcopy
import numpy as np
import torch
from shapely.geometry import LineString, MultiPolygon, Point, Polygon
# from MPNet.visualizer.visualizer import plot_path
project_path = f"{os.path.abspath(__file__).split('mpnet')[0]}mpnet"
def is_in_collision(x, env):
x = Poi... |
"""Text feature extraction"""
__author__ = 'thor'
from sklearn.base import BaseEstimator
from sklearn.feature_extraction.text import CountVectorizer
from pandas import Series
import numpy as np
from urllib.parse import urlsplit
import re
from collections import Counter
from itertools import chain
from operator import... |
#!/usr/bin/env python3
"""1st step of analysis.
Performs sanity check of Bambino output and extracts
indel calls on canonical chromosomes.
'indel_preprocessor' is the main routine of this module.
"""
import os
import sys
import logging
import pandas as pd
from .left_aligner import lt_aln
from .indel_sequence impor... |
# -*- coding: utf-8 -*-
"""define all global parameters here."""
from os.path import join
import argparse
import pcode.models as models
from pcode.utils.checkpoint import get_checkpoint_folder_name
def get_args():
ROOT_DIRECTORY = "./"
RAW_DATA_DIRECTORY = join(ROOT_DIRECTORY, "data/")
TRAINING_DIRECTORY... |
# Copyright 2020 Petuum, 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 by applicable law or... |
from werkzeug.utils import import_string, cached_property
from flask import Blueprint, request, render_template
from functools import wraps, singledispatch
from decimal import Decimal
import datetime
import time
import json
class LazyView(object):
def __init__(self, import_name):
self.__module__, self.__name__ = i... |
"""
Use 2D mask or object tracking to filter out objects and create a new objects
file
"""
import os
import warnings
import re
import xarray as xr
import numpy as np
import tqdm
import genesis.objects
import cloud_identification
try:
import cloud_tracking_analysis
from cloud_tracking_analysis import CloudDa... |
import argparse
import ast
import ntpath
import xml.etree.ElementTree
from botocore.exceptions import ClientError
from syslinkats.data.common.aws_default_parameters import DEFAULT_AWS_SYSLINK_ACCESS_DATA
from syslinkats.tests.buckets.file.utils.file_web_api import FileWebApi
from syslinkats.tests.buckets.testmon.util... |
# -*- coding: utf-8 -*-
"""
The :program:`celery amqp` command.
.. program:: celery amqp
"""
from __future__ import absolute_import, print_function, unicode_literals
import cmd
import sys
import shlex
import pprint
from functools import partial
from itertools import count
from kombu.utils.encoding import safe_str
... |
# -*- coding: utf-8 -*-
# Copyright (C) 2021-2022 by SCICO Developers
# All rights reserved. BSD 3-clause License.
# This file is part of the SCICO package. Details of the copyright and
# user license can be found in the 'LICENSE' file distributed with the
# package.
"""Utility functions used by example scripts."""
... |
from dnn_schedules.schedule import Schedule
from dnn_schedules.cross_layer.cross_layer_utils import second_layer_dataflow, init_cc_stats
from dnn_schedules.per_layer.hwfc_schedule import conv2d_pw as hwfc_conv2d_pw
from dnn_schedules.per_layer.hwcf_schedule2 import conv2d_pw as hwcf_conv2d_pw
from dnn_schedules.per_lay... |
import logging
import os
from github import Github
from github.GithubObject import NotSet
from sretoolbox.utils import retry
import utils.gql as gql
import utils.secret_reader as secret_reader
import reconcile.openshift_users as openshift_users
import reconcile.queries as queries
from utils.aggregated_list import Agg... |
"""
Test suite for DelegateParameter
"""
from typing import cast
import pytest
from qcodes.instrument.parameter import (
Parameter, DelegateParameter, ParamRawDataType)
# Disable warning that is created by using fixtures
# pylint: disable=redefined-outer-name
@pytest.fixture()
def numeric_val():
yield 1
@... |
"""
This is the starter code and some suggested architecture we provide you with.
But feel free to do any modifications as you wish or just completely ignore
all of them and have your own implementations.
"""
import numpy as np
import scipy.io
from scipy import stats
import random
import time
import math
###########... |
#############################################################################
# Imports
#############################################################################
import os
import ujson as json
import utils.debiaiUtils as debiaiUtils
import utils.utils as utils
dataPath = debiaiUtils.dataPath
####################... |
#!/usr/bin/env python
"""
This code imports a file, determines its type, and exports it
into the user specified file type.
"""
from __future__ import absolute_import
import argparse
import QCvalidate as val
def get_args():
"""
Get input arguments
"""
parser = argparse.ArgumentParser()
parser.add_ar... |
import contextlib
import itertools
import multiprocessing
import os
import pickle
import urllib
from pathlib import Path
import quapy as qp
import numpy as np
from joblib import Parallel, delayed
def _get_parallel_slices(n_tasks, n_jobs=-1):
if n_jobs == -1:
n_jobs = multiprocessing.cpu_count()
batch... |
"""
# gemini implementation uses 0, 1, 2, 3, 4 for HOM_REF ... HOM_ALT, but we use
# the strings here for illustrative testing.
>>> HOM_REF, HET, UNKNOWN, HOM_ALT = ('HOM_REF', 'HET', 'UNKNOWN', 'HOM_ALT')
>>> Sample, Family = make_classes(valid_gts, Filter, HOM_REF, HET, UNKNOWN, HOM_ALT)
>>> a, b = Sample(1, True),... |
################################################################################
# Possible scenarios (@ - many, % - one):
#
# 1. go object files:
# @.go -> %.6
#
# One object file per Go package.
#
# 2. go packages
# %.6 -> %.a
#
# Technically a Go package is an object file, but if it's a cgo case or there... |
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
# Copyright: (c) <<EMAIL>>
# Released under the MIT License.
from django.views.generic import View
from django.db.models import F
from django.conf import settings
from django_redis import get_redis_connection
from libs import json_response, JsonPa... |
import discord
import apiai
import json as j
import utils as u
import time
import traceback
import sys
import json as jsonlib
import random
import aiohttp
from gtts import gTTS
import os
import hashlib
import re
async def on_message(patt: u.Patt, msg: discord.Message, start_time: int):
failed = False
author: ... |
#
# 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... |
"""
<Program Name>
sig.py
<Author>
<NAME> <<EMAIL>>
<Started>
February 28, 2012. Based on a previous version by <NAME>.
<Copyright>
See LICENSE for licensing information.
<Purpose>
Survivable key compromise is one feature of a secure update system
incorporated into TUF's design. Responsibility separat... |
import json
import pathlib
from functools import lru_cache
from urllib.parse import urlparse
from django.conf import settings
from django.db import models
from django.db.models.fields.reverse_related import ManyToOneRel
from taggit.managers import TaggableManager
from wagtail.core.fields import RichTextField, StreamFi... |
import os
import time
import random
import hashlib
import requests
import subprocess
from colors import color
from string import ascii_lowercase
from prettytable import PrettyTable
from social_media.utils import install_tiv
from selenium.webdriver.common.keys import Keys
class InstagramProfile(object):
def __init_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.