content
stringlengths
5
1.05M
from sqlalchemy import BigInteger, Column, DateTime, Enum, Integer, String from virtool.pg.base import Base from virtool.pg.utils import SQLEnum class AnalysisFormat(str, SQLEnum): """ Enumerated type for analysis file formats """ sam = "sam" bam = "bam" fasta = "fasta" fastq = "fastq" ...
import click from prog.cli import create from prog.cli import delete from prog.cli import set from prog.cli import show from prog.cli import unset from prog import client from prog import output from prog import utils import json from argparse import Namespace CriteriaOpRegex = "regex" CriteriaOpNotRegex = "!regex" ...
import sys import tkinter class EmbeddedConsole: def __init__(self, window): self.frame = tkinter.Frame(window) self.entry = tkinter.Entry(self.frame) self.entry.pack() self.doIt = tkinter.Button(self.frame, text="Execute", command=self.on_enter) self.doIt.pack() se...
from swift.ipvl.inspect_custom import whoami, whosdaddy pass # (WIS) print __name__ class ContainerQuotaMiddleware(object): """docstring for ContainerQuotaMiddleware""" def __init__(self, app): pass # (WIS) print "%s %s (%s -> %s)" % (__name__, self.__class__.__name__, whosdaddy(), whoami()) ...
#!/usr/bin/python -tt """Ansible CallBackModule to log output.""" # pylint: disable=W0212 from datetime import datetime from ansible.plugins.callback import CallbackBase try: from spotmax import spotmax except ImportError: pass class PlayLogger(object): """Store log output in a single object.""" def __ini...
import math import random import re from kivy.app import App from kivy.clock import Clock from kivy.core.window import Window from kivy.garden.iconfonts import icon from kivy.garden.magnet import Magnet from kivy.graphics import Color, Ellipse, Line, Rectangle, RoundedRectangle from kivy.metrics import dp, sp from kiv...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ http://www.myengineeringworld.net/2013/10/Excel-thermochemical-NASA-polynomials-Burcat.html """ # # http://www.wsp.ru/en/..%5Cdownload%5Cdocs%5Carticles%5Cen%5CTENG221.pdf # http://www.wsp.ru/en/test/wspgGCGS.asp?gas_specification=air #import sys #sys.path.append("/ho...
"""Support for LightsControl logic""" import logging import voluptuous as vol from homeassistant.const import ( EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP) # TODO: check if some CONF constants can be imported from homeassistant.const import CONF_XXX import homeassistant.helpers.config_validation as...
""" Cameron, M. J., Tran, D. T., Abboud, J., Newton, E. K., Rashidian, H., & Dupuis, J. Y. (2018). Prospective external validation of three preoperative risk scores for prediction of new onset atrial fibrillation after cardiac surgery. Anesthesia & Analgesia, 126(1), 33-38. """ #Author: Eduardo Valverde ...
import inspect from functools import wraps import typing from .compat import check_async from .request import Request from .response import Response from .routing import HTTPRoute from .views import View, Handler, get_handlers HookFunction = typing.Callable[ [Request, Response, dict], typing.Awaitable[None] ] Hoo...
# import the necessary packages from imutils import paths import argparse import cv2 import numpy from scipy import misc def variance_of_laplacian(image): # compute the Laplacian of the image and then return the focus # measure, which is simply the variance of the Laplacian return cv2.Laplacian(image, cv2.CV_64F)....
from rest_framework.generics import ListAPIView,CreateAPIView from SavedPostAPP.models import ModelSavedPost from .serializers import SerializerSavedUserPost,SerializerCreateSavePost from PostAPP.models import ModelPost from django.shortcuts import get_object_or_404 class SavedUserPostListAPIView(ListAPIView): # K...
""" Functions and objects describing optical components. """ from arch.block import Block from arch.connectivity import Connectivity from arch.models.model import Linear, LinearGroupDelay from sympy import Matrix, sqrt, exp, I, eye import arch.port as port import numpy as np class Beamsplitter(Block): reference_p...
import numpy as np from munkres import munkres def test_big(k): a = np.empty((k,k)) for i in range(k): for j in range(k): a[i,j] = (i+1)*(j+1) b = munkres(a) print k, b if __name__ == '__main__': for i in range(256): test_big(i+1)
import graphene from django.db import models from django.conf import settings from modelcluster.fields import ParentalKey from modelcluster.contrib.taggit import ClusterTaggableManager from taggit.models import TaggedItemBase from wagtail.core.models import Page, Orderable from wagtail.core.fields import StreamField ...
from django.conf import settings from django.utils.translation import gettext_lazy as _ from google.oauth2 import id_token from google.auth.transport import requests from flashsale.misc.provider.ProviderBase import ProviderBase from flashsale.misc.lib.exceptions import OAuthAuthenticationError # refer to https://d...
# Copyright 2022, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
import socket from random import randrange from common import * def rand_point(): return Point(x=randrange(100), y=randrange(100)) logger = Logger(also_print = True) parser = Parser(logger) sock = socket.create_connection(SERVER_ADDR) f = sock.makefile("rwb", 0) vec = Vector(p1=rand_point(), p2=rand_point()) lo...
def index(request): request.render_template("home/shop.html")
import os from root import * from preprocessing.data_utils import * import numpy as np import pandas as pd import seaborn as sns import scipy from datetime import datetime, timedelta from sklearn.preprocessing import LabelEncoder pd.set_option('display.max_columns', 100) data = pd.read_pickle(root+"/data/interim/data...
import os; import sys; sys.path.insert(1, os.path.join(sys.path[0], '..')) import prince from sklearn import datasets X, y = datasets.load_iris(return_X_y=True) pca = prince.PCA(rescale_with_mean=True, rescale_with_std=True, n_components=2).fit(X) print('Eigenvalues') print(pca.eigenvalues_) print(pca.explained_in...
import unittest import numpy as np from chainer import testing from chainer.datasets import TupleDataset from chainercv.datasets import SiameseDataset from chainercv.utils.testing.assertions.assert_is_image import assert_is_image N = 15 @testing.parameterize( # Positive and negative samples {'labels_0': ...
from setuptools import setup setup(name='redwood-cli', version='0.1.0', description='Redwood Tracker CLI', url='http://github.com/kespindler/redwood-cli', author='Kurt Spindler', author_email='kespindler@gmail.com', license='MIT', packages=['redwood_cli'], zip_safe=Fals...
from keras.preprocessing.image import ImageDataGenerator from keras.models import Model from keras.layers import Dense,GlobalAveragePooling2D from keras.applications import MobileNet from keras.applications.mobilenet import preprocess_input # Module for training the transfer learning model for car type classific...
''' Paper : Incremental Domain Adaptation with Smoothing and Calibration for Surgical Report Generation Note : Dataloader for incremental learning ''' import os import sys import random import numpy as np from glob import glob from PIL import Image import torch from torch.utils.data import Dataset, DataLoader if sys....
# coding: utf-8 from celery import shared_task import geocoder from django.contrib.gis.geos import Point @shared_task def update_coordinates(id, address): from .models import Property g = geocoder.google(address) Property.objects.filter(pk=id).update(point=Point(g.lat, g.lng))
import sys import time import qi import numpy as np import cv2 import cv2.aruco import almath import math import signal from camera_config import * class Authenticator: def __init__(self, user, pswd): self.user = user self.pswd = pswd def initialAuthData(self): cm = {'user': self.u...
from BiGNN import BiGNN import sys sys.path.append('..') from utlis import load_data,load_customdataset_test_data,load_randomdataset_test_data,vaild,get_50_epoch_MAPE,accuracy_train import argparse import random import numpy as np import torch from torch.optim import lr_scheduler import torch.optim as optim import tim...
import numpy as np import matplotlib.pyplot as plt from keras.layers import Conv2D, BatchNormalization, Activation, Dense, Conv2DTranspose, Input, Lambda, Reshape, Flatten, UpSampling2D, MaxPooling2D from keras.models import Model import keras.backend as K from keras import initializers class SVHNGenerator(): def...
""" Created on Oct 28, 2016 @author: mvoitko """ import re import time import locale from datetime import datetime from selenium import webdriver from selenium.common.exceptions import * from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.sup...
import logging logger = logging.getLogger(__name__) import os from functools import reduce import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from gym.common.info import Content class VNFPP(Content): def __init__(self): Content.__init__(self) self.id = ...
# -*- coding: utf-8 -*- import json import logging import math import multiprocessing import os import time from functools import wraps from itertools import repeat from statistics import mean from tempfile import NamedTemporaryFile from typing import List, Tuple, TypedDict from django.conf import settings from django...
import bin.generateGraph as graph import json def test_graph(): output = open("files/test.txt") output = output.read().strip() j = json.load(open("output/aaa/aaa.json")) artefacts = j['analysis']['data']['art'] if isinstance(artefacts, dict): artefacts = [artefacts] g = graph.generateGraph(artefacts) g...
u = 0.5*sin(2*pi*x)+1
from .get_pathname_data import get_directory
# _______________________________________________________________________ # | File Name: views.py | # | | # | This file is for handling the views of support ticket display | # |_____________________...
from .abc import AbstractIdentityPolicy, AbstractAuthorizationPolicy from .api import remember, forget, setup, authorized_userid, permits from .cookies_identity import CookiesIdentityPolicy from .session_identity import SessionIdentityPolicy __version__ = '0.1.1' __all__ = ('AbstractIdentityPolicy', 'AbstractAuthor...
COMMENT_HEADER = "# ******************************************************************************" MODULE_HEADER = "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #" RULE_HEADER = "rule " POOL_HEADER = "pool "
# -*- coding: utf-8 -*- """ core runtime tests ~~~~~~~~~~~~~~~~~~ tests canteen's runtime core, which is responsible for pulling the app together with glue and spit. :author: Sam Gammon <sg@samgammon.com> :copyright: (c) Sam Gammon, 2014 :license: This software makes use of the MIT Open Source License...
from src import macadress from src import ping import sys modeChoice = int( input("\nChoose:\n1 - full (1-254) or\n2 - partial mode (custom range)\n\n|> ")) safeChoice = input( "Activate safe-mode or flood network?\n\nyes - safe-mode\nno - no timeout between pings\n\n|> ") if(safeChoice.lower() == 'yes'): ...
# -*- coding: utf-8 -*- """ :copyright: (c) 2016 by Mike Taylor :license: CC0 1.0 Universal, see LICENSE for more details. """ import json from flask import current_app class IndieWebNews(): def __init__(self, keyBase): self.keyRoot = '%sindienews-' % keyBase # execute the query def query(self, ...
class Solution(object): def combinationSum2(self, candidates, target): result = [] self.combinationSumRecu(sorted(candidates), result, 0, [], target) return result def combinationSumRecu(self, candidates, result, start, intermediate, target): if target == 0: result.a...
import pytest from .config import PORT_DEFAULT import time from pynextion import PySerialNex from pynextion.widgets import NexPage, NexQRcode, NexText @pytest.mark.parametrize("port", [PORT_DEFAULT]) def test_qrcode(port): nexSerial = PySerialNex(port) nexSerial.init() nexPage = NexPage(nexSerial, "pg_qr...
from datetime import timedelta from molly.utils.views import BaseView from molly.utils.breadcrumbs import * from forms import SearchForm class IndexView(BaseView): def initial_context(self, request): return { 'search_form': getattr(self.conf, 'form', SearchForm(request.GET or None)) }...
from django.shortcuts import render, redirect, render_to_response, HttpResponseRedirect from django.http import HttpResponse, Http404,HttpResponseRedirect from django.contrib.auth.forms import UserCreationForm from .models import Projects, Profile from django.core.exceptions import ObjectDoesNotExist from django.contri...
import math from collections import deque from typing import List import collections from ListNode import ListNode # URL: # https://leetcode.com/problems/swap-nodes-in-pairs/ # Question: # Given a linked list, swap every two adjacent nodes and return its head. # You may not modify the values in the list's nodes. Only...
import json import os import shutil import tempfile from datetime import timedelta from unittest import mock from unittest import TestCase from pytuber.storage import Registry class RegistryTests(TestCase): def tearDown(self): Registry.clear() Registry._obj = {} def test_singleton(self): ...
import argparse import os import logging import time import shutil import sys import subprocess from typing import cast, Iterable from powar.module_config import ModuleConfigManager from powar.global_config import GlobalConfigManager, GlobalConfig from powar.settings import AppSettings, AppMode, AppLogLevel from powar...
import glob import json import os.path import time from json import loads from uuid import uuid4 import boto3 from kafka import KafkaConsumer consumer = KafkaConsumer( bootstrap_servers="localhost:9092", value_deserializer=lambda x: loads(x), group_id='Pintrestdata_{}'.format(uuid4()), auto_offset_res...
import contextlib import numpy as np from . import base import config class State(base.StateWithSprings): pass class Robot(base.Robot): """ A simulated version of the robot that requires no connected hardware """ @classmethod @contextlib.contextmanager def connect(cls): yield cls...
# -*- coding: utf-8 -*- """ Created on Fri Mar 19 11:11:42 2021 @author: Abdelrahman """ import torch from torch import nn, optim from torchvision import transforms import numpy as np import matplotlib.pyplot as plt from torchvision import datasets, models from Model import Net mean = np.array([0.70756066,0.591194...
#!/usr/bin/env python2 import ConfigParser class configuration(): def __init__(self, configuration_file): self.configuration_file = configuration_file def get_options(self): result_dict = {} Config = ConfigParser.ConfigParser() Config.read(self.configuration_file) for...
from itemmultipliers import equipmentMultipliers as equipMultipliers levelMultiplier = { 'hp': 3, 'sp': 0, 'atk': 2, 'def': 2, 'mag': 2, 'mnd': 2, 'spd': 2 } statOrder = [ 'hp', 'sp', 'tp', 'atk', 'def', 'mag', 'mnd', 'spd', 'eva', 'fir', 'cld', 'wnd', 'ntr', 'mys', 'spi' ] def readAsInteger(f, nbytes): data...
from GroupCreator import GroupCreator from Filter import Filter from Filter import IsIn from Filter import NotIn from Filter import IsNot from Filter import GT from Filter import GTE from Filter import LT from Filter import LTE from Utils import WILDCARD # Goal types from Goal import GroupFilterGoal from Goal import...
#!/usr/bin/env python ''' Python WebSocket library with support for "wss://" encryption. Copyright 2011 Joel Martin Licensed under LGPL version 3 (see docs/LICENSE.LGPL-3) Supports following protocol versions: - http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 - http://tools.ietf.org/html/dr...
# -*- coding: utf-8 -*- # Copyright (C) 2012-2014 Mag. Christian Tanzer All rights reserved # Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at # #*** <License> ************************************************************# # This module is part of the package CNDB.OMP.__test__. # # This module is licensed und...
# Generated by Django 3.1.4 on 2020-12-21 19:01 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('aptlist', '0008_auto_20201221_1855'), ] operations = [ migrations.AlterField( ...
"""Top-level package for opytional.""" __author__ = """Matthew Andres Moreno""" __email__ = 'm.more500@gmail.com' __version__ = '0.1.0' from .apply_if_or_else import apply_if_or_else from .apply_if_or_value import apply_if_or_value from .apply_if import apply_if from .or_else import or_else from .or_value import or_v...
import os import shutil from pathlib import Path from django.core.management.base import BaseCommand from ._config import GrpcFrameworkSettings from ._utils import LoggingMixIn class Command(LoggingMixIn, BaseCommand): help = 'Compile protobuf files' settings = GrpcFrameworkSettings() force = False ve...
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="uscalendar", version="0.0.1", author="Matthew McElhaney", author_email="matt@lamplightlab.com", description="Package that contains modules for US Federal Holidays and US ...
from ._train import add_args
#! /usr/bin/python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # """ Test Target Broker Daemon HW Health Check Monitor Monitor the kernel's journal output looking for telltale signs of some piece of hardware gone unresponsive and take action to remediate it. This has to be confi...
import torch import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt import wandb import os def authorize_wandb(project, name, config): """Authorizes Weights and Biases for the project :param project: Name of the project. :type project: str :param name: Name for...
import re import Regex def Name(string,pattern = Regex.NamePattern): if re.findall(pattern,string): return True else: return False def City(string,pattern = Regex.CityPattern): if re.findall(pattern,string): return True else: return False def Number(string,pattern = R...
from django.contrib import admin from import_export.admin import ImportExportModelAdmin from recommender.models import Item @admin.register(Item) class ItemAdmin(ImportExportModelAdmin): search_fields = ['id']
import time import traceback from ccapi import EventHandler, SessionOptions, SessionConfigs, Session, Subscription, Event class MyEventHandler(EventHandler): def __init__(self): super().__init__() def processEvent(self, event: Event, session: Session) -> bool: try: raise Exception('o...
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generate an HTML file containing license info for all installed packages. Documentation on this script is also available here: http://www.chromium...
#!/usr/bin/env python3 import os import pytest import sys sys.path.append(os.path.join(os.path.dirname(__file__), "../lib")) import dartsense.organisation organisation_list = None def test_organisation_list_init(setup_db): organisation_list = dartsense.organisation.OrganisationList() assert isinstance(...
from envs import ShippingFacilityEnvironment, rewards from envs.network_flow_env import ( EnvironmentParameters, ) from envs.order_generators import ( ActualOrderGenerator, BiasedOrderGenerator, NormalOrderGenerator, ) from envs.inventory_generators import DirichletInventoryGenerator from envs.shipping_...
name = input("Enter your name") print("Hello" + name) print("Long Live India!")
""" The tool to check the availability or syntax of domain, IP or URL. :: ██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗ ██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝ ██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ █...
#!/usr/bin/env python3 import sys import psycopg2 import datetime from psycopg2 import Error from termcolor import colored, cprint class postgres_cursor_print: def __init__ ( self, cursor ): self.cursor = cursor self.rows = None self.query = None self.col_widths = None self.col_name_mappings = {} self.h...
from spidermon import Monitor, MonitorSuite, monitors class DummyMonitor(Monitor): def runTest(self): pass class DummyMonitorSuite(MonitorSuite): monitors = [DummyMonitor] # ---------------------------------- # Monitors ordering # ---------------------------------- class Unordered: class A(Dum...
from django.contrib.auth.models import User from django.urls import reverse from django.db import models from PIL import Image # Create your models here. class Prof(models.Model): user = models.OneToOneField( User, null=True, blank=True, on_delete=models.CASCADE) nickname = models.CharField( m...
import cv2 as cv import numpy as np import matplotlib.pyplot as plt import json from random import randint def get_img_from_dataset(no): img = cv.imread(f"dataset\image_{no}.jpg") return img def resize_picture(img, scale_percent=20): print('original Dimensions:', img.shape) width = int(img.shape[1] *...
import RPi.GPIO as GPIO from tuxdroid.tuxdroid import TuxDroid tux = TuxDroid("config.yaml") input("Press Enter to stop...") tux.stop()
#!/usr/bin/python3 # coding: utf-8 """ This module is to login Disney+ """ import logging import re import json from getpass import getpass import sys import requests from configs.config import Config from utils.helper import get_locale class Login(object): def __init__(self, email, password, ip_info, locale): ...
import boto3 import zsec_aws_tools.aws_lambda as zaws_lambda import zsec_aws_tools.iam as zaws_iam import io import zipfile import textwrap import json import logging import uuid import pytest logging.getLogger('botocore').setLevel(logging.WARNING) logging.getLogger('boto3').setLevel(logging.WARNING) logging.getLogge...
import os import time import uuid from flask import Flask, request, make_response, render_template, redirect from google.cloud import storage from peewee import * db = SqliteDatabase("core.db") class User(Model): # mapping from user token to their background pic url id = AutoField() token = CharField() ...
import torch from torch.jit.annotations import List from torch import Tensor def _new_empty_tensor(x: Tensor, shape: List[int]) -> Tensor: """ Arguments: input (Tensor): input tensor shape List[int]: the new empty tensor shape Returns: output (Tensor) """ return torch.ops....
from mptt.managers import TreeManager class MenuItemManager(TreeManager): def enabled(self, *args, **kwargs): return self.filter(*args, enabled=True, **kwargs)
from lesson23_projects.house3n2.auto_gen.data.const import ( E_FAILED, E_TURNED_KNOB, MSG_TURN_KNOB, ) def create_out(state): def __on_entry(req): req.context.c_sock.send( """You can see the house. You can see the close knob.""".encode() ) def __on_trigger(req): ...
#NAME: arm.py #DATE: 14/06/2019 #AUTH: Ryan McCartney #DESC: A python class for moving an entity in real-time via and http API #COPY: Copyright 2019, All Rights Reserved, Ryan McCartney import threading import time import json import requests import random from requests import Session from kinematics import Kinematic ...
# Load pickled data import pickle import numpy as np import tensorflow as tf tf.python.control_flow_ops = tf with open('small_train_traffic.p', mode='rb') as f: data = pickle.load(f) X_train, y_train = data['features'], data['labels'] # Initial Setup for Keras from keras.models import Sequential from keras.layer...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './examples/ScatterPlotSpeedTestTemplate.ui' # # Created: Fri Sep 21 15:39:09 2012 # by: pyside-uic 0.2.13 running on PySide 1.1.0 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui cla...
# -*- coding: UTF-8 -*- from flask import request, jsonify from app.api_1_0 import api from app.models import Compilation __author__ = 'Ivan' #PAGE_INDEX=0 PAGE_SIZE=10 @api.route('/compilations/<int:page_index>') def page_compilations(page_index): #json = request.get_json() #page_index = json.get('page_...
""" fundamental_analysis/financial_modeling_prep/fmp_view.py tests """ import sys import unittest # Not testing these tests further. I do not have a fmp key from contextlib import contextmanager import vcr from gamestonk_terminal.stocks.fundamental_analysis.financial_modeling_prep import ( fmp_view, ) from tests...
import sys import importer module
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the CLI argument helper interface.""" from __future__ import unicode_literals import locale import sys import unittest from plaso.lib import errors from tests.cli import test_lib as cli_test_lib from tests.cli.helpers import test_lib class HelperManagerT...
import asyncio import os import re import aiohttp from bs4 import BeautifulSoup import pandas as pd import tqdm BASE_URL = "https://link.springer.com/" BASE_FOLDER = "Springer" CONN_LIMIT = 100 TIMEOUT = 3600 def create_folders(books): for topic in books["English Package Name"].unique(): os.makedirs(f"{...
from PIL import Image import numpy as np import streamlit as st from PIL import ImageFilter from .converter import Converter from .correlator import Correlator class Filter: def __init__(self): self.image = None self.output = None def apply_negative_filter(self, image_path, R=True,G=True,B=Tr...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Chatterbug(MakefilePackage): """A suite of communication-intensive proxy applications that...
import setuptools with open("README.md", "r") as f: longdesc = f.read() setuptools.setup( name = "ps-minifier", version = "0.1.2", author = "Willumz", description = "A minifier for PowerShell scripts.", long_description = longdesc, long_description_content_type="text/markdown", url = "...
import itertools import operator def evaluate_distribution(spec, function_lookup): ''' Process the declarative specification and return a function of the form: def wrapper(rstate, **kwargs): ... Regardless of the specification, the generated function expects a positional argumen...
# 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, software # distributed under th...
from database import db_session from models.notificacao import Notificacao class NotificacaoDAO: ''' CLASSE NotificacaoDAO - IMPLEMENTA O ACESSO AO BANCO RELACIONADO A CLASSE Notificacao DO MÓDULO models.py QUE MAPEIA A TABELA TNotificacao @autor: Luciano Gomes Vieira dos Anjos - ...
# -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # 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 Free Software Foundation, either version 3 of th...
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from kmeans_100D import * #learing rate = 0.1, K = 3, epoch=300 logging = runKmeans(0.1,10,300)
import os import numpy as np import pandas as pd import urllib.request from bs4 import BeautifulSoup import xml.etree.ElementTree as ETREE import datetime as dt pd.set_option('display.max_columns', 500) def add_pitcher_ids(data): """ """ last_registries = [ fname for fname in sorted(os.listdir(ref...
import time import numpy as np def parse_input(file): nums = [int(n) for n in file.readline().split(',')] file.readline() boards = [] board = [] for line in file.readlines(): if line == '\n': boards.append(board) board = [] else: # each number h...