text stringlengths 8.04k 46.5k |
|---|
from bs4 import BeautifulSoup
import urllib.request
from dotenv import load_dotenv
import json
import requests
# import pyperclip
import time
import datetime
import os
import sys
import io
sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding='utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding=... |
import os
from itertools import chain
from statistics import mean
import numpy as np
import pandas as pd
import torch
from torch.utils.data import TensorDataset
class ThymioState:
"""
Object containing all the agent information
:param state_dict
"""
def __init__(self, state_dict):
for k, ... |
"""PISA data container"""
from __future__ import absolute_import, division, print_function
import argparse
from collections.abc import Mapping, Iterable, Sequence
from collections import OrderedDict
import copy
import numpy as np
from pisa import FTYPE
from pisa.core.binning import OneDimBinning, MultiDimBinning
fr... |
# -*- coding: utf-8 -*-
# Copyright 2020 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... |
#!/usr/bin/env python3
from __future__ import print_function
import os
import pysam
import numpy as np
import math
import sys
from scipy import stats
from collections import defaultdict
import pickle,os
__author__ = '<NAME> (<EMAIL>), <NAME> (<EMAIL>), <NAME> (<EMAIL>)'
__version__ = '1.0.3'
__date__ = '23 September 2... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from torchvision.utils import make_grid
from torch.autograd import Variable
from pathlib import Path
from data import denorm
import os
import re
def get_upsample_filters(min_filters, max_filters, upsample_layers):
upsam... |
# -*- coding: utf-8 -*-
"""
Class-based views
-----------------
Group related views into a class for easier management.
"""
from __future__ import unicode_literals
from functools import update_wrapper, wraps
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy.orm.descriptor_props import Syn... |
#!/bin/python3
import yaml
import json
import jinja2
import jsonschema
import re
import argparse
import sys
from collections import OrderedDict
# This schema describes what we expect interface definition files to look like
validator = jsonschema.Draft4Validator(yaml.safe_load("""
definitions:
interface:
type: o... |
#!/usr/bin/env python -u
"""py65mon -- interact with a simulated 6502-based system
Usage: %s [options]
Options:
-h, --help : Show this message
-m, --mpu <device> : Choose which MPU device (default is 6502)
-l, --load <file> : Load a file at address 0
-r, --rom <file> : Load a rom at the to... |
import datetime
import logging
import os
import threading
import time
import tkinter as tk
import tkinter.ttk as ttk
from importlib.metadata import version
from dredge_logger import backup
from dredge_logger import Log
from dredge_logger.config import config
from ttkthemes import ThemedTk
_logger = logging.getLogger(... |
import torch
import torch.nn as nn
import numpy as np
import torch.jit as jit
class MatrixLayer(jit.ScriptModule):
__constants__ = ['input_size', 'output_size']
def __init__(self, input_size, output_size, bias=True, cuda=True):
super(MatrixLayer, self).__init__()
# self.matrix_layer = nn.Par... |
import os
import glob
import torch
import random
import numpy as np
from tqdm import tqdm
import torch.nn as nn
from PIL import Image
from skimage import io
import torch.optim as optim
from torchvision import models
import torch.nn.functional as F
import pydensecrf.densecrf as dcrf
from torchvision import transforms
fr... |
# -*- coding: utf-8 -*-
# Computing Persistent Homology and its histogram
import os,glob
import numpy as np
from tqdm import tqdm
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.neighbors import KernelDensity
from scipy.stats import gaussian_kde
import argparse,json
import cripser
from scipy.ndimage... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#****************************************************************************************************************************************************
# Copyright 2017 NXP
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modifi... |
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
'''
###############################################################################
#
# This code is used to parcellate the cortical surface from dMRI information
# (tractograms in nii.gz files) using the Mutual Nearest Neighbor Condition
#
###############################... |
# -*- coding: utf-8 -*-
r"""
Shuffle product of iterables
The shuffle product of two sequences of lengths `m` and `n` is a
sum over the `\binom{m+n}{n}` ways of interleaving the two sequences.
That could be defined inductively by:
.. MATH::
(a_n)_{n \geqslant 0} \Cup (b_m)_{m \geqslant 0} =
a_0 \cdot \left(... |
##########################################################################
#
# MRC FGU Computational Genomics Group
#
# $Id$
#
# Copyright (C) 2009 <NAME>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Fre... |
#! /usr/bin/python3
import regex as re
import sys
import xml.etree.ElementTree as et
import xml.dom.minidom
COLORS_LIST = [
"silber",
"gold",
"schwarz",
"blau",
"rot",
"grün",
]
COLORS = "|".join(COLORS_LIST)
COLORS_ADJ = {
"silbern" : "silber",
"silberbekleidet" : "silber",
... |
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
#
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
#
# Kubernetes (kubectl) utilities
# Use kubectl instead of the API so we go through the same code path as an end-user
import os
import subprocess
impor... |
from __future__ import unicode_literals
import fiona
import os
import logging
import sys
import urllib
import datetime
from collections import OrderedDict
import cartosql
import zipfile
import requests
import json
# do you want to delete everything currently in the Carto table when you run this script?
CLEAR_TABLE_FI... |
from datetime import datetime
import os
import numpy as np
import json
from copy import deepcopy
import xarray as xr
from sklearn.model_selection import cross_validate, KFold
from sklearn.metrics import make_scorer, mean_squared_error
from sklearn.base import BaseEstimator, RegressorMixin
from sklearn.utils.validation... |
""" Analysis of the content of BioModels
:Author: <NAME> <<EMAIL>>
:Date: 2017-05-31
:Copyright: 2017, Karr Lab
:License: MIT
"""
import bioservices
import ete3
import glob
import datanator.data_source.bio_portal
import libsbml
import os
import sqlalchemy
import sqlalchemy.ext.declarative
import sqlalchemy.orm
import... |
import math
FLAGS_ENABLED = 1 #1 for warning messages, 0 to disable warnings
DISPLAY_OPTIMAL_ONLY = 0 # 1 for displaying optimal cell only
#Vehicle inputs:
motorCount = 4
#Replit test
#example
#Motor input:
motorName = 'U7 V2.0 - KV 420'
motorVoltage = 25
motorMaxCurrent = 47.5
#Energy input:
#Format [power(Watts)... |
from IPy import IP
from pytest import raises
from ..fields import (RPSLIPv4PrefixField, RPSLIPv4PrefixesField, RPSLIPv6PrefixField,
RPSLIPv6PrefixesField, RPSLIPv4AddressRangeField, RPSLASNumberField,
RPSLASBlockField,
RPSLSetNameField, RPSLEmailField, ... |
# This source code is part of the Biotite package and is distributed
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
# information.
__name__ = "biotite.sequence"
__author__ = "<NAME>"
__all__ = ["Location", "Feature", "Annotation", "AnnotatedSequence"]
import numbers
import copy
import sys
from... |
# coding: utf-8
import numpy as np
import pickle
from collections import deque, Counter
import tensorflow as tf
from tensorflow.keras import optimizers
from tensorflow.keras.layers import *
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.optimizers import Adam, RMSprop
import matplotlib.pyp... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""Ciscoのshow ip routeをパースします
2016/04/20 初版
2021/06/28 textfsmを使ってパースするクラスを追加
"""
__author__ = '<NAME>'
__version__ = '0.2'
__date__ = '2021/06/28'
#
# 標準ライブラリのインポート
#
import re
import os
import sys
from typing import Text
import typing
#
# 外部ライブラリのインポート
#
HAS_TEXTFSM = T... |
#This is the list of all the functions for this project. This could change as the package is currently unstable.
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
# Invoke Libraries
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
import pandas as pd
from nltk import pos_tag, word_tokenize, sent_tokenize, p... |
#
# Group Chat Server
#
# Copyright (C) 2019 Internet Real-Time Laboratory
#
# Written by <NAME> <<EMAIL>>
#
import re
import os
import shlex
import types
import time
import json
import sqlite3
import traceback
import pjsua2 as pj
import time
from types import SimpleNamespace
from email.utils import formatdate, par... |
import machine
import struct
import time
from micropython import const
from setting import PORTS_DIGITAL
from utility import say
class SX1590def:
RegInputDisableB = const(0x00)
RegInputDisableA = const(0x01)
RegPullUpB = const(0x06)
RegPullUpA = const(0x07)
RegOpenDrainB = cons... |
#!/usr/bin/env python3
"""
Yandex Transport Monitor proxy service, automates getting data from Yandex.Transport using Selenium Webdriver and
Chromium browser.
"""
# NOTE: This project uses camelCase for function names. While PEP8 recommends using snake_case for these,
# the project in fact implements the "quasi... |
# *************************************************************
#
# 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 y... |
from collections import Counter
import steampi.calendar
from disqualify_vote import filter_out_votes_for_hard_coded_reasons
from extend_igdb import extend_both_igdb_databases
from extend_steamspy import get_release_year_for_problematic_app_id, get_app_name_for_problematic_app_id
from extend_steamspy import load_exten... |
"""
Copyright (c) 2018 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 writing,... |
import cbpro
import os
import time
import traceback
import threading
from decimal import Decimal, ROUND_DOWN, ROUND_UP
from datetime import datetime, timedelta
API_URL = "https://api.pro.coinbase.com"
API_KEY = 'APIKey'
API_SECRET = 'APISecret'
API_PASSPHRASE = '<PASSWORD>Pass<PASSWORD>'
DATA_FILENAME = 'data.cfg'
SET... |
import contextlib
import logging
import os
import sys
import threading
from typing import Iterator
import six
from dbnd._core.constants import (
RunState,
SystemTaskName,
TaskExecutorType,
TaskRunState,
)
from dbnd._core.current import current_task_run
from dbnd._core.errors import DatabandRunError, ... |
# GUI Application automation and testing library
# Copyright (C) 2006-2018 <NAME> and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modific... |
# Copyright 2014 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... |
import os
import itertools
import filecmp
from fontTools.ufoLib import fontInfoAttributesVersion3
from fontParts.world import OpenFont
# ---------
# Directory
# ---------
def diffDirectories(
root1,
root2,
ignorePaths1=None,
ignorePaths2=None,
onlyCompareFontDefaultLayers=True,... |
# -*- coding: utf-8 -*-
"""Contains functions that test for differential expression."""
# pylint: disable=wildcard-import,redefined-builtin,unused-wildcard-import
from __future__ import absolute_import, division, print_function
from builtins import *
# pylint: enable=wildcard-import,redefined-builtin,unused-wildcard-i... |
# -*- coding: utf-8 -*-
"""
Test JSON saving and loading.
@author: <EMAIL>
"""
import agilkia
import jsonpickle # type: ignore
import json
import decimal
import datetime
import xml.etree.ElementTree as ET
from pathlib import Path
import pandas as pd # type: ignore
import numpy.testing as nptest
import unittest
... |
#! /usr/bin/env python3
#
# Copyright (C) 2020 <NAME>
# This file is part of the cq-kit python module.
# 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 withou... |
#!/usr/bin/env python
__author__ = '<NAME>'
__email__ = '<EMAIL>'
__license__ = 'Apache'
__version__ = '0.1'
from datetime import datetime, timedelta
# import time
from trajectory import Trajectory
from itertools import tee, izip
from collections import OrderedDict
from sqlalchemy import Column, ForeignKey, Integer,... |
from dataclasses import dataclass
from lzma import is_check_supported
from PIL import Image, ImageDraw, ImageFilter
from typing import List
from seedsigner.gui.renderer import Renderer
from seedsigner.models.threads import BaseThread
from .screen import ButtonListScreen, WarningScreen
from ..components import (BtcAmo... |
import json
import traceback
from config.app import celery_app, app as flask_app
from tasks.task_scheduler import run_node_task
from utils.constants import REPORT_INDEX, \
NODE_TYPE_HOST, ES_TERMS_AGGR_SIZE, CVE_SCAN_LOGS_INDEX, ES_MAX_CLAUSE, NODE_TYPE_CONTAINER_IMAGE, \
PDF_REPORT_MAX_DOCS
import pandas as ... |
import os
import sys
from glob import glob
from tqdm import tqdm
import numpy as np
import pandas as pd
import SimpleITK as sitk
from torch.utils.data import Dataset, DataLoader
import nibabel
from scipy import ndimage
import time
import torch
import torch.nn as nn
import fire
import time
import pydicom
import sh... |
'''
Script: aggMaxFit.py
For each run, grab the maximum fitness organism at end of run.
'''
import argparse, os, copy, errno, csv, re, sys
import hjson, json
csv.field_size_limit(sys.maxsize)
key_settings = [
"SEED",
"matchbin_metric",
"matchbin_thresh",
"matchbin_regulator",
"TAG_LEN",
"NUM_... |
import os
import sys
import cv2
import matplotlib.pyplot as plt
import numpy as np
from math import cos, sin, sqrt
from scipy.spatial import distance as dist
from imutils.video import FileVideoStream
from imutils.video import VideoStream
from imutils import face_utils
import argparse
import imutils
import time
import d... |
# -*- coding: utf-8 -*-
import os
import glob
import pandas as pd
import numpy as np
from collections import Counter
from graphpype.utils_net import read_Pajek_corres_nodes
from graphpype.utils_dtype_coord import where_in_coords
from graphpype.utils_cor import where_in_labels
from graphpype.utils_mod import read_l... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------------------------
"""
Verify onnx export and transform... |
# coding: utf-8
# # Execute this notebook first, after execute the notebook track_improved
# In[1]:
from utils.definitions import ROOT_DIR
filepath = ROOT_DIR+'/data/original/'
# file path
artist_csv = "artists.csv"
track_csv = "tracks.csv"
artist_improved_intermediate= "tracks_improved_intermediate.csv" # generated... |
"""
TABLEFRAME.py
Data wrangling module
written by <NAME> and Dr.<NAME>
"""
import json
import time
import joblib
import string
import random
import logging
import tempfile
import numpy as np
import pandas as pd
from urllib import parse
from datetime import datetime
from sklearn import svm
from sklearn import tree
fr... |
#!/usr/bin/env python
# The MIT License (MIT)
#
# Copyright (c) 2015 <NAME> <<EMAIL>>
#
# 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 ... |
#!/usr/bin/env python
# Copyright (c) 2021 FrostBit Software Lab
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>
import glob
import os
import sys
try:
sys.path.append(glob.glob('../carla/dist/carla-*%d.%d-%s.egg' % (
sys.version_info.ma... |
"""
ASSUMPTIONS
- this tool created to bump versions, so if it can't do that it will exit with
return code 1, meaning failure. This is so it can be used in CI/CD tooling
OVERVIEW
- [x] parse tag spec and compare with latest tag
- [x] bump the version number
- [x] write changelog
- [x] append to existing changelog f... |
# Copyright 2017 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://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... |
from scipy import misc
import tensorflow as tf
import align.detect_face
import matplotlib.pyplot as plt
import numpy as np
minsize = 20 # minimum size of face
threshold = [0.6, 0.7, 0.7] # three steps's threshold
factor = 0.709 # scale factor
gpu_memory_fraction = 1.0
# function pick = nms(boxes,thresho... |
# Project Title: Present and Future Value Calculator for Engineering Decision Using Python
# By: Aresgado, <NAME>
# <NAME>
# <NAME>
#Tkinter is the standard GUI library for Python. Python when combined with Tkinter provides a fast and easy way to create GUI applications.
#Tkinter provides a powerful ob... |
#!/usr/bin/env python
# vim: set fileencoding=<utf-8> :
# Copyright 2018-2020 <NAME> and <NAME>
# universal
import os
import sys
# additional
import numpy as np
import subprocess
from collections import defaultdict
import scipy.optimize
from scipy.sparse import coo_matrix, bmat, find
# required from v2.1.1 onwards (n... |
''' Automate populating element properties for QUAD4M analyses
DESCRIPTION:
This module contains functions that help populate element properties for QUAD4M
analysis, generally adding columns to the dataframe "elems" that then gets
exported to a ".q4r" file.
'''
import llgeo.props_nonlinear.darendeli_2011 as q4m_dara... |
import sys
import math
import os
import time
import random
import copy
# --------------------
# OBJ : operations
# DESC: Dictionary object in which the keys are a string expression and the item is a lambda function.
# --------------------
operations = {
"const": lambda p: p[0],
"add" : lambda p: p[0].evaluate() + p... |
import matplotlib as mpl
#mpl.use('Agg')
import matplotlib.pyplot as plt
import random
import gym
import torch
from torch.optim import Adam
import numpy as np
import os
import math
import pickle
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvis... |
#!/usr/bin/env python3
import sys
import re
import argparse
def eprint(*s):
print(*s,file=sys.stdout)
class Operation:
def __init__(self, s, patterns=[]):
if not patterns:
self.build_patterns(patterns)
for p in patterns:
m = re.match(p, s)
if m: break
self.op = None... |
"""This module contains utility classes and functions."""
import enum
import os
import typing as t
import warnings
from builtins import print
import numpy as np
import pymia.data.conversion as conversion
import pymia.filtering.filter as fltr
import pymia.evaluation.evaluator as eval_
import pymia.evaluation.metric as ... |
# A mgpcg + reflection enhanced version for https://github.com/taichi-dev/taichi/blob/master/examples/simulation/stable_fluid.py
# By @<NAME> @<NAME>
import argparse
import numpy as np
import taichi as ti
class TexPair:
def __init__(self, cur, nxt):
self.cur = cur
self.nxt = nxt
def swap(s... |
# -*- coding: utf-8 -*-
import os
import time
import numpy as np
from pathlib import Path
import h5py
from tqdm import tqdm
class H5DataSet:
"""
Represents an abstract HDF5 dataset.
This class allows the user to read headers and sensor data from hdf5 files
into numpy arrays.
Input params:
""... |
import os
from subprocess import call
import fortranformat
import numpy as np
from rdkit import Chem
from fragresp.aux_progs import ante_exe
from fragresp.aux_progs import respgen_exe
from fragresp.aux_progs import espgen_exe
from fragresp.aux_progs import resp_exe
from fragresp.utils import cat_esp
from fragresp.util... |
#!/usr/bin/env python3
# Script to print pictures using the NanoLab Microcontroller
# Microcontroller Model: Micos 1860SMC Basic
# Made 2019, <NAME>
# sunyudong [at] outlook [dot] sg
# github.com/sunjerry019/photonLauncher
from PIL import Image
# Pillow reqs https://pillow.readthedocs.io/en/5.1.x/installation.html
# ... |
import glob
import math
import os
import shutil
import subprocess
import sys
from multiprocessing.dummy import Pool as ThreadPool
from sys import platform
from zipfile import ZipFile
import cv2
from torchvision import datasets, transforms
from base import BaseDataLoader
class CatDataLoader(BaseDataLoader):
@pro... |
import os
def abinitSubparser(subparsers):
# --------------------------------------------------------------------------
# Abinit
# --------------------------------------------------------------------------
subparser = subparsers.add_parser("abinit", help="using abinit as calculator")
gp = ... |
#!/usr/bin/env python
"""Geoname Annotator"""
from __future__ import absolute_import
import math
import re
import sqlite3
from collections import defaultdict
from .annotator import Annotator, AnnoTier, AnnoSpan
from .ngram_annotator import NgramAnnotator
from .ne_annotator import NEAnnotator
from geopy.distance import... |
# -*- coding: utf-8 -*-
import datetime as dt
import pydash as _
from . import fixtures
from .fixtures import parametrize
today = dt.date.today()
@parametrize('case,expected', [
(({'name': 'fred'}, {'employer': 'slate'}),
{'name': 'fred', 'employer': 'slate'}),
(({'name': 'fred'}, {'employer': 'slat... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#########################################################################
##### Delta Autonomy #####
##### Written By: <NAME> #####
##### Date: 09/09/19 ... |
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 25 20:46:27 2021
@author: Lukas
"""
# imports
import numpy as np
import scipy.optimize as opt
import numpy.linalg as lina
from scipy.constants import speed_of_light
from .materials import Material
import matplotlib.pyplot as plt
import sys
# ===========================... |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from tensorflow.keras.applications.inception_v3 import InceptionV3
from tensorflow.keras.models import Model
from tensorflow.keras.preprocessing import image
from tensorflow.keras.preprocessing import sequence
from deprecated import deprecated
import os
import numpy as np
f... |
#!/usr/bin/python
"""
Create a structured pathways file from the MetaCyc flat pathways file (pathways.dat)
Dependencies: MetaCyc flat files
To Run:
$ ./create_metacyc_structured_pathways_database.py --input pathways.dat --output metacyc_pathways.structured
There are a variety of different pathway structures to pro... |
from datetime import datetime
from enum import Enum
from functools import reduce, wraps
import inspect
from json.decoder import JSONDecodeError
from math import floor
import os
import re
from typing import Any, Callable, Dict, List, Optional, Tuple, TYPE_CHECKING, TypeVar, Union
import warnings
import pandas as pd
imp... |
import json
from queue import Queue
from threading import Thread
from uuid import uuid4
import logging
import tornado.escape
import tornado
import tornado.web
from tornado.options import options, define
import tornado.httpserver
import tornado.ioloop
import pika.adapters.tornado_connection
from pyasynch.encoder impo... |
"""
Base support for defining codeGen templates in python.
"""
import re
import Studio
from PythonSnippet.StudioProject import *
from PythonSnippet.PropertyMap import PropertyMap
import inspect
##Global variables for generation cycle. Initialize just so pydev can do completeion
#: Global context
CONTEXT = None
#... |
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
import glob
import cmath
import tempfile
import os
import sys
import unittest
import shutil
import six
from soma import aims
from soma.aims import soma
import numpy as np
import glob
from soma.aims.volumetools import c... |
"""
Author: Ruben
Uptated by <NAME> 07/10/2020. Master Thesis 2020 - metabolic engineering pipeline.
Modifications to the functions RunOptknock, evaluateKO and PrintResults are indicated with
in line comments.
Updated by <NAME> 05/04/18. Master Thesis 2018- Metabolic modelling of Actinobacteria
Script to run Optknock... |
"""Implementation of set managers for prototype set models.
Copyright by <NAME>
Released under the MIT license - see LICENSE file for details
"""
from abc import ABCMeta, abstractmethod
import numpy as np
import scipy.sparse as sparse
from scipy.sparse.csgraph import connected_components
from sklearn.metr... |
import warnings
import numpy as np
import numpy.linalg as la
from numpy.random import Generator, PCG64
from modpy.optimize._optim_util import OptimizeResult, OptimizePath, _function, _chk_callable
from modpy.optimize._constraints import _prepare_constraints
ID_INFEASIBLE = -12
ID_MAX_SIGMA = -11
ID_TOL_... |
# -*- coding: utf-8 -*-
# Copyright 2004-2007 <NAME>, <NAME>, <NAME>
# 2009-2010 <NAME>
# 2012-2013 <NAME>
# 2009-2014 <NAME>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free... |
# spese/views.py
''' app spese views:
- toggle(id), change amount sign
- add, create new expense
- transfer_funds, create new transfer fund
- index, list all expenses summary
- detail(id), show expense detail
- change(id), change expense
- delete(id), ... |
"""Unit-test for stmetrics."""
def test_getmetrics():
import numpy
import stmetrics
series = numpy.array([0.157327502966,0.168894290924,0.141409546137,
0.113800831139,0.0922891944647,0.0747280195355,
0.0537555813789,0.0660935789347,0.0770644843578,
0.07... |
import re
from fractions import Fraction
from decimal import Decimal
from abc import ABCMeta, abstractmethod, abstractproperty
from time import localtime, struct_time, strftime, gmtime
from calendar import timegm
from math import log, log10, sin, cos, acos, radians, pi
import sys
from wellpapp._util import _uni, _enc,... |
from dictlearn.config_registry import ConfigRegistry
lm_config_registry = ConfigRegistry()
lm_config_registry.set_root_config({
# data
'data_path': 'onebillionword/',
'dict_path' : "",
'vocab_path': "",
'dict_vocab_path': "",
'layout' : 'standard',
'num_input_words' : 10000,
'def_num_in... |
# -*- coding: utf-8 -*-
"""Support for DLNA DMR (Device Media Renderer)."""
import asyncio
import functools
import logging
import re
import urllib.parse
import xml.etree.ElementTree as ET
from datetime import datetime
from datetime import timedelta
import aiohttp
import async_timeout
import voluptuous as vol
import ... |
# encoding: utf-8
# author: <NAME>
# email: <EMAIL>
import audio
import gc
import mfeats
# import modpybass as pybass
import numpy
import os
import sys
import threading
import time
import wx
from macroboxlib import GetPreference
from macroboxlib import ListBoxColumn
from macroboxlib import MakeMusicFileItem
from m... |
# Copyright (c) 2015 <NAME>
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import logging
import time
import calendar
from contractvmd import config, dapp
from contractvmd.proto import Protocol
from contractvmd.chain.message imp... |
# This file is part of GridCal.
#
# GridCal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GridCal is distributed in the hope that... |
#!/usr/bin/env python
# -*- coding: utf8 -*-
# My imports
from __future__ import division, print_function
import argparse
import os
import urllib
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import scipy.interpolate as sci
from astropy.io import fits
from astropy.modeling import fitting, mode... |
# This implemented model of EvoRecSys has been designed as a web-based system. This file, which is a minimal endpoint,
# controls the full workflow of the system.
# All necessary libraries and imports from other files.
from src.collaborativefiltering.CollaborativeFiltering import CollaborativeFiltering
from src.genet... |
# qt5模块
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtCore import *
# 自定义模块
import mainpage
import addpage
import gridlayout
import editpage
import pinyintool
# 内置模块
import sys
import requests, base64, json
import ... |
"""
send a gRPC command that has streaming results
capture the results in the db as StoredResponse objects
"""
import copy
import uuid
from random import random
import math
import numpy as np
from django.conf import settings
from django.http import JsonResponse
from tworaven_apps.utils.static_keys import KEY_SUCCESS... |
import logging
import os
from datetime import datetime
import time
from src.models import Dbentity, Referencedbentity, Source, Journal, \
Referenceauthor, ReferenceUrl, Referencetype, \
ReferenceRelation, Referencedocument
from scripts.loading.database_session import get_s... |
#!/usr/bin/python
#
# Copyright 2018 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 ag... |
"""
Defines celery tasks for deployment (e.g.: create, undeploy, wire, unwire)
"""
import copy
from httplib import HTTPException
import socket
import logging
import urllib2
from fabric.exceptions import NetworkError
from fleet.client.fleet_fabric import FleetExecutionException
from paramiko import SSHException
import s... |
"""
#####################################################################################################
This module is for comparing mutations between strains and determining strain lineages
* find identical strains
* find new mutations (mutations that weren't in the parent strain)
* find 'lost' mutations (mutation... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.