text stringlengths 6.04k 39.5k |
|---|
from collections import defaultdict
import param
import numpy as np
from bokeh.models import (StaticLayoutProvider, NodesAndLinkedEdges,
EdgesAndLinkedNodes, Patches, Bezier, ColumnDataSource)
from ...core.data import Dataset
from ...core.util import (basestring, dimension_sanitizer, unique_... |
from _xqpy import ffi, lib
import base64
from decimal import Decimal as _Decimal
try:
unicode
except NameError:
unicode = str
class Implementation:
def create_context(self):
"""Create a static context to use for expressions"""
_context = ffi.new('XQC_StaticContext**')
_handle_error... |
"""Create important distributions classes.
Especially provide the logic for a hypererlang distributions with data
fitting.
"""
import logging
import multiprocessing as mp
from itertools import combinations_with_replacement
from typing import Any, Dict, Generator, Iterable, List, Optional, Union
import matplotlib.pyp... |
# Copyright 2021 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 a... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
"""Configuration class."""
import bisect
from collections import deque
import cPickle
import heapq
import random
from absl import logging
import numpy as np
import six
from six.moves import xra... |
#!/usr/bin/env python
from concurrent import futures
import grpc
import sys
from time import sleep
from uuid import uuid4
from threading import Thread
from functools import wraps
from tira.proto import tira_host_pb2, tira_host_pb2_grpc
from tira.grpc.test_grpc_host_client import TestGrpcHostClient
VIRTUAL_MACHINES ... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import argparse, pickle
import shutil
from keras.models import load_model
import tensorflow as tf
import os
sys.path.append('../')
import keras
from keras import Input
from deephunter.coverage imp... |
# Copyright 2015 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://... |
"""
Script to test vignetting at alt/az positions. While this code is designed to avoid damage from
looking at the Sun, it is strongly recommended to run only while the Sun is below the horizon.
"""
import os
import sys
import time
import argparse
from tempfile import TemporaryDirectory
from contextlib import suppress
... |
# coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... |
__all__ = [
"Class",
"EnumProperty",
"ModelProperty",
"NoneProperty",
"Property",
"Schemas",
"build_schemas",
"property_from_data",
]
from itertools import chain
from typing import Any, ClassVar, Dict, Generic, Iterable, Iterator, List, Optional, Set, Tuple, TypeVar, Union
import attr
... |
# -*- coding: utf-8 -*-
#!/usr/bin/python
##################################################
# AUTHOR : <NAME>
# CREATED_AT : 2015-09-15
# LAST_MODIFIED : 2015年11月14日 星期六 16时46分14秒
# USAGE : python core.py
# PURPOSE : TODO
##################################################
import mylogging
impor... |
#########################################################################
#
# spectral.py - This file is part of the Spectral Python (SPy) package.
#
# Copyright (C) 2001-2008 <NAME>
#
# Spectral Python is free software; you can redistribute it and/
# or modify it under the terms of the GNU General Public Licen... |
from PyQt5.QtCore import QCoreApplication, Qt
import random
import numpy as np
from scipy.sparse import csr_matrix
from GUI_classes.utils_gui import choose_dataset, pause_execution
from GUI_classes.generic_gui import StartingGui
from base import appctxt
class PAM_class(StartingGui):
def __init__(self):
... |
# Copyright (c) 2013, wayzon and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class OrderGeneration(Document):
pass
@frappe.whitelist()
def show_table(d):
q=frappe.db.sql("""select table_no from `tabT... |
# Copyright (c) Glow Contributors. See CONTRIBUTORS file.
#
# 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 ... |
from __future__ import print_function
from random import sample
import numpy as np
import os
from models.layers.mesh_prepare import fill_from_file
from os import path
import torch
from models.losses.loss import ChamferDist
from util.sampler import sampler
def mesh_upsampler(filename, dir_in, dir_out, epoch, nface):... |
""" test """
import datetime
import os
import random
import sys
from _socket import SOCK_STREAM, AF_INET
from collections import Counter
from random import random
import requests
from bzt.modules import TransactionListener
from bzt.modules.aggregator import DataPoint, KPISet, ResultsReader, AggregatorListener, Consol... |
#!/usr/bin/env python
""" Contains validation functions.
These functions are important to ensure that only valid values are passed to the processing functions.
Validation could likely be improved by moving WTForms, which Overwatch already depends upon for CSRF
protection.
.. codeauthor:: <NAME> <<EMAIL>>, Yale Unive... |
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 25 15:55:37 2021
@author: <NAME>
"""
import serial, time, os
import serial.tools.list_ports
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtGui import QIcon
from flip_servo_ui import *
from connection_popup_ui import *
class MyPopup(QtWidgets.QDialog, Ui_Dialog):
... |
from PIL import Image
import glob, os, sys, face_recognition, itertools, subprocess, concurrent.futures, numpy, pickle, datetime, time
is_verbose = ""
def collect_faces_of_dir(dir, verbose, collect, d_faces_unknown):
# check images size to avoid DecompressionBombWarning and running out of memory
Image.warni... |
# -*- coding: utf-8 -*-
"""TimeDelayingRidge class."""
# Authors: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
# License: BSD (3-clause)
import numpy as np
from .base import BaseEstimator
from ..cuda import _setup_cuda_fft_multiply_repeated
from ..filter import next_fast_len
from ..fixes import jit
from ..parallel ... |
# -*- coding: utf-8 -*-
import json
import random
import string
from unittest import TestCase
from hypothesis import given
from hypothesis import settings
from hypothesis.strategies import dictionaries
from hypothesis.strategies import floats
from hypothesis.strategies import integers
from hypothesis.strategies import... |
# coding=utf-8
# Copyright 2020 The HuggingFace Team 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
#
# Unles... |
""" Class-Attention in Image Transformers (CaiT)
Paper: 'Going deeper with Image Transformers' - https://arxiv.org/abs/2103.17239
Original code and weights from https://github.com/facebookresearch/deit, copyright below
Modifications and additions for timm hacked together by / Copyright 2021, <NAME>
"""
# Copyright (... |
"""CFNgin plan, plan componenets, and functions for interacting with a plan."""
import json
import logging
import os
import threading
import time
import uuid
from runway._logging import LogLevels, PrefixAdaptor
from .dag import DAG, DAGValidationError, walk
from .exceptions import CancelExecution, GraphError, Persist... |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
##########################################################
# Copyright (c) 2020 Baidu.com, Inc. All Rights Reserved #
##########################################################
"""auto generate simple query&question
Filname: auto_gen_simple_query.py
Authors: ZhangAo(<EMAI... |
'''
Purpose:
Auto-trigger mini RNA pipeline
Input:
Flowcell data folder
Output:
New Flowcell List ->
'''
import sys
import os
import subprocess
#LOGDir = "/home/lixin/lxwg/Data/Log"
LOGDir = "/DCEG/Projects/Exome/SequencingData/DAATeam/Log/RNAPipeline"
HISEQLogDir = LOGDir + "/HiSeq"
MISEQLogDir = LOGDir ... |
# Copyright (c) 2016 EMC 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 applica... |
'''
Python Interface
-- heFFTe --
Univ. of Tennessee, Knoxville
'''
from heffte_config import *
import heffte_config
__version__ = heffte_config.__version__
from ctypes import sizeof, Structure, c_char_p, c_int, c_double, c_float, c_void_p, POINTER, cast, cdll
import sys, traceback
from numpy.ctypeslib imp... |
# Copyright 2018 ICON Foundation
#
# 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 writi... |
import os, glob, importlib
from itertools import combinations_with_replacement as comb_with_repl
from pdkb.rml import Belief, Possible, RML, Literal, neg, parse_rml
from pdkb.kd45 import PDKB, kd_closure
from pdkb import ancillary
SIMPLIFY_INTROSPECTION = True
DEBUG = False
class Action(object):
def __init__(... |
import os
import pandas as pd
from frozendict import frozendict
from pm4pymdl.algo.mvp.gen_framework import algorithm as discovery
from pm4pymdl.visualization.mvp.gen_framework import visualizer as vis_factory
from pm4pymdl.algo.mvp.utils import clean_frequency, clean_arc_frequency
dir = r"C:\Users\aless\Documents\sap... |
#!usr/bin/python3
# -*- coding : utf8 -*-
from mpi4py import MPI;
import numpy as np;
from functions import *;
def methode_1(data, idx_by_cluster):
"""
A method that generates byzantine errors
Parameters :
-----------
data : ndarray of shape (n_samples, n_features)
... |
import asyncio
from concurrent.futures import ThreadPoolExecutor
from functools import partial
from inspect import signature
from logging import getLogger
import uuid
from aiohttp import WSMsgType, web
from aria.auth import Auth
from aria.manager import MediaSourceManager
from aria.player import Player
from aria.play... |
#!/usr/bin/env python3
# Copyright (c) 2015-2020 by the parties listed in the AUTHORS file.
# All rights reserved. Use of this source code is governed by
# a BSD-style license that can be found in the LICENSE file.
"""
This script runs a ground simulation and makes a map.
"""
import os
if "TOAST_STARTUP_DELAY" in ... |
from __future__ import annotations
import os
from tkinter import Variable
from typing import Union
import numpy as np
from survey_stats.functions import *
class Data_Types:
cross = 'cross'
time = 'time'
panel = 'panel'
class Data:
"""
type: 'cross', 'time', 'panel'
"""
def __init__(self, ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2019 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" A Pythonic git API """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ i... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
import time
import traceback
import transmission_telegram_bot.tools as tools
from transmission_telegram_bot.transmission import Transmission
from transmission_telegram_bot.db import DB
from base64 import b64encode
from emoji import emojize
from f... |
"""
**Project Name:** MakeHuman
**Product Home Page:** http://www.makehuman.org/
**Code Home Page:** http://code.google.com/p/makehuman/
**Authors:** <NAME>
**Copyright(c):** MakeHuman Team 2001-2009
**Licensing:** GPL3 (see also http://sites.google.com/site/makehumandocs... |
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 12 12:56:37 2019
updated on Jul 15, anntation changed
@author: gansheng.tan
"""
# # Below are personalised functions -> to py script and import
import warnings
import os
import mne
from utils_ASR import *
def autorej_rate(epochs_autorejected):
epoch_num = 0
... |
#!/usr/bin/python3
#!coding=utf-8
import rospy
import numpy as np
from rospy.topics import _PublisherImpl
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import cv2
import sys
import requests
import json
import os
from threading import Timer
import threading
import time
import signal
i... |
import frappe
import json
from datetime import timedelta
from frappe import _
from frappe.utils import today, getdate, now
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account
from toolz import pluck, parti... |
# This is a Brython script, which means roughly Python 3.
# TODO: painfully slow under Brython (was much faster with Pyjamas).
# I'm not sure why I used <canvas> when I wrote this in 2009 but I
# think SVG had even less support then? Anyway, nowdays could use SVG
# or WebGL - but it's not the drawing that's slow, it'... |
import bs
import random
def bsGetAPIVersion():
# see bombsquadgame.com/apichanges
return 4
def bsGetGames():
return [CTFGame]
class CTFFlag(bs.Flag):
def __init__(self, activity, team):
bs.Flag.__init__(
self,
materials=[team.gameData['flagMaterial']],
p... |
# Copyright 2013 IBM Corp
#
# 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... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 14 19:50:56 2020
@author: hiroyasu
"""
import cvxpy as cp
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import control
import SCPmulti as scp
import pickle
import TrainRNN as trnn
import torch
import pan... |
"""
const_pass.py - AST pass that collects constants.
Immutable string constants like 'new Str("foo")' are moved to the top level of
the generated C++ program for efficiency.
"""
import json
from typing import overload, Union, Optional, Any, Dict, List
from mypy.visitor import ExpressionVisitor, StatementVisitor
fro... |
# Copyright 2015 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
import os
import shutil
TAG = 'version_1'
HASH = '0d0b1280ba0501ad0a... |
"""Deployment package."""
from __future__ import annotations
import base64
import hashlib
import logging
import mimetypes
import stat
import zipfile
from typing import (
TYPE_CHECKING,
ClassVar,
Dict,
Generic,
Iterator,
List,
Optional,
TypeVar,
Union,
cast,
overload,
)
from ... |
'''
notes for maintainers
---------------------
KXDraggableBehaviorがTaskを作る際に
.. code-block::
self._drag_task = ak.start(Task(...))
ではなく
.. code-block::
self._drag_task = ak.Task(...)
ak.start(self._drag_task)
としているのは、前者だと ``on_drag_start`` event 時にdraggable.cancel()が呼ばれると
代入前の古い ``self._drag_task`` への操... |
import os
import yaml
import json
import re
import requests
import logging
import socket
from datetime import datetime
import teuthology
from teuthology.config import config
from teuthology.job_status import get_status, set_status
report_exceptions = (requests.exceptions.RequestException, socket.error)
def init_log... |
#!/usr/bin/env python
# Copyright (c) <NAME>. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
import sys
import time
import serial
import serial.tools.list_ports
import logging
from logging.handlers import RotatingFileHandler
import argparse
impo... |
#!/home/lizhe/anaconda3/envs/pyspark/bin/python
from simulationfunc import *
from math import ceil
from pyspark import SparkContext
from pyspark import SparkConf
import os
os.environ['JAVA_HOME'] = '/usr/lib/jvm/jdk8u252'
# Spark Environment
findspark.init("/usr/local/spark")
conf = SparkConf().\
setMaster("local[... |
import os
import copy
import time
import glob
import re
import datetime
import argparse
import csv
import math
from pathlib import Path
from scipy.stats import gaussian_kde
from XAI_utils.tp_fp import *
from XAI_utils.metrics import *
# XAI related imports
import matplotlib.pyplot as plt
import matplotlib.patches as p... |
"""Utility functions for TensorVision."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import imp
import json
import logging
import os
from datetime import datetime
import matplotlib.cm as cm
# https://github.com/tensorflow/tensorflow/issues/2034#issuec... |
import math
import numpy as np
import pytest
from albumentations import Flip, HorizontalFlip, VerticalFlip, IAAFliplr, IAAFlipud
from albumentations.augmentations.keypoints_utils import convert_keypoint_from_albumentations, \
convert_keypoints_from_albumentations, convert_keypoint_to_albumentations, convert_keypo... |
import discord
import os
os.chdir('/home/gilb/LyricMaster/')
from discord.ext import commands
import json
import logging
import collections
import random
import motor.motor_asyncio
from pathlib import Path
import os
import asyncio
import aiohttp
import json, asyncio
import copy
import traceback
import s... |
# Copyright (c) 2009-2014 <NAME> <http://www.stefan-marr.de/>
#
# 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, mo... |
# coding=utf-8
# Copyright 2020 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 applicab... |
""" Plugin that would act as a pokédex, specifically designed for Pokémon GO.
Commands:
pokedex
"""
import json
import logging
import os
from collections import defaultdict
from difflib import get_close_matches
from io import BytesIO
from operator import itemgetter
import discord
import bot
import plugins
from ... |
import numpy as np
import torch
import math
from torch import nn
from ..builder import DETECTORS, build_backbone, build_head, build_neck
from mmdet.ops import (draw_umich_gaussian, draw_dense_reg, gaussian_radius)
from mmdet.core import bbox2result, transpose_and_gather_feat
from .base import BaseDetector
def check_f... |
__version__ = '20210616' #yyyymmdd
__author__ = '<NAME> <<EMAIL>>, <NAME> <<EMAIL>>'
import os
from copy import copy
import warnings
#warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
import logging
from astropy.coordinates impo... |
"""Abstract base classes for RL algorithms."""
import io
import pathlib
import time
from abc import ABC, abstractmethod
from collections import deque
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type, Union
import gym
import numpy as np
import torch as th
from stable_baselines3.common imp... |
import random
import math
import os
import pygame
from pygame.locals import *
__version__ = "BETA"
__author__ = "github.com@marcioz98"
os.environ['SDL_VIDEO_CENTERED'] = '1'
pygame.init()
GAME_RES = WIDTH, HEIGHT = int(pygame.display.Info().current_w), int(pygame.display.Info().current_h)
ASTEROIDS_SPAWN_SPOTS = [
... |
import re
import xml.etree.ElementTree as ET
import logging
import datetime, time
import requests
import traceback
from StringIO import StringIO
from PIL import Image, ImageDraw, ImageFont
from collections import OrderedDict
from sqlalchemy import inspect
from flask import current_app
from emonitor.extensions import ev... |
import socket
import time
import argparse
import sys
import logging
import numpy as np
import rtde.rtde as rtde
import rtde.rtde_config as rtde_config
def encode(string):
return string.encode()
class UR5:
host = None
data_port_number = None
control_port_number = None
rtde = None # obje... |
import os
import sys
import argparse
import json
import random
import soundfile as sf
from itertools import permutations, combinations
from math import factorial, inf
sys.path.extend('..')
from wham_scripts.utils import read_scaled_wav
import matplotlib.pyplot as plt
from pprint import pprint
"""
this script is used t... |
# -*- coding: utf-8 -*-
'''
This code generates Fig. 2
Spatial distribution of climatic and economic impacts introduced by anthropogenic aerosol emissions.
by <NAME> (<EMAIL>)
'''
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from netCDF4 import Dataset
from mpl_toolkits.basemap import B... |
# Copyright 2020 Dragonchain, Inc.
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
# 6. Tr... |
from unittest import TestCase
from travertino.colors import color, hsl, hsla, rgb, rgba
class ColorTests(TestCase):
def assertEqualColor(self, a, b):
self.assertEqual(a.rgba.r, b.rgba.r)
self.assertEqual(a.rgba.g, b.rgba.g)
self.assertEqual(a.rgba.b, b.rgba.b)
self.assertEqual(a.r... |
#%%
import pandas as pd
import numpy as np
from datetime import datetime
import os
import pickle
# List down file paths
#dir_data = "../smoking-lvm-cleaned-data/final"
exec(open('../env_vars.py').read())
dir_data = os.environ['dir_data']
dir_picklejar = os.environ['dir_picklejar']
# Read in data
data_dates = pd.read... |
import os
import sys
#debug = True
debug = False
#pHActive = 0.77
#pHSyncWidth = 0.092
#pVSyncWidth = 0.03
pHActive = 0.745
pHSyncWidth = 0.117
pVSyncWidth = 0.03
pHPos = 0
pVPos = 0
h_pos = 0
v_pos = 0
freq_vert_60p = 15720
freq_vert_50p = 15600
poverscan = 0
# hdmi-timings
x_res = 320
h_fp = 12
h_sync = 22
h_b... |
"""
Module description:
"""
__version__ = '0.3.1'
__author__ = '<NAME>, <NAME>'
__email__ = '<EMAIL>, <EMAIL>'
import copy
import os
from types import SimpleNamespace
import numpy as np
import pandas as pd
import scipy.sparse as sp
import typing as t
import logging as pylog
from elliot.dataset.abstract_dataset imp... |
try:
unicode
except NameError:
unicode = str
from copy import deepcopy
import datetime
try:
from urlparse import urljoin
except ImportError:
from urllib.parse import urljoin
from django.contrib.auth.models import User
from django.contrib.gis.db import models
from django.contrib.gis.geos import fromstr... |
### 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 3
# of the License, or (at your option) any later version.
#
# This program is distributed... |
import mock
import os
import pandas as pd
from datetime import datetime
from flexmock import flexmock
from sportsreference import utils
from sportsreference.constants import HOME
from sportsreference.nba.constants import BOXSCORE_URL, BOXSCORES_URL
from sportsreference.nba.boxscore import Boxscore, Boxscores
MONTH = ... |
# SPDX-FileCopyrightText: 2020 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
from sys import modules
from math import floor
from mathutils import Euler, Matrix
import bpy
from bpy import app
from time import strftime
FLOAT_PRECISION_DEFAULT = 4
VERTEX_OUTPUT_PER_LINE = 50
STRIP_LEADING_ZEROS_DEFAULT = False # false for .babylon
#=======================================================... |
#!/usr/bin/python
# Classification (U)
"""Program: mysql_perf.py
Description: Performance administration program for MySQL database
servers. Has a number of functions to include capturing database
performance statistical data and sending the data out in a number of
formats or to the... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import print_function, division, absolute_import
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.dates import num2epoch, epoch2num
import numpy as np
from astropy.time import Time
from matplotlib.dates import (YearLoca... |
from athena import ndarray
from athena import gpu_links as gpu_op
from athena import gpu_ops as ad
import numpy as np
import argparse
import six.moves.cPickle as pickle
import gzip
import os
import pdb
import time
import logging
from athena import gpu_memory_manager
channel_axis = 1
variable_list = []
... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015, ParaTools, Inc.
# 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 of source code must retain the above copyright notice,
# t... |
# Copyright (c) 2020 <NAME>
import torch
import math
import numpy as np
from torch import nn
non_linearities = {
"relu": nn.ReLU,
"tanh": nn.Tanh,
}
class Scaling(torch.nn.Module):
"""
Elementwise scaling layer
features size
bias wether to add bias
"""
def __init__(self, feat... |
# -*- coding: utf-8 -*-
"""Start multiple worker instances from the command-line.
.. program:: celery multi
Examples
========
.. code-block:: console
$ # Single worker with explicit name and events enabled.
$ celery multi start Leslie -E
$ # Pidfiles and logfiles are stored in the current directory
... |
# -*- coding: utf-8 -*-
# Copyright 2011 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 require... |
import copy
import time
import itertools
import numpy as np
# redirect print
from io import StringIO
import sys
# website stuff
from flask import Flask, request, render_template, redirect, url_for, flash, Blueprint
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
from wtforms.validators im... |
# -*- test-case-name: twistedcaldav.directory.test.test_calendar -*-
##
# Copyright (c) 2005-2015 Apple 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://ww... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2017 bily Huazhong University of Science and Technology
#
# Distributed under terms of the MIT license.
"""Class for tracking using a track model."""
# 老cls+新reg
from __future__ import absolute_import
from __future__ import division
from __future__ imp... |
import pandas as pd
import numpy as np
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from urllib.request import urlopen
import dash_bootstrap_components as dbc
from dash import Dash, dcc, html
from dash.dependencies import Input, Output
import dash
external_... |
# -*- coding: utf-8 -*-
"""Convert a BEL graph to HiPathia inputs.
Input
-----
SIF File
~~~~~~~~
- Text file with three columns separated by tabs.
- Each row represents an interaction in the pathway. First column is the source
node, third column the target node, and the second is the type of relation
between them... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019-2021 Megvii Inc. All rights reserved.
import contextlib
import copy
import io
import os
import os.path as osp
import megfile
from loguru import logger
import numpy as np
import torch
from cvpods.structures import BoxMode
from cvpods.utils import Timer
... |
from typing import Optional, Any
import torch
import numpy as np
from abc import ABC, abstractmethod
from functools import lru_cache
from pylidar_slam.common.utils import check_sizes, assert_debug
def torch__spherical_projection(t_pointcloud: torch.Tensor,
height: int,
... |
"""Developed by: <NAME> 2017
This Module contains the database class that handles all of the data gathering
and cleaning. It also contains functions that help us work with our data.
"""
import os
import pandas as pd
import numpy as np
import sklearn
from sklearn import preprocessing, model_selection
# from sklearn.mod... |
"""
all the routes and structure of app defined here.
"""
import os
import ast
import datetime
import bleach
from functools import wraps
from persiantools.jdatetime import JalaliDateTime
from flask import render_template, flash, redirect, url_for, request, abort
from flask_login import current_user, login_required
fro... |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import math
import typing as tp
import julius
import torch
from torch import nn
from torch.nn import functional as F
from... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
import warnings
import numpy as np
import pandas as pd
from astropy.time import Time
__all__ = [
"preprocessObservations",
"findAverageOrbits",
]
def preprocessObservations(
observations,
column_mapping,
astrometric_errors=None,
mjd_scale="utc",
attribution=False
):... |
import math
import random
from collections import namedtuple
import time
import numpy as np
from pyrf.numpy_util import compute_fft
from pyrf.config import SweepEntry
class SweepStep(namedtuple('SweepStep', '''
fcenter
fstep
fshift
decimation
points
bins_skip
b... |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.