text stringlengths 6.04k 39.5k |
|---|
# coding=utf-8
"""Tests for annotate."""
# Copyright 2017 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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... |
# JUST implementing an edge queu to do LPA*
import sys
sys.path.append("../")
import code
import Visualizer
import time
import heapq
import numpy as np
import random
import matplotlib.pyplot as plt
plt.style.use("seaborn-dark")
inf = np.Inf
class State():
def __init__(self):
self.x = 5
self.y = ... |
from __future__ import annotations
import asyncio
import calendar
import logging
from asyncio import Task
from dataclasses import replace
from datetime import timedelta
from functools import reduce
from textwrap import dedent
from typing import Dict, List, Tuple
from typing import Optional, Any
from aiostream import ... |
import abc
import collections.abc
from datetime import datetime, timedelta
import itertools
import dateutil.tz
from ..utils.list import ListModel
from ..utils.event import EmitterGroup, Event
LOCAL_TIMEZONE = dateutil.tz.tzlocal()
_epoch = datetime(1970, 1, 1, 0, 0, tzinfo=LOCAL_TIMEZONE)
class RunList(ListModel):... |
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# Copyright (c) 2016+ <NAME> + <NAME>
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxyz.or... |
#################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... |
import logging
import pickle
import numpy as np
import pkg_resources
import pytest
import nengo
import nengo.simulator
from nengo.builder import Model
from nengo.builder.ensemble import BuiltEnsemble
from nengo.builder.operator import DotInc
from nengo.builder.signal import Signal
from nengo.exceptions import Readonl... |
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 <NAME> and contributors
# See LICENSE.rst for details.
import time
from textwrap import TextWrapper
from PIL import Image, ImageDraw, ImageFont
from luma.core import mixin, ansi_color
from luma.core.threadpool import threadpool
from luma.core.render import canvas
fro... |
'''
=====================
Folder "View" Classes
=====================
These classes wrap Directories and perform automatic actions
to Histograms retrieved from them. The different views can be composited and
layered.
Summary of views:
- ScaleView: scale histogram normalization
- NormalizeView: normalize histograms... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Database layer
# translates database calls to functions
#
# Software is free software released under the "Modified BSD license"
#
# Copyright (c) 2014-2016 <NAME> - <EMAIL>
# imports
import ast
import sqlite3
import pymongo
import re
import uuid
from passlib.... |
# -*- coding: utf-8 -*-
import operator
from functools import reduce
from django.conf import settings
from django.contrib.admin import SimpleListFilter
from django.contrib.admin.views.main import ChangeList, ORDER_VAR
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import rever... |
#!/usr/bin/env python
#
# svnmucc_tests.py: tests of svnmucc
#
# Subversion is a tool for revision control.
# See http://subversion.apache.org for more information.
#
# ====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more co... |
#!/usr/bin/env python3
# Copyright 2020 <NAME> <<EMAIL>>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND TH... |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 <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:
#
#... |
"""Validate a face recognizer on the "Labeled Faces in the Wild" dataset (http://vis-www.cs.umass.edu/lfw/).
Embeddings are calculated using the pairs from http://vis-www.cs.umass.edu/lfw/pairs.txt and the ROC curve
is calculated and plotted.
"""
import os
import sys
import math
import pathlib
import argparse
import im... |
#!/usr/bin/env python
#
# Library for Grove - 3 Axis Accelerometer ADXL372
#
'''
## License
The MIT License (MIT)
Copyright (C) 2018 Seeed Technology Co.,Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... |
import torch
import torch.nn as nn
import numpy as np
import pdb
try:
from torch.hub import load_state_dict_from_url
except ImportError:
from torch.utils.model_zoo import load_url as load_state_dict_from_url
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152', 'resnext5... |
import os
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import sklearn.preprocessing as preprocessing
from sklearn import linear_model
from sklearn import model_selection
from sklearn.ensemble import RandomForestRegressor
print(os.getcwd())
# data_path = r'C:\Users\ArseneLupin\Desktop\OrderT... |
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import chi2
from matplotlib.patches import Ellipse
from scipy.special import erf
from astroML.plotting.mcmc import convert_to_stdev as cts
from scipy.optimize import curve_fit
def draw_ellipse(pos, cov, nsig=None, ax=None, label="temp",
... |
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... |
# -*- coding: utf-8 -*-
"""Multistage work chain."""
from copy import deepcopy
from aiida.common import AttributeDict
from aiida.engine import append_, while_, WorkChain, ToContext
from aiida.engine import calcfunction, workfunction
from aiida.orm import Dict, Int, Float, SinglefileData, Str, RemoteData, StructureDat... |
import os
import numpy as np
import pickle
import copy
# --------------------------------------------------------------------
def get_split_vids(split_vids_path, image_set, subset='default') -> list:
"""
Returns a list of video ids for a given data split
:param: split_vids_path: path of JAAD spli... |
#
# Copyright (c) 2017 Orange.
#
# 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 pysnobal.c_snobal import snobal
from datetime import datetime, timedelta
import logging
import numpy as np
from smrf.framework.model_framework import SMRF
from smrf.utils import queue
from pysnobal import ipysnobal
import pandas as pd
import threading
from awsm.interface import pysnobal_io
from awsm.interface.in... |
# coding=utf-8
# Copyright 2019 The Tensor2Tensor 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... |
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
from google.protobuf.message import DecodeError
from infra_libs.event_mon.protos.chrome_infra_log_pb2 import (
ChromeInfraEvent, ServiceEve... |
#!python3
# ##----------------------------------------## #
# Author: <NAME> #
# Truss Optimization by Employing #
# Genetic Algorithms #
# ##----------------------------------------## #
# Importing necessary modules
# To run the code below, imported python pack... |
#!/bin/env python3
"""Main executable for running puppetmaster."""
import bisect
import json
import os
import random
import statistics
from argparse import ArgumentParser, Namespace
from multiprocessing import Pool
from pathlib import PurePath
from typing import Dict, List, Sequence, Set
try:
import matplotlib.pyp... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import sys
import pickle as pickle
import socket
from datetime import datetime
import time
import tensorflow as tf
import cifar10
import bingrad_common_updated
# import bingrad_common
TCP... |
"""Cuda op Python library."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import numpy as np
import tensorflow.compat.v1 as tf
from mpi4py import MPI
from tensorflow.python.framework import ops
from blocksparse.utils import _op_module
from blo... |
# coding=utf-8
# Copyleft 2019 project LXRT.
import json
import os
import pickle
import numpy as np
import torch
from torch.utils.data import Dataset
from param import args
from utils import load_obj_tsv
import os
import IPython.display
import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
from c... |
# Hani's get_dG_ratio_to_optimum filter:
# (see files folding_energy.c and matchmaker.c)
# - returns the ratio of the dG for a fold that takes the shape of the "motif" at the specified position relative to the global minimum dG for folding
# - mask motif match with Ns (function lcl_get_surrounding_sequence)
# - make an... |
#!/usr/bin/env python
import unittest
from io import StringIO
from GFFUtils.GFFFile import *
class TestGFFIterator(unittest.TestCase):
"""Basic tests for iterating through a GFF file
"""
def setUp(self):
# Example GFF file fragment
self.fp = StringIO(
u"""##gff-version 3
# generated: Wed ... |
import re
import sys
import types
from functools import reduce
# Handle numpy types if numpy is available.
try:
import numpy
except ImportError:
numpy = False
# Try to register IPython magic commands if IPython is available If
# IPython isn't installed, you get an import error. If IPython is
# installed but ... |
import json
import os
import warnings
import cv2
import numpy as np
import scipy
from common import utils
from tensorflow import cast
from tensorflow.keras.utils import Sequence
class SegmentationDataset:
def __init__(self, images_dir=None, class_key='object', augmentation=None,
preprocess_tran... |
# -*- coding: utf-8 -*-
"""
Class definition of YOLO_v3 style detection model on image and video
"""
import colorsys
import os
from timeit import default_timer as timer
import numpy as np
from keras import backend as K
from keras.models import load_model
from keras.layers import Input
from PIL import Image, ImageFont... |
# :coding: utf-8
# :copyright: Copyright (c) 2015 ftrack
import inspect
import json
import os
import time
import subprocess
import sys
import pytest
import ftrack_api.event.hub
import ftrack_api.event.subscriber
from ftrack_api.event.base import Event
import ftrack_api.exception
class MockClass(object):
'''Moc... |
import warnings
import cupy
from cupyx.scipy.ndimage import _util
from cupyx.scipy.ndimage import filters
from cupyx.scipy.signal import _signaltools_core as _st_core
def convolve(in1, in2, mode='full', method='auto'):
"""Convolve two N-dimensional arrays.
Convolve ``in1`` and ``in2``, with the output size... |
"""Minimalistic DNS-SD implementation."""
import math
import socket
import asyncio
import struct
import logging
import weakref
from ipaddress import IPv4Address, ip_address
from collections import namedtuple
from typing import Optional, Dict, List, cast, NamedTuple, Callable
from zeroconf import Zeroconf, ServiceInfo
... |
import cv2
from time import perf_counter
import numpy as np
import tensorrt as trt
import pycuda.driver as cuda
import pycuda.autoinit
import os
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
CWD = os.getcwd()
# Simple helper data class that's a little nicer to use than a 2-tuple.
class HostDeviceMem(object)... |
# Copyright 2017 the pycolab 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
import numpy as np
import pickle
import matplotlib.pyplot as plt
from scipy.interpolate import griddata
def get_barycentric_coords(tensor):
"""
:param tensor: 3x3 anisotropic Reynolds stress tensor
:return: x and y barycentric coordinates
"""
# Compute barycentric coordinates from the eigenvalues ... |
import matplotlib.text as text
import pandas as pd
import numpy as np
import pylab as pl
import scipy as sp
import re
#from IPython.core.debugger import set_trace
import rpy2
from rpy2.robjects.packages import importr
from rpy2.robjects import pandas2ri,FloatVector,ListVector
from rpy2.rinterface import NULL
import s... |
#
# Copyright (c) 2019 National Motor Freight Traffic Association Inc. All Rights Reserved.
# See the file "LICENSE" for the full license governing this code.
#
import json
import bitstring
import sys
import math
from collections import OrderedDict
NA_NAN = float('nan')
EMPTY_BITS = bitstring.ConstBitArray(bytes=b'')... |
# coding=utf-8
# Copyright 2021 The Uncertainty Baselines 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 ap... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Project: Fast Azimuthal integration
# https://github.com/silx-kit/pyFAI
#
# Copyright (C) European Synchrotron Radiation Facility, Grenoble, France
#
# Principal author: <NAME> (<EMAIL>)
#
# Permission is hereby granted, free of charge, to an... |
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import brenth, root, brentq, bisect
from scipy.constants import c, pi
from scipy.special import jv, kv, jvp, kvp
from scipy.interpolate import interp1d
from scipy.integrate import simps
import sys
import warnings
from pprint import pprint
from math... |
#!/usr/bin/python
# Copyright (c) 2017, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... |
from bitcoin_tools.analysis.plots import get_cdf
from bitcoin_tools.analysis.status.data_dump import transaction_dump, utxo_dump
from bitcoin_tools.analysis.status.utils import parse_ldb, aggregate_dust_np
from .data_processing import get_samples, get_filtered_samples
from bitcoin_tools.analysis.status.plots import plo... |
import shutil
import subprocess
import tempfile
from pathlib import Path
from typing import Union
from zipfile import ZipFile
import zipfile
from io import RawIOBase
import numpy as np
from scipy.spatial.transform import Rotation
from d3d.abstraction import (ObjectTag, ObjectTarget3D, Target3DArray,
... |
import unittest
import alakazam as zz
from alakazam import _1, _2, _3, _4, _5
class UnaryOpMock(object):
def __init__(self, txt):
self.txt = txt
def __str__(self):
return self.txt
def __repr__(self):
return self.txt
def __eq__(self, other):
return type(self) == type... |
#!/usr/bin/env python
# coding=utf-8
import pprint
import csv
import click
import requests
import datetime as datetime
# from splinter import Browser
import time
import re
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
f... |
import pandas as pd
from pandas.testing import assert_frame_equal, assert_series_equal
import pytest
import tarfile
from tempfile import NamedTemporaryFile, TemporaryDirectory
from unittest import mock
from nesta.packages.crunchbase.crunchbase_collect import rename_uuid_columns
from nesta.packages.crunchbase.crunchbas... |
import os
import shutil
import zipfile
import urllib.parse
import urllib.request
import torch
import torch.utils.data
from dataset import *
import pickle
from sklearn.manifold import TSNE
import matplotlib.pyplot as plt
import numpy as np
import csv
from collections import Counter, defaultdict
def maybe_download_and... |
"""PURPLE: Purity and ploidy estimates for somatic tumor/normal samples
https://github.com/hartwigmedical/hmftools/tree/master/purity-ploidy-estimator
"""
import csv
import os
import re
import shutil
import subprocess
import toolz as tz
from bcbio import broad, utils
from bcbio.log import logger
from bcbio.distribut... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import calendar
import datetime
import json
import logging
import math
import re
import ssl
import threading
import urllib.request
import urllib.parse
from time import sleep, time
from queue import Queue
import requests
from geopy import Point
from geopy.distance import v... |
"""AWS Higher Level Abstractions
This module contains higher-level AWS abstractions to make working with
AWS instances and collections of instances easier and less error-prone.
:class:`EC2Instance` is responsible for maintaining information about
itself and updating its state when asked to. The executer passed in
mus... |
# -*- coding: utf-8 -*-
import atexit
import ctypes
from logging import getLogger, WARN, DEBUG, INFO
from ctypes import wintypes
from ctypes import WINFUNCTYPE
from ctypes import c_int
from ctypes import Structure
###############################################################################
# ctypes shor... |
import sys
import os
import time
import argparse
from datetime import datetime, timedelta
import cmd_databases
import analyze_43
import android_analysis_17
import random
from threading import Timer
from subprocess import Popen, PIPE, STDOUT
from subprocess import call
# Get argurments
parser = argparse.ArgumentParser... |
import abc
import datetime
import json
from oidcmsg.message import Message
from oidcmsg.message import OPTIONAL_MESSAGE
from oidcmsg.message import SINGLE_OPTIONAL_JSON
from oidcmsg.message import SINGLE_OPTIONAL_STRING
from oidcmsg.message import SINGLE_REQUIRED_STRING
from oidcmsg.message import msg_deser
from oidcm... |
from copy import deepcopy
from collections import deque
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection
class InspectorVisualizer():
""" Class to visualize and plot online classification
results in real time.
Specific data is exposed per train step, and ploted on a real... |
from __future__ import absolute_import
import numpy as np
import scipy as sp
import logging
from scipy import stats
from fastlmm.pyplink.snpreader.Bed import Bed
#from fastlmm.association.gwas import LeaveOneChromosomeOut, LocoGwas, FastGwas, load_intersect
from fastlmm.association.LeaveOneChromosomeOut import LeaveOne... |
from itertools import count
from typing import Any, Dict, List, Tuple
import numpy as np
import pandas as pd
import CosmOrc.gauspar as gauspar
import CosmOrc.orpar as orpar
from CosmOrc.cospar import Jobs
import pysnooper
from yaml import dump, load
try:
from yaml import CLoader as Loader, CDumper as Dumper
exce... |
import torch
# Based on https://github.com/odegeasslbc/Differentiable-RGB-to-HSV-convertion-pytorch/blob/master/pytorch_hsv.py
def rgb_decompose_median(rgb_tensors: torch.Tensor) -> tuple:
"""
Separate median color from given RGB images.
:param rgb_tensors: RGB images [batch_size, 3, height, width].
... |
import contextlib
import os
import platform
import shutil
import socket
import stat
import tempfile
import unittest
from pathlib import Path
from textwrap import dedent
from typing import Any, ContextManager, FrozenSet, List, Optional, Tuple
import pyspawner
def child_main(indented_code: str) -> None:
code = ded... |
#! /usr/bin/python
# -*- coding: utf-8 -*-
"""Test the modern PyGreSQL interface.
Sub-tests for the copy methods.
Contributed by <NAME>.
These tests need a database to test against.
"""
try:
import unittest2 as unittest # for Python < 2.7
except ImportError:
import unittest
from collections import Iterab... |
# Copyright 2020-2021 Open Networking Foundation
# Copyright 2021-present Princeton University
#
# 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 os, shutil
import numpy as np
import pandas as pd
import csv
import time
from orbitpy.util import OrbitState, Spacecraft
from orbitpy.propagator import J2AnalyticalPropagator
from orbitpy.coveragecalculator import GridCoverage
from datametricscalculator import DataMetricsCalculator, AccessFileInfo
from orbitpy.... |
# Atom Tracing Code for International Workshop and Short Course on the FRONTIERS OF ELECTRON TOMOGRAPHY
# https://www.electron-tomo.com/
import numpy as np
import scipy as sp
import scipy.io as sio
import os
import warnings
def tripleRoll(vol, vec):
return np.roll(np.roll(np.roll(vol, vec[0], axis=0), vec[1], ax... |
import tensorflow as tf
from tensorflow.image import rot90 as img_rot90
from tensorflow.image import flip_left_right as img_flip
from tensorflow.keras.optimizers import Adam
import logging
import numpy as np
from sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score
import pandas as pd
import copy
im... |
#
# 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 us... |
# Copyright (c) ZenML GmbH 2022. 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:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... |
from __future__ import annotations
from copy import deepcopy
from typing import TYPE_CHECKING
from pyNastran.bdf.case_control_deck import CaseControlDeck
if TYPE_CHECKING: # pragma: no cover
from pyNastran.bdf.bdf import BDF
from pyNastran.bdf.subcase import Subcase
from cpylog import SimpleLogger
def loa... |
from __future__ import unicode_literals
import json
import requests
from django.core import serializers
from django.core.urlresolvers import reverse_lazy
from django.http import HttpResponse, JsonResponse
from django.views.generic import ListView, DetailView, View, CreateView, DeleteView, TemplateView, UpdateView
fro... |
"""
Module to perform analysis on MRI models.
Note: fMRI support to be added in the future.
"""
import argparse
import logging
import matplotlib
matplotlib.use("Agg")
import nipy
import numpy as np
import os
from os import path
from matplotlib import pyplot as plt
from math import log
from math import sqrt
from pylea... |
# -*- coding: utf-8 -*-
import json
import uuid
import requests
import time
from MetagenomeAPI.AMAUtils import AMAUtils
from Workspace.WorkspaceClient import Workspace
def get_contig_feature_info(ctx, config, params, sort_by, cache_id, msu, caching):
"""
Function to get information about contigss
"""
... |
from __future__ import annotations
import asyncio
# import collections
import functools
import typing
from asyncio import futures
import time
from typing import Optional
from bson import ObjectId
import core.util.UtilApi
from ConnBase import ConnBase, RECONNECT_INTERVAL, RECONNECT_MAX_TIMES
from ConnMgr import Conn... |
"""
Copyright 2018 Fluence Labs Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... |
#!/usr/bin/python
"""
Student name(s): <NAME>
Student ID(s): 21252240
GitHub URL: https://github.com/rahuldwivedi1112/ARC
"""
"""
Summary
Libraries:
All three tasks were solved by basic python using Loops and conditional statements. i have used Numpy library in one of the task
for matrix manipulation which i have... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*
#签到领现金-助力
'''
项目名称: JD-Script / jd_cash
Author: Curtin
功能:签到领现金-助力, 仅助力拿cash
Date: 2021/7/4 上午09:35
TG交流 https://t.me/topstyle996
TG频道 https://t.me/TopStyle2021
update 2021.7.24 18:02
建议cron: 0 0 * * * python3 jd_cashHelp.py
new Env('签到领现金-助力');
'''
#ck 优先读... |
"""
FASTA format sequence I/O.
This module provides parsers and writers for sequences and alignments in
FASTA format. The most basic usage is:
>>> parser = SequenceParser()
>>> parser.parse_file('sequences.fa')
<SequenceCollection> # collection of L{AbstractSequence}s
This will load all sequences in me... |
import operator
import math
from collections import namedtuple
from brainpy import mass_charge_ratio, neutral_mass as calc_neutral_mass, PROTON
from ms_peak_picker import simple_peak, PeakSet as FittedPeakSet
from .utils import Base, ppm_error
class _Index(object):
"""
Stores the ordered index of an object... |
from IPython.display import display, Latex
import json
import ast
import base64
import numpy as np
import pandas as pd
import random
from PIL import Image, ImageDraw, ImageFont
from io import BytesIO
import os
import streamlit as st
import cv2
import matplotlib.pyplot as plt
labels_dict = {0: '\\cdot',
1: '\\frac',
... |
#!/usr/bin/env python
# coding: utf-8
# In[13]:
import pandas as pd
medicare = pd.read_csv("/netapp2/home/se197/RPDR/<NAME>/3_EHR_V2/CMS/Data/final_medicare.csv")
# In[14]:
medicare = medicare[(medicare.Co_CAD_R0 == 1) | (medicare.Co_Diabetes_R0 == 1) | (medicare.Co_CAD_R0 == 1) |
(medicare.... |
#!/usr/bin/env python
#
# Copyright (C) 2017 ShadowMan
#
# The absence of such a field is equivalent to the null value
# (meaning that if the server does not wish to agree to one of
# the suggested subprotocols, it MUST NOT send back a
# |Sec-WebSocket-Protocol| header field in its response).
# The empty string is no... |
# -*- coding: utf-8 -*-
"""Test the shell.
"""
import os
import time
from contextlib import redirect_stdout
from io import StringIO
from subprocess import PIPE, Popen
from threading import Event, Lock, Thread
from pyvisa import constants, errors
from pyvisa.resources import Resource
from pyvisa.rname import to_canoni... |
import typing
import discord
import asyncio
import re
from discord.ext import commands
from collections import Counter
from utilities import decorators
from utilities import converters
from utilities import checks
from utilities import helpers
def setup(bot):
bot.add_cog(Server(bot))
class Server(commands.Cog):... |
import torch
import torch.nn.functional as F
import numpy as np
from torch.nn.utils import spectral_norm as sn
from torch.cuda.amp import autocast
class ResnetBlock(torch.nn.Module):
def __init__(self, ni, no, stride, activation, spectral_norm=False, dp_prob=.3, batchnorm=torch.nn.InstanceNorm2d):
super().... |
# -*- coding:utf-8 -*-
# Copyright xmuspeech (Author: JFZhou 2019-11-18)
# Updata xmuspeech (Author: <NAME> 2020-12-31)
import scipy
import numpy as np
import math
import os
import kaldi_io
import sys
import logging
'''
Modified from the code avaliable at https://github.com/vzxxbacq/PLDA/blob/master... |
# imports
from importlib import reload
import os
import numpy as np
from matplotlib import pyplot as plt
import iris
import sys
# create module paths
# MHW_PATH = '/Users/kamil/Desktop/research2020/mhw_analysis'
# OCEANPY_PATH = '/Users/kamil/Desktop/research2020/oceanpy'
# os.environ['NOAA_OI'] = '/Users/kamil/Desk... |
from __future__ import unicode_literals
import re
from django.core.exceptions import ValidationError
from django.test import TestCase
from localflavor.au import forms, models
from localflavor.au.validators import (AUBusinessNumberFieldValidator, AUCompanyNumberFieldValidator,
A... |
# -------------------------------------------------------------
#
# 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 unde... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# ./create_JSON_file_of_sections_in_your_courses.py
#
# with the option "-v" or "--verbose" you get lots of output - showing in detail the operations of the program
#
# Can also be called with an alternative configuration file:
# ./create_JSON_file_of_sections_in_your_course... |
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
""" Functionality for analysis of single quantum dots
For more details see https://arxiv.org/abs/1603.02274
"""
# %%
import scipy
import scipy.ndimage
import numpy as np
import matplotlib.pyplot as plt
import warnings
import logging
import qcodes
from qcodes.plots.qcmatplotlib import MatPlot
from qtt.data import dat... |
"""
Docs
Developers:
<NAME> + MinhNT10
Description:
This module is used to automatically generate HTML-based documentation for
Python scripts with NumPy/SciPy format docstrings and correct code and syntax
conventions followed throughout.
Please see NumPy/SciPy docstrings formatting guidance here:
https://numpydoc.rea... |
import io
import itertools
from entityservice.database.util import query_db, logger, binary_format, compute_encoding_ids
from entityservice.errors import ProjectDeleted, RunDeleted, DataProviderDeleted
def select_dataprovider_id(db, project_id, receipt_token):
"""
Given a receipt token get the id of the matc... |
###############################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
###############################################################################
imp... |
import logging
import os
import sys
from typing import Optional as PythonTypingOptional
from contextlib import contextmanager
from enum import Enum
from strictyaml import Bool, Int, Map, Optional, Str, load, YAMLError, Seq, Any
from pathlib import Path
from datarobot_drum.drum.exceptions import DrumCommonException
fr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.