text
stringlengths
2
999k
import binascii import errno import hashlib import inspect import logging import numpy as np import os import six import subprocess import sys import tempfile import threading import time import uuid import ray import ray.gcs_utils import ray.ray_constants as ray_constants import psutil logger = logging.getLogger(__n...
# @Copyright 2007 Kristjan Haule from scipy import * from scipy import interpolate import os,sys import occupi import occupr def FindSignChange(fComputeCharge, old_mu, sdmu, fh_info, args): """ Routine brackets the chemical potential. Input: old_mu -- start of looking for mu ...
from typing import Optional, Sequence # The point of this one is to remove ALL the batchnorms. import larq as lq import numpy as np import tensorflow as tf from zookeeper import Field, factory from larq_zoo.core import utils from larq_zoo.core.model_factory import ModelFactory from customRenorm import ReluNormalRe...
#!/usr/bin/env python3 # /*************************************************************************** # # @package: panda_siimulator_examples # @metapackage: panda_simulator # @author: Saif Sidhik <sxs1412@bham.ac.uk> # # **************************************************************************/ # /*************...
from flask import jsonify from . import api def bad_request(message): response = jsonify({'error': 'bad request', 'message': message}) response.status_code = 400 return response def unauthorized(message): response = jsonify({'error': 'unauthorized', 'message': message}) response.status_code = 40...
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 from KratosMultiphysics import * import KratosMultiphysics.PfemFluidDynamicsApplication as PfemFluid from KratosMultiphysics import gid_output_process class GiDOutputProcess(gid_output...
""" Hidden Shift Benchmark Program - Qiskit """ import sys import time import numpy as np from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister sys.path[1:1] = [ "_common", "_common/qiskit" ] sys.path[1:1] = [ "../../_common", "../../_common/qiskit" ] import execute as ex import metrics as metrics n...
import time import sys sys.path.append('../classes') from WiiMote import WiiMote wiimote = WiiMote(None) wiimote.init() def handlerAButton(): print('A button pressed') wiimote.on(wiimote.WIIMOTE_KEYS['A'], handlerAButton) while True: button_delay = 0.25 time.sleep(button_delay) # buttons = wii.state['b...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Using ciscoconfparse find the crypto maps that are not using AES (based-on the transform set name). Print these child entries. """ from ciscoconfparse import CiscoConfParse cisco_cfg = CiscoConfParse("cisco_config.txt") crypto_maps_not_AES = cisco_cfg.find_objects_wo_...
'''Plots a semi-log x axis against a linear y-axis. It is, I think, only used for perturbation size, as it reflects the underlying physics of that behaviour, but I've split it up for clarity. Both bits do quite a lot of stuff.''' from linear_plot import linear_plot import matplotlib.pyplot as plt import numpy as np ...
import os import trimesh import numpy as np from urdfpy import URDF try: from vgn.ConvONets.utils.libmesh import check_mesh_contains except: print('import libmesh failed!') n_iou_points = 100000 n_iou_points_files = 10 ## occupancy related code def as_mesh(scene_or_mesh): """ Convert a possible scene ...
''' This file holds the agents. ''' import random, copy, collections from objects import Object from perception import * from comms import * import numpy as np from scipy import spatial import uuid # ______________________________________________________________________________ class Agent(Object): ''' An Ag...
from typing import List def merge_sort(input: List): length = len(input) for step in range(1, length): key = input[step] j = step - 1 while j >= 0 and key < input[j]: input[j+1] = input[j] j = j - 1 input[j+1] = key ...
""" URLify: write a method to replace all spaces in the string with %20 """ def URLify(s): """ :param s: string with enough space. in python we dont need this constraint as there is no constraint in the string ds :type s: str :return: string with replaced value :rtype: str """ return s.rep...
import sys from string import String from matrix import * from math import * def display_key(key): lines = 0 cols = 0 while lines != key.lines: cols = 0 while cols != key.cols: print (key.matrice[lines][cols], end = '') if cols + 1 != key.cols: print (" ", end = '') cols = cols + 1 print () lin...
import csv import os DIR = 'MTA_Subway_turnstile' def fix_turnstile_data(filenames): """ Filenames is a list of MTA Subway turnstile text files. A link to an example MTA Subway turnstile text file can be seen at the URL below: http://web.mta.info/developers/data/nyct/turnstile/turnstile_110507.txt ...
""" A collection of classes which aid in serializing data types. """ import importlib import inspect import json from abc import ABC, abstractmethod from enum import Enum import numpy as np from propertyestimator import unit from propertyestimator.utils.quantities import EstimatedQuantity def _type_string_to_objec...
# Authors: # # Giorgio Patrini # # License: BSD 3 clause import warnings import itertools import numpy as np import numpy.linalg as la from scipy import sparse, stats from scipy.sparse import random as sparse_random import pytest from sklearn.utils import gen_batches from sklearn.utils._testing import ass...
m = float(input('Coloque uma distância em metros: ')) cm = m * (10 ** 2) nm = m * (10 ** 3) print('O valor em metros {}\nVira {}cm,\nE {}mm'.format(m, cm, nm))
#!/usr/bin/env python3 #-*- Coding: utf-8 -*- """ NAME: _PYTHON_LEARNING_While_Loops.py VERSION: None AUTHOR: Jesse Leverett (CyberThulhu) STATUS: Building Initial code framework DESCRIPTION: Collection Learning While Loops TO-DO: USAGE: COPYRIGHT © 2021 Jesse Leverett """
#!/usr/bin/env python """ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from xml.sax.handler import ContentHandler from lib.core.common import sanitizeStr class FingerprintHandler(ContentHandler): """ This class defines methods...
class WebPageStatus: def __init__(self, url, ua_type, status_code, location): self.url = url self.ua_type = ua_type self.status_code = status_code self.location = location def output(self): return self.url + ',' + self.ua_type + ',' + str(self.status_code) + ',' + self.location
# # Example MQTT client using paho-mqtt # import os import time import struct import binascii import paho.mqtt.client as paho # binary payload format we use in this example: # unsigned short + signed int + 8 bytes (all big endian) FORMAT = '>Hl8s' if False: # topic we subscribe to. this is ending with a single...
import os import shutil from pathlib import Path from typing import Any, Dict, List, Optional, Tuple import yaml from chives import __version__ from chives.consensus.coinbase import create_puzzlehash_for_pk from chives.ssl.create_ssl import ( ensure_ssl_dirs, generate_ca_signed_cert, get_chives_ca_crt_key...
def odd_even_equation(numbers, command): if command == 'Odd': print(sum([x for x in numbers if x % 2 != 0]) * len(numbers)) else: print(sum([x for x in numbers if x % 2 == 0]) * len(numbers)) command = input() nums = [int(x) for x in input().split()] odd_even_equation(nums, command)
#!/usr/bin/env python """ Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 lim...
import torch from torch.utils.tensorboard import SummaryWriter import sys import os sys.path.append(os.getcwd()) from loss_functions import RBFClassifier, AAML, CircleLoss, Model, ModelArc from data_load import get_loader, get_channels, get_num_classes import numpy as np import torch.optim as optim import torch impor...
""" Copyright 2017, Silas Gyger, silasgyger@gmail.com, All rights reserved. Borrowed from https://github.com/Nearoo/pygame-text-input under the MIT license. """ import os.path import pygame import pygame.locals as pl pygame.font.init() class TextInput: """ This class lets the user input a piece of text, e...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: streamlit/proto/ArrowVegaLiteChart.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _ref...
from django.db import models # Create your models here. class Endpoint(models.Model): ''' The Endpoint object represents ML API endpoint. Attributes: name: The name of the endpoint, it will be used in API URL, owner: The string with owner name, created_at: The date when endpoint w...
import asyncio import copy import logging import os import random import shutil import ssl import sys import tempfile import time from argparse import Namespace from dataclasses import replace from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Tuple from blspy import AugSchemeMPL, G1Eleme...
import torch from dexpression_pytorch.cnn_model.dexpression import Dexpression device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def initialize(): """ Loads model parameters into cuda. Returns ------- model : object The convolutional neural network to be trained. ...
# Adopted from # https://github.com/pytorch/fairseq/blob/master/fairseq/distributed_utils.py import pickle import torch MAX_SIZE_LIMIT = 65533 BYTE_SIZE = 256 def enc_obj2bytes(obj, max_size=4094): """ Encode Python objects to PyTorch byte tensors """ assert max_size <= MAX_SIZE_LIMIT byte_tens...
import os import time import copy import datetime import json from argparse import ArgumentParser from pprint import pformat import logging import shutil import torch import numpy as np from torch.utils.tensorboard import SummaryWriter from utils import plot_confusion_matrix from dataset import SoundDataset from data...
from kivy.app import App from kivy.uix.scatter import Scatter from kivy.uix.label import Label from kivy.uix.floatlayout import FloatLayout from kivy.uix.textinput import TextInput from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button from kivy.uix.widget import Widget from kivy.uix.popup import ...
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance ...
""" This is an implementation of `sha256_treehash`, used to calculate puzzle hashes in clvm. This implementation goes to great pains to be non-recursive so we don't have to worry about blowing out the python stack. """ from typing import Optional, Set from clvm import CLVMObject from silicoin.types.blockchain_forma...
# Copyright 2019 The Texar Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
from flask import current_app, request from zeus.config import db from zeus.constants import Result, Status from zeus.models import Build, Repository, TestCase, Job, Source from zeus.utils.trees import build_tree from .base_repository import BaseRepositoryResource from ..schemas import BuildSchema build_schema = Bui...
#!/usr/bin/env python """ Version.py """ # Version string - globally available __VERSION__ = '0.7-240120'
import math n=int(input("Enter the terms ")) for i in range (1,n+1): c=((1/math.sqrt(i))+(math.sqrt(i+1))) print(c)
/home/runner/.cache/pip/pool/e0/9b/c6/27a92213f9ee5de0ba9d5354337667742f8f5af8a4026f586b65b73048
############################################################################### ## ## Copyright (C) 2014 Tavendo 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:/...
import json import sys import subprocess as sp from functools import partial import nbconvert def build_cmd(notebook, timeout): cmd = [ "jupyter", "nbconvert", "--log-level=ERROR", "--ExecutePreprocessor.timeout=" + timeout, "--execute", "--inplace", "--to", "noteb...
from Data import Data import scoring.dictionary.SSS93 as dictionary class SSS93(Data): scores = {'raw' : None }# def scoring_raw(self, score): option_numbers = dictionary.option_numbers score.set(dictionary.factors_names,0) for i, item in self.items(): try: ...
import time from gtts import gTTS import os error_log = os.getcwd() + "\error.log" while True: try: data = input("What should I say?: ") tts = gTTS(text=data, lang='en') tts.save(data[0]+".mp3") os.system("start " + data[0]+".mp3") time.sleep(1) except Valu...
""" Core Module for Activations Visualizations """ import numpy as np import tensorflow as tf from tf_explain.utils.display import filter_display from tf_explain.utils.saver import save_grayscale class ExtractActivations: """ Draw activations of a specific layer for a given input """ def __init__(self, bat...
import os, sys sys.path.append(os.getcwd()) import time import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.cifar10 # import tflib.inception_score import tflib.plot #...
import json import logging from datetime import date from dateutil import parser from sqlalchemy.exc import IntegrityError from sqlalchemy.sql import func from couchers.crypto import hash_password from couchers.db import get_user_by_field, session_scope from couchers.models import ( Cluster, ClusterRole, ...
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/Range Release: R4 Version: 4.0.1 Build ID: 9346c8cc45 Last updated: 2019-11-01T09:29:23.356+11:00 """ import sys from . import element class Range(element.Element): """ Set of values bounded by low and high. A set of ordered Quan...
import os.path import torch import numpy as np from PIL import Image import blobfile as bf import tifffile as tiff from typing import Union, Any, List, Callable from torch.nn.functional import interpolate from matplotlib import pyplot as plt from torch.utils.data import DataLoader, Dataset def imread(path: str): ...
#!/usr/bin/python # # Copyright 2015 Google 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...
""" Example for using langid.py to identify the language of messages on a twitter livestream. Optionally, it can also filter messages and display only those in a target language(s). Expects a Twitterstream on STDIN, such as the one provided by: # curl https://stream.twitter.com/1/statuses/sample.json -u<username> -s ...
import json from unittest.mock import patch, Mock from federation.entities.activitypub.entities import ActivitypubFollow, ActivitypubPost from federation.tests.fixtures.payloads import ( ACTIVITYPUB_FOLLOW, ACTIVITYPUB_POST, ACTIVITYPUB_POST_OBJECT, ACTIVITYPUB_POST_OBJECT_IMAGES) from federation.utils.activitypub...
import os import inspect import importlib def _not_hidden(f): return f[0] != "_" and f[0] !='.' def _get_files(file_): return [ os.path.splitext(f.name)[0] for f in os.scandir(os.path.dirname(file_)) if f.is_file() and _not_hidden(f.name) ] def _get_dirs(file_, ignore=[]): ...
# Source code distributed under the Copyright (c) 2008, Chris Lewis # Authors: Chris Lewis (http://work.chris.to), John David Funge (www.jfunge.com) # # Licensed under the Academic Free License version 3.0 # (for details see LICENSE.txt in this directory). import util import util2D import vec from OpenGL.GL import *...
import random import numpy as np import pandas as pd import SpaGCN as spg import torch from anndata import AnnData from typing import Optional try: from typing import Literal except ImportError: from typing_extensions import Literal from .utils import compute_pca_components def cluster_spagcn( adata: ...
'''Code for indexing to subexpressions.''' from .....common import T_SETGRD, T_FWD from .....exceptions import CurryIndexError, CurryTypeError from ..... import icurry, inspect from . import node from .....utility import visitation import collections import numbers __all__ = ['compress_fwd_chain', 'logical_subexpr', ...
from django.contrib import admin from .models import * # Register your models here. admin.site.register([Ticket,Area,Places,TicketPlace])
# -*- coding: utf-8 -*- # # kdd-cup-2019 documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values h...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' @File : start.py @Author: ChenXinqun @Date : 2019/1/19 11:59 ''' import os import sys import pickle from subprocess import Popen from importlib import import_module from crawlframe import configs from crawlframe.utils.timers import BaseTime from crawlframe.engine.cr...
import torch from torch import nn # LapSRN, 拉普拉斯金字塔结构, 2017 class LapSRN(nn.Module): def __init__(self, fea_chan=64, scale=2, conv_num=3): super(LapSRN, self).__init__() self.level_num = int(scale/2) self.share_ski_upsample = nn.ConvTranspose2d( 1, 1, 4, stride=scale, padding=...
import torch # Make code device agnostic with respect to user input def get_device(gpu): if gpu == 'on': device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") else: device = torch.device("cpu") return device
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
from allauth.socialaccount.providers.discord.provider import DiscordProvider from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns urlpatterns = default_urlpatterns(DiscordProvider)
""" CISCO_IETF_ATM2_PVCTRAP_MIB_EXTN This MIB Module is a supplement to the CISCO\-IETF\-ATM2\-PVCTRAP\-MIB. """ from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64 from ydk.filters import YFilter from ydk...
import OxygenRM as O import OxygenRM.events as event from functools import wraps, partial def temporal_events(f): """ Decorates a function so it is assured to fire the events (and deactivate the events after if they were not active) """ @wraps(f) def _uses_events(*args, **kwargs): dea...
#!/usr/bin/env python # # Written by JM Lopez # GitHub: https://github.com/jm66 # Email: jm@jmll.me # Website: http://jose-manuel.me # # Note: Example code For testing purposes only # Based on ExportOvfToLocal.java by Steve Jin # # This code has been released under the terms of the Apache-2.0 license # http://ope...
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'coen315.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are ...
# TODO 机器学习 4.6.sp 试选择2个UCI数据集,对上述2种算法所产生的未剪枝、预剪枝、后剪枝决策树进行实验比较。 from ml4_3 import ID3_tree from ml4_4 import CART_tree from sklearn.datasets import load_iris, load_wine from sklearn.model_selection import train_test_split # Import train_test_split function def run_4_6(dataset, criterion): x_train, x_test, y_tra...
from peewee import SqliteDatabase, Model, CharField, TextField db = SqliteDatabase('comments.db') class Comment(Model): title = CharField() content = TextField() class Meta: database = db db.connect() if not Comment.table_exists(): Comment.create_table() def create_comment(title, content...
import numpy as np import pandas as pd from sklearn.linear_model import Ridge from sklearn.model_selection import cross_val_score, train_test_split from sklearn.model_selection import RepeatedKFold from sklearn.preprocessing import OneHotEncoder import pickle from flask import Flask, request np.random.seed(42...
def number(input): for i in range(input+1): s = "" for x in range(i): s+= str(i) print(s) number(4)
from hugectr import Session, solver_parser_helper, get_learning_rate_scheduler import sys from mpi4py import MPI def session_impl_test(json_file): solver_config = solver_parser_helper(seed = 0, batchsize = 16384, batchsize_eval = 16384, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # from http://zetcode.com/gui/pyqt5/ import sys import os from PyQt5.QtWidgets import * from PyQt5.QtGui import * """QMainWindow skeleton """ class MainWindow(QMainWindow): def __init__(self): QMainWindow.__init__(self) self.initUI() def init...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # индивидуальное задание №2. Написать функцию произведения положительных аргументов. def multiply(*args): z = 1 for num in args: z *= num print(z) if __name__ == "__main__": multiply(5, 5) multiply(8, 9) multiply(2, 3, 7) ...
import copy import os from flask import Flask, request, jsonify from queue import PriorityQueue from threading import Thread # Agent from end2end.soloist.methods.baseline.SoloistAgent import Soloist rgi_queue = PriorityQueue(maxsize=0) rgo_queue = PriorityQueue(maxsize=0) app = Flask(__name__) # soloist model model...
#!/usr/bin/env python # Copyright 2001-2004 by Brad Chapman. All rights reserved. # Revisions copyright 2007-2016 by Peter Cock. All rights reserved. # Revisions copyright 2013 by Kai Blin. All rights reserved. # Revisions copyright 2015-2016 by Peter Cock. # Revisions copyright 2019 by Sergio Valqui. # This code is p...
from bs4 import BeautifulSoup import requests import re from scraper.web_scraper import WebScraper class NewsScraper(WebScraper): def __init__(self, url, filter_terms, html_parser="html.parser"): """ Used to scrape Steam newsfeeds and get appids of free games. :param url: :param f...
# # This file is part of LiteDRAM. # # Copyright (c) 2017-2019 Florent Kermarrec <florent@enjoy-digital.fr> # Copyright (c) 2020 Antmicro <www.antmicro.com> # SPDX-License-Identifier: BSD-2-Clause import unittest from migen import * from litex.soc.interconnect.stream import * from litedram.common import LiteDRAMNat...
#TODO- for loop with 16bit that trains a vgg19bn to recognize writers from torch import optim from torch.cuda.amp import GradScaler, autocast from models.StyleEncoder_model import StyleEncoder def freeze_conv(model): for param in model.features: param.requires_grad = False def train_vgg_extractor(): ...
"""The setup script.""" from setuptools import setup setup(use_scm_version={"fallback_version": "999"})
# Generated by Django 3.1.7 on 2021-03-07 01:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('todo', '0001_initial'), ] operations = [ migrations.AddField( model_name='task', name='due_date', field=...
import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions from ._jsii import * import cdk8s import constructs class Jenkins(cdk8s.ApiObject, metaclass=jsii.JSIIMeta, jsii_type="iojenkins.Jenkins"): '''Jenkins is the Schema for the jenkins API. ...
### All the configuration needed for the application config = { # Necessary to use Google services "spreadsheet_id": "", "qpx_api_key": "", # Write dates in YYYY-MM-DD e.g. "2017-05-13" "date_start": "2017-09-16", "date_end": "2017-09-24", # Write times in HH:MM e.g. "13:00" "time_arr...
# # Copyright 2017 National Renewable Energy Laboratory # # 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 la...
from SerialDevice import SerialDevice class Scanner: def __init__(self, max_angle=170) -> None: self.dev = SerialDevice() self._ready = False self.max_angle = max_angle self.pan_angle = None self.tilt_angle = None print('syncing with scanner...') self.center(...
import sys import pymssql # if sys.platform == 'cygwin': # import pyodbc import smtplib import logging import logging.handlers import re from os import getenv from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import formatdate from datetime import datetime from py...
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ericsson AB # # 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 ...
""" sphinx.util.inspect ~~~~~~~~~~~~~~~~~~~ Helpers for inspecting Python modules. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import builtins import contextlib import enum import inspect import re import sys import types import typ...
""" Module containing class representing a jumping distribution which describes a translation whose distribution does not depend on the starting location. If the PDF of the translation distribution is \\(g(\\boldsymbol{t})\\), this distribution's PDF is given by $$f(\\boldsymbol{x},\\boldsymbol{y})=g(\\boldsymbol{y}-\\...
#!/usr/bin/python #coding=utf-8 ''' @author: sheng @license: ''' SPELL=u'yuānyè' CN=u'渊液' NAME=u'yuanye14' CHANNEL='gallbladder' CHANNEL_FULLNAME='GallbladderChannelofFoot-Shaoyang' SEQ='GB22' if __name__ == '__main__': pass
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Thomas Scholtes. # # 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 ...
from pysketcher._angle import Angle from pysketcher._point import Point from pysketcher._shape import Shape from pysketcher._style import TextStyle class Text(Shape): """Place `text` on the drawing at the Point(x, y) `position`. The `text` will be drawn in the given `direction` Args: text: The t...
from setuptools import setup, find_packages setup ( name='data-analysis', version='0.0.1', url='www.github.com/kush4agarwal/data-analysis', license='BSD', author='Kush Agarwal', packages=find_packages(), install_requires=['PyQt5', 'pandas', 'numpy', 'SQLAlchemy', 'nltk', 'python-twitter', 'jupyter'], entry_po...
from datetime import date, datetime from json import dumps as jdumps from typing import Any, Callable, Dict, List from httpx import URL, Request, Response, codes from pytest import fixture from firebolt.async_db import ARRAY, Connection, Cursor, connect from firebolt.async_db.cursor import JSON_OUTPUT_FORMAT, ColType...
#!/usr/bin/env python3 # # Generate the component inter-dependency list # Caveat: does not detect nor manage circular dependencies yet import os import sys from optparse import OptionParser EXCLUDE_DIRS = ('build', 'private') usage = 'Usage: %prog [options]\n'\ ' generates component inter-dependency list' o...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
import json import re from datetime import datetime from typing import Any, Optional from bs4 import BeautifulSoup as bs from nonebot.log import logger from ..post import Post from ..types import * from ..utils import http_client from .platform import NewMessage class Weibo(NewMessage): categories = { ...
""" General helper functions to handle measurement data TODO: Use more efficient numpy solution? """ def crop_data_range_to_x(xdata, ydata, lower, upper): """Crop two data data vectors so that the second corresponds to the first Args: xdata (1D array/list): ydata (1D array/list): lowe...