content
stringlengths
5
1.05M
import argparse import pickle import sys from collections import Counter from operator import itemgetter import matplotlib import matplotlib.pyplot as plt import squarify # pip install squarify (algorithm for treemap) # Create a dataset: from parse_analyzer import analyze from utils import ropen_file plt.rcParams.u...
import os import unittest from conans.model.info import ConanInfo from conans.model.ref import ConanFileReference, PackageReference from conans.paths import CONANINFO from conans.test.utils.conanfile import TestConanFile from conans.test.utils.tools import TestClient from conans.util.files import load class PackageI...
""" ============================ Plotting with generated data ============================ This example illustrates basic plotting functionality using generated data. """ from matplotlib import pyplot as plt from upsetplot import generate_data, plot example = generate_data(aggregated=True) print(example) plot(examp...
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-08-17 15:00 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('company', '0062_collaboratorinvite_uuid'), ] operations = [ migrations.RunPython( ...
#!/usr/bin/env python3 # In Python 3 quotes without a prefix is a string, a unicode string. # So, str here means unicode str. print("Unicode by default.") print(type("Hello")) # str print(type("\u2603")) # str, stores code points. # You have to instead tell Python that you want a Byte String if that is # what you w...
import warnings import numpy as np from nengo.base import NengoObject, NengoObjectParam, ObjView from nengo.dists import DistOrArrayParam, Distribution from nengo.ensemble import Ensemble, Neurons from nengo.exceptions import ValidationError from nengo.learning_rules import LearningRuleType, LearningRuleTypeParam fro...
import json from chivideo.streams import * class CacheStream(DataStream): def __init__(self, name): super().__init__(name) self.cache = [] self.min_frame = 0 self.keep_all = False self.operator = None def set_op(self, operator): self.operator = operator def...
from oauthlib.oauth2.rfc6749.errors import OAuth2Error class MalformedResponsePushCodeError(OAuth2Error): """ Error for the case of a malformed auth push code. """ error = 'malformed_response_push_code'
import pandas as pd from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import LabelEncoder from prepare import PrepareData class PrepareDataWang(PrepareData): def __init__(self): PrepareData.__init__(self) def get_data(self): soy_file = pd.read_csv('dataset/yield.csv')...
# -*- coding: UTF-8 -*- from PySide2 import QtCore, QtWidgets def isShiftModifier(): #Shift 키가 눌렸다면 True 반환 modifiers = QtWidgets.QApplication.keyboardModifiers() return modifiers == QtCore.Qt.ShiftModifier
class LexerError(Exception): def __init__(self, line, message, character): """ Lexer Error constructor :param line: line that the error occurs in the plain text (integer) :param message: error message (string) :param character: character that raised the error (string) ...
import logging import traceback from mopidy import core import pykka from .gpio_input_manager import GPIOManager from .main_menu import MainMenu from .tts import TTS logger = logging.getLogger(__name__) class TtsGpioOpi(pykka.ThreadingActor, core.CoreListener): def __init__(self, config, core): super...
from typing import List from operator import attrgetter class Solution: class P: def __init__(self, score: int, age: int): self.score = score self.age = age self.allScore = score def bestTeamScore(self, scores: List[int], ages: List[int]) -> int: pAry: List[...
""" Signal Summary """ import podpac from collections import OrderedDict import traitlets as tl import numpy as np import xarray as xr import scipy.signal from podpac.core.settings import settings from podpac.core.coordinates import Coordinates, UniformCoordinates1d from podpac.core.coordinates import add_coord from...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .common import EchoFactory, Request, BaseUnitTest HTTP_METHODS = ["OPTIONS","HEAD","GET","POST","PUT","DELETE"] class ProtocolUnitTest(BaseUnitTest): methods = ["OPTIONS"] def test_405(self): methods = list(set(HTTP_METHODS).difference(set(self....
# reads file and separates lines into tuples def readInfo(file): list1 = [] tupleList = [] for line in file: if line.startswith('name,'): pass else: info = line.split(',') for i in info: i = i.strip() list1.append(i) ...
""" byceps.permissions.consent ~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from ..util.authorization import create_permission_enum ConsentPermission = create_permission_enum( 'consent', [ 'administrate', ], )
from ._SmachContainerInitialStatusCmd import * from ._SmachContainerStatus import * from ._SmachContainerStructure import *
# Copyright 2021 99cloud # # 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, soft...
from src.asana import helpers as asana_helpers from test.impl.builders import builder, build from test.impl.base_test_case_class import BaseClass from functools import reduce class TestGetLinkedTaskIds(BaseClass): def test_gets_many_task_ids(self): task_ids = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]...
""" Adapted from: https://pypi.org/project/pydeck/ This demo shows how to resize the map using the `style` prop. """ import os import dash import dash_deck import dash_html_components as html import pydeck as pdk import pandas as pd mapbox_api_token = os.getenv("MAPBOX_ACCESS_TOKEN") # 2014 locations of car accide...
""" Copyright 2019 Samsung SDS 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...
# Copyright 2021 Sony Semiconductors Israel, 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 b...
import os import cv2 from utils.blur_utils import * # blur functions import torch import numpy as np def fill_noise(x, noise_type): """Fills tensor `x` with noise of type `noise_type`.""" if noise_type == 'u': x.uniform_() elif noise_type == 'n': x.normal_() else: assert False...
# std import logging from typing import Optional # project from src.notifier import Event, EventService, EventType, EventPriority from . import HarvesterConditionChecker from ...parsers.harvester_activity_parser import HarvesterActivityMessage class TimeSinceLastFarmEvent(HarvesterConditionChecker): """Check tha...
#FIXME exceptions #FIXME serialization class TBranch(object): def __init__(self, model, leafID, name = None): self.model = model self._ID = GUID() self._leafID = leafID self._rootID = None self._name = name self.model.branches.register(self._ID, self) if self...
import os import progressbar as pb import sys from datetime import datetime as dt from urllib.request import urlretrieve #### PACKAGE IMPORTS ########################################################### from politeness.helpers import get_elapsed THIS_DIR = os.path.dirname(os.path.realpath(__file__)) WIKI_JSON = THIS_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from ..models import Sponsor from django import template register = template.Library() @register.inclusion_tag('sponsors/sponsors_tag.html') def show_sponsors(sponsor_type=None): if sponsor_type: types_names = sponsor_type.split(',') ...
from .customrecomendationvalidator import *
import sys import pygame from pygame.sprite import Group from block import Block from invader import Invader from life import Life from player_shot import PlayerShot from invader_shot import InvaderShot from text import Text from random import randint def check_events(settings, screen, player, player_shots): """Ch...
"""CaRT PiP Installer""" from setuptools import setup, find_packages from cart import cart setup( name='cart', version='%s.%s.%s' % (cart.__build_major__, cart.__build_minor__, cart.__build_micro__), description='CaRT Neutering format', long_descri...
import torch import torch.nn as nn import torch.nn.functional as F from transformers.models.bert.modeling_bert import BertPooler from pyabsa.network.sa_encoder import Encoder from ..layers.dynamic_rnn import DynamicLSTM class Absolute_Position_Embedding(nn.Module): def __init__(self, opt, size=None, mo...
""" ADD WHATEVER CODE YOU NEED TO DO HERE TO DECRYPT CREDENTIALS FOR USE OF YOUR BOT! """ def get_credentials(): # Here is a KMS example: (uncomment to make work) # return kms_decrypt() # For Docker, encryption is assumed to be happening outside of this, and the secrets # are instead being passed in ...
from .unet import UNet from .transunet import TransUNet def build_model_helper(model_name, model_cfg): return eval(f'{model_name}(model_cfg)')
import importlib import torch from option import args if __name__ == "__main__": args.model_name = 'EDSR' args.angRes_in = 5 args.scale_factor = 4 device = torch.device(args.device) if 'cuda' in args.device: torch.cuda.set_device(device) MODEL_PATH = args.model_name MODEL = impor...
# # Copyright (c) 2008-2016 Citrix 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
f=open("File.txt",'r') # reading tab seprated txt file p=open("Generated.txt",'w') f.readline() #avoiding headings identity = f.readline().strip('\n') code=1 while identity: split_identity = identity.split("\t") #details coder = split_identity[0] name = split_identity[1] email = split_identity[3] #DONT FORGET ...
#!/usr/bin/python # delays.py: return JSON of the current average delays # Copyright 2011 Matt Conway # 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...
from rest_framework import viewsets from hypothesis.models import ( Vector, Vector3D, Interaction, InteractionPoint, ProteinResidue, TargetResidue, ) from hypothesis.serializers import ( VectorSerializer, Vector3DSerializer, InteractionSerializer, InteractionPointSerializer, ...
# Try to import the classes from the python files in this directory if __name__ == 'tests': import os, re filenames_list = os.listdir(os.path.dirname(__file__)) for filename in filenames_list: if not re.match("__init__\.py",filename) and re.match(".+\.py",filename): cmd = "from .{0} impo...
from tests.config import Config
# Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z" _version_major = 0 _version_minor = 1 _version_micro = '' # use '' for first of series, number for 1 and above _version_extra = 'dev' # _version_extra = '' # Uncomment this for full releases # Construct full version string from these. _ver ...
# This sample tests basic type narrowing behavior for # the isinstance call. from typing import Any, List, Literal, Optional, Type, TypedDict, Union def func1(x: Union[List[str], int]): if isinstance(x, list): t1: Literal["List[str]"] = reveal_type(x) else: t2: Literal["int"] = reveal_type(x)...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from chatbot.config import Config db = SQLAlchemy() migrate = Migrate(db) def create_app(config_class = Config): app = Flask(__name__,static_folder="../frontend_bot/build/static",template_folder="../frontend_bot/b...
from random import random class Luminati: def __init__(self, username, password, port=22225, country=None, protocol="http"): if not (username and password): raise Exception("invalid params", username, password) self._username = username self._password = password self._p...
import numpy as np def sample_features_init(numObj,gamma0): #function F = sample_features_init(numObj,gamma0) F[0,:np.random.poisson(gamma0)] = 1; if np.sum(F[0,:]) == 0: F[0,0] = 1; featureCounts = np.sum(F,axis=0) posInds = np.nonzero(np.sum(F,axis=0)>0); Kz = posInds[-1]; for ii in range(1,n...
from typing import List from to_python.core.filter import FilterAbstract from to_python.filters.collect_files import FilterCollectDumpFiles from to_python.filters.data_list.doc import FilterParseDocs from to_python.filters.data_list.init import FilterInitInternalList from to_python.filters.data_list.oop import FilterP...
import unittest from discogs_client import Client from discogs_client.tests import DiscogsClientTestCase from discogs_client.exceptions import ConfigurationError, HTTPError from datetime import datetime class CoreTestCase(DiscogsClientTestCase): def test_user_agent(self): """User-Agent should be properly ...
""" defines: edges = free_edges(model, eids=None) edges = non_paired_edges(model, eids=None) """ from __future__ import annotations from collections import defaultdict from typing import Tuple, List, Optional, TYPE_CHECKING if TYPE_CHECKING: # pragma: no cover from pyNastran.bdf.bdf import BDF def free_e...
from utils.managers.manager import Manager from utils import logger_utils import os class TemplateManager(Manager): ROOT_PATH = logger_utils.ROOT_PATH + "GeneratorAPI\\templates\\" TEMPLATE_PATHS = { "Car Simulator": "{}{}\\".format(ROOT_PATH, "car_simulator") } TEMPLATE_EXTENSION = ".py.tem...
import torch def apply_drop_path(x, drop_path_keep_prob, layer_id, num_layers, step, steps): """NAO way of dropout path. based on layer id and total number of layers. """ layer_ratio = float(layer_id+1) / (num_layers) drop_path_keep_prob = 1.0 - layer_ratio * (1.0 - drop_path_keep_prob) step_ratio =...
import unittest import numpy as np from numpy.testing import assert_almost_equal import openmdao.api as om from openmdao.utils.assert_utils import assert_check_partials from dymos.transcriptions.common import TimeComp, PolynomialControlGroup from dymos.transcriptions.grid_data import GridData from dymos.phase.options...
""" Faça um algoritmo que recebe uma lista encadeada de números inteiros e retorna uma lista sem repetições, ou seja, uma lista onde cada número apareça apenas uma vez. Exemplo: 12, 5, -7, 8, 5, 9, 12, 1, 8 ®: 12, 5, -7, 8, 9, 1 """ lista = [12, 5, -7, 8, 5, 9, 12, 1, 8] cont = 0 saida = [] while cont < len(lista):...
from .ModelHelper import ModelHelper from .RelationshipHelper import RelationshipHelper from .PropertyHelper import PropertyHelper from .TwinHelper import TwinHelper from .QueryHelper import QueryHelper from .DeployHelper import DeployHelper
import json import os import sys import math import time import random random.seed(1234) import numpy as np np.random.seed(1234) from pathlib import Path import argparse import pickle import ipdb import tensorflow as tf #tf.set_random_seed(1234) from utils import * from multiprocessing import Pool from tqdm import tqdm...
import unittest import os import tempfile from flask import Flask, make_response, redirect, url_for, request from core import sqliteAdminBlueprint import sqlite3 from functools import wraps db_file = tempfile.mkstemp() class flask_test_app: """ basic app setup """ app = Flask(__name__) @app.route('/') def inde...
"""@ingroup vigilance @file Contains functionality for reading Vigilance configurations. These configurations provide a simple format through which constraints can be applied to coverage reports. """ import logging from abc import ABCMeta, abstractmethod import six from vigilance.constraint import ConstraintSet @six....
# To get toy dataset use: # $ wget https://raw.githubusercontent.com/jbrownlee/Datasets/master/pima-indians-diabetes.data.csv import numpy as np import pandas as pd from tpot import TPOTClassifier, TPOTRegressor #scikit-learn package (https://pypi.org/project/scikit-learn) from sklearn.metrics import accuracy_score...
import torch from torch import Tensor from torch import nn from typing import Union, Tuple, List, Iterable, Dict import os import json import torch.nn.functional as F from sentence_transformers.models.AttentionPooler import ScaledDotProductAttention class CrossAttentionPooling(nn.Module): """ Pool either the...
import numpy as np import pandas as pd import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String, Float, Date, Numeric from flask...
import numpy as np def merge_patches(patch, coordinates, full_output): """ This function merges the patch into the full output image Overlapping values are resolved by taking the max. Parameters ---------- patch: numpy matrix of size [#classes x crop_size x crop_size] a patch from the...
import sys non_bmp_map = dict.fromkeys(range(0x10000, sys.maxunicode + 1), 0xfffd) filename = "2.txt" search = "妹" with open("2.txt",encoding="utf8") as file: lines = [] for line in file: if line[0].isdigit(): l = next(file) lines.append( (line[-12:],l,) ) tql = [it...
import time import io def parse_timestamp(t): """Parses a string containing a timestamp. Args: t (str): A string containing a timestamp. Returns: time.struct_time: A timestamp. """ if t is None or t == '0000-00-00T00:00:00Z': return time.struct_time((0, 0, 0, 0, 0, 0, 0, ...
"""classes for pytorch machine learning models in opensoundscape For tutorials, see notebooks on opensoundscape.org """ # originally based on zhmiao's BirdMultiLabel import os import numpy as np from datetime import datetime import pandas as pd import numpy as np from pathlib import Path from collections import Order...
#Generate Dataset for users import os import json from pathlib import Path import platform dir_path = os.path.dirname(os.path.realpath(__file__)) root = Path(dir_path) json_file = root / "input" / "intents.json" def checkOS(): return platform.system() def clearScreen(): sys = checkOS() if(sys == 'Windows...
import sys from typing import List X = Y = 10 def convert_input(data: List[str]) -> List[List[int]]: return [[int(char) for char in line] for line in data] def increase_energy_level(data: List[List[int]]): for x in range(X): for y in range(Y): data[x][y] += 1 def process_flashes(data:...
import os, csv, time import glob def write_list_file(listfile, jpg_file): f = open(listfile, 'w') wd = os.getcwd() for filename in glob.glob("{}/JPEGImages/{}".format(wd, jpg_file)): print(filename) f.write(filename+"\n") f.close() write_list_file('train.txt', '[0-5]*.jpg') write_li...
from os import path, mkdir, remove from shutil import copyfile, move, copytree from editor import GetBrsarPath, GetGeckoPath, GetMainDolPath, GetMessagePath, GetSongNames, LoadSetting, SavePath, ProgramPath import editor from editor import RecordType, LoadSetting, RecordType, GetMainDolPath, Songs, LoadMidi, PatchBrsar...
from itertools import product from unittest import TestCase, main from battle_tested.beta.ammo import standard ''' This code converts user provided type combos to combos that can be split out for a fuzz plan. ''' def has_nested_combos(input_types): ''' returns True if any object in the type collection is n...
from x2df import x2df from x2df import logfuns def test_main(): assert logfuns.setupLogging() == 0 # first pass for logging setup assert logfuns.setupLogging() == -1 # second pass: skipped bc already set up assert x2df.main(["test", "-v"]) == 0 assert x2df.main(["test", "-?"]) == 0
# -*- coding: utf-8 -*- """Functions for use in testing :mod:`~utilipy.utils.functools`.""" __author__ = "Nathaniel Starkman" __all__ = [ # args "func_x", "func_xy", "func_xy_annotate", # defargs "func_a", "func_ab", "func_ab_annotate", # *args "func_args", "func_args_anno...
from imutils import paths import face_recognition import pickle import cv2 import os import face_recognition import imutils import pickle import time import cv2 import os from matplotlib import pyplot as plt import pandas as pd #get paths of each file in folder named Images #Images here contains my data(folders of va...
import telegram class TelegramLog: def __init__(self, token, group_id): self.bot = telegram.Bot(token=token) self.group = group_id def log(self, text): self.bot.send_message(self.group, text) def send_patch(self, patch): self.bot.send_document(self.group, patch.file.open...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' """ The script looks for in a running Notepad ++ toolbar and closes them. Скрипт ищет у запущенного Notepad++ панели инструментов и закрывает их. """ import win32gui import win32con def all_ok(hwnd, param): text = win32gui.GetWindowText(...
# question => https://www.codechef.com/LP2TO301/problems/INDIPERM t=int(input()) for i in range(t): n = int(input()) for x in range(1,n): print(x+1,end=" ") print(1,end="\n")
import pynvml import time import os import threading import psutil from . import jsonlfile from numbers import Number from pathlib import Path EVENTS_FNAME = Path("events.jsonl") def gpu_in_use_by_this_process(gpu_handle): if not psutil: return False base_process = psutil.Process().parent() or psuti...
from glob import glob import sys import numpy as np from seisflows.tools import unix from seisflows.tools.array import loadnpy, savenpy from seisflows.tools.array import mesh2grid, grid2mesh, stack from seisflows.tools.tools import call, exists from seisflows.config import ParameterError, custom_import from seisflow...
#!/usr/bin/env python3 """ Contact tracing beacon format """ __copyright__ = """ Copyright 2020 Diomidis Spinellis 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://w...
import sys sys.path.append('/home/ian/code/github') import os import gensim import jieba import numpy as np import pandas as pd from scipy.linalg import norm from utils.pymongo_wrapper import pymongo_wrapper as pmw from utils.pickle_wrapper import pickle_wrapper as pkw from utils.nlp.nlp_wrapper import nlp_wrapper as n...
from sb3_contrib import MaskablePPO from sapai_gym import SuperAutoPetsEnv from sb3_contrib.common.maskable.evaluation import evaluate_policy from sb3_contrib.common.maskable.utils import get_action_masks from sapai_gym.opponent_gen.opponent_generators import random_opp_generator, biggest_numbers_horizontal_opp_generat...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
# -*- coding: utf-8 -*- """ Created on Thu Aug 30 10:30:28 2018 @author: suvod """ from __future__ import division import sys sys.path.append("..") from api import git_access,api_access from git_log import git2repo,buggy_commit import json import pandas as pd import numpy as np import matplotlib.pyplot as plt import m...
import os import sys import pytest import inspect from faker import Faker current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) # add current directory into import path sys.path.append(current_dir + "/../") sys.path.append(current_dir + "/../../") import src import datetime from util...
# -*- coding: utf-8 -*- # @Author: ahpalmerUNR # @Date: 2021-01-19 15:34:08 # @Last Modified by: ahpalmerUNR # @Last Modified time: 2021-05-29 22:32:55 import MouthMusicModel as mmodel import mouthFuncs as mfunc import torch import time import cv2 as cv import numpy as np import keyboard import tkinter as tk fro...
# The MIT License (MIT) # Copyright (c) 2018 Massachusetts Institute of Technology # # Authors: Cody Rude # This software is part of the NSF DIBBS Project "An Infrastructure for # Computer Aided Discovery in Geoscience" (PI: V. Pankratius) and # NASA AIST Project "Computer-Aided Discovery of Earth Surface # Deformation...
import os import shutil import stat import subprocess import tempfile import github def synchronize( manifest: str, token: str = None, repository: str = "synchronization-demo-public", organization: str = "pyansys", protos_path: str = r"ansys\api\test\v0", dry_run: bool = True, ): """Synch...
import sys import json import numpy as np # Command line arguments: input files # First input is observed values with some subset # Second argument is expected values of whole set INPUT_FILE_1 = sys.argv[1] INPUT_FILE_2 = sys.argv[2] RANDOM_SUBSET_AMOUNT = int(sys.argv[3]) # Whole set with open(INPUT_FILE_1) as f: ...
from django.urls import path from .views import PropertyAveragePriceList, PropertyTransactionCountList urlpatterns = [ path("properties/avg_prices", PropertyAveragePriceList.as_view()), path("properties/count_transactions", PropertyTransactionCountList.as_view()), ]
#!/usr/bin/env python3 input1 = input() input2 = input() isAnagram = True for c1 in input1: if c1.isalpha(): numC1 = input1.lower().count( c1.lower() ) numC1inInput2 = input2.lower().count( c1.lower() ) if numC1 != numC1inInput2: isAnagram = False if isAnagram: print( '{}'.format( input1 ) ) else: p...
from .shape_aware_roi_align import ShapeAwareRoIAlign, shape_aware_roi_align __all__ = ['shape_aware_roi_align', 'ShapeAwareRoIAlign']
#!/usr/bin/env python from setuptools import setup, find_packages # So you can use either pip or this setup script with open('requirements.txt') as f: requirements = f.read().splitlines() with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup(name='LinkedMob...
myName = "Melissa" #variable containing my name. myAge = 16 + float(11)/12 #variable containing my age in years as a decimal. myHeight = 1.61 #variable containing my height in meters. sqLength = 2 #variable containing the length of one side of a square. rectLength = 6 #variable containing the length of a rectangle. rec...
# Copyright 2019-present Kensho Technologies, LLC. import unittest from .test_helpers import get_sqlalchemy_schema_info class QueryFormattingTests(unittest.TestCase): def test_sqlalchemy_schema_info(self) -> None: # Test that validation passes get_sqlalchemy_schema_info()
""" @file SpikeData.py @author Jewel Lee (jewel87@uw.edu) @date 5/5/2018 @brief Spike and Avalanche class implementation """ import numpy as np GRID = 100 # ----------------------------------------------------------------------------- # CLASS: Spike() # each Spike is a node contains it's spiking times...
# -*- coding: utf-8 -*- import json import requests from .base import BaseChannel from ..exceptions import HttpError class GitHubChannel(BaseChannel): def __init__(self, token, owner, repository, base_url="https://api.github.com", *args, **kwargs): self.token = token self.url = ...
from utils.data_utils import dataUtils from utils.signal import Signal from utils.graph_utils import graphUtils, graphData from utils.file_utils import fileUtils from modulators import * class Radio(QAM,dataUtils,graphUtils,graphData,fileUtils): def __init__(self,bits_per_sample=1,sampling_freq=10,carrier_freq=50): ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- from itertools import chain from operator import itemgetter import jedi from jedi.api.completion import Parameter from . import logger from . import settings from . import unique def format_completion(complete): """Returns a tuple of the string that would be visible i...
r""" Biological sequences (:mod:`skbio.sequence`) ============================================ .. currentmodule:: skbio.sequence This module provides functionality for working with biological sequences, including generic sequences, nucelotide sequences, DNA sequences, and RNA sequences. Class methods and attributes a...
import unittest import pytest from s2and.data import ANDData from s2and.s2_funcs import ( year_gap_is_small, affiliation_fuzzy_match, trusted_ids_are_compatible, emails_match_exactly, trusted_ids_match_exactly, names_are_compatible, ) class TestData(unittest.TestCase): def setUp(self): ...
import copyreg import pickle import os from .product import product from .__init__ import pClass import sys os.chdir(os.path.expanduser("~")) def createDir(dir): p = dir.replace("/", "/ ").split() for d in range(len(p)): x = str(p[0:d+1]).replace("[","").replace("]","").replace("'","").replace(" ","").r...