text stringlengths 8.04k 46.5k |
|---|
"""
Copyright (C) 2020 <NAME>, <NAME> Ltd
Copyright (C) 2019 <NAME>, ETH Zurich
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 us... |
from postgres import Postgres
import urllib.parse
import os
import os.path
import json
import logging
import gzip
import traceback
import psycopg2
import operator
import psycopg2.extras
from psycopg2.extras import NumericRange
import math
from logging.handlers import TimedRotatingFileHandler
from io import BytesIO
from... |
#
# Copyright (C) [2020] Futurewei Technologies, Inc.
#
# FORCE-RISCV is 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
#
# THIS SOFTWARE IS PR... |
import sys
import threading
import queue
import random
import collections
import torch
import torch.multiprocessing as multiprocessing
from torch._C import _set_worker_signal_handlers, _update_worker_pids, \
_remove_worker_pids, _error_if_any_worker_fails
from torch.utils.data.dataloader import DataLoader
from to... |
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
from collections import deque
from program_types import *
from flatIR import *
def assertTypeMatch(
ltype, rtype, lpos, rpos,
evaluateGenerics=False,
genericMap=None
):
encounteredBoxes = []
if evaluateGenerics and genericMap == None:
# On a besoin de "genericMap" dans ce cas,
# ... |
"""
Copyright (c) 2015-2018 <NAME>(<EMAIL>), StopStalk
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... |
import functools
import os.path
import pytest
from leapp import reporting
from leapp.exceptions import StopActorExecution, StopActorExecutionError
from leapp.libraries.actor import peseventsscanner
from leapp.libraries.actor.peseventsscanner import (
Action,
Event,
SKIPPED_PKGS_MSG,
Task,
add_outp... |
"""Business logic."""
import datetime
import logging
import math
from collections import OrderedDict
from ortools.sat.python import cp_model
from django.contrib.auth import get_user_model
from .models import Leave, Role, Shift, ShiftRule, TimeSlot, Day, StaffRequest
log = logging.getLogger(__name__)
class Soluti... |
from typing import *
import asyncio
import os
import json
from datetime import datetime, timezone as tz
from anchorpy import Idl, Program, Provider, Context, Wallet
from anchorpy.error import AccountDoesNotExistError
from solana.publickey import PublicKey
from solana.keypair import Keypair
from solana.rpc.commitment im... |
import cv2
from gym.spaces.box import Box
import numpy as np
import gym
from gym import spaces
import logging
import universe
from universe import vectorized
from universe.wrappers import BlockingReset, GymCoreAction, EpisodeID, Unvectorize, Vectorize, Vision, Logger, Monitor
from universe import spaces as vnc_spaces
f... |
# Copyright (c) IMToolkit Development Team
# This toolkit is released under the MIT License, see LICENSE.txt
import os
import sys
import glob
import re
import time
import shutil
from scipy import special
import numpy as np
import itertools
from imtoolkit import *
def getHammingDistanceTable(MCK, indsdec):
# This ... |
from pprint import pprint
import enum
from urllib.parse import urlparse, parse_qs
import sys
import pdsupport
# creating enumerations using class
class States(enum.Enum):
old = 0
unchanged = 1
changed = 2
new = 3
class PyvoSheet:
def __init__(self, name, table, style, template):
self.name = name
self.tab... |
import sys
import re
import copy
import argparse
import textwrap
import pathlib
from gettext import gettext as _
from operator import attrgetter
from e4s_cl import logger, util
from e4s_cl.cli import USAGE_FORMAT
from e4s_cl.util import flatten, add_dot
from e4s_cl.error import InternalError
from e4s_cl.cf.storage.leve... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Dell EMC OpenManage Ansible Modules
# Version 3.6.0
# Copyright (C) 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from __future__ import (absolute_import, division, ... |
# Standard Library
import asyncio
import logging
import os
import pandas as pd
# Third Party
from elasticsearch import AsyncElasticsearch
from kubernetes import client, config
from PeakDetecion import PeakDetection
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(message)s")
config.load_in... |
import numpy, json, shelve, os, glob, time
import collections
from exceptions_lib import *
import local_utilities
import utils_walk
sh_ex01 = "sh_ranges/Emon/hus/hus_AS-RCEC_TaiESM1_historical_00-03"
log_factory =local_utilities.LogFactory(dir="./logs")
def sh_to_json(sfile,ofile=None):
assert os.path.isfile( sf... |
"""
cppcheckdata
This is a Python module that helps you access Cppcheck dump data.
License: No restrictions, use this as you need.
From: cppcheck 1.84
"""
import xml.etree.ElementTree as ET
import argparse
from fnmatch import fnmatch
class Directive:
"""
Directive class. Contains information about each pre... |
# -*- coding: utf-8 -*-
#
# Derived from https://github.com/pybind/pybind11/
#
# Copyright (c) 2016 <NAME> <<EMAIL>>,
# 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. Redistributions o... |
#!/usr/bin/python3
# Copyright © 2021 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0 OR MIT
import argparse
import os
import sys
import pathlib
import shutil
import subprocess
import prctl
import signal
import toml
import pexpect
import plumbum
import re
import errno
from time import sleep
im... |
"""
Module for the Device class.
"""
from __future__ import annotations
import asyncio
from collections.abc import Callable
from dataclasses import dataclass
from datetime import datetime
import logging
from typing import Any, Final
import hahomematic.central_unit as hm_central
import hahomematic.client as hm_client
... |
from typing import Any, Dict, List, Literal, Mapping, MutableMapping, Optional, Sequence, Tuple
import asyncio
import dataclasses
import enum
import hmac
import json
import logging
import time
import httpx
from binancebot import trader
logger = logging.getLogger(__name__)
Symbol = str
Timestamp = int # time in m... |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 09 18:07:03 2017
@author: scram
"""
from gensim import corpora, models, similarities
import gensim
import json
import os
import pickle
from pymongo import MongoClient
import unicodedata as uniD
import sys
import nltk
import networkx as nx
import numpy as np
import iterto... |
from typing import Iterator, Union, List, Tuple, Any
from lesma.ast import Collection, CollectionAccess, DotAccess, Range, Var, VarDecl, AST
from lesma.grammar import *
from lesma.utils import error, warning
from lesma.visitor import (BuiltinTypeSymbol, ClassSymbol, CollectionSymbol,
EnumSym... |
from hashlib import md5
import io
from .utils import read_block, tokenize
# alternative names for some methods, which get patched to new instances
aliases = [
('makedir', 'mkdir'),
('listdir', 'ls'),
('cp', 'copy'),
('move', 'mv'),
('stat', 'info'),
('disk_usage', 'du'),
('rename', 'mv'),
... |
# -*- coding: utf-8 -*-
"""
Parsing of grammar files
"""
from typing import Tuple, List, Iterable, FrozenSet, Any
from pyramids.categorization import Category, Property, LinkLabel
from pyramids.rules.conjunction import ConjunctionRule
from pyramids.rules.last_term_match import LastTermMatchRule
from pyramids.rules.o... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# from tabulate import tabulate
import pandas as pd
import copy
import random
import re
import networkx as nx
### CONSTANTS #########################################
FORMAT_AVAILABLES = ['dat', 'txt']
DAT_STYLES_AVAILABLES = ['']
TXT_STYLES_AVAILABLES = ['only_matrix', '... |
"""OCS agent module to read the data from beagleboneblack for CHWP encoder
Note
----
This is confirmed to be work with the following versions of beagleboneblack software:
- currently hwpdaq branch in spt3g_software_sa repository: 731ff39
(sha256sum)
- Encoder1.bin: c8281525bdd0efae66aede7cffc3520ab719cfd67... |
import pytest
import unittest.mock as mock
import numpy as np
import xarray as xr
import matplotlib.pyplot as plt
from deltametrics.sample_data import _get_rcm8_path, _get_golf_path
from deltametrics import mask
from deltametrics import cube
from deltametrics import plan
from deltametrics import section
simple_land... |
# Import smorgasbord
import pdb
import os
import numpy as np
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings('ignore')
import multiprocessing as mp
import gc
import re
import copy
import shutil
import ssl
import time
import datetime
import signal
import astropy.io.fits
import astropy.wcs
import ... |
#!/usr/bin/env python3
import os
import sys
pythonpath = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(pythonpath)
import argparse
import json
import signal
from functools import wraps, reduce
from prompt_toolkit import prompt
from twisted.internet import reactor, endpoints
from common.l... |
# -*- coding: utf-8 -*-
"""
Late updated on 16/11/2020
-Add new operator supported and customized function definition
-Update docstrings
@author: Qi.Wang
"""
import re
import numpy as np
# region Complied regex pattern for reading expression
# ()
pars = re.compile(r"(?P<oper1>\//|[\^#*])?(?P<par>(?P<init>[!|\\]|[A-Z... |
from datetime import datetime as dt
from typing import List, Union, Dict, Tuple, Optional, Callable
import glob
import os
import time
import logging
import json
import re
import shutil
from tqdm.notebook import tqdm as tq
from termcolor import colored
import sqlparse
from sqlparse.sql import IdentifierList
from sqlpars... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... |
import os
import numpy as np
import scipy.signal as scs
from PyAstronomy import pyasl
from scipy import integrate, interpolate
from scipy.optimize import differential_evolution, dual_annealing
from scipy.optimize import shgo, leastsq, NonlinearConstraint
from bokeh.models import ColumnDataSource, RangeTool, Line... |
import os
from django.core.exceptions import ObjectDoesNotExist
from django.forms import formset_factory
from django.utils.datastructures import MultiValueDictKeyError
from allSales.settings import BASE_DIR
try:
from django.urls import reverse
except:
from django.core.urlresolvers import reverse
from datetime i... |
import re
import calendar
import json
import functools
from datetime import datetime
from random import random
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_urlparse,
compat_urlparse
)
from ..utils import (
bug_reports_message,
ExtractorError,
get_first,
int_or_n... |
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# auth: <NAME> <<EMAIL>>
# date: 2016/09/12
# copy: (C) Copyright 2016-EOT Canary Health, Inc., All Rights Reserved.
#------------------------------------------------------------------------------
impor... |
#!/usr/bin/env python3
#--coding:utf-8 --
"""
callPeaks.py
2019-08-27: updated as select the most significant peaks for overlapped ones; also stich together close peaks.
2019-09-10: basically finished.
2020-01-20: fine tune, also change cDBSCAN to blockDBSCAN
2020-01-25: fine tune enrichment score, using real control R... |
import pytest
from textwrap import dedent
import attr
import numpy as np
import re
from bionic.descriptors.parsing import dnode_from_descriptor
from bionic.exception import CodeVersioningError
from bionic.utils.misc import single_element, single_unique_element
import bionic as bn
from ..helpers import import_code
... |
#!/usr/bin/env python
# coding: utf-8
'''
Created: 11-26-2020 by <NAME>
Description: End-to-End prototype command line script for Evolutionary Algorithm
python /media/data/jacob/GitHub/genetic_algorithm/Notebooks/generation/generation.py
'''
def get_hardest_k_examples(test_dataset, model, k=32):
class... |
# This file is part of GridCal.
#
# GridCal 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.
#
# GridCal is distributed in the hope that... |
worker_import_fail = False
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigParser
import cProfile
from datetime import datetime
import math
try:
from multiprocessing import Pool
from multiprocessing.pool import ThreadPool
except ImportError:
worker... |
# coding: utf-8
# # Developing an AI application
#
# Going forward, AI algorithms will be incorporated into more and more everyday applications. For example, you might want to include an image classifier in a smart phone app. To do this, you'd use a deep learning model trained on hundreds of thousands of images as p... |
# Copyright (c) 2015-2019 The Switch Authors. All rights reserved.
# Licensed under the Apache License, Version 2.0, which is in the LICENSE file.
"""
A simple and flexible model of spinning reserves that tracks the state of unit
commitment and dispatched capacity to ensures that the generation fleet has
enough up- and... |
"""Support to interact with a MopidyMusic Server."""
import re
import logging
from mopidyapi import MopidyAPI
from requests.exceptions import ConnectionError as reConnectionError
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistan... |
"""
Gridder class (and directly supporting utils) for efficient and parallelized mapping of
Py-ART Radar objects to a common, regular grid. Supported by the underlying subgrid mapping
of the GatesToSubgridMapper.
Portions inspired by the map_gates_to_grid implementation of Py-ART (license reproduced in
_map_gates_to_s... |
import os
import sys
import time
import math
import numpy as np
from tqdm import tqdm
import MEN
import utils
from Fruitfly import Fruitfly
from Incrementor import Incrementor
"""parameters (via console input)"""
# paths
global corpus_dir, testset_file, overlap_file, \
pipedir, \
count_file, fly_dir, ... |
# Filename: aanet.py
# pylint: disable=locally-disabled
"""
Pump for the Aanet data format.
"""
from __future__ import division, absolute_import, print_function
import os.path
import numpy as np
from km3pipe import Pump, Blob
from km3pipe.dataclasses import (HitSeries, TrackSeries, EventInfo,
... |
# Copyright (c) 2014, <NAME>
#
# See the LICENSE file for legal information regarding use of this file.
"""Implementation of the TLS Record Layer protocol"""
import socket
import errno
from .utils import tlshashlib as hashlib
from .constants import ContentType, CipherSuite
from .messages import RecordHeader3, RecordH... |
import time
from collections import namedtuple
from enum import IntEnum
from os.path import join
from ovos_utils import resolve_ovos_resource_file, resolve_resource_file
from ovos_utils.log import LOG
from ovos_utils.messagebus import wait_for_reply, get_mycroft_bus, Message
from ovos_utils.system import is_installed,... |
# Copyright (c) 2018 Cloudify Platform Ltd. 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 ap... |
'''
Name: QuantumSRNNs
Desriptption: Implement the classical simple recurrent neural networks
Email: <EMAIL>
OpenSource: https://github.com/yesunhuang
Msg: For studying quantum recurrrent neural networks
Author: YesunHuang
Date: 2022-04-06 10:18:00
'''
#import everything
import torch
from torch import pi
from collecti... |
import pandas as pd
from pathlib import Path
import geopy.distance as gd
import re
import numpy as np
from datetime import datetime
import datetime
import time
# Plotly and cufflings standart impors
import plotly.graph_objects as go
import plotly.io as pio
from plotly.subplots import make_subplots
import cufflinks as ... |
#!/usr/bin/env python
import distutils.dir_util
import glob
import json
import logging
import os
import time
import pandas as pd
from joblib import Parallel, delayed
import utils.foldx as foldx
import utils.io as io
import utils.rosetta as rosetta
from utils import abacus
# from utils import autofix
from utils impor... |
#!/usr/bin/env python
# libraries
from __future__ import print_function, division
import sys
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal
import os
import h5py
import re
import shutil
import copy
import time
import random
import warnings
import operator
from datetime... |
#!/usr/bin/env python
# coding=utf-8
'''
open Fritzing part definition file, and extract information from it
xml parsing
'''
# pipenv shell
# pipenv run pylint parse_fzp.py
# standard library imports
from typing import Dict
import subprocess
import re
import argparse
import defusedxml.ElementTree as ET
# local app... |
import xml.etree.ElementTree as ET
import xml.dom.minidom
import json
import csv
import pyodbc
import codecs
import os.path
from copython import metadata
class LODConf():
def __init__(self):
self.type = "lod"
self.lod = None
class FlyTableConf():
def __init__(self):
self.type = "flytab... |
#!/usr/bin/env python
"""
Classes which define the individuals of a population with
its characteristic genes, generation, crossover and
mutation processes.
"""
import math
import pprint
import random
try:
from .models.xgboost_models import XgboostModel
except ImportError:
pass
try:
from .models.keras_mod... |
"""
pghoard - list and restore basebackups
Copyright (c) 2016 Ohmu Ltd
See LICENSE for details
"""
from . import common, config, logutil, version
from .postgres_command import PGHOARD_HOST, PGHOARD_PORT
# ignore pylint/distutils issue, https://github.com/PyCQA/pylint/issues/73
from distutils.version import LooseVersio... |
# Copyright (c) 2021 OpenKS Authors, DCD Research Lab, Zhejiang University.
# All Rights Reserved.
"""
Rule based question parser for multiple domains
"""
import os
import ast
import re
import copy
import ahocorasick
from .question_parser import QuestionParser, StrucQ
from ...abstract.mtg import MTG
class RuleParser... |
import unittest
import numpy as np
import os
import shutil
import json
from pathlib import Path
from unittest.mock import patch, MagicMock
from appdirs import user_cache_dir
import geopandas as gpd
import warnings
import shutil
from ausdex.seifa_vic.data_wrangling import preprocess_victorian_datasets
from ausdex.seifa_... |
"""Module for twisting 2D materials"""
# Author: <NAME>
# Email: <EMAIL>
# Date: 2021.04.27
# Description: Module for twisting the 2D materials
import sys
import numpy as np
# Necessary Constants
FLOAT_PREC = 1e-6
DEFAULT_IN_POSCAR = 'POSCAR'
DEFAULT_OUT_POSCAR = 'POSCAR.T2D.vasp'
############################
### ... |
#!/usr/bin/env python3
import os
import sys
import datetime
import re
import ast
import sass
import yaml
import frontmatter
import markdown
import pypandoc
from mako.template import Template
from mako.lookup import TemplateLookup
from mako.exceptions import text_error_template, TemplateLookupException
from mako.runt... |
import itertools
import random
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit
class FitClass:
"""
This class is used for sigma optimization via curve_fit.
"""
def __init__(self):
self.mu = []
def multi_modal(self, *args):
"""
This... |
"""
This module contains parameter update functions for stochastic gradient descent optimization.
"""
from __future__ import division, print_function
import numpy as np
import theano
import theano.tensor as T
from ..util import netlog
log = netlog.setup_logging("nnets_sgd_updates", level="INFO")
class Rule(object... |
import pygame
from settings import *
from collections import deque
from ray_casting import mapping
from numba.core import types
from numba.typed import Dict
from numba import int32
class Sprites:
def __init__(self):
self.sprite_parameters = {
'sprite_barrel': {
'sprite': pygame... |
###run this using regina-python to produce a .pkl file that rhino can read in and draw edges from
import pickle
from taut import isosig_to_tri_angle
from veering import veering_triangulation
import pyx ### vector graphics
from develop_ideal_hyperbolic_tetrahedra import develop_verts_pos
from file_io import read_fr... |
from typing import (
Any, Callable, Dict, Iterator, List, Optional, Sequence, Set, Tuple, TypeVar, cast)
import datetime
import inspect
import ipaddress
import json
import logging
import os.path
import re
import time
from collections import OrderedDict
from concurrent.futures import ThreadPoolExecutor
from contextl... |
import copy
import dataclasses
import re
import sys
import traceback
from functools import lru_cache
from typing import Any, Callable, Dict, List, Optional, Tuple
from starkware.cairo.lang.compiler.debug_info import DebugInfo, InstructionLocation
from starkware.cairo.lang.compiler.encode import decode_instruction, is_... |
#!/usr/bin/env python
""" Locate single cells
Annotate the files with points in a nested layout:
.. code-block:: bash
$ ./cell_locator.py \\
--sel-mode point \\
--layout nested \\
-r /path/to/data
Annotate tiles within a certain range:
.. code-block:: bash
$ ./cell_locator.py \\
... |
"""
ATCACERT: classes and functions for interacting with compressed certificates
"""
# (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#
# Subject to your compliance with these terms, you may use Microchip software
# and any derivatives exclusively with Microchip products. It is your
# responsibility to c... |
# -*- coding: utf-8 -*-
#!/usr/bin/python
#########################################################################################################################################################################################################################
#Desenvolvido por: <NAME>
#
#Forma de uso: Execute a partir ... |
#!/usr/bin/env python
import html
import os
import pprint
import requests
from bs4 import BeautifulSoup
from copy import copy
from le_utils.constants import roles
from PyPDF2 import PdfFileReader, PdfFileWriter
from ricecooker.chefs import SushiChef
from ricecooker.classes.files import DocumentFile, VideoFile
from r... |
# 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 ... |
import numpy as np
from glob import glob
import os
import json
from neuralparticles.tools.param_helpers import *
from neuralparticles.tools.data_helpers import particle_radius
from neuralparticles.tools.shell_script import *
from neuralparticles.tools.uniio import writeParticlesUni, writeNumpyRaw, readNumpyOBJ, writeNu... |
"""
---------------------------------------------------
--------------- MÓDULO: fundamentus ---------------
---------------------------------------------------
Neste módulo, será proposta a construção de classes
e funções capazes de extrair uma gama de indicadores
financeiros de empresas/ativos da bolsa de valores
a pa... |
from neo4j.v1 import GraphDatabase, basic_auth
import networkit as nk
import graph_tool as gt
import networkx as nx
from pyspark.graphframes import *
from pyspark.sql import Row
import igraph as ig
import csv
from .graph_vis import NxpdGraph
from .config import bolt_url, results_path
entities = [":ORG", ":LOC", ":PER... |
#!/usr/bin/env python
# coding: utf-8
# # Attention - Qutorch
# In[72]:
import numpy as np
import math, copy, time
import torch.nn as nn
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import matplotlib.pyplot as plt
import seaborn
seaborn.set_context(context="talk")
get_ipython().... |
from math import radians, cos, sin, sqrt, radians, pow
import math
import colorsys
from colormath.color_objects import (LCHuvColor, LCHabColor, HSLColor,
HSVColor, IPTColor, sRGBColor,
XYZColor, AdobeRGBColor)
from colormath.color_conversions im... |
import collections.abc
import inspect
import logging
from copy import deepcopy
from pathlib import Path
from typing import (
Any,
Callable,
Dict,
Iterable,
List,
Mapping,
Optional,
Set,
Tuple,
Type,
TypeVar,
Union,
cast,
get_type_hints,
)
from tango.common.det_ha... |
from __future__ import unicode_literals, absolute_import
import re
import json
import weakref
import fnmatch
from collections import defaultdict, namedtuple
from functools import cmp_to_key
from six import iteritems
from six.moves import range
from mimeparse import best_match
from werkzeug.datastructures import Fil... |
import matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d import proj3d
from matplotlib.text import OffsetFrom
import numpy as np
from matplotlib import cm
from matplotlib.ticker import AutoLocator
from matplotlib.widgets import Cursor
from nurbsvisualizer.utili... |
from __future__ import division
from __future__ import unicode_literals
import codecs
import math
import pickle
import re
import struct
import sys
import warnings
from functools import partial
from io import BytesIO
from io import StringIO
import numpy as np
from liteasr.utils.kaldiio.compression_header import Globa... |
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import plotly
from ._make_chart import prepare_wide_data
class _BarChartRace:
def __init__(self, df, filename, orientation, sort, n_bars, fixed_order, fixed_max,
steps_per_period, period_length, interpolate_period, pe... |
#!/usr/bin/env python3
#python
import time
from os import mkdir, listdir
from os.path import isdir, isfile
from itertools import chain
#from pickle import load
#external
import numpy as np
np.set_printoptions(precision=10, threshold=np.inf)
from scipy.optimize import least_squares
from matplotlib import pyplot as plt... |
import pymysql as pymysql
import requests
from selenium import webdriver
from bs4 import BeautifulSoup
from selenium.common.exceptions import NoSuchElementException
from wordcloud import WordCloud, STOPWORDS
import datetime
import pandas as pd
import matplotlib.pyplot as plt
import time
import random
def click_url(u... |
import hail as hl
from ukbb_common.resources.generic import *
AC_CUTOFFS = list(range(0, 6)) + [10, 20, 50, 100]
AF_CUTOFFS = sorted([0] + [y * 10 ** x for y in (1, 2, 5) for x in range(-4, 0)] + [0.99])
SIG_THRESHOLD = 5e-8
def format_pheno_dir(pheno):
return pheno.replace("/", "_")
def get_top_p_from_mt(mt, ... |
import numpy, sys
from PyQt5.QtGui import QPalette, QColor, QFont
from PyQt5.QtWidgets import QMessageBox
from orangewidget import gui
from orangewidget import widget
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from oasys.widgets.gui import ... |
from tqdm import tqdm
import network
import utils
import os
import random
import argparse
import numpy as np
from torch.utils import data
from datasets import VOCSegmentation, Cityscapes, Oilwell
from utils import ext_transforms as et
from metrics import StreamSegMetrics
import torch
import torch.nn as nn
from utils.... |
"""
Functions for explaining classifiers that use tabular data (matrices).
"""
import collections
import copy
import json
import warnings
import numpy as np
import sklearn
import sklearn.preprocessing
from sklearn.utils import check_random_state
from .discretize import QuartileDiscretizer
from .discretize import Deci... |
#!/usr/bin/env python
"""Unique Crater Distribution Functions
Functions for extracting craters from model target predictions and filtering
out duplicates.
"""
import click
import logging
import deepmars2.features.template_match_target as tmt
import numpy as np
import h5py
import os
import time
import pandas as pd
from... |
from __future__ import division
from collections import Counter, defaultdict
import os
from random import shuffle
import tensorflow as tf
import pickle
import os.path
import numpy as np
import collections
import math
import numpy
from pathlib import Path
SUCCESS_HEADER = 'S_'
class NotTrainedError(Exception):
pa... |
# based on code from https://stackabuse.com/minimax-and-alpha-beta-pruning-in-python
import time
import sys
import math as m
from collections import Counter
class Game:
MINIMAX = 0
ALPHABETA = 1
HUMAN = 2
AI = 3
def __init__(self,
recommend=False,
n=3,
... |
# python gt-gen-vac-fixed-num-cbgs.py MSA_NAME RANDOM_SEED NN NUM_EXPERIMENTS quick_test
# python gt-gen-vac-fixed-num-cbgs.py SanFrancisco 66 70 100 False
import setproctitle
setproctitle.setproctitle("gnn-simu-vac@chenlin")
import sys
import os
import datetime
import pandas as pd
import numpy as np
import pickle
i... |
# coding: utf-8
import pandas as pd
import numpy as np
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource
from bokeh.models import HoverTool, PanTool, WheelZoomTool, BoxSelectTool, TapTool, OpenURL
from bokeh.models import GMapPlot, GMapOptions, Circle, DataRange1d, Range1d
from bokeh.io impor... |
"""
Usage:
python search-client.py display_env
-
python search-client.py create_blob_datasource documents
python search-client.py create_cosmos_datasource dev airports
python search-client.py delete_datasource azureblob-documents
-
python search-client.py list_indexes
python search-clien... |
# (c) 2012-2014, <NAME> <<EMAIL>>
#
# 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 later version.
#
# Ansi... |
import config
import sys
from subprocess import call
from PyQt5 import QtGui, QtCore
from PyQt5.QtCore import pyqtRemoveInputHook
from PyQt5.QtWidgets import QPushButton, QCheckBox, QWidget, QVBoxLayout, QLabel, QGroupBox, \
QHBoxLayout, QLineEdit, QRadioButton, QGridLayout, QComboBox, QFileDialog, QApplication, \... |
#!/usr/bin/env python3
# coding: utf-8
# Author:<NAME> <<EMAIL>>
import warnings
import time
import numpy as np
import re
import random
from random import randint
from ..normalization.normalizer import Normalizer
from ..duplicate_detection.duplicate_detector import Duplicate_detector
from ..outlier_detection.outlier_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.