text stringlengths 8.04k 46.5k |
|---|
# --------------------------------------------------------------------------
# Source file provided under Apache License, Version 2.0, January 2004,
# http://www.apache.org/licenses/
# (c) Copyright IBM Corp. 2015, 2016
# --------------------------------------------------------------------------
from io import S... |
import json
import logging
import uuid
import time
import re
# Django imports
from django.http import HttpResponse
from django.utils import timezone
from django.core.exceptions import MultipleObjectsReturned
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from rest_framework im... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright © Spyder Project Contributors
#
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
# ----------------------------------------------------------------------------
"""
Tes... |
# coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2018-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
from pylab import *
import itertools
from sklearn.metrics import confusion_matrix
# Para cambiar el mapa de color por defecto
plt.rcParams["image.cmap"] = "Set2"
# Para cambiar e... |
import time
from matrix import *
# F(X)= sqrt(1 + x[0]^2 + x[1]^2)
def f17102(x):
return (1 + x[0]**2 + x[1]**2)**.5
def f17102_g(x):
return [x[0] / (1 + x[0]**2 + x[1]**2)**.5, x[1] / (1 + x[0]**2 + x[1]**2)**.5]
def f17102_dg(x):
s = 1 + x[0]**2 + x[1]**2
a11 = 1/s**.5 - x[0]**2/s**1.5
a22 =... |
#
# This file is:
# Copyright (C) 2018 <NAME> <<EMAIL>>
#
# MIT License
#
from . import utils
from . import gui
from . import addresses
from .amountedit import BTCAmountEdit, FiatAmountEdit, BTCkBEdit # Makes sure ObjC classes are imported into ObjC runtime
from electroncash import WalletStorage, Wallet
from elect... |
"""A module for solving FRVCPs.
This module defines the Solver class for the FRVCP and
offers a main function for execution of the solver from
the command line.
Classes:
Solver: the class users interact with to solve an FRVCP
"""
import argparse
import copy
import os
import sys
from typing import List, Any, Tupl... |
# coding=UTF-8
"""Carbon Storage and Sequestration."""
import codecs
import logging
import os
import time
from functools import reduce
from osgeo import gdal
from osgeo import ogr
import numpy
import pygeoprocessing
import taskgraph
from . import validation
from . import utils
LOGGER = logging.getLo... |
import cv2
import SimpleITK as sitk
import numpy as np
import os
import time
import math
from k_means import kmeans
from gcgraph import GCGraph
#read dicom images
def loadFile(filename):
ds = sitk.ReadImage(filename)
img_array = sitk.GetArrayFromImage(ds)
return img_array
#空回调函数
def nothing(x):
pass
... |
# This file is covered by the BSD license. See LICENSE in the root directory.
from selenium import webdriver
from selenium.common.exceptions import NoAlertPresentException
from selenium.webdriver.common.keys import Keys
from time import sleep
import os
import shutil
from django.contrib.auth import get_user_model
from ... |
#!/usr/bin/python
# Copyright (c) 2013 Quanta Research Cambridge, Inc.
#
# 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,... |
# Copyright (c) 2021, eQualit.ie inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import nginx
import os
import shutil
import tarfile
import json
from jinja2 import Template
from pyaml_env import parse_config... |
"""
Module for the base Tabs
The root class Tab defines the generic interface and attributes of a
tab. A tab organizes various Windows around the screen depending
of the tab specificity. If the tab shows messages, it will also
reference a buffer containing the messages.
Each subclass should redefine its own refresh()... |
import rastervision as rv
import io
import os
import shutil
import tarfile
from os.path import join
from subprocess import (Popen, PIPE, STDOUT)
import glob
import re
import uuid
import logging
from copy import deepcopy
from PIL import Image
import numpy as np
from google.protobuf import text_format, json_format
fro... |
"""OAuth2.0 user credentials."""
import datetime
import ipaddress
import json
import multiprocessing
import os
import re
from socket import gethostbyname
import sys
from time import sleep
import threading
from urllib.parse import urlencode, urlparse, parse_qs
import wsgiref.simple_server
import wsgiref.util
import web... |
# Copyright (c) 2018 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... |
#!/usr/bin/env python3
"""
Binary memcached test client.
Copyright (c) 2007 <NAME> <<EMAIL>>
"""
import array
import random
import socket
import ssl
import struct
from typing import Iterable, List, Optional, Tuple, Union
import couchbaseConstants
from couchbaseConstants import (AUDIT_PKT_FMT, INCRDECR_RES_FMT, MIN_... |
#!/usr/bin/env python
from __future__ import print_function
import argparse
import email.mime.multipart
import email.mime.text
import logging
import os.path
import pickle
import re
import smtplib
import subprocess
import sys
from datetime import datetime, timedelta
from phabricator import Phabricator
# Setting up a ... |
"""
gimbal/mcmc.py
"""
import contextlib
import numpy as onp
from tqdm.auto import trange
import jax.config
import jax.numpy as jnp
import jax.random as jr
from jax import lax, jit, partial, vmap
from jax.scipy.special import logsumexp
import tensorflow_probability.substrates.jax as tfp
import tensorf... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-LOG 蓝鲸日志平台 is licensed under the MIT License.
License for BK-LOG 蓝鲸日志平台:
------------------------------------------------... |
# Copyright 2018 eBay Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
"""fitrec_attn.py
This code provides the FitRec-Attn model introduced by Ni, et al [2019 WWW].
The model is trained to predict the next observed heart rate reading given
a set of user attributes and previous sequences of current and past workouts.
The vast majority of this code is derived from the original author's... |
import json
import logging
import os
from JsonResponseResult import JsonResponseResult
from Neo4jConnectionPool import ConnectionPool
logger = logging.getLogger('django')
review_tags = None
"""
normally, u just initialize a JsonResponseResult obj and dot ok().
and send back to the data you queried
Api response will... |
import sys
import numpy as np
import pandas as pd
import configparser
import logging.config
import h5py
import scipy.sparse as sps
import multiprocess as mp
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from pybedtools import BedTool
## Intialize logger
logging.config.fileConfig('logging.ini', disabl... |
import argparse
import csv
import logging
import os
import random
import sys
import shutil
import contextlib
import numpy as np
import pandas as pd
import torch
from torch.utils.data import (DataLoader, RandomSampler, SequentialSampler,
TensorDataset)
from torch.utils.data.distributed imp... |
# Copyright: 2019, NLnet Labs and the Internet.nl contributors
# SPDX-License-Identifier: Apache-2.0
import time
from celery import shared_task
from celery.exceptions import SoftTimeLimitExceeded
from django.conf import settings
from django.core.cache import cache
from urllib.parse import urlparse
import unbound
from... |
__all__ = ['TemporalFusionTransformer']
# This file contain most of the code from
# https://github.com/google-research/google-research/blob/master/tft/libs/tft_model.py
# The TemporalFusionTransformer class has been modified so that it can be used as regular layer and without static,
# categorical, observation and fut... |
import itertools
import logging
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.forms.formsets import formset_factory
from django.h... |
'''
Classes for handling DBContexts for ILP systems.
@author: <NAME> <<EMAIL>>
'''
import re
import itertools
class Converter:
'''
Base class for converters.
'''
def __init__(self, dbcontext):
self.db = dbcontext
class ILPConverter(Converter):
'''
Base class for converting between a... |
import abc
import ast
import json
import re
from urllib3.exceptions import HTTPError
import kubernetes as k8s
import kubernetes.client
from kubernetes.client import CustomObjectsApi
from kubernetes.client import StorageV1Api
from kubernetes.client.rest import ApiException
import pytest
from pytest_bdd import given, wh... |
import itertools
import json
import logging
import time
from pathlib import Path
from typing import Any
from typing import List
from typing import NamedTuple
from typing import Optional
from typing import Union
import cbor2
from cardano_clusterlib import clusterlib
from cardano_node_tests.utils import helpers
from ca... |
import copy
import collections
import json
import os
import warnings
from paddle.dataset.common import md5file
from paddle.utils.download import get_path_from_url
from paddle.io import Dataset
from paddlenlp.utils.env import DATA_HOME
from paddlenlp.transformers.tokenizer_utils import _is_whitespace, _is_control, conv... |
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# The source code in this module was created by <NAME>
# from University Clermont Auvergne, CNRS, SIGMA Clermont, Institut Pascal.
#
# Publi... |
# Status: minor updates by <NAME> to make gcc work
#
# Copyright (C) <NAME> 2002. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to i... |
# coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
#!/usr/bin/env python
# Copyright 2014-2020 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... |
# -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
"""VLAN configuration."""
# Copyright (C) 2015 <NAME>, <NAME> and <NAME>.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with t... |
from __future__ import annotations
from collections import defaultdict
import numpy as np
from typing import TYPE_CHECKING
import numpy as np
from pyNastran.op2.result_objects.table_object import RealTableArray # , ComplexTableArray
from pyNastran.utils.numpy_utils import integer_types
if TYPE_CHECKING: # pragma: no... |
# -*- coding: utf-8 -*-
import warnings
import numpy as np
from scipy.linalg import inv
from scipy.signal import (
cont2discrete, zpk2ss, ss2tf, ss2zpk, tf2ss, tf2zpk, zpk2tf, normalize)
from nengo.synapses import LinearFilter
from nengo.utils.compat import is_integer, is_number
__all__ = [
'sys2ss', 'sys2tf... |
# Copyright 2020 getcarrier.io
#
# 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... |
import copy
import math
import time
from functools import partial
import numpy as np
import tensorflow as tf
from algorithms.agent import AgentLearner, TrainStatus
from algorithms.multi_env import MultiEnv
from algorithms.utils.algo_utils import calculate_gae, EPS, num_env_steps, main_observation, goal_observation
fr... |
from typing import Any, Dict, List, Callable, Optional, Tuple, Union, Iterable, TYPE_CHECKING
from typing_extensions import TypedDict
import sympy as sp
import numpy as np
from pyomo.environ import (
ConcreteModel, Param, Set, Var, Constraint,
)
from sympy import Matrix as Mat
from .system import System3D
from .li... |
# -*- coding: utf-8 -*-
import locale
import subprocess
import psutil
print(locale.getdefaultlocale())
import argparse
import os
import random
import signal
import sys
import time
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from libs.vmsmodify import VMSModifyHandler
... |
"""
This module provides a database with the deltafactor results,
and tools to compute the deltafactor of a pseudopotential.
Client code should use the official API df_database(xc) to access the database.
Example::
db = df_database("PBE")
wien2k = db.get_entry("Si")
print(wien2k.v0, wien2k.b0, wien2k.b1)
"... |
import re
import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.keras import backend_config
from tensorflow.python.keras.optimizer_v2 import optimizer_v2
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import... |
from attr import evolve
import numpy as np
import numpy.testing as npt
from ... import bs2051
from ..gain_calc import GainCalc
from ....fileio.adm.elements import (AudioBlockFormatObjects, ChannelLock, ObjectDivergence,
CartesianZone, PolarZone, ScreenEdgeLock, ObjectPolarPosition, ... |
# coding: utf-8
# Copyright (c) 2020 The MITRE Corporation.
"""
Inferencers to make predictions and analyze data using trained topic models.
"""
import json
import mxnet as mx
import numpy as np
import gluonnlp as nlp
import io
import os
import scipy
import umap
import logging
import pickle
from tmnt.modeling import B... |
# Copyright 2019 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# Copyright 2022 The TensorFlow 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 applica... |
# -*- coding: utf-8 -*-
#
# This file is part of the pyFDA project hosted at https://github.com/chipmuenk/pyfda
#
# Copyright © pyFDA Project Contributors
# Licensed under the terms of the MIT License
# (see file LICENSE in root directory for details)
"""
The ``Plot_Hf`` class constructs the widget to plot the magnitu... |
from __future__ import annotations
import os
import re
import time
import json
import array
import random
import asyncio
import logging
import datetime
import contextlib
import collections
from enum import IntEnum
from dataclasses import dataclass, field
from typing import Any, List, Dict, Optional, Tuple, TypeVar, Ca... |
import datetime
from datetime import timedelta
from urllib.parse import urlencode
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.shortcuts... |
#!/usr/bin/env python
import getopt
import json
import locale
import os
import re
import sys
from urllib import request, parse
import platform
import threading
from .version import __version__
from .util import log, legitimize, sogou_proxy_server
dry_run = False
force = False
player = None
sogou_proxy = None
sogou_e... |
# Created: 2019-02-18
# Copyright (c) 2019-2020, <NAME>
# License: MIT License
from typing import (
TYPE_CHECKING, Iterable, Any, Union, List, Tuple, cast, Optional, Dict,
)
from ezdxf.entitydb import EntitySpace
from ezdxf.lldxf import const
from .base import BaseLayout
if TYPE_CHECKING:
from ezdxf.eztypes im... |
#!/usr/bin/env python3
""" Targeted assay probe design pipeline steps
About: Pipeline of all steps to be taken within targeted probe design.
Authors: <NAME>, <NAME>
Date: 2019-03-22
"""
import sys
import os
import re
import shutil
import random
# Config options:
import tomlkit
# pipeline-app modules
fro... |
#
# Copyright (C) 2020 IBM. All Rights Reserved.
#
# See LICENSE.txt file in the root directory
# of this source tree for licensing information.
#
import random
from math import cos, isnan, pi, sin, sqrt
from typing import Dict, Optional, Tuple
import numpy as np
import portion
import torch
from PIL import Image
imp... |
from bcc import BPF, tcp
import signal
import sys
import os
import json
import ctypes
import time as ti
import hashlib
import time
from socket import inet_ntoa, htonl, ntohs
bpf_code = """
#define VIRTME_DEBUG
#include <uapi/linux/ptrace.h>
#include <net/sock.h>
#include <net/inet_sock.h>
#include <linux/tcp.h>
#i... |
"""K-Means Algorithms Module."""
from abc import abstractmethod
import warnings
from sklearn.base import BaseEstimator, ClusterMixin, TransformerMixin
from sklearn.utils import check_random_state
from sklearn.utils.validation import check_is_fitted
import numpy as np
from ...misc.metrics import pairwise_distance, l... |
import asyncio
import json
import logging
import os
from typing import Optional
import pkgpanda
import ssh.utils
from dcos_installer.constants import (
BOOTSTRAP_DIR,
CHECK_RUNNER_CMD,
CLUSTER_PACKAGES_PATH,
PACKAGE_LIST_DIR,
SERVE_DIR,
SSH_KEY_PATH,
)
from ssh.runner import Node
REMOTE_TEMP_... |
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
"""
rocsalt_system.py
Open source toolkit for creating an OpenMM System_ and ParmEd Structure_ for a receptor and pair of compounds screened in ROCS (<https://www.eyesopen.com/rocs >)
.. _System : http://docs.openmm.org/latest/api-python/generated/simtk.openmm.openmm.System.html.
.. _Structure : https://parmed.github.i... |
import numpy as np
import pickle
import os
def GenerateFeature_interaction_ML(protein_name, working_dir,typ):
if typ == 'pair':
ProEleList = ['C','N','O','S']
LigEleList = ['C','N','O','S','P','F','Cl','Br','I']
elif typ == 'all':
ProEleList = ['C','N','O','S','CN','CO','NO','CNO']
... |
"""
Peasauce - interactive disassembler
Copyright (C) 2012-2017 <NAME>
Licensed using the MIT license.
"""
import logging
from . import util
logger = logging.getLogger("disassembler-65c816")
def IB(v):
""" Convert value to 8 digit binary string. """
return util._n2b(v, padded_length=8)
IF_65c81... |
#%% Utils for Burger's equation
import scipy.io
import numpy as np
import tensorflow as tf
import time
from datetime import datetime
from pyDOE import lhs
import os
import sys
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
from scipy.interpolate import griddata
import matplotlib.gridspec as gridspec
... |
# Copyright 2020 <NAME> (<EMAIL>).
# Copyright 2018 The TensorFlow Authors All Rights Reserved.
"""Data preparation functions."""
import os
import numpy as np
import pickle
from functools import partial
import tensorflow as tf
import igl
import bop_renderer
from bop_toolkit_lib import config as config_bop
from bop_to... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 21 12:01:40 2017
@author: www.github.com/GustavZ
"""
import numpy as np
import tensorflow as tf
import tarfile
import copy
import os
import sys
import time
from skimage import measure
import six.moves.urllib as urllib
from tensorflow.core.framework ... |
from __future__ import division
import numpy as np
from numpy.testing import assert_equal, assert_allclose
import itertools
from abel.tools.vmi import Distributions, harmonics
def test_origin():
"""
Test symbolic origin wrt corresponding numeric form.
"""
# image size
n = 11 # width
m = 20 ... |
import codecs
import os
import re
from collections import OrderedDict
from importlib import util
from string import Template
from subprocess import check_output, CalledProcessError
from py3status.constants import (
CONFIG_FILE_SPECIAL_SECTIONS,
I3S_SINGLE_NAMES,
I3S_MODULE_NAMES,
MAX_NESTING_LEVELS,
... |
from manim_imports_ext import *
from scenes import *
class HeresTheThing(TeacherStudentsScene):
def construct(self):
thumbnail = ImageMobject(
os.path.join(
self.file_writer.output_directory,
self.file_writer.get_default_module_directory(),
os.pa... |
''' Class for defining linear model
Will have an A, B, C, and D matrix for every operating point
u_op, y_op, and x_op
'''
import numpy as np
import scipy as sp
import control as co
import weis.control.mbc.mbc3 as mbc
import matplotlib.pyplot as plt
import re
from itertools import chain
from scipy.io import loadmat
... |
import os
import logging
import sys
from collections import OrderedDict
import datetime
from dateutil.relativedelta import relativedelta
import pandas as pd
import cartosql
import requests
import json
import time
import geopandas as gpd
from concurrent.futures import ThreadPoolExecutor, as_completed
import warnings
war... |
import os
import tkinter as tk
from collections import deque
from PIL import Image, ImageTk
from kanoodlegenius2d.domain import (holes,
orientation)
from kanoodlegenius2d.domain.models import (Noodle,
PositionUnavailableException)
from k... |
from __future__ import print_function
import os
import argparse
import torch
import torch.backends.cudnn as cudnn
from PIL import Image
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as transforms
import numpy as np
import time
from data import cfg_mnet, cfg_re50,cfg_mobilenetv2
fro... |
#!/usr/bin/env python
# Copyright (C) 2012 OpenStack, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
# coding: utf-8
import geocoder
from flask import Flask, render_template, request, url_for, redirect
from flask_googlemaps import GoogleMaps, Map, icons
import math
import pandas as pd
import gmaps
import urllib.request
import numpy
import json
import datetime
from geopy.geocoders import Nominatim
app = Flask(__name__,... |
import argparse
import math
from datetime import datetime
#import h5pyprovider
import numpy as np
import tensorflow as tf
import socket
import importlib
import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(BASE_DIR) # model
sys.path.append(ROOT_... |
# Copyright (c) 2012-2017 The Khronos Group 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 ag... |
"""
PropertySets group common attributes together, each property set is used to control a specific part of the rendering.
PropertySets can be used in different elements of the document.
For example the FramePropertySet is used in paragraphs, tables, cells, etc.
The TextPropertySet can be used for text or in a Paragr... |
import os
import pickle
import random
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from amr_parser import (AMRSemParser, get_formatted_obs_text,
get_verbnet_preds_from_obslist)
from logical_twc import DEFALT_TWC_HOME, EPS, Action2Literal, LogicalTWC
from tq... |
""" Utilities to create parsers, renderers and nodes as well as iterators. Some of the functions lay fairly close on top of the C library.
This means that some care must be taken when it comes to memory management. It is recommended to do any manipulation of the AST
through processors from within the :py:class:`~cmar... |
"""Simple easy instance view grouping instances into collapsible groups.
View has multiselection ability. Groups are defined by `creator_label`
attribute on instance (Group defined by creator).
Each item can be enabled/disabled with their checkbox, whole group
can be enabled/disabled with checkbox on group or
selecti... |
"""Surge tanks.
Unit operations that accept various flow rate profiles and provide
constant or box-shaped profile.
"""
__all__ = ['CSTR', 'TwoAlternatingCSTRs']
__version__ = '0.7.1'
__author__ = '<NAME>'
import numpy as _np
import bio_rtd.core as _core
import bio_rtd.utils as _utils
import bio_rtd.peak_shapes as ... |
import json
import csv
import matplotlib.pyplot as plt
import matplotlib as mpl
import re
import numpy as np
import pandas as pd
from pprint import pprint
import pickle
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pylab as pylab
colors = ['tab:orange', 'tab:red', 'tab:pink', 'tab:brown', 'tab:... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2/23/2019 3:38 PM
# @Author : chinshin
# @FileName: eval.py
from __future__ import unicode_literals
from __future__ import print_function
import os
import sys
import copy
import json
import argparse
import numpy
import pandas as pd
import matplot... |
#!/usr/bin/python
# encoding: utf-8
# Copyright 2016-2017 ProfitBricks GmbH
#
# 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 requ... |
"""Various calculations used for generating the research for medium posts.
Usage:
./medium_posts.py
Author:
<NAME> - 2021-08-30
"""
from typing import List
import pandas as pd
import numpy as np
import datetime
import matplotlib.pyplot as plt
from document_filter import DocumentFilter
from base import running_mean,... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from time import time
import argparse
import json
import sys
import os
import logging
import operator
from copy import copy
from uuid import uuid4
import socket
import re
from redis import Redis
from operator import itemgetter
from pyzabbix import ZabbixAPI
# from IsolateCo... |
"""
A Library that will allow you to create simple and fast DataBase.
This library uses flask as the base and then it creates a simple
flask app using the database provided.
Database allow certain good features to be used. It is constructed in a thread
safe manner. Implementation for Database can also be implemented ... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
------------------------ Copyright Block -----------------------
Prayer Times Calculator improved by Sid-Ali TEIR.
Original used :
praytimes.py: Prayer Times Calculator (ver 2.3)
Copyright (C) 2007-2011 PrayTimes.org
Python Code: <NAME>, <NAME>
Original js Code: <NA... |
# -*- coding: utf-8 -*-
"""
@author: <NAME>
@date: Sun Dec 20 01:58:25 2020
"""
import logging
import random
import numpy as np
import skimage.color
import skimage.io
import skimage.transform
from .core import utils
from .core.common import mold_image
from .core.common import compose_image_meta
# TODO - Can load '... |
"""Checkers game"""
import os
# Display representation of "reachable" squares
PIECE_DISP = {
"wm": " \u26aa ",
"wk": " \u265a ",
"bm": " \u26ab ",
"bk": " \u2654 ",
"": " "
}
# Display representation of "non-reachable" white squares
WH_SQ = "\u2591" * 3
# Display representation of box lines
BOX ... |
import json
import string
import re
from collections import defaultdict
import logging
from django.shortcuts import render_to_response, get_object_or_404
from stripey_app.models import (ManuscriptTranscription, Book, Chapter,
Hand, Verse, MsVerse, get_all_verses,
... |
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from PyQt5.QtWidgets import *
import numpy as np
import cv2
from skimage.util import *
from skimage.segmentation import*
import math
import random
class Paint_CV:
def __init__(self):
... |
import datetime
from operator import getitem
import pickle
import sys
import numpy as np
import pytest
from datashape.coretypes import (
CType,
Categorical,
DataShape,
Date,
DateTime,
Decimal,
Ellipsis,
Fixed,
Map,
Option,
R,
Record,
String,
Time,
TimeDelta,... |
r"""
Various utilities for use with fits files.
----
.. include common links, assuming primary doc root is up one directory
.. include:: ../include/links.rst
"""
import sys
import os
from glob import glob
import traceback
import pickle
import re
import numpy as np
import matplotlib.pyplot as plt
import multiprocessi... |
# This file is part of beets.
# Copyright 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, ... |
from pydap.client import open_url
from datetime import datetime
from calendar import monthrange, month_name
import os
import numpy as np
import pandas as pd
import netCDF4 as nc
import xarray as xr
import time
import pickle
import cdsapi
import math
from Plot import incidence_and_ml_plot
# Interpolation
from scipy.i... |
import cache as CACHE
import datetime
import time
import ast
import tqdm
import asyncio
import asyncpg
import discord
import importlib
import requests
import traceback
from discord.errors import Forbidden
from discord.ext import tasks, commands
from discord.ext.commands.errors import CommandNotFound
from discord.errors... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.