text stringlengths 6.04k 39.5k |
|---|
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2008 <NAME> and <NAME>
# Copyright (C) 2012-2014 <NAME>
# Copyright (C) 2015-2018 <NAME>
from __future__ import absolute_import, division, print_function
from re import compile, escape
from ..scraper import _BasicScraper, _ParserScraper
from ..helpers import indirectStart... |
# Copyright 2020 The Forte Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
# Embedded file name: /Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/DeviceComponent.py
# Compiled at: 2018-04-23 20:27:04
from __future__ import absolute_import, print_function, unicode_literals
import Live
from _Generic.Devices import device_parameters_to_map,... |
# (Be in -*- python -*- mode.)
#
# ====================================================================
# Copyright (c) 2000-2009 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also availabl... |
import itertools
from typing import List, Dict
from dataclasses import fields
import nltk
from nltk.corpus import wordnet
from config import Config
from log import get_child_logger
from pipeline import Pipe
from models import Topic, ProcessingObject, Query
import gensim.downloader
from gensim.models import Word2Vec
... |
# Copyright 2010 <NAME>
# Copyright 2011 OpenStack Foundation
# 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/LICEN... |
# -*- coding: utf-8 -*-
"""
@Author: lyzhang
@Date: 2018/4/5
@Description: 对论元对数据获取
"""
import nltk
import torch
from config import *
import numpy as np
from utils.file_util import *
from utils.text_process_util import rm_edge_s, get_sent_words_syns, s_list
if USE_ELMo and LOAD_ELMo:
print("loading...")
from ... |
"""
@author: <NAME>
@contact: <EMAIL>
"""
import logging
import argparse
from joblib import cpu_count, delayed, Parallel # type: ignore
import numpy as np # type: ignore
import os
import radiantkit as ra
from radiantkit import argtools as ap
from radiantkit import const, path, stat, string
from radiantkit import cha... |
import os
import random
import logging
from datetime import datetime
import discord
from discord.utils import get
from discord.ext import commands
from dotenv import load_dotenv
logging.basicConfig(level=logging.ERROR)
logger = logging.getLogger(__name__)
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
GUILD = os.... |
import os
import sys
import pickle
import torch
import numpy as np
from pprint import pprint
from tqdm import tqdm
from utils.logger import setup_logging
from utils.arg_helper import parse_arguments, get_bo_config
from ahgp.gp.gp_helper import standardize
from ahgp.nn import *
from utils.bo_functions import *
from util... |
# Copyright 2019 Stanford University
# Copyright 2016, Yahoo Inc.
# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
import math
from pprint import pprint
from operator import add, sub, mul
from numpy.testing import assert_raises
# from multiproc... |
#!/usr/bin/env python3
'''
Authors: <NAME>
License: Apache 2.0
'''
from subprocess import Popen
import json
import pandas as pd
import numpy as np
import os
import seaborn as sns
import matplotlib.pyplot as plt
pd.options.display.width = 0
def summarize(input_dir, test_set='', model=0, model_name='SGDClassifier'):... |
import discord
from discord import Interaction, InteractionType, Embed, Forbidden, Member, User
from discord.ext import commands
from Cogs.BaseCog import BaseCog
from Util import Configuration, MessageUtils, Translator, Pages, Emoji, Utils, Permissioncheckers, InfractionUtils
from Util.InfractionUtils import get_key
f... |
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.use('Qt5Agg')
import tensorflow as tf
import numpy as np
import keras
import PIL
import pathlib
import keras.backend as K
from tensorflow.python.framework import ops
from scipy import ndimage
import copy
from collections import OrderedDict
from PyQt5.QtWi... |
import time
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
import gpflow
from gpflow.utilities import set_trainable
def elbo_fullcov(q_mu,
q_sqrt_latent,
inducing_inputs,
D_idxs,
max_idxs,
kernel,
... |
import math
import os
import time
from math import ceil
import cv2
import matplotlib
from scipy import misc
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.ops import gen_nn_ops
from imgaug import augm... |
###################################################################################################
# Repository: https://github.com/lgervasoni/urbansprawl
# MIT License
###################################################################################################
import geopandas as gpd
import pandas as pd
impor... |
#!/usr/bin/env python
# coding: utf-8
#
# Copyright (c) 2021 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 req... |
import logging
from collections import deque
from threading import RLock
from datetime import datetime
from gdrivefs.utility import utility
from gdrivefs.conf import Conf
from gdrivefs.drive import get_gdrive
from gdrivefs.account_info import AccountInfo
from gdrivefs.normal_entry import NormalEntry
fro... |
#!/usr/bin/env python2
# This file is part of the dune-hdd project:
# https://github.com/pymor/dune-hdd
# Copyright Holders: <NAME>
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
'''Dune LRBMS demo.
Usage:
thermalblock_main.py CONFIGFILE
Arguments:
CONFIGFILE File that can be und... |
# -*- coding: utf-8 -*-
# --------------------------------------------------------------------------
# Copyright Commvault Systems, 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
#
# ... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
Utility functions
"""
import sys
from six.moves import cPickle
from xml.etree import cElementTree as ET
import logging
from collections import defaultdict
from xml.dom import minidom
import numpy as np
import json
import os
import nltk
import zss
f... |
import DSGRN
import json, os, sys, ast
from functools import partial
from dsgrn_net_query.utilities.poset_utilities import calculate_posets_from_multiple_time_series,check_posets
from dsgrn_net_query.utilities.file_utilities import read_networks, create_results_folder
from mpi4py import MPI
from mpi4py.futures import M... |
import datetime
from .application import Application
from .channel import GuildChannel, WelcomeScreen, GuildStageChannel, Overwrite
from .client import Client
from .emoji import Emoji
from .guild import GuildPreview
from .role import Role
from .sticker import StickerItem, Sticker
from .thread import Thread
from .membe... |
# Copyright (c) 2011-2020 <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 use, copy, modify, merge, publish, distrib... |
#!/usr/bin/env python
import sys, time, os
import numpy as np
import matplotlib.pyplot as plt
import uproot
import awkward
import h5py
import psutil
from pprint import pprint
from pygama.utils import sizeof_fmt
def main():
"""
uproot tutorial:
https://hub.mybinder.org/user/scikit-hep-uproot-0ldc9pe0/lab
... |
import os
import tempfile
import pytest
import numpy as np
import pandas as pd
from neuroquery import tokenization
TEST_DATA = os.path.join(os.path.dirname(__file__), "data")
VOCABULARY_FILE = os.path.join(TEST_DATA, "vocabulary_list.csv")
def test_nltk_stop_words():
stop_words = tokenization.nltk_stop_words(... |
#
# Copyright (c) 2014 <NAME>, Inc. <<EMAIL>>
#
# Permission to use, copy, modify, and 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.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI... |
import platform
import re
from collections import namedtuple
from copy import deepcopy
from elasticsearch.helpers import streaming_bulk
from elasticsearch.exceptions import NotFoundError
from langdetect.lang_detect_exception import LangDetectException
from onegov.core.utils import is_non_string_iterable
from onegov.se... |
#!/usr/bin/env python3
import argparse
import datetime
import logging
import os
import re
import shutil
import signal
import socket
import sys
import time
import json
import unicodedata
import boto3
import botocore.exceptions
from Cryptodome.PublicKey import RSA
from iso8601 import parse_date as parse_iso8601
PROGRAM... |
# -*- coding: utf-8 -*-
from text2num import text2num
import codecs, json, sys, io, os, copy
# add all records to valid and test
CWD = os.getcwd()
DATA = sys.argv[1]
INPUT_PATH = os.path.join("rotowire_temp", DATA)
print(INPUT_PATH)
os.chdir(INPUT_PATH)
# if DATA == 'train':
# ORACLE_IE_OUTPUT = 'roto-original-%s... |
from collections import defaultdict
from pathlib import Path
import numpy as np
from numpy.lib.arraysetops import unique
import torch.utils.data as torch_data
from ..utils import common_utils
from .augmentor.data_augmentor import DataAugmentor
from .processor.data_processor import DataProcessor
from .processor.point_... |
"""
Class to create a pop-up input dialog that
allows the user to input one or more data items.
"""
from PyQt5.QtWidgets import (QDialog, QFormLayout, QDialogButtonBox, QComboBox,
QStyledItemDelegate, QLabel, QSpinBox, QMessageBox, QScrollBar,
QDoubleSpinBox, Q... |
import logging
import torch
import scipy
import mathtools as m
from mathtools import utils, torchutils
from visiontools import geometry, render, imageprocessing
import neural_renderer as nr
logger = logging.getLogger(__name__)
class TorchSceneRenderer(nr.Renderer):
def __init__(
self, intrinsic_ma... |
from __future__ import division
from torch.utils.data import DataLoader
import torch.optim as optim
from models.models import *
from utils.utils import *
from datasets.datasets import *
import os
import time
import datetime
import resource
from utils.visualize import Visualizer
import torch
from torch.utils.data import... |
"""
Known Issues:
-------------
- GlyphLineView does not properly handle fonts that are not saved to a file.
this is because there is not good way to find the font index for a given font
and the preview control requires a font index. so, the best thing i can
do at this point is get the font index by comparing fil... |
"""钢管混凝土构件承载力
GB 50936-2014 钢管混凝土结构技术规范 第5.3.1节
"""
__all__ = [
'bearing_capacity',
'solid_circular_CSFT_compressive_capacity',
]
from collections import OrderedDict
from math import pi, sqrt
from calla import abacus, InputError
class bearing_capacity(abacus):
"""
钢管混凝土构件在复杂受力状态下承载力计算
... |
from lettuce import *
import activity
import json
import datetime
import time
import os
import provider.article as articlelib
@step('I create an article provider')
def i_create_an_article_provider(step):
try:
world.settings = world.settings
except AttributeError:
world.settings = None
try:
world... |
import tensorflow as tf
import tensorflow.contrib.rnn as rnn
from tensorflow.python.ops.nn_ops import max_pool, leaky_relu
class g_embedding_bidirectionalLSTM:
def __init__(self, name, layer_sizes, batch_size):
"""
Initializes a multi layer bidirectional LSTM
:param layer_sizes: A list con... |
#!/usr/bin/env python3
import threading
import time
import logger
import stts
from backup import Backup
from config import ConfigHandler
from discovery_server import DiscoveryServer
from duplex_mode import DuplexPool
from languages import F
from lib import STT, TTS, detectors
from lib import volume as volume_
from li... |
from ImportFile import *
from pyevtk.hl import gridToVTK
pi = math.pi
extrema_values = None
parameters_values = torch.tensor([[0, 2 * pi],
[0, pi],
[0, 1]])
space_dimensions = 3
time_dimensions = 0
output_dimension = 2
assign_g = True
average = False
... |
#!/usr/bin/env python3
# coding=utf-8
#
# Copyright (c) 2020-2021 Huawei Device 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
#
#... |
from random import choice, choices
BASES = ('A', 'C', 'G', 'T')
def ham_dist(one: str, two: str) -> int:
"""Calculates HAMming DISTance between two strings
'Hamming distance' is the number of substituted chars
:param one: a string
:type one: str
:param two: a string to compare to one
:type t... |
from utils import log_utils
import jbrik_solver_move_lib
import jbrik_cube
# solveface cross https://ruwix.com/the-rubiks-cube/how-to-solve-the-rubiks-cube-beginners-method/step-1-first-layer-edges/
def solvecross(cube):
log_utils.log("Starting cross solve")
ccolor = cube.get_cell_val_by_rowcell("2.2")
fa... |
import os
import numpy
import numpy.ctypeslib
import ctypes as CT
from . import umfile
_len_real_hdr = 19
_len_int_hdr = 45
class File_type(CT.Structure):
_fields_ = [("format", CT.c_int),
("byte_ordering", CT.c_int),
("word_size", CT.c_int)]
def _get_ctypes_array(dtype, size=No... |
#! /usr/bin/env python
"""SPDX license identifier: MIT; Project 'http://quex.sf.net';
(C) <NAME>
"""
import quex.engine.misc.error as error
from StringIO import StringIO
import os
__reference_to_setup = None
def specify_setup_object(TheSetup):
global __reference_to_setup
__reference_to_setup =... |
# Copyright 2021 Xanadu Quantum Technologies 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... |
# -*- encoding: utf-8 -*-
# upass v0.3.0
# Console UI for pass.
# Copyright © 2015-2020, <NAME>.
# See /LICENSE for licensing information.
"""
upass user interface.
:Copyright: © 2015-2020, <NAME>.
:License: BSD (see /LICENSE).
"""
import os
import re
import sys
import upass
import urwid
import pyperclip
import subp... |
# -*- coding: utf-8 -*-
"""
Created on Mon May 7 06:55:45 2018
@author: jose
"""
import re
import os
import glob
import subprocess
import collections
from nltk.corpus import wordnet as wn
import time
import shutil
from lxml import etree
import pandas as pd
import time
from collections import Counter
specific_names... |
#!/usr/bin/env python3
#
# todo: detect when *we* have no surviving moves.
import sys
import sqlite3 as db
import codecs
import _pickle as cP
#from copy import deepcopy
def deepcopy(twod): # faster
return [x[:] for x in twod]
CUTOFF = 2 # ignore words shorter than this
NOBODY = 0
US = 1
THEM = 2
BOTH = 3
... |
from .base import AMCCase
import time
from psim.sims import OrbitControllerTest
from psim import Configuration, Simulation
import lin
import numpy as np
from .utils import str_to_val, Enums
from typing import NamedTuple, List
from ..gpstime import GPSTime
from .conversions import ecef2eci_mc_runs, ecef2eci, get_covaria... |
from __future__ import print_function
import os, boto3, json, base64
import urllib.request, urllib.parse
import logging
import pprint
import re
# Decrypt encrypted URL with KMS
def decrypt(encrypted_url):
region = os.environ['AWS_REGION']
try:
kms = boto3.client('kms', region_name=region)
plai... |
# Modified by:
# Copyright (c) 2016 <NAME>
# Modified work:
# -----------------------------------------------------------------------------
# Copyright (c) 2015 Preferred Infrastructure, Inc.
# Copyright (c) 2015 Preferred Networks, Inc.
# -----------------------------------------------------------------------------
... |
# -*- coding: UTF-8 -*-
from typing import IO, Any, Callable, Dict, List, Tuple, Union, TypeVar, Generic
import requests
from ...model import OapiHeader
from ... import VERSION
from ...config import Config
from ...consts import *
from ...context import Context
from ...api.api_error import APIError, ERR_ACCESS_TOKEN_... |
"""Module for accessing pre-trained `fastText word embeddings
<https://fasttext.cc/>`_ and `Word2Vec embeddings from NLPL
<http://vectors.nlpl.eu/repository/>`_. Two sets of models are available
from fastText, one being trained only on corpora taken from
Wikipedia (`249 languages
<https://fasttext.cc/docs/en/pretrained... |
# coding: utf-8
from vpython import arrow, box, bumpmaps, color, distant_light, radians, rate, scene, sphere, textures, vector
import time
from toolbox_draw_body import draw_part
from toolbox_draw_body import p0, p1, p1_, p2, p2_
from toolbox_draw_body import p0_la, p1_la, p1__la, p2_la, p2__la
from toolbox_draw_body ... |
''' Adapted from https://github.com/whai362/PSENet '''
import sys
import torch
import argparse
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import shutil
import tensorflow as tf
#from tensorflow import summary
import datetime
from torch.autograd import Variable
from torch.utils import data
... |
# imports
import asyncio
# from datetime import date
# from datetime import datetime
import datetime
import os
import time
from datetime import timedelta
from itertools import cycle
from time import strptime
from urllib.request import urlopen as uReq
import discord
import requests
from bs4 import BeautifulSoup as soup... |
#!/usr/bin/env python
# cardinal_pythonlib/sqlalchemy/subproc.py
"""
===============================================================================
Original code copyright (C) 2009-2021 <NAME> (<EMAIL>).
This file is part of cardinal_pythonlib.
Licensed under the Apache License, Version 2.0 (the "Licen... |
import numpy as np
import matplotlib.pyplot as plt
from .tools import median_mad
from .dataio import DataIO
from .catalogueconstructor import CatalogueConstructor
from .tools import make_color_dict, get_neighborhood
def plot_probe_geometry(dataio, chan_grp=0, margin=150, channel_number_mode='absolut'):
... |
# coding=utf-8
# Copyright 2018 <NAME>
#
# 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 following disclaimer... |
# -*- coding: utf-8 -*-
#
# Copyright © 2011 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
"""
Line Profiler widget
See the official documentation of line_profiler:
http://pythonhosted.org/line_profiler/
"""
# Standard library imports
from __future__ import ... |
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
from copy import deepcopy as dc
from dace import dtypes, memlet as mm, properties, data as dt
from typing import Any, Dict, Optional
from dace.symbolic import symstr
import dace.library
import dace.properties
from dace.frontend.common import op... |
import inspect
import os
from functools import partial
from inspect import Parameter
from typing import Any, AnyStr, Dict, List, _alias, _GenericAlias, _SpecialForm
import PySimpleGUI as sg
from pydantic import create_model
from pydantic.error_wrappers import ValidationError as ValidateError
from PyInquirer import Tok... |
"""
This *events* module contains the various event type used by the SimPy core.
The base class for all events is :class:`Event`. Though it can be directly
used, there are several specialized subclasses of it:
- :class:`Timeout`: is scheduled with a certain delay and lets processes hold
their state for a certain am... |
from async_asgi_testclient import TestClient
from guillotina import task_vars
from guillotina import testing
from guillotina.component import get_utility
from guillotina.component import globalregistry
from guillotina.const import ROOT_ID
from guillotina.const import TRASHED_ID
from guillotina.db.interfaces import ICoc... |
import os, subprocess, shutil
import parser5
from tkinter import *
import tkinter.messagebox
from tkinter import simpledialog
import requests, zipfile, io, tldextract, json
import pygame, threading, re
class myWindow(Frame):
def __init__(self,parent=None):
Frame.__init__(self,parent)
self.parent =... |
#!/usr/bin/python3
"""
NPR, 01/2019
This module extracts pieces of information from a RDF/XML document that describes a collection of ship properties, and crosses it with a CSV list of IMO vessel codes.
To run it:
* ensure that the two input files :download:`imo-vessel-codes.csv <imo-vessel-codes.csv>` and :download... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.utils.rnn as rnn
from torch.autograd import Variable
from utils.common import *
from utils.Quaternions_torch import qeuler, euler_to_quaternion
torch.manual_seed(1234)
class HAPPY(nn.Module):
def __init__(self, dataset, T, V, C,... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""This file contains some functions that can be used everywhere in the program."""
import math
import datetime
from html.parser import HTMLParser
import unicodedata
import urllib.request
import user_io
def connected(website):
"""prueft, ob Internetverbindung vorhanden... |
#-*- coding: utf-8 -*-
# pylint: disable=E0102, W0613
"""
Values generators for common Django Fields
"""
from __future__ import division
import random
import re
import os
from decimal import Decimal
from datetime import date, datetime, time
from string import ascii_letters, digits, hexdigits
from django.conf import se... |
from __future__ import absolute_import, division, print_function
from collections import OrderedDict, Iterator
import copy
from functools import partial
from hashlib import md5
import inspect
import pickle
import os
import threading
import uuid
from toolz import merge, groupby, curry, identity
from toolz.functoolz im... |
"""
Copyright (c) 2016, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following discla... |
from random import *
import math
import argparse
import json
from PIL import Image, ImageDraw, ImageOps
# from filters import *
# from strokesort import *
no_cv = False
export_path = "images/out.svg"
svg_folder = "images/"
json_folder = "images/"
# vectorisation defaults
draw_contours = True
draw_hatch = True
reso... |
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import json
import os
import random
import torch
import time
import multiprocessing
import numpy as np
from torch.utils.data import TensorDataset, DataLoader
from torch.utils.tensorboard import SummaryWriter
from torch.a... |
#!/usr/bin/env python3
import glob
import logging
import os
import queue
import re
import json
import struct
import threading
from typing import Tuple, Any, List, Dict, Optional
import couchstore # pylint: disable=import-error
import couchbaseConstants
import pump
from cb_bin_client import decode_collection_id, enco... |
'''
Example of Crocoddyl sequence for computing a whole-body jump.
The sequence is composed of a double-support phase, a flight phase, a double impact and a
double-support landing phase. The main cost are an elevation of the COM at the middle of the flight
phase, a minimization of the COM energy loss at impact, and a t... |
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# 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/LICEN... |
# -*- coding: utf-8 -*-
# ======================================================================================================================
# Copyright (©) 2015-2021 LCS - Laboratoire Catalyse et Spectrochimie, Caen, France. =
# CeCILL-B FREE SOFTWARE LICENSE AGREEMENT - See ful... |
# This part of the code is responsible for putting together the STAN code.
# I'm outsourcing this to its own module because some of the options were
# impossible to do in the STAN language with if/else blocks.
from hashlib import md5
import pystan
import pickle
import os
from numpy import random, array
from numpy imp... |
# Copyright 2021 MosaicML. All Rights Reserved.
from __future__ import annotations
import logging
import os
import time
from functools import wraps
from types import TracebackType
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
from composer.profiler._profiler_acti... |
from Bio import SeqIO
from Bio.Seq import Seq
from bisect import bisect_left
import mmap
import re
nuc = ["A", "T", "C", "G"]
table = {
'ATA': 'I', 'ATC': 'I', 'ATT': 'I', 'ATG': 'M',
'ACA': 'T', 'ACC': 'T', 'ACG': 'T', 'ACT': 'T',
'AAC': 'N', 'AAT': 'N', 'AAA': 'K', 'AAG': 'K',
'AGC': 'S', 'AGT': 'S',... |
#!/usr/bin/env python
# author: <NAME> <EMAIL>
# Updated: <NAME> <EMAIL>
# Written for Python 3.4 and above
# No warranty is offered, use at your own risk. While these scripts have been tested in lab situations, all use cases cannot be accounted for.
# version: 1.6 4-Dec-2017
# use: Query clusters and node... |
##################################################
# Advanced Widgets
##################################################
# Contains more advanced Widgets to be used.
# All Widgets here are to inherit a Widget from base_widgets.py
# The point of advanced Widgets is to provide more application-specific Widgets
# that a... |
import logging
from urllib.parse import parse_qs, urljoin
import requests
from .matching_rule import fold_type, nice_type, rule_matchers_v2, rule_matchers_v3, RuleFailed
from .parse_header import parse_header
from .paths import format_path
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
class Provid... |
#
# Copyright 2010-2019 University of Southern California
#
# 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... |
import asyncio
import io
import re
import warnings
from asyncio import Event
from io import StringIO
from random import choice
from aiogram.dispatcher.filters import Filter
from aiogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
from aiogram.utils.exceptions import TelegramAPIError... |
"""
Various functions and dispatchers for testing effects.
Usually the best way to test effects is by using :func:`perform_sequence`.
"""
from __future__ import print_function
from contextlib import contextmanager
from functools import partial
from operator import attrgetter
import sys
import attr
from ._base impo... |
# Copyright (c) 2014 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... |
from django.contrib.auth.models import User
from django_q.tasks import async_task
from app.models import Document, Similarity
from binfile.distance_measurement import cosine_sim, cosine_similarity, jaccard_similarity, dice_similarity, mahalanobis_distance, \
euclidean_distance, minkowski_distance, manhattan_distanc... |
"""
Dataloaders for VCR
"""
import json
import os
import numpy as np
import torch
from allennlp.data.dataset import Batch # ALLENNLP0.8独有
# from allennlp.data import Batch # ALLENNLP1.2独有
from allennlp.data.fields import TextField, ListField, LabelField, SequenceLabelField, ArrayField, MetadataField
from al... |
import argparse
import numpy as np
import os
import pandas as pd
import random
import sys
import time
import torch
import scan
import torch.nn as nn
import torch.optim as optim
import torch.utils.data
class RNN(nn.Module):
def __init__(self,
input_size,
hidden_size,
... |
import argparse
import json
import os
from torch.optim import optimizer
from tqdm import tqdm
import wandb
import numpy as np
import torch
import torch.optim as optim
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
import torch.nn.functional as F
torch.backends.cudnn.benchmark... |
##############################################################################
# Copyright by The HDF Group. #
# All rights reserved. #
# #
# Th... |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2020, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
'''
Molecular Orbital Utilities
##############################
Molecular orbitals are constructed symbolically
then evaluated on a numerical grid.
These are their stories.
'''
from _... |
'''
Utopia is an Alexa skill programmed in Python to help with depression.
Disclaimer: This skill is not meant to be a cure for depression, but more of an aid for depression.
Author: <NAME>
Date: March 8, 2018
'''
import os
from flask import Flask, json, render_template, jsonify
from flask_ask import (
Ask,
... |
#!/usr/bin/python3
"""
Simple okay/cancel dialog.
"""
import os
import re
import stat
import sys
import time
import fnmatch
import cairo
import yutani
import text_region
import toaru_fonts
from button import Button
from icon_cache import get_icon
import yutani_mainloop
_default_text = "This is a dialog. <b>Formatt... |
#!env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import os
import sys
from collections import namedtuple
from datetime import datetime
import click
import cv2
import numpy as np
import pykitti
import rosbag
import rospy
import sensor_msgs.point_cloud2 as pcl2
from cv_bridge import ... |
# 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 use ... |
from corehq.apps.reminders.models import (Message, METHOD_SMS,
METHOD_SMS_CALLBACK, METHOD_SMS_SURVEY, METHOD_IVR_SURVEY,
METHOD_EMAIL, CaseReminderHandler)
from corehq.apps.hqwebapp.tasks import send_mail_async
from corehq.apps.reminders.util import get_unverified_number_for_recipient
from corehq.apps.smsforms... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.