text stringlengths 6.04k 39.5k |
|---|
from hypixel_api_microservices_utils.hypixel_data_objs import *
from hypixel_api_microservices_utils.logs_obj import init_a_new_logger
from hypixel_api_microservices_utils.others_objs import GlobalHAM
from hypixel_api_microservices_utils.sql_utils import save_sold_history, load_sold_history, save_stats, load_stats
impo... |
"""
Tool_Box v0.3.0
Aug. 6, 2018
<NAME>
Options file parser is no longer a class and now returns an updated argparse object. This library needs a good
scrubbing.
Tool_Box v0.2.1
October 12, 2017
<NAME>
Updated the options file parser.
Tool_Box v0.2.0
June 9, 2017
<NAME>
Added th... |
# Licensed under an MIT open source license - see LICENSE
from __future__ import print_function, absolute_import, division
import numpy as np
import math
from scipy.optimize import leastsq
import astropy.wcs as wcs
def hellinger(data1, data2, bin_width=1.0):
'''
Calculate the Hellinger Distance between two d... |
#!/usr/bin/env python3
#
# MIT License
#
# (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
#
# 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 w... |
from sympy import Rational as frac
from sympy import sqrt
from ..helpers import article
from ._helpers import TriangleScheme, concat, s1, s2, s3
citation = article(
authors=["<NAME>", "<NAME>"],
title="Moderate Degree Symmetric Quadrature Rules for the Triangle",
journal="IMA Journal of Applied Mathematic... |
from __future__ import print_function, division
import numpy as np
from ..util.constants import G, pi
from ..densities.envelope import Envelope
from ..densities.bipolar_cavity import BipolarCavity
from ..util.convenience import OptThinRadius
from ..dust import SphericalDust
from astropy import log as logger
from ..ut... |
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# The Universal Permissive License (UPL), Version 1.0
#
# Subject to the condition set forth below, permission is hereby granted to any
# person obtaining a copy of this softw... |
"""Parsing google results"""
__author__ = 'thorwhalen'
#!/usr/bin/python
# -*- coding: iso-8859-15 -*-
import os, sys
from bs4 import BeautifulSoup
import re
import os.path
from ut.pfile.name import files_of_folder
from ut.pfile.name import replace_folder_and_ext
from urllib.request import urlopen
from ut.pfile import... |
"""
HistoryList
Remembers the history of navigation and provides ability to
jump backwards and forwards
"""
import sublime
import sublime_plugin
import unittest
import time
# https://github.com/SublimeTextIssues/Core/issues/1846
class RegionsManager(object):
def __init__(self):
self.regions = {}
def add(self... |
""" Module including helper functions for feature extraction and other stuff including metrics, jsonhandler, etc"""
import json
from collections import Counter
import logging
import re
from typing import List, Dict
import numpy as np
import string
from scibert.resources.lexicons import ALL_CONCEPT_LEXICONS, ALL_ACTIO... |
"""
Utilities for iterating constructing data sets and iterating over
DNA sequence data.
"""
import multiprocessing
import pandas as pd
import numpy as np
import functools
import math
from collections import defaultdict
from multiprocessing import Pool
import pyfasta
import pyBigWig
from pybedtools import Interval, Be... |
bl_info = {
'name': 'Origamify',
'description': 'Create a parent hierarchy, one object per face, to unwrap objects like origami',
'blender': (2, 80, 0),
'category': 'Object',
}
import bpy
import bmesh
from mathutils import Vector, Matrix, Euler
import math
from collections import defaultdict
from queu... |
import PySimpleGUI as sg
import json
import os
import pydub
import simpleaudio as sa
##################### VOCAL EXERCISE CLASS FUNCTIONS ########################################
###################################################################################################################... |
import datetime
import logging
import urllib.parse
from typing import List, Dict, Type, Iterable
import operator
from marshmallow import ValidationError, EXCLUDE
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
from sqlalchemy import create_engine, inspect, Column, text, or_, and_
from sqlalchemy.ext.declarativ... |
from operator import concat
from task_template import TaskTemplate
from psychopy import visual, gui, data, event, core
import time
import os
import glob, pandas
import random
from screeninfo import get_monitors
from PIL import Image
screen = get_monitors()[0]
width = screen.width
height = screen.height
def si... |
"""
core/algorithms.py
powerful module for algo
here are a lot of functions
that you can use in your math programs
author: @alexzander
"""
# python
import math
from typing import Callable
from typing import List
from typing import Dict
from .backtracking import *
def float_eq(__x: float, ... |
import pygame
import random
import sys
from pygame.locals import *
def checkWin(board):
winCount = 0
# Check for wins horizontally
for i in range(6):
for j in range(4):
if (board[i * 7 + j] == board[i * 7 + j + 1] and
board[i * 7 + j + 1] == board[i * 7 + j + 2] and
... |
import numpy as np
import cv2
import glob
def trim_zeros(x):
"""It's common to have tensors larger than the available data and
pad with zeros. This function removes rows that are all zeros.
x: [rows, columns].
"""
assert len(x.shape) == 2
return x[~np.all(x == 0, axis=1)]
def compute_pre_rec_... |
# Copyright 2019 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 applicable law or agree... |
# Copyright 2017 The TensorFlow Lattice 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 applicable law or a... |
import h5py
import numpy as np
import random
import csv
from time import time
from sklearn.model_selection import ParameterGrid, StratifiedShuffleSplit, train_test_split
from sklearn import preprocessing
from sklearn.metrics import confusion_matrix
import tensorflow as tf
# ENSURE REPRODUCIBILITY ##################... |
# -----------------------------------------------------------------------------
# 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 (th... |
__author__ = 'voanna'
import os
import numpy as np
import io
import glob
from PIL import Image
import argparse
import torch
import torch.utils.data
from torch import nn, optim
from torch.nn import functional as F
from torchvision import datasets, transforms
from torchvision.utils import save_image
from torch.utils imp... |
import logging
import os
from astropy import units as u
from astropy.io import fits
from astropy.wcs import WCS
from astropy.modeling import models, fitting
import shlex
from ...spectra import Spectrum1D
from ..registers import data_loader
__all__ = ['wcs1d_fits_loader', 'wcs1d_fits_writer', 'non_linear_wcs1d_fits'... |
import comet_ml
import torch
import torch.nn as NN
import torch.utils.data as data_utils
import deepracing_models.data_loading.proto_datasets as PD
from tqdm import tqdm as tqdm
import deepracing_models.nn_models.LossFunctions as loss_functions
import deepracing_models.nn_models.Models
import numpy as np
import torch.o... |
# -*- coding: utf-8 -*-
import ctypes
from ctypes.util import find_library
import numpy as np
import pathlib
from qlazy.config import *
from qlazy.error import *
from qlazy.util import *
from qlazy.QState import QState
from qlazy.MData import *
from qlazy.Observable import Observable
from qlazy.QCirc import QCirc
from... |
# Needed imports
import sys # for exit on error
import math # for pi
import json # for reading json files
import random # for dice values
import functools # for some utility functions
from datetime import timedelta # for time... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.2.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # OpenGLを用いたMCMCのリアルタイム可視化
#... |
import sys
import os
import json
import numpy as np
import glob
import argparse
import pdb
import scipy.optimize
import scipy.stats
import itertools
import functools
import multiprocessing
import f0dl_bernox
sys.path.append('/om2/user/msaddler/pitchnet/assets_datasets/')
import stimuli_f0_labels
def add_f0_judgmen... |
#!/usr/bin/python3
import cv2
import numpy as np
import enum
from matplotlib import pyplot as plt
import math
class BaseIP(object):
Obj_Num = 0
def __init__(self):
BaseIP.Obj_Num += 1
print("Create 1 obj: Total number of BaseIP objects is "+ str(BaseIP.Obj_Num))
def __del__(self):
... |
# -*- coding: utf-8 -*-
"""
Functions for creating and manipulating graphics, colormaps and plots.
@author: <NAME>, Geophysics Labs.
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
import matplotlib.cm as cm
from skimage import exposure
# import local modules
import colors #... |
#!/usr/bin/env python
# Copyright (c) 2019 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License"). This software is distributed "AS IS"
# as set forth in the License.
import re
import struct
import socket
from array import arra... |
"""
The CLI can be accessed through the command ``stor``. For details on
valid subcommands, usage, and input options, refer to the ``--help`` / ``-h``
flag.
In addition to UNIX-like basic list, copy, and remove commands, the CLI also
has some features such as specifying a current working directory on an OBS service
(w... |
"""
Benchmark the PyCrypto and cryptography libraries.
(C) 2016 <NAME> <<EMAIL>>
"""
from __future__ import division, print_function, absolute_import, unicode_literals
import inspect
import time
import types
import Crypto.Cipher.AES
import Crypto.Cipher.Blowfish
import Crypto.Cipher.DES
import Crypto.Cipher.XOR
impo... |
from django import forms
from django.forms import BaseInlineFormSet
from core.models import *
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Submit, Row, Column, HTML
from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions
from django.core.exceptions import NON_FI... |
import sublime, sublime_plugin
import re
from collections import namedtuple
class MultiFindAllCommand(sublime_plugin.TextCommand):
def run(self, edit, case=True, word=False, ignore_comments=False, expand=True):
view = self.view
newRegions = []
# filter selections in order to exclude duplica... |
"""
"""
import argparse
import datetime
import json
import os
import shutil
import textwrap
import traceback
import types
import urllib
import zipfile
import pandas as pd
import progressbar
import tator
def email_status(
tator_api: tator.openapi.tator_openapi.api.tator_api.TatorApi,
project: int,
... |
"""
Set of classes to analyse geometric PSF and produce spot diagrams.
"""
from poptics.wavelength import WavelengthColour,getDefaultWavelength
from poptics.surface import OpticalPlane
from poptics.vector import Vector2d,Vector3d
from matplotlib.pyplot import plot, scatter, axis, figure, axes, xlabel,title
from mat... |
"""
Copyright 2017 ARM Limited
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
dis... |
from __future__ import print_function
import os
import csv
import time
from modeller import alignment
from modeller.automodel import automodel
from modeller.scripts import complete_pdb
from .altmod_utils import get_modeller_atom, get_modeller_dist
from .automodel_custom_restraints import Automodel_custom_restraints
... |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function, division
import unittest
import sys
PY2 = sys.version_info.major == 2
import os
import time
import threading
import zmq
import xmlrunner
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))... |
import numpy as np
import sys
import pandas as pd
import scipy
from sklearn.cluster import KMeans
import networkx as nx
import copy, random
import matplotlib.pyplot as plt
from SERGIO.SERGIO.sergio import sergio
from sklearn.preprocessing import StandardScaler
# NOTE: this function is called from the main file
def g... |
from django.shortcuts import get_object_or_404, render
from django.http import Http404
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from django.http import JsonResponse
from .models import Choice, Question, Vote, Poll_members, Archive_question, Place
fro... |
from __future__ import annotations
__all__ = (
'StateVar',
'StateTuple',
'StateDict',
'statefunction',
)
import functools
import itertools
from typing import (
Any,
AsyncIterable as AIterable,
AsyncIterator as AIterator,
Awaitable,
Callable,
cast,
ClassVar,
Final,
... |
from __future__ import absolute_import, print_function
import os
import sys
import readline
import cmd
import subprocess
import re
from fnmatch import fnmatch
from glob import glob
import traceback
# Try and get the termcolor module - pip install termcolor
try:
from termcolor import colored
except ImportError:
... |
# !/usr/bin/env python3
# -*-coding:utf-8-*-
# @file: embednetwork.py
# @brief:
# @author: <NAME>, <EMAIL>, <EMAIL>
# @version: 0.0.1
# @creation date: 19-02-2019
# @last modified: Sat 23 Nov 2019 10:00:35 PM EST
import torch
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
#from s... |
"""
General networks for pytorch.
Algorithm-specific networks should go else-where.
"""
import torch
from torch import nn as nn
from torch.nn import functional as F
from rlkit.policies.base import Policy
from rlkit.torch import pytorch_util as ptu
from rlkit.torch.core import PyTorchModule
from rlkit.torch.data_manag... |
import numpy as np
import pandas as pds
import os
import time
from pathlib import Path
from ophyd import PseudoPositioner, PseudoSingle, EpicsMotor, EpicsSignal
import bluesky.preprocessors as bpp
from ophyd.pseudopos import pseudo_position_argument, real_position_argument
print(f'Loading {__file__}')
path = Path(__... |
######################################################################
# #
# Copyright 2009-2018 <NAME>. #
# This file is part of gdspy, distributed under the terms of the #
# Boost Software License - Version 1.0. See the accom... |
from collections import defaultdict
from datetime import timedelta
from discord.ext import commands
from orm.models import Raid, RaidParticipant, RaidMessage, RaidZone
import discord
from django.utils.timezone import localtime
from django.db.models import Max
time_format = '%m/%d %I:%M %p'
embed_color = 0x408fd0
cl... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
"""
import argparse
import os
import pandas as pd
import numpy as np
import optuna
import torch
from sklearn.ensemble import RandomForestClassifier
from sklearn.linear_model import SGDClassifier
from xgboost import XGBClassifier, XGBRFClassifier
from sklearn.gaussian... |
import matplotlib.pyplot as plt
from src import ice_build_geoms
#from src import error_mexc_v9
from src import error_mexc_v10
from src import gather_energies
from src import vibrational_frequencies
import time
import glob
import os
import sys
import subprocess
import numpy as np
import scipy.signal
import math
import m... |
import json
from opu import utf8
from opu.processor import movement
from collections import deque
from evo.neuron import block_reference_builder
from evo.synapse import synapse
from evo.blocks import neurons_in_the_block
from inf import runtime_data, settings
from cython_lib import neuron_functions_cy as cy
def acti... |
#!/usr/bin/env python
# Author: <NAME> (jewett.aij at g mail)
# http://www.chem.ucsb.edu/~sheagroup
# License: 3-clause BSD License (See LICENSE.TXT)
# Copyright (c) 2011, Regents of the University of California
# All rights reserved.
"""
ettree.py
ettree.py is an extension of the generic ttree.py program.
... |
from __future__ import annotations
from dataclasses import dataclass, field
from enum import Enum
from typing import Any, Dict, Iterator, List, Literal, Optional, Union
from ..utils.dataclasses import to_camel_case, to_snake_case
@dataclass
class Model:
@classmethod
def _encode_case(cls, s: str) -> str:
... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import nltk
import pickle
import argparse
from collections import Counter
import json
import os
from tqdm import *
import numpy as np
import re
class Vocabulary(object):
"""Simple vocabulary wrapper."""
def __init__(self):
self.w... |
# Copyright 2019 The Texar 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 applicable ... |
"""
Neato
MIT License
Copyright (c) 2021 <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,... |
# -*- coding: utf-8 -*-
# Copyright (c) 2019 CANDY LINE 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 applica... |
import sys
from .SLR import Parser
from anytree import Node, RenderTree
from bson.json_util import loads
"""
<query> ::= <and-query>
| <query> OR <and-query>
<and-query> ::= <unary-query>
| <and-query> ' ' <unary-query>
| <and-query> AND <unary-query>
<unary-query> ::= <primary-... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchsummary import summary
import sys
# import ipdb
import itertools
import warnings
import shutil
import pickle
from pprint import pprint
from types import SimpleNamespace
from math import floor,ceil
from pathlib import Path
impo... |
from collections import namedtuple
from dataclasses import dataclass
import string
import os
import sys
from weakref import ref as wref
def deref(w : wref['T']) -> 'T':
return w() if w is not None else None
LANG = "cpp"
#Entity = namedtuple("Entity", """
# type
# category
# brief
# display
# sectio... |
# implement the default mpl key bindings
import matplotlib
import matplotlib.animation as animation
matplotlib.use("TkAgg")
from numpy import arange, sin, pi
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
#from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, Naviga... |
from _ctypes import PyObj_FromPtr
import bz2
import collections as cols
import datetime
import enum
import fcntl
import gzip
import inspect
import json
import math
import multiprocessing as mp
import numba as na
import numpy as np
import os
import re
import signal
import shutil
import subprocess
import sys
import tarfi... |
from __future__ import absolute_import
import os
import dill
import pysnptools.util as pstutil
from itertools import *
from unittest.mock import patch
def work_sequence_to_result_sequence(work_sequence):
'''
Does all the work in a sequence of work items and returns a sequence of results.
'''
for work ... |
# -*- coding:utf-8 -*-
# keypoint subnet + detection subnet(RetinaNet) + PRN
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from collections import OrderedDict
from network.fpn import FPN50, FPN101
from torch.nn import init
from network.utils import ... |
from .economic_dispatch import QPModel
import numpy as np
import pandas as pd
from pyomo.environ import *
class BaseModel(object):
def __init__(self, system):
self.m = None
self.system=system
def _build_units_equations(self):
m = self.m
system = self.system
m.units = S... |
# Author <NAME>
# This file will contain all of the classes required for the puzzle
import copy
class Problem:
__problem_solved = False
__varialbes_list = []
__constraint_set = []
__multi_solution_list = []
def __init__(self,variables):
# Generate type and domain no from data input
... |
import numpy as np
from typing import Any, Dict, NoReturn, Optional
from collections import Counter, deque
import cv2
from collections import Counter, deque
from typing import Any, Dict, List, Optional
from filterpy.kalman import KalmanFilter
from scipy.optimize import linear_sum_assignment
np.random.seed(0)
def lab... |
# coding: utf-8
from __future__ import annotations
import os
from kwhelp import KwargsHelper, BeforeAssignEventArgs
from ooo.dyn.connection.no_connect_exception import NoConnectException
from abc import ABC, abstractstaticmethod
from pathlib import Path
import subprocess
import tempfile
import os
import sys
import sig... |
#!/usr/bin/env python
# coding: utf-8
# # WHY FAKE NEWS IS A PROBLEM?
# **Fake news refers to misinformation, disinformation or mal-information which is spread through word of mouth and traditional media and more recently through digital forms of communication such as edited videos, memes, unverified advertisements an... |
# Copyright 2012 VPAC, http://www.vpac.org
# Copyright 2013-2016 <NAME> <<EMAIL>>
#
# This file is part of Patchman.
#
# Patchman 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, version 3 only.
#
# Patchman is... |
# -*- coding: utf-8 -*-
"""
Module to handle getting data loading classes and helper functions.
"""
import json
import io
import torch
import numpy as np
from collections import Counter, defaultdict
from torch.utils.data import Dataset
from . import constants as Constants
from .timer import Timer
from allennlp.module... |
from collections import defaultdict
from glypy.io import iupac, glycoct
from glypy.structure.glycan_composition import HashableGlycanComposition, FrozenGlycanComposition
from glypy.enzyme import (
make_n_glycan_pathway, make_mucin_type_o_glycan_pathway,
MultiprocessingGlycome, Glycosylase, Glycosyltransferase,... |
import json
import math
import os
from collections import OrderedDict
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
class Visualize(object):
def __init__(self):
self.method = 'Method'
self.direction = 'Direction'
self.accurate = 'Accurate'
self.filename_te... |
#!/usr/bin/env python
#
# atlasoverlaypanel.py - The AtlasOverlayPanel class.
#
# Author: <NAME> <<EMAIL>>
#
"""This module provides the :class:`AtlasOverlayPanel`, which is a sub-panel
used by the :class:`.AtlasPanel`.
"""
import logging
import wx
import fsl.data.atlases as atlases
import fsl.... |
from mtcnn import MTCNN
from Learner import face_learner
from config import get_config
from utils import draw_box_name
# from RetinaFace import test
import os
import os.path as osp
import argparse
from PIL import Image, ImageDraw
import numpy as np
import torch
import cv2
import json
import random
from mtcnn_pytorch... |
# ====================== BEGIN GPL LICENSE BLOCK ======================
#
# This program 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 2
# of the License, or (at your option) any later ver... |
### modified from https://github.com/qiuqiangkong/audioset_tagging_cnn
import os
import sys
import numpy as np
import h5py
import csv
import time
import logging
from utilities import int16_to_float32
def read_black_list(black_list_csv):
"""Read audio names from black list.
"""
with open(black_list_csv, ... |
import abc
from datetime import datetime
import os.path
import threading
import zipfile
from Quality.AtomicComputation.cp_qoi_system import CpQoiSystem
from virtualisation.annotation.observationidgenerator import ObservationIDGenerator
from virtualisation.misc.jsonobject import JSONObject
from virtualisation.misc.log ... |
# Copyright 2019 The Sonnet 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 applicable l... |
# -*- coding: utf-8 -*-
## Attribution: original code by <NAME>, edited by <NAME>
import boto3
import xmltodict
import datetime # or getting today's date
import pytz # for timezone stuff
import glob # for listing files with wildcards in names
import argparse # for parsing command-line arguments
import sys
import unid... |
import copy
from pysv.interm import *
from pysv import contract
from pysv import utils
class ConverterSSA(object):
"""ConverterSSA is used to convert instruction block to the SSA (Single Static Assignment)
form, in which every new assignment to a variable is equivalent to creating a new ("marked")
vers... |
# 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 app... |
# -*- coding: utf-8 -*-
__author__ = 'fyabc'
# Dependent libraries.
import pygame
# Local modules.
from config.gameConfig import CELL_SIZE, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT, IMAGES_DIR, FPS_MAIN, AllColors
from shift.utils.basicUtils import sign, getRealLocation, getLogicLocation, getRotateRealCoor, getFont
from... |
import pytz
from datetime import datetime
from django.contrib.postgres.search import SearchVector
from django.db import transaction
from django.db.models import Q
from django.http import Http404, HttpResponse
from django.shortcuts import redirect
from django.utils import timezone
from private_storage.views import Priva... |
import math
from torch.nn.init import xavier_uniform_
from transformers import BertPreTrainedModel, BertModel
import torch
from torch import nn
import torch.nn.functional as F
class Classifier(nn.Module):
def __init__(self, hidden_size):
super(Classifier, self).__init__()
self.linear = nn.Linear(... |
from dataclasses import field, fields
import encodings
from itertools import count, groupby
from multiprocessing import Condition
from re import U
import pandas as pd
import altair as alt
import streamlit as st
from vega_datasets import data
import networkx as nx
import matplotlib.pyplot as plt
import numpy ... |
import datetime as dt
from operator import itemgetter
from typing import List, Optional, Tuple, Union, NamedTuple
from firestore_ci import FirestoreDocument
from flask import request
from flask_login import current_user
from flask_wtf.file import FileAllowed
from werkzeug.datastructures import FileStorage
from werkzeu... |
__description__ = "general utilities"
__author__ = "<NAME> (<EMAIL>)"
#-------------------------------------------------
import os
import shutil
import gzip
import h5py
import numpy as np
#-------------------------------------------------
DEFAULT_ACCOUNTING_GROUP = 'ligo.sim.o3.cbc.bayesianpopulations.parametric' ... |
from importlib import reload
from pycqed.measurement import measurement_control as mc
import adaptive
from pycqed.instrument_drivers.meta_instrument.LutMans import flux_lutman_vcz as flm
from pycqed.instrument_drivers.virtual_instruments import sim_control_CZ_v2 as scCZ_v2
from pycqed.simulations import cz_superopera... |
# Copyright 2020 <NAME>
# SPDX-License-Identifier: Apache-2.0
import inspect
import io
import logging
import struct
import typing
from collections.abc import Iterable
import numpy
logger = logging.getLogger(__name__)
T = typing.TypeVar("T")
class SizedType:
def __init__(self, variable_type: type, count: int, ... |
import pickle
import numpy as np
import cv2
import os.path
from PIL import ImageFilter
from PIL import Image
from scipy import ndimage
from os.path import join
import json
from kawalc1 import settings
from mengenali import imageclassifier, io
from skimage.morphology import skeletonize
import sys
import logging
import... |
import sys
import numpy as np
import pandas as pd
import matplotlib
matplotlib.use('PS')
import matplotlib.pyplot as plt
import cv2
import pytesseract as pt
import re
import json
import datetime
import time
import json
import os
from django.conf import settings
directory = os.getcwd()
json_file_path = directory + '/ex... |
import matplotlib.pyplot as plt
import cv2
import numpy as np
import os
import glob
import pickle
import sys
try: #commandline import
import sample_bundle as sb
except: #IDE import with other cwd
import Data.sample_bundle as sb
class Data_converter():
def __init__(self, path, max_num_samples, n_data, ... |
#!/usr/bin/evn python
# encoding: utf-8
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# www.pagebot.io
# Licensed under MIT conditions
#
# -----------------------------------------------------------------------------
#
# TextLineT... |
import traceback
import wx, wx.xrc
from WikiExceptions import *
# from wxHelper import *
from . import MiscEvent
from .Utilities import DUMBTHREADSTOP
from .wxHelper import GUI_ID, XrcControls, autosizeColumn, wxKeyFunctionSink
from .WikiPyparsing import buildSyntaxNode
try:
from EnchantD... |
import pandas as pd
import numpy as np
import gc
import rethinkdb as r
import operator
import itertools as itt
import requests
import datetime
import time
import os
import io
import math
def jumbo_write_json(data, table_name, chunk_size=5000, silent=True):
'''Write big JSON lists to RethinkDB.
Essential for... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import utool as ut
import vtool as vt
import numpy as np
import ubelt as ub
import pandas as pd
import dtool as dt
from os.path import join
from ibeis.algo.graph import nx_utils as nxu
from ibeis.core_annots impor... |
"""
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
def get(self):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.