text stringlengths 8.04k 46.5k |
|---|
# Written by Rolarga Version 0.3.1
# Shadow Weapon Coupons contributed by BiTi for the Official L2J Datapack Project
# Visit http://forum.l2jdp.com for more details
import sys
from ru.catssoftware.gameserver.model import L2Attackable
from ru.catssoftware.gameserver.model.quest import State
from ru.catssoftware.ga... |
"""
This module is responsible for loading the documentation from Python objects.
It uses [`inspect`](https://docs.python.org/3/library/inspect.html) for introspecting objects,
iterating over their members, etc.
"""
import importlib
import inspect
import pkgutil
import re
from functools import lru_cache
from itertool... |
#!/usr/bin/env python
# coding: utf-8
# !jupyter nbconvert --no-prompt --to=script deconv_example_manga.ipynb
# # Example: Deconvolve SDSS-IV MaNGA data and compare the difference in kinematcis
#
# Author: <NAME> (University of Arizona, <EMAIL>)
#
#
# This example deconvolve one of the [SDSS-IV MaNGA](https://ww... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Solutions to chapter 11 exercises.
###############################################################################
# chapter11_exercises.py
#
# Revision: 1.00
# Date: 7/9/2021
# Author: Alex
#
# Purpose: Solutions to chapter 11 exercises from "Da... |
# -*- test-case-name: flocker.node.agents.functional.test_ebs -*-
# Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
An EBS implementation of the ``IBlockDeviceAPI``.
"""
from subprocess import check_output
import threading
import time
import logging
from uuid import UUID
from bitmath import Byte, GiB
... |
#!/usr/bin/env python3
import os
import time
import signal
import json
import shutil
import contextlib
import datetime
import multiprocessing
from submitty_utils import dateutils, glob
import operator
import paramiko
import tempfile
import socket
from autograder import grade_items_logging
from autograder import grad... |
# -*- coding: utf-8 -*-
"""
comments
author: diqiuzhuanzhuan
email: <EMAIL>
"""
import collections
import random
from poros.bert import tokenization
import tensorflow as tf
import numpy as np
import os
from poros.poros_dataset import about_tfrecord
from poros.poros_dataset import about_tensor
import logging
class Sa... |
from pathlib import Path
import os
from statistics import mean
import matplotlib.pyplot as plt
from random import randint
import pickle
from akkadian.build_data import build_signs_and_transcriptions, break_into_sentences
from akkadian.data import from_key_to_text_and_line_numbers
from akkadian.parse_xml import parse_xm... |
# import sys
import logging
import datetime
import tempfile
import os
import urllib.request
from enum import Enum
# Share httpCodes definition with all OPAS modules that need it. Starlette provides the symbolic declarations for us.
import starlette.status as httpCodes # HTTP_ codes, e.g.
... |
from __future__ import absolute_import, division, print_function, unicode_literals
from datetime import datetime
from decimal import Decimal as D
import mock
from pando.utils import utc
import pytest
from liberapay.billing import transactions, watcher
from liberapay.billing.fees import (
skim_credit,
upcharg... |
# Copyright (c) 2020 Carnegie Mellon University
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, ... |
# coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from calendar import timegm as unix_timestamp
from datetime import datetime
from operator import attrgetter
from typing import Generator, Iterable, Iterator, List, MutableSequence, \
Optional, Sequence, Text, Tuple
... |
"""Core control stuff for Coverage."""
import atexit, os, random, socket, sys
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class, iitems, sorted # pylint: disable=W0622
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from cover... |
import numpy as np
#theoreticalCloudTimescales v0.3
#A collection of functions to implement the general theory of molecular cloud lifetimes of Jeffreson & Kruijssen (2018)
#The aim here is to provide a set of simple python functions for predicting mean molecular (and atomic) cloud lifetimes
#For maximum accessability a... |
import json
import os
import sys
import time
import wx
from Classes import noname, WorkClasses, Threads, InfoClasses
class MainFrame(noname.MyFrame1):
def __init__(self, parent, start_path):
noname.MyFrame1.__init__(self, parent)
self.start_path = start_path
try:
... |
#
# catalog.py -- image and star catalog interfaces for Ginga
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import os.path
import tempfile
import re
import time
import warnings
from urllib.request import Request, urlopen, urlretrieve
from urllib.error im... |
# loss function library.
# author: ynie
# date: Feb, 2020
import torch
import torch.nn as nn
import torch.nn.functional as F
from configs.data_config import cls_reg_ratio
from external.pyTorchChamferDistance.chamfer_distance import ChamferDistance
from models.registers import LOSSES
from net_utils.libs import get_layou... |
import os
import random
import sys
import time
import csv
import imageio
import numpy as np
import skimage
import torch as th
import torchvision
from torch import optim
import torch.nn as nn
import torch.nn.functional as F
from torchvision import datasets, transforms
import matplotlib.pyplot as plt
from distributions... |
import logging
import sys
from functools import partial
from pathlib import Path
from PyQt5 import QtWidgets, QtCore, QtGui
from simnav.gui.base import Ui_VistaPrincipal, Ui_Configuracion, Ui_Composicion, Ui_Destilacion, \
Ui_Corrientes
# from simnav.gui.utils import StdOutToTextBox, LogToStdOut
# TODO: REMUE... |
# coding=utf-8
#
# Copyright 2020 <NAME> Duesseldorf
#
# Part of this code is based on the source code of BERT-DST
# (arXiv:1907.03040)
# Part of this code is based on the source code of Transformers
# (arXiv:1910.03771)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exc... |
"""
Listens for various units of measurements in messages and outputs the
conversions applicable to that measurement where applicable.
This isn't coded that well... but I cannot be arsed to re-implement this, and
it was a complete and utter bastard to get working the way I wanted...
"""
import asyncio
import collectio... |
########################################################################
# Copyright 2021, UChicago Argonne, LLC
#
# Licensed under the BSD-3 License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a
# copy of the License at
#
# https://opensource.org/licenses/BSD-... |
from stuff import *
import sys,re,argparse,pickle
from scipy.optimize import minimize
from scipy.stats import norm
from scipy.special import gammaln
from math import log,exp,sqrt,sin,pi
import numpy as np
from subprocess import Popen,PIPE
from datetime import datetime
# (Make it auto download files?)
# Get ltla.csv fr... |
import datetime
import json
import os
import re
import sys
import time
import cv2
from multiprocessing import Process, Queue
import numpy as np
sys.path.append(os.getcwd() + "/PaddleDetectiondeploy/python")
sys.path.append(os.getcwd() + "/PaddleSegdeploy/python")
# print(os.getcwd())
from PaddleDetectiondeploy.python... |
import struct
from socket import inet_ntop
from socket import inet_pton
from socket import AF_UNSPEC
from socket import AF_INET
from socket import AF_INET6
from pr2modules.common import AF_MPLS
from pr2modules.common import hexdump
from pr2modules.common import map_namespace
from pr2modules.netlink import nlmsg
from pr... |
"""
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... |
"""
Author: <NAME>, PhD - Higher Education Specialist at Education & Research at Esri Canada.
Date: Re-modified Q1-2022
About: 3 Classes with their own unique purpose.
a) CalcSemiDf - starts building the dataframe in preparation for data augmentation.
- Schema: stop_seque, end_paths, dist, Tot_Dist
... |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
##
## card.py
##
## Created on: Sep 26, 2017
## Author: <NAME>
## E-mail: <EMAIL>
##
"""
===============
List of classes
===============
.. autosummary::
:nosignatures:
EncType
CardEnc
ITotalizer
=============... |
from __future__ import print_function
import os
import sys
import json
import httplib2
import traceback
import logging
from datetime import datetime as dt
from dateutil import tz
import dateutil.parser
from time import sleep
from enum import Enum
from urllib.request import urlopen
sys.path.insert(0, "./gspread")
impo... |
"""
HHpred-related format parsers.
This module defines two HHpred format parsers: L{HHProfileParser} and
L{HHOutputParser}. The first one is used to read HMM (*.hhm) files:
>>> HHProfileParser("profile.hhm", "profile.pdb").parse()
<ProfileHMM> # ProfileHMM object
while the latter parses HHsear... |
#!/usr/bin/env python
"""
Classes and functions that help reduce molecular simulations to time series data.
In the future, this functionality will get a separate module (this is taken from LLC_Membranes at the moment)
"""
import os
import numpy as np
import matplotlib.path as mplPath
from hdphmm.utils import file_rw
... |
# coding=utf-8
#
# This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis/
#
# Most of this work is copyright (C) 2013-2019 <NAME>
# (<EMAIL>), but it contains contributions by others. See
# CONTRIBUTING.rst for a full list of people who may hold copyright, and
# consult ... |
from pyomo.environ import Param, RangeSet, Set, Var, NonNegativeReals, NonNegativeIntegers, Binary, Constraint, Objective, minimize, AbstractModel
from pyomo.opt import SolverFactory
from pyomo.dataportal.DataPortal import DataPortal
from math import sqrt
from pandas import read_excel, read_csv
model= AbstractModel()
... |
"""Report host-guest atom distance and endpoint metrics indicating each trajectory's quality.
Trajectories may position host crystal and guest molecule atoms too closely as no interatomic forces are considered by current trajectory-discovery methods. Distances between hydrogen and non-hydrogen atoms have different sig... |
import math
import os
import time
import numpy as np
import pybullet as p
import pybullet_data
#########
# Functions
#########
def update_pose(observation):
objectid1Pos = observation[7:10]
objectid2Pos = observation[14:17]
objectid3Pos = observation[21:24]
POS = [objectid1Pos, objectid2Pos, objecti... |
from copy import deepcopy
import json
import os
import shutil
import subprocess
import sys
import tempfile
import unittest
import cyclecloud_provider
from symphony import RequestStates, MachineStates, MachineResults
# import test_json_source_helper
# from util import JsonStore
import util
MACHINE_TYPES = {
"A4":... |
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... |
"""
Classes and functions to handle block/disk images for KVM.
This exports:
- two functions for get image/blkdebug filename
- class for image operates and basic parameters
"""
import logging
import os
import re
from avocado.core import exceptions
from avocado.utils import process
from . import utils_misc
from .... |
import gevent.monkey; gevent.monkey.patch_all()
from gevent.pywsgi import WSGIServer
from geventwebsocket.handler import WebSocketHandler
import logging
import json
import redis
import docker
import base64
import time
import os
import requests
from urllib.parse import urlsplit, urlunsplit
from bottle import debug, d... |
# Copyright (c) 2020 by Farsight Security, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
# from __future__ import division
import numpy as np
from os import path as op
import gzip
import bz2
import glob
import json
import traceback # ,itertools
from ase.io import vasp as pv
# remove nested list by list(chain.from_iterable(list_of_lists))
from itertools import chain
import itertools as itr
from math import... |
'''
Custom base classes for admin interface, for both the top-level admin page
and for inline forms.
'''
import logging
from django import template
from django.conf import settings
from django.contrib import admin
from django.contrib.admin import helpers
from django.contrib.admin.util import unquote, get_deleted_objec... |
# identities.py
# Copyright 2009 <NAME>
# Licence: See LICENCE (BSD licence)
"""Identify players sent to remote database who are reported as new players.
The remote database compares the player names included on the results file
with the names already known and reports any that cannot be matched back to
the submitter... |
"""
A collection of protocols which employs OpenMM to evaluate and propagate the
state of molecular systems.
"""
import io
import json
import logging
import os
import re
from collections import defaultdict
from typing import TYPE_CHECKING, List
import numpy as np
import pandas as pd
from openff.evaluator import unit
... |
# (c) 2013-2022 <NAME>
#
# Licensed under the Apache License,
# see LICENSE.TXT for conditions of usage
import wx.grid
import os, time, datetime, shutil
from ast import literal_eval
from shlex import shlex
import logger
loaddir=None
def localTimeMillis():
return time.time()*1000
def SetLoaddir(d):
global lo... |
#--Used for Ubuntu 10.10
# Copyright (C) 2003-2008 Brailcom, o.p.s.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
... |
""" Parent class for all creatures """
# pylint: disable=too-many-public-methods
import random
from collections import defaultdict
from collections import namedtuple
from typing import Optional
import dice
from pycs.action import Action
from pycs.attack import Attack
from pycs.constant import ActionCategory
from pycs.c... |
from numpy.lib.type_check import _nan_to_num_dispatcher
from flow.core.params import VehicleParams
import numpy as np
import torch
import os
import traci
from functools import partial
from tqdm import tqdm
from .a2c_ppo_acktr import utils
from .a2c_ppo_acktr.envs import make_vec_envs
import matplotlib.pyplot as plt
f... |
import os
from keras.layers import Conv1D,Dense, Activation
from keras.models import Sequential, load_model
from keras.optimizers import Adam
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from joblib import dump, load
# Constants and training parameters
MODEL_NAME='GreenABR'
S_DIM=7 # ... |
# Don't bother reading this! Just utility functions.
# pip install pandas numpy requests tqdm h5py
import shutil, os, pathlib, pickle, sys, math, importlib, json.tool, argparse, requests, atexit, builtins, itertools,h5py
import pandas as pd
import numpy as np
from glob import glob
from os.path import exists, isdir
fro... |
"""Everything related to the state space of a structural model."""
import itertools
import numba as nb
import numpy as np
import pandas as pd
from numba.typed import Dict
from respy._numba import array_to_tuple
from respy.parallelization import parallelize_across_dense_dimensions
from respy.shared import compute_cova... |
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
"""
Train a YOLOv5 model on a custom dataset.
Models and datasets download automatically from the latest YOLOv5 release.
Models: https://github.com/ultralytics/yolov5/tree/master/models
Datasets: https://github.com/ultralytics/yolov5/tree/master/data
Tutorial: https://github... |
# coding: utf-8
# 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... |
import argparse
import torch
import os
import numpy as np
import pandas as pd
import random as rd
import time
import tqdm
import sys
sys.path.append('..')
from torch.utils.data import DataLoader
from torch_geometric.utils import softmax
from graph_recsys_benchmark.models import KGCNRecsysModel
from graph_recsys_benchm... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# raw_data = pd.read_csv(r"E:\CCFDF\plansmatching\data\raw data\final_data\train_all\train_all.csv", encoding="utf-8",
# low_memory=False)
#
# service_type = raw_data["current_service"].tolist()
# new_type = []
# for i in se... |
#!/usr/bin/env python
import zipfile
import csv
import argparse
import psycopg2
import hashlib
import random
import uuid
from time import time, sleep
from psycopg2.extras import execute_batch
import io
import os
from pprint import pprint
from multiprocessing import Pool, Manager
from itertools import zip_longest
from ... |
# -*- coding: utf-8 -*-
# Copyright 2022, SERTIT-ICube - France, https://sertit.unistra.fr/
# This file is part of eoreader project
# https://github.com/sertit/eoreader
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may ob... |
import argparse
import torch
import os
import numpy as np
import random as rd
import tqdm
import time
import inspect
import sys
sys.path.append('..')
from graph_recsys_benchmark.models import MetaPath2Vec
from torch.utils.data import DataLoader
from graph_recsys_benchmark.models import HeRecRecsysModel
from graph_rec... |
import numpy as np
from PySide2.QtWidgets import (QApplication, QMainWindow, QWidget, QHBoxLayout, QVBoxLayout, QSlider, QPushButton,
QSizePolicy, QLabel)
from PySide2.QtCore import QSize
from PySide2.QtCore import Qt
import pyqtgraph.opengl as gl
import pyqtgraph as pg
import matplotlib.... |
# Copyright 2021 Xiaomi Corp. (authors: <NAME>
# <NAME>)
#
# See ../../LICENSE for clarification regarding multiple authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... |
#!/usr/bin/env python
# coding=utf-8
"""
file_processing.py
Part of neoepiscope
Includes functions for processing input and output files.
Licensed under the MIT license.
The MIT License (MIT)
Copyright (c) 2018 <NAME>, <NAME>,
<NAME>, and <NAME>
Functions parsed_md() and indels_junctions_exons_mi... |
"""Convert H.264 mkv files to mp4 files playable on the PS3, and "correct" the
MPEG4/ISO/AVC profile for use on the PS3."""
try:
from .version import __version__
except ImportError:
__version__ = 'unknown'
import sys
import os
import errno
import re
import getopt
import subprocess as sp
import struct
import t... |
"""
Train CMC with AlexNet
"""
from __future__ import print_function
import os
import sys
import time
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
import argparse
import socket
import numpy as np
import tensorboard_logger as tb_logger
from torchvision impor... |
# -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2017-2018 <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to u... |
#!/usr/bin/env python
import rospy
import tf
import pickle
import copy
import torch
import controller_manager_msgs.srv
import trajectory_msgs.msg
import os.path
import numpy as np
import moveit_commander
import torch.optim as opt
import moveit_msgs.msg
from geometry_msgs.msg import Pose, PoseWithCovarianceStamped, Twis... |
"""
An abstract base class for a Manga with Chapters.
"""
import os
import json
import shutil
import logging
from time import sleep
from typing import List, Any
from queue import Empty, Queue
from functools import lru_cache
from threading import Thread, Event
from abc import ABC, abstractmethod
import requests
from t... |
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 6 05:15:48 2021
@author: Gortaf
"""
import os
import discord
import asyncio
import time
import datetime
import random
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
from dotenv import load_dotenv
from discord.ext import comman... |
# coding: UTF-8
"""
Copyright (c) 2009 <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the... |
import json
import logging
import requests
import aiohttp
import socket
import semver
import time
from palazzetti_sdk_asset_parser import AssetParser as psap
from .exceptions import *
_LOGGER = logging.getLogger(__name__)
UDP_PORT = 54549
DISCOVERY_TIMEOUT = 5
DISCOVERY_MESSAGE = b"plzbridge?"
BUFFER_SIZE = 2048
HTT... |
from __future__ import absolute_import
from __future__ import print_function
import platform
import re
import datetime
import requests
import click
import pyperclip
from getpass import getpass
from pyshorteners import Shortener
import json
from kitchen.text.display import textual_width_fill
import six
from six.moves im... |
import unittest
import asyncio
import time
import random
from config import Config
from bonus import Bonus
from node import Node, encode_advance_area_table, encode_advance_bonus_table
def async_test(coro):
def wrapper(*args, **kwargs):
return loop.run_until_complete(coro(*args, **kwargs))
return wrapp... |
import os
import sys
import argparse
import datetime
import torch
import numpy as np
import torch.nn as nn
import torch.optim as optim
from model.config import cfg
from model.modeling.FinalNet import Net
from model.dataset.rscan_detection_dataset import RScanDetectionVotesDataset
from model.dataset.model_util_rscan i... |
"""
lightning_hydra_classifiers/models/transfer.py
Author: <NAME>
Created: Thursday Oct 14th, 2021
Plugins:
LayerSelectPlugin
LayerFreezeLightningPlugin
LightningMetricsPlugin
Super classes:
BaseLightningModule
Usable classes:
LightningClassifier
------------------------------------------------... |
'''
Style Augmentation: Data Augmentation via Style Randomization (CVPR2019 workshops)
Paper link: https://arxiv.org/abs/1809.05375
Modified by <NAME>
2021.8.30
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
import numpy as np
import sys
from os.pat... |
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import json
from imageio import mimwrite
import pickle
import numpy as np
from copy import deepcopy
import time
import os, sys
import numpy as np
import shutil
import torch
torch.set_num_threads(2)
import torch.nn as nn
from torch.nn.utils import... |
import modules.errors
import numpy as np
import random
import math
import numbers
import time
class Polymer(list):
def __init__(self, polymer_list, model, rate_constants):
list.__init__(self, polymer_list)
self.rate_constants = rate_constants
self.model = model
def last_monomer(self):
... |
# -*- coding: utf-8 -*-
# Builtin Modules
import sys
import argparse
try:
import simplejson as json
except ImportError as e:
import json
import re
from pprint import pprint
# 3rd-party Modules
import MySQLdb
from MySQLdb.cursors import DictCursor
TABLE_MIGRATE_PREFIX = '_migrated'
TABLE_MIGRATE_VERSION = ... |
import os
import re
import numpy as np
import matplotlib.pylab as plt
import matplotlib
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
from scipy.spatial import ConvexHull
from itertools import chain, count
from scipy.interpolate import interp1d
from collections import de... |
# Copyright (c) 2016 IBM 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 req... |
import datetime
import google.auth
import pandas as pd
import pytz
import smtplib
import traceback
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from enum import Enum
from google.cloud import bigquery
from google.cloud import bigqu... |
# coding=utf-8
import matplotlib.pyplot as plt
import numpy as np
def plot_residuals_reference_sections(
resid,
sections,
fig=None,
title=None,
plot_avg_std=None,
plot_names=True,
robust=True,
units='',
fig_kwargs=None,
method='split',
... |
import os,json,logging,ConfigParser,time,glob,sys
from pandayoda.common.yoda_multiprocessing import Lock,Manager,Event
from pandayoda.common import exceptions,serializer
logger = logging.getLogger(__name__)
'''
This is a collection of functions used by Yoda/Droid to communicate with Harvester. It can be exchanged wit... |
#!/usr/bin/env python3
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright 2010 California Institute of Technology. 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... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 France-IOI, MIT license
#
# http://opensource.org/licenses/MIT
# This tool helps task writers create and test their tasks.
# It handles simple tasks, and is not suited for tasks using more advanced
# features of the taskgrader.
import argparse, dis... |
from __future__ import print_function
from six import iterkeys
import rejson
from .accessors import KeyAccessor,ActiveSubscriberKeyAccessor,ChannelListener,MetadataListener
from .marshalling import *
from .utilities import *
from threading import Lock
from rejson import Path
import logging
class RedisInterface:
... |
# Copyright 2010 <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
# Unless required by applicable law or agreed to in writing, software... |
import collections
from typing import Callable, Iterable, List
import numpy as np
import torch
from numpy import ceil
from ppq.core import (CHECKPOINT_TOLERANCE, OPTIM_ADVOPT_GRAPH_MAXSIZE,
OPTIM_ADVOPT_INITIAL_THRES, OPTIM_ADVOPT_PASSIVE_BOOST,
OPTIM_ADVOPT_PATIENT, OPTIM_A... |
import math
import warnings
import numpy as np
import pandas as pd
from .utils import _gca, is_classifier, is_regressor
class ModelXRay(object):
"""This class executes a model over a broad range of modified data points to analyze aspects of its performance.
For each point in the data set, and for every featu... |
from __future__ import print_function, division
import sys
import os
import math
import numpy as np
import copy
from activation_functions import Sigmoid, ReLU, SoftPlus, LeakyReLU, TanH, ELU, SELU, Softmax
class Layer(object):
def set_input_shape(self, shape):
self.input_shape = shape
def layer_name... |
import os
import bpy, mathutils
from . import utils
from .. import version_utils
LEVEL_COLLECTION_NAME = 'Level'
LEVEL_VISUALS_COLLECTION_NAME = 'Visuals'
LEVEL_CFORM_COLLECTION_NAME = 'CForm'
LEVEL_GLOWS_COLLECTION_NAME = 'Glows'
LEVEL_LIGHTS_COLLECTION_NAME = 'Lights'
LEVEL_PORTALS_COLLECTION_NAME = 'Portals'
LEV... |
#!/usr/bin/env python2.7
"""
Generate a VCF from a GAM and XG by splitting into GAM/VG chunks.
"""
import argparse, sys, os, os.path, random, subprocess, shutil, itertools, glob
import json, timeit, errno, copy, time
from uuid import uuid4
import logging
from collections import defaultdict
from toil.common import Toi... |
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import backend as K
from keras_cv_attention_models.aotnet import AotNet
from keras_cv_attention_models.attention_layers import RelativePositionalEmbedding, conv2d_no_bias, CompatibleExtractPatches, make_divisible
from keras_cv_attention_models.d... |
import numpy
import pandas
import scipy.stats
import scipy.special
import matplotlib.pyplot
import tensorflow as tf
from irt import Beta_3_IRT, Logistic_IRT, GP_IRT
import matplotlib
matplotlib.use('Agg')
tf.compat.v1.enable_eager_execution()
m_list = ['Acc', 'BS', 'LL', 'B-Acc', 'AUC', 'F1']
eps = 1e-... |
from lavendeux import Types, Errors
def call(args):
# Check number of arguments
if len(args) != 1:
return (Types.ERROR, Errors.INVALID_ARGS)
if isinstance(args[0], basestring) and str(args[0].capitalize()) in pokedex.values():
return (Types.INT, pokedex.keys()[pokedex.values().index(str(args[0].capitalize()))]... |
import os
import cv2
import torch
import numpy as np
import random
import math
from torch.utils.data import Dataset
from pycocotools.coco import COCO
import torch.nn.functional as F
COCO_CLASSES = [
"person",
"bicycle",
"car",
"motorcycle",
"airplane",
"bus",
"train",
"truck",
"boat... |
def getPsw4UsrInDB(cursor, input_usr):
query = "SELECT password FROM User WHERE email = %(usrname)s"
cursor.execute(query, {'usrname': input_usr})
psw = cursor.fetchall()
return psw
def checkAdmin4Usr(cursor, input_usr):
query = "SELECT email FROM Owner WHERE email = %(usrname)s"
cursor.execut... |
import discord, sqlite3, asyncio, os, re, datetime, requests, codecs, traceback, logging
from icalendar import Calendar
from shutil import copy2
logging.basicConfig(filename="logfile.log", level=logging.INFO)
symbols = (
"\U00000030\U0000FE0F\U000020E3 ",
"\U00000031\U0000FE0F\U000020E3... |
# -*- coding: utf-8 -*-
# An interface for music21 using mod_wsgi
#
# To use, first install mod_wsgi and include it in the HTTPD.conf file.
#
# Add this file to the server, ideally not in the document root,
# on mac this could be /Library/WebServer/wsgi-scripts/music21wsgiapp.py
#
# Then edit the HTTPD.conf file to re... |
#!/usr/bin/python
#coding:utf-8
#'''
# 主要思路:
# 1. 对某一商品中的所有评论、ocr内容提取主题特征,选择名词、动名词、形容词、名形词作为特征关键词key,商品属性数据中的属性值作为特征候选项(字数少于2个的滤除)
# 1.1 使用句子依存分析,找出中心词作为特征词
# 2. 提取特征对应的观点,形成特征-观点对。
# 3. 协同过滤方法选择相似文章(目前达人文章数量不足,选择三级分类相同的所有达人文章)
# 4. 依次查找某一特征词对应的子句并验证合理性(规则条件过滤),同时,查找和验证其观点对应的子句
# 5. 所有子句中选择前5个特征作为子句,集成一段话... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.