text stringlengths 8.04k 46.5k |
|---|
# -*- coding: UTF-8 -*-
"""
..
---------------------------------------------------------------------
___ __ __ __ ___
/ | \ | \ | \ / the automatic
\__ |__/ |__/ |___| \__ annotation and
\ | | | | \ ... |
import numpy as np
import scipy.stats
import matplotlib.pyplot as plt
import time
import os
import pickle
import pandas as pd
# import seaborn as sns
from sklearn.manifold import TSNE
from matplotlib.ticker import FormatStrFormatter
# sns.set_style("white")
def get_bias(d1, d2, d3=None):
z = d1 + d2
bias = 0... |
import six
import os
import os.path as osp
import copy
from ast import literal_eval
import numpy as np
import torch
import torch.nn as nn
from torch.nn import init
import yaml
from utils.collections import AttrDict
__C = AttrDict()
# Consumers can get config by:
# from fast_rcnn_config import cfg
cfg = __C
# Con... |
import numpy as np
import tensorflow as tf
import theano.tensor as tht
import scipy.misc
from time import time
from os.path import dirname, join
import keras.backend as K
from keras.models import Model
from keras.layers import Layer, Input, InputLayer, Conv2D, MaxPooling2D, Activation, Conv2DTranspose
from keras.prep... |
import os
import math
import tensorflow as tf
from collections import namedtuple
from .model import Model
from .builder import MODELS
from core.layers import build_normalization
PARAMS = {
# (width_coefficient, depth_coefficient, resolution, dropout_rate)
"efficientnet-b0": (1.0, 1.0, 224, 0.2),
... |
import math
import cv2
import numpy as np
from numpy import exp as exp
from numpy import cos as cos
from numpy import sin as sin
from numpy import tan as tan
from numpy import sqrt as sqrt
from numpy import arctan2 as arctan2
from matplotlib import pyplot as plt
import os
import datetime
import zernike_functions
fro... |
"""
TODO update description
based on this: https://raw.githubusercontent.com/explosion/spaCy/master/examples/deep_learning_keras.py
This example shows how to use an LSTM sentiment classification model trained
using Keras in spaCy. spaCy splits the document into sentences, and each
sentence is classified using the LSTM.... |
import copy
import numpy as np
import logging
from bnpy.allocmodel.hmm import HMMUtil
from bnpy.allocmodel.hmm.HDPHMMUtil import ELBOTermDimMap, calcELBO
from bnpy.allocmodel.hmm.HDPHMMUtil import calcELBO_LinearTerms, calcELBO_NonlinearTerms
from bnpy.allocmodel import AllocModel
from bnpy.suffstats import SuffStatB... |
"""
Implements configuration and control of an EMANE emulation.
"""
import logging
import os
import threading
from enum import Enum
from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, Type, Union
from core import utils
from core.emane.emanemodel import EmaneModel
from core.emane.linkmonitor import Ema... |
# udis86 - scripts/ud_opcode.py
#
# Copyright (c) 2009, 2013 <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:
#
# * Redistributions of source code must retain the above copyright not... |
import os
import glob
import re
import sys
import socket
import couchdb
import logging
import argparse
import yaml
import json
import distance
import operator
try:
import ConfigParser
except ImportError:
import configparser
CONFIG = {}
logger = logging.getLogger(__name__)
def setupServer(conf):
db_c... |
#!/usr/bin/env python
# the purpose of this script is to parse a truss or strace log file and summarise all the commands
# e.g. on AIX generate a truss log file like this: truss -d -f -o truss.log -p <pid>
# e.g. on Linux generate a strace log file like this: strace -ttt -T -f -o strace.log -p <pid>
# default usage: py... |
"""Define Parameter which holds the value."""
# Copyright (c) 2019 zfit
from contextlib import suppress
import numpy as np
import tensorflow as tf
# TF backwards compatibility
from ordered_set import OrderedSet
from tensorflow.python import ops, array_ops
import zfit
from zfit import ztf
from tensorflow.python.op... |
__author__ = 'DGriffith'
# Functions related to interpolation of xarray.DataArray and other utilities
# Some sort of global data dictionary (CF compliant ?), including short names and synonyms
# Could import some or all CF definitions from XML file.
import numpy as np
import xarray
from scipy.interpolate import Regu... |
"""
CORE DATA MODELS
================
Contains the core data structure models for sequencing files.
"""
import logging
import os
import re
from .config import CONFIG as cfg
try:
FileNotFoundError
except NameError:
FileNotFoundError = OSError
logger = logging.getLogger(__name__)
def extract_frame(name):
"""
Th... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" archaic_match
Calculate archaic match percent for haplotype windows
"""
import argparse
import logging
import allel
import numpy
import subprocess
import sys
import functools
import glob
import pandas
from collections import namedtuple
from collections import default... |
import angr
from angr import sim_options as so
import claripy
import copliot
from pwn import *
from zeratool import printf_model
from .overflowExploiter import getRegValues, findShellcode
from .simgr_helper import getShellcode
import timeout_decorator
import time
import rescript
import string
import logging
log = logg... |
# coding=utf-8
# Copyright 2022 The Pix2Seq 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 o... |
import argparse
import os
import matplotlib
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from sklearn.manifold import TSNE
import itertools
import matplotlib.pyplot as plt
from matplotlib.legend_handler import Han... |
import tkinter as tk
from tkinter import ttk
from tkinter import filedialog, messagebox
from PIL import Image, ImageTk
import os
from tkinter.messagebox import showinfo
# import pymodm
import ssl
from pymodm import connect, MongoModel, fields
import pymongo
from datetime import datetime
import time
from IPython.display... |
"""Argumentation structure RNN using dynet and AD3 inference"""
# Author: <NAME> <<EMAIL>>
# License: BSD 3-clause
import warnings
from collections import Counter
from time import time
import numpy as np
import dynet as dy
from sklearn.utils import shuffle
from marseille.struct_models import BaseArgumentMixin
from... |
import wgpu # only for flags/enums
from . import register_wgpu_render_function
from ._shadercomposer import Binding, WorldObjectShader
from ._conv import to_texture_format
from ...objects import Volume
from ...materials import VolumeSliceMaterial, VolumeRayMaterial
from ...resources import Texture, TextureView
vert... |
import time
import uuid
import neat
import uuid
import numpy as np
import vrep.vrep as vrep
import threading
import pickle
from datetime import datetime, timedelta
from vision.tracker import get_marker_object
from robot.vrep_robot import VrepRobot
from utility.path_tracking import follow_path, transform_pos_angle, crea... |
"""
Test the ColumnTransformer.
"""
import numpy as np
from scipy import sparse
import pytest
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import assert_raise_message
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_true
from sklearn.utils.testing i... |
#!/usr/bin/env python3
# coding: utf-8
"""
LAKit for LiAna
Author: Lucka
Version: 0.4.0
Licence: MIT
"""
# 庫
from datetime import datetime # 處理日期
from datetime import timedelta # 累計時間
# 全局變量
## 時間字符串格式
dateFormat = "%Y-%m-%dT%H:%M:%SZ"
# 最新數據版本
lastDataVersion = "0.3.0"
# 起點時間
zeroTime = datetime.fromti... |
"""
GP + transit example for Kepler 1627 / exoplanet case-studies docs.
"""
import exoplanet as xo
xo.utils.docs_setup()
print(f"exoplanet.__version__ = '{xo.__version__}'")
##########################################
import lightkurve as lk
import numpy as np, matplotlib.pyplot as plt
# Get long cadence light curve... |
import torch
import torch.nn as nn
import torch.nn.init
import torchvision.models as models
from torch.autograd import Variable
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from torch.nn.utils.clip_grad import clip_grad_norm
import numpy as np
from collections import OrderedDict
import torch... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader
from torch.utils.data.sampler import SubsetRandomSampler, WeightedRandomSampler
import torch.optim as optim
import numpy as np
import matplotlib.pyplot as... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script performs a supervised training and prediction for
Spatial Transcriptomics datasets
The multi-class classification is performed using a 2 layers
neural network with the option to use GPU (CUDA) acceleration
The training set will be a matrix with counts (g... |
# Copyright 2015 Google 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 agreed ... |
from __future__ import print_function
# -*- coding: utf-8 -*-
import base64
from importlib import import_module
import unittest
import socket
import json
import os
from time import sleep
import pytest
try:
from sauceclient import SauceClient
USE_SAUCE = True
WAIT_TIMEOUT = 20
except ImportError:
USE_SAU... |
import asyncio
import logging
import shlex
import time
import weakref
from collections import deque
from math import ceil
from math import floor
from discord import player, opus
from discord.activity import Activity, ActivityType
from discord.errors import ClientException
from discord.errors import HTTPException
from ... |
#!/usr/bin/env python3
#
# Copyright 2021 GoPro Inc.
#
# 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 Apach... |
try:
from collections import OrderedDict
except:
from cassandra.util import OrderedDict
import re
import warnings
from cqlengine import columns
from cqlengine.exceptions import ModelException, CQLEngineException, ValidationError
from cqlengine.query import ModelQuerySet, DMLQuery, AbstractQueryableColumn, NOT... |
"""dml voor probreg met sql om dezelfde data te gebruiken die de Django versie
gebruikt
vervallen omdat we nu de versie gebruiken die met het Django ORM werkt
"""
## import sys
import os
import datetime as dt
import sqlite3 as sql
from contextlib import closing
import logging
from probreg.shared import DataError, DBLO... |
#! /usr/bin/env python
import louvain
import leidenalg
import networkx as nx
import igraph as ig
import argparse
import os, time
import pickle
import numpy as np
import pandas as pd
import scipy as sp
from hidef import weaver
from hidef.utils import *
from hidef import LOGGER
import multiprocessing as mp
class Clus... |
# coding: utf-8
# python-3
# Author: <NAME> (<EMAIL>)
# Creation date: 6/14/16
# Description: Contains multiple methods to calculate final result statistics.
# The methods in this script file highly utilizes objects created by JobsMapResultsFilesToContainerObjs.py.
# Three global variables are declared in the scope ... |
# -*- coding: utf-8 -*-
## Part of the pyprimes.py package.
##
## Copyright © 2014 <NAME>.
## See the file __init__.py for the licence terms for this software.
"""\
===============================
Probabilistic primality testing
===============================
Unless otherwise stated, the functions in this module... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import babel
import base64
import copy
import datetime
import dateutil.relativedelta as relativedelta
import logging
import lxml
import urlparse
from urllib import urlencode, quote as quote
from odoo import _, api, fie... |
import numpy as np
from mldftdat.workflow_utils import get_save_dir, SAVE_ROOT
from mldftdat.density import get_exchange_descriptors2, LDA_FACTOR,\
get_ldax, get_ldax_dens
import os, json, yaml
from sklearn.metrics import r2_score
from pyscf.dft.libxc import eval_xc
from sklearn.gaussian_p... |
#!/usr/bin/env python
# coding=utf-8
# author=<NAME>
"""SFTPClone tests."""
# Simply launch me by using nosetests and I'll do the magic.
# I require paramiko
# Python 2.7 backward compatibility
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
impor... |
# -*- coding: utf-8 -*-
'''
Created on 13.08.2015
@author: rdebeerst
'''
import bkt
import bkt.console
import bkt.library.powerpoint as powerpoint
import bkt.library.algorithms
import System
import bkt.ui
import json
# import ruben as toolbox_rd
class Adjustments(object):
@staticmethod
def adjustment_e... |
# Copyright 2019 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
import numpy as np
from scipy.optimize import curve_fit
from auspex.... |
import os
import stat
import struct
import numpy as np
from yt.data_objects.static_output import ParticleFile
from yt.frontends.sph.data_structures import SPHDataset, SPHParticleIndex
from yt.funcs import only_on_root
from yt.utilities.chemical_formulas import compute_mu
from yt.utilities.cosmology import Cosmology
f... |
from bokeh.plotting import Figure, output_file , show
from bokeh.models import ColumnDataSource, Slider, LabelSet, OpenHead, NormalHead, Arrow
from bokeh.layouts import column, row, widgetbox
from bokeh.models.widgets import Button
from bokeh.io import curdoc
import numpy as np
#main1
#conversion of java code
class... |
#!/usr/bin/python2
# -*- coding: utf-8 -*-
#
# Compares texts with the classifier.
#
import pickle
import kyotocabinet as kc
import kyotocabinetutil as kc_util
from Stemmer import Stemmer
from collections import Counter
from math import sqrt, log
from nltk.corpus import stopwords
import time
import re
SPLIT_TEXT = r... |
import numpy as np
import pandas as pd
import scipy.stats
import scipy.optimize
import edhec_risk_kit
def drawdown(return_series: pd.Series):
"""
Takes a time series of asset returns
Computes and returns a DataFrame that contains:
- Wealth index
- Previous peaks
- Percent drawdown... |
import os
import numpy as np
import matplotlib.pyplot as plt
import time
import scipy.io as scio
from tqdm import tqdm
from dataloaders import make_data_loader
from dataloaders.custom_transforms import denormalizeimage
from modeling.sync_batchnorm.replicate import DataParallelWithCallback, patch_replication_callback
fr... |
import argparse
import os
import sys
sys.path.append(os.getcwd())
from models.defensive_model import DefensiveModel
from models.standard_model import StandardModel
import random
import json
from collections import defaultdict, OrderedDict
from types import SimpleNamespace
import torch
import torch.nn.functional as F
i... |
from bdbd_common.geometry import threeSegmentPath, twoArcPath, HALFPI, TWOPI, \
default_lr_model, pose3to2, nearestLinePoint, nearestArcPoint, transform2d, lr_est, \
oneArcPath
from bdbd_common.utils import fstr, gstr
import math
def static_plan(
start_pose=(0.0, 0.0, 0.0),
start_twist=(0.0, 0.0, 0.0)... |
from ratelimit.decorators import ratelimit
from datetime import timedelta
from dateutil.tz import tzutc
from io import StringIO
from link_header import Link as Rel, LinkHeader
from urllib.parse import urlencode
import time
from timegate.utils import closest
from warcio.timeutils import datetime_to_http_date
from werkze... |
'''
Created on Sep 18, 2015
@author: <NAME> (<EMAIL>)
This module contains an implementation of a tabular and continuous state MDP classes.
It also contains different helper functions to compute distributions over state
spaces and MSPBE values.
'''
import numpy as np
from basisfunction import basisFunctionMatrixSta... |
import sys
print(sys.executable)
import socket
import threading
import keyExchange
import errno
import primes as Primes
import dataOverStream as DataStream
import encryption
import re
import packet as Packet
import dataOverString as DataString
import time
import json
import platform
import os
import base64
impo... |
import jax.numpy as jnp
import numpy as np
import scipy.sparse as sp
from scipy.sparse.linalg import eigs
from .grid import YeeGrid
from .typing import Size, Spacing, Optional, Tuple, Union, Callable, Size2
from .utils import poynting_fn, Box
from .viz import plot_power_2d, plot_field_2d, plot_field_1d, hv_field_1d, h... |
from collections.abc import Mapping
from dataclasses import fields, is_dataclass
from functools import lru_cache
import logging
from multiprocessing.context import BaseContext
from pathlib import Path
import platform
import subprocess
from typing import (
Any,
Callable,
Dict,
Final,
Iterator,
Li... |
# coding: utf-8
# # Self-Driving Car Engineer Nanodegree
#
#
# ## Project: **Finding Lane Lines on the Road**
# ***
# In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and later apply the result t... |
#!/usr/bin/env python3
"""Tools to submit multiple jobs to the cluster.
"""
# Copyright 2021 jhauschild, MIT License
# I maintain this file at https://github.com/jhauschild/cluster_jobs in multi_yaml/
# requires Python >= 3.5
import pickle
import subprocess
import os
import sys
import warnings
import importlib
from ... |
#
# Frank-Wolfe Adaptive Adversarial Training (FW-Adapt-AT)
# Code used in paper
# Understanding and Increasing Efficiency of Frank-Wolfe Adversarial Training (2021)
#
import datetime
import time
from pathlib import Path
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.optim as... |
#!/usr/bin/env python
################################################################################
# _ ____ ___ _ _ _ #
# / \ / ___|_ _| | | (_)_ __ | |_ #
# / _ \| | | | | | | | '_ \|... |
import pandas as pd
import random
import os
import numpy as np
from plastering.inferencers.relational_inference.util import logging, logging_result
# Data
def set_up_logging(config, args):
if not os.path.exists(config.log):
os.mkdir(config.log)
if args.log == '':
log_path = config.log + 'no_n... |
# -*- coding: utf-8 -*-
#
# -----------------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this softw... |
#!/usr/bin/env python
import argparse
import csv
import datetime
import io
import itertools
import json
import numpy
import pygal
import time
import threading
import traceback
import sys
from collections import defaultdict, deque, Counter, namedtuple
from ciso8601 import parse_datetime
from concurrent.futures import Th... |
import time
import threading
import multiprocessing
try:
import queue # python 3
except ImportError:
import Queue as queue # python 2
import numpy as np
class data_flow(object):
"""
Given a list of array-like objects, data from the objects is read in a
parallel thread and processed i... |
""" <NAME> <<EMAIL>>
Sept 17, 2018
"""
import torch
import numpy as np
import pandas as pd
import dill as pickle # see https://stackoverflow.com/questions/25348532/can-python-pickle-lambda-functions
import random
from tqdm import tqdm
from mdp import MDP
from ddqn import DoubleDQN
from sarsa import SARSA
from forw... |
from formats.sound import smdl
from formats import binary
import io
from queue import PriorityQueue
import numpy as np
from pg_utils.sound.StreamPlayerAbstract import StreamPlayerAbstract
from formats.sound.soundtypes import Preset
from typing import Dict
from dataclasses import dataclass, field
from typing import Any... |
"""
DockCI - CI, but with that all important Docker twist
"""
import json
import logging
import random
import re
import subprocess
import tempfile
from datetime import datetime
import docker
import docker.errors
import py.path # pylint:disable=import-error
from docker.utils import kwargs_from_env
from flask import... |
#!/usr/bin/python3
"""Compare currently served and wiki images, storing the results in a SQLite database.
This script exists to help curate Fallen London wiki's extensive mirror of
game images, helping keep them up-to-date with the current artwork deployed
released on fallenlondon.com. To do this, it scrapes the categ... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 - 2019, doudoudzj
# Copyright (c) 2012, VPSMate development team
# All rights reserved.
#
# InPanel is distributed under the terms of the (new) BSD License.
# The full license can be found in 'LICENSE'.
'''Module for Querying Server Information'''
import datet... |
import argparse
import math
import torch
import torch.nn as nn
from thop import profile
from copy import deepcopy
from classification.modules import Conv, Bottleneck, GlobalPool, \
SeparableConv, InvertedResidual, Activation, PatchEmbed, ViTBlock
from classification.tools import select_device, ModelEMA
class Mode... |
import numpy as np
import pandas as pd
import itertools
import random
from sklearn import manifold
from sklearn.metrics import euclidean_distances
from sklearn.preprocessing import scale as sklearn_scale
from sklearn.decomposition import PCA as sklearnPCA
from rpy2.robjects import r as R
import rpy2.robjects.pandas2ri ... |
#!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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 req... |
"""
Here the MIL classifier performance will be tested on the input similarity matrices
There are 3 CV possibilities:
- leave-one-patient-out CV (also with random labels)
- leave-one-chromosome-out CV (also possible with feature elimination)
- leave-bags-out-CV
"""
import sys
import numpy as np
fr... |
import os
import sys
import importlib
import pkg_resources
import json
import argparse
import yaml
import re
import copy
from datetime import datetime
from .config_loader import ConfigLoader
from .dependency_grapher import DependencyGrapher
from .git import Git
from .run import run
from .token_interpolator import Toke... |
'''
TODO:
- avg training loss
- baseline? ie what is the prediction
'''
from tokenizers import CharBPETokenizer
import torch
import torch.nn as nn
from torchtext import data
from picotext.model import RNN_lm, RNN_tr
from picotext.utils import batchify, get_batch, repackage_hidden
from picotext.utils import load_pret... |
# Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Persistence of cluster configuration.
"""
from base64 import b16encode
from calendar import timegm
from datetime import datetime
from json import dumps, loads
from mmh3 import hash_bytes as mmh3_hash_bytes
from uuid import UUID
from collections import Set,... |
import pandas as pd
import json
import math
import time
import matplotlib.pyplot as plt
import datetime
from numba import jit
filename_arr = ["reverse_microwave.tsv", "reverse_hair_dryer.tsv","reverse_pacifier.tsv"]
filename_NLP_arr = ["NLP1_microwave.tsv", "NLP1_hair_dryer.tsv","NLP1_pacifier.tsv"]
time_pin = time.ti... |
from abc import abstractmethod, ABC
from py_wake.site._site import Site, UniformSite, UniformWeibullSite, LocalWind
from py_wake.wind_turbines import WindTurbines
import numpy as np
from py_wake.flow_map import FlowMap, HorizontalGrid, FlowBox, YZGrid, Grid, Points
import xarray as xr
from py_wake.utils import xarray_u... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------
# Filename: cross_correlation.py
# Author: <NAME>, <NAME>, <NAME>
# Email: <EMAIL>
#
# Copyright (C) 2008-2016 <NAME>, <NAME>, <NAME>
# ---------------------------------------------------------------... |
#
# Blueprint for the GUI
#
from flask import Flask, Blueprint, url_for, jsonify, make_response, app, \
render_template, request, session, redirect, flash, g
from flask_login import login_required, login_user, logout_user, current_user
from flask_mail import Message
import re
import logging
from datetime impo... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
get_ipython().system('wget https://dwz.cn/ijPVPQhz')
get_ipython().system('sudo apt-get install rar unrar')
get_ipython().system('unrar x ijPVPQhz')
get_ipython().system('cp -r AI研习社_鸟类识别比赛数据集/* ./')
# In[2]:
# 将kaggle的数据集直接下载到codelab中
get_ipython().system('pip inst... |
# coding=utf-8
"""
Manage pictures via UI.
"""
# Copyright (c) 2016 <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 t... |
"""
Provide consistent and up-to-date ``__version__`` strings for
Python packages.
See https://github.com/pyviz/autover for more information.
"""
# The Version class is a copy of autover.version.Version v0.2.5,
# except as noted below.
#
# The current version of autover supports a workflow based on tagging
# a git re... |
import numpy as np
import pandas as pd
from numpy.linalg.linalg import LinAlgError
from numpy.linalg import norm
import matplotlib.pyplot as plt
import sys
from ctypes import CDLL, POINTER
from ctypes import c_int, c_double
# Load the library I created for extra speed
mylib = CDLL("./mylib.so")
# C-type corresponding... |
import os
import datetime
import shutil
import logging
import yaml
import importlib
import time
from path import Path
from abc import ABC, abstractmethod
from PIL import Image as Im
import numpy as np
import torch.nn.functional as F
import torch
from torch.utils.tensorboard import SummaryWriter
import torch.distribut... |
#
# Copyright (c) 2020 Expert System Iberia
#
"""Credibility reviewer for an Article.
"""
import logging
from esiutils import citimings
from esiutils import isodate, bot_describer, dictu, hashu
from acred.reviewer.credibility import website_credrev, aggqsent_credrev
from acred.reviewer.credibility import label as credl... |
# | Copyright 2017 Karlsruhe Institute of Technology
# |
# | 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 ... |
#!/usr/bin/env python
from mpl_toolkits.basemap import Basemap, cm
# requires netcdf4-python (netcdf4-python.googlecode.com)
from netCDF4 import Dataset as NetCDFFile
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime as dt
from datetime import timedelta as td
import sys
from scipy import... |
#pylint: disable=unexpected-keyword-arg
# non-essential parameters are declared with decorators in es.py
# https://github.com/elastic/elasticsearch-py/issues/274
import json
import logging
import string
import sys
from datetime import date, datetime
from shlex import shlex
import boto3
from elasticsearch import Elast... |
#
#
# Copyright (C) University of Melbourne 2012
#
#
#
#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... |
#!/usr/bin/env python
# Copyright 2015-present Samsung Electronics Co., Ltd. and other contributors
#
# 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/LIC... |
import copy
import warnings
import re
import numpy as np
import pandas as pd
import matplotlib as mpl
from matplotlib import pyplot as plt
import fitgrid
# enforce some common structure for summary dataframes
# scraped out of different fit objects.
# _TIME is a place holder and replaced by the grid.time value on the f... |
import time, os, ast, pygame, threading, platform, random, logging
from _thread import *
from customEnums import *
from menus import *
#Basic Logging
logging.basicConfig(level=logging.INFO)
fileLogger = logging.getLogger("pongFileLogger")
fileHandler = logging.FileHandler("pongLog.log")
fileFormatter = logging.Format... |
from numpy import pi, e, array
import codecs
import urllib.request
import os.path
import os
import multiprocessing
from urllib.error import HTTPError
def download_html(data_directory, which="all"):
"""
Download the html files with mass data.
Parameters
----------
data_directory : string
Na... |
import json
import os
import os.path
import shutil
import sys
import unittest
from collections import OrderedDict
from time import sleep
from typing import Union, List
from unittest import TestCase
from cate.cli import main
from cate.core.ds import DATA_STORE_REGISTRY
from cate.core.op import OP_REGISTRY
from cate.cor... |
import itertools
import math
import os
from datetime import datetime
import matplotlib.pyplot as plt
import numpy as np
from mne import baseline
from scipy.ndimage import convolve1d
from scipy import stats
from sklearn.feature_selection import mutual_info_classif
from sklearn.metrics import accuracy_score, precision_r... |
# Copyright 2020 The SQLFlow 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 law o... |
from dataclasses import dataclass, field
from enum import Enum
import random
import math
import copy
import time
import numpy as np
from typing import List, Tuple
from ..base import Parameter, Individual
from ..helpers import convert_to_ndarray
from dataclasses_json import dataclass_json
class de_mutation_type(Enu... |
import casadi as ca
import numpy as np
import sys
sys.path.insert(0, '../../../../../python/pyecca')
import matplotlib.pyplot as plt
import pyecca.lie.so3 as so3
from pyecca.util import rk4
def u_to_fin(u):
ail = u[1]
elv = u[2]
rdr = u[3]
# top, left, down right
return ca.vertcat(ail - rdr, ail... |
import time
import threading
import os
import cv2 as cv
import pickle as pkl
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import pandas as pd
from tqdm import tqdm
# from utilities.utility import get_datetime_attrs
from matplotlib.patches import Rectangle
from utilities.utility import lo... |
import datetime
import functools
import json
import multiprocessing
import os
import sys
import tkinter as tk
from pathlib import Path
from tkinter import ttk, messagebox, filedialog
import keyboard
import win32api
import win32event
import winerror
from TextSpitter import TextSpitter
from tkdocviewer im... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.