content
stringlengths
5
1.05M
import setuptools # Get Readme from root directory (which will be used for package long_description) with open("README.md", "r") as fh: long_description = fh.read() # Get any requirements for installation from requirements.txt with open("requirements.txt", "r") as fh: requires = fh.read().splitlines() setupt...
from {{app_name}}.config import * SQLALCHEMY_DATABASE_URI = 'postgresql://user:pass@host:5432/db'
#!/usr/bin/env python from Tkinter import Tk, Entry, TOP, BOTH, RIGHT, RAISED, X, LEFT, N, E, W, S, EW, NS, NSEW, RIDGE, Toplevel from Tkinter import Grid, BooleanVar, Spinbox from ttk import Frame, Button, Style, Label, Entry, Checkbutton import tkFileDialog import tkMessageBox import prepare_dwi_gui from dwi_utils i...
import FWCore.ParameterSet.Config as cms # # module to combine the persistent genParticles # from the top decay and top mothers # genEvt = cms.EDProducer("TtGenEventReco", src = cms.InputTag("decaySubset"), init = cms.InputTag("initSubset") )
from __future__ import absolute_import, print_function from copy import copy from .dataset import Dataset, ImageDataset from .image import (CUHK01, CUHK02, CUHK03, GRID, LFW, MSMT17, PRID, VRIC, CityFlow, Classification, ClassificationImageFolder, ExternalDatasetWrapper, CompCar...
from mojo.events import addObserver, removeObserver, extractNSEvent ''' Option-dragging one margin will change the other margin accordingly. Ryan Bugden Idea: Frank Griesshammer v0.1.0: 2019.12.20 ''' gutt = 10 class symmetricalMarginDrag(): def __init__(self): self.font = None self.glyp...
import math import os import random import collections import json import argparse import numpy as np import copy """ PRECONSTRUCT MEMORY GAME SEQUENCES The code deals with preconstructing sequences for the memory game. More precisely, it creates "tracks" that can be assigned to a player of the game. A track consist...
host = 'localhost' port = 3306 # Your MySQL/MariaDB port here username = 'photo_album' password = 'stylish_photo_album' database = 'photo_album' __all__ = ['host', 'port', 'username', 'password', 'database']
# blender imports import bpy # utility imports import numpy as np import csv import random import importlib import os from src.assets.TSSMesh import TSSMesh class MeshMultipleRandom(TSSMesh): """docstring for MeshMultipleRandom""" def __init__(self): super(MeshMultipleRandom, self).__init__() ...
''' Written by: Thomas Munzer (tmunzer@juniper.net) Github repository: https://github.com/tmunzer/Mist_library/ ''' import requests import json import weakref from getpass import getpass from .__req import Req from .models.privilege import Privileges try: from config import log_level except: log_level = 6 f...
"""Compare the output of the functions ``eval_eigspace_vivit`` and ``eval_eigspace_pi`` implemented in ``utils_shared.py``. Both function compute eigenspaces on a mini- batch (using ViViT or the power iteration method implemented by ``GGNLinearOperator``, respectively). Using ViViT without curvature subsampling and w...
# coding=utf-8 # Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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/lice...
from typing import List, Optional from monitoring.monitorlib.typing import ImplicitDict ServiceProviderID = str class DisplayProviderBehavior(ImplicitDict): always_omit_recent_paths: Optional[bool] = False do_not_display_flights_from: Optional[List[ServiceProviderID]] = []
# 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 by applicable law or ag...
from postgresqleu.util.backendviews import backend_list_editor from postgresqleu.util.auth import authenticate_backend_group from postgresqleu.elections.backendforms import BackendElectionForm def edit_election(request, rest): authenticate_backend_group(request, 'Election administrators') return backend_list...
import multiprocessing import os import random import time from typing import List import pytest import requests from jina.helper import random_port from transformers import AutoModel from transformers import AutoTokenizer os.environ['JINA_LOG_LEVEL'] = 'DEBUG' import torch from finetuner.toydata import generate_qa ...
from flask import Flask, render_template,flash, redirect,url_for,session,logging,request from flask.helpers import make_response from pandas.core.series import Series import twint import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from flask_sqlalchemy import SQLAlchemy from f...
#!/usr/bin/python3 import glob import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument("-p", "--path", default="clang-format", help="Path to clang-format executable") args = parser.parse_args() extensions = ["cu", "cpp", "h", "cuh", "hpp"] file_paths = [] for extension in extensions:...
import os import sys sys.path.insert(1, os.path.join(sys.path[0], '../../..')) import app.calculator.calculator as calc from app import testing_helpers attacker, defender, options, tol = testing_helpers.defaults() # target source: http://alphamou.se/ti4calc/ target = [2, 49, 49] # target percentages; [tie, attacker...
from susc import File, log from susc.things import * from colorama import Fore from lark import Tree, Token def print_subtree(tree: Tree|Token, level: int = 0): line = Fore.LIGHTBLACK_EX + ("| " * level) + Fore.RESET if isinstance(tree, Tree): line += f"{Fore.YELLOW}{tree.data}" log.info(line)...
import seaborn as sns import matplotlib.pyplot as plt from random import shuffle import pandas as pd from sklearn.metrics import roc_curve, auc import os from matplotlib import cm import numpy as np from tqdm import tqdm from scipy import stats from adjustText import adjust_text import math import itertools from colle...
# MIT License # # Copyright (c) 2018-2019 Red Hat, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, m...
# Generated by Django 2.2.7 on 2019-11-11 01:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Pedido', '0018_auto_20191110_2156'), ] operations = [ migrations.AlterField( model_name='roupa', name='id', ...
#Execution-3 from fake_news_detection_final_code import * # main function. def main(): Training_Validating('fake_news_dataset',130000,400,100,12,64,'x_test_3','y_test_3','history_3','model_3') Testing('x_test_3','y_test_3','history_3','model_3') ############################################# # uti...
#! /usr/bin/python # -*- coding: utf-8 -*- """Download disconnected errors from OSM Ispector, filter important highways, remove corrected errors and create GPX and GeoJSON files with errors per highway type. """ import os from subprocess import call import psycopg2 def find(user, password): """- Download ...
import os from ..constants import GlobalConstants INVALID_ORDERS_DATA_FOLDER = 'Invalid Orders Data Folder Specified!' INVALID_CUSTOMERS_SERVICE_URL = 'Invalid Customers Service URL Specified!' INVALID_PRODUCTS_DATA_FILE = 'Invalid Products Data File Specified!' class GlobalConfiguration: configuration = {} ...
# -*- coding:utf-8 -*- from plugin import Plugin import csv from faker import Factory class Csv(Plugin): def load(self): if self._config["append"]: f = open(self._config["outputfile"], "a+") else: f = open(self._config["outputfile"], "w") writer = csv.writer(f, line...
def test_add_related_entities(related_entity_container, related_type, related_name): related_entity_container.add_related_entity(related_type, related_name) related = _get_related_entities(related_entity_container) assert len(related) == 1 [entity] = related assert entity['entity_type'] == related_t...
import os import re from subprocess import Popen, PIPE, call, check_output from .settings import out_storage, par_storage, tim_storage from .pexopar import PexoPar from .pexotim import PexoTim from .pexoout import PexoOut class Pexo(object): """ A Python wrapper for PEXO - https://github.com/phillippro/pexo/ ...
# ----------------------------------------------------------------------------- # Name: ObserverCatchBasketsModel.py # Purpose: View Model for Observer DB Table CatchAdditionalBaskets # (Table used only for Weight Method 3 estimation of catch weight from # a subset of unspeciated b...
#!/usr/bin/env python """ This module provides ReleaseVersion.List data access object. """ __revision__ = "$Id: List.py,v 1.5 2010/08/09 18:43:08 yuyi Exp $" __version__ = "$Revision: 1.5 $" from WMCore.Database.DBFormatter import DBFormatter from dbs.utils.dbsExceptionHandler import dbsExceptionHandler class List(DB...
""" Fix the objective scale factor Give "stated objective", "actual objective" ('objective', '4x 0.1na ACHROPLAN') """ import numpy as np from pathlib import Path from pyqtgraph import configfile import pprint import datetime pp = pprint.PrettyPrinter(indent=4) # retiga: CineScale = 1.0 refscale = [(1./CineScale)*6....
#x is the dependent variable columns joined into a matrix and labels is the column matrix of labels, iter is number of iterations you want the model to go through before it returns the output. #The initialization of weights are fixed to a small number.. it could br small different random numbers also. But in this case ...
print ('hello world')
from django.http import HttpResponse from django.db.models import Count from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.db.models.functions import Distance from rest_framework import generics, permissions, filters from rest_framework.decorators import api_view from rest_framework.response imp...
import sys import numpy as np from vhts import metal_bind class my_class(object): def __init__(self, docking_params): self.check_metal_bind = docking_params['check_metal_bind'] if self.check_metal_bind: self.metal_coor = docking_params['metal_coor'] self.metal_bind_cutoff =...
# For more details about routing, see # http://www.tornadoweb.org/en/stable/routing.html from tornado.web import url from . import handlers route_patterns = [ url(r'/bundle/(?P<bundle_id>\d*)/?', handlers.BundleHandler, name='bundle'), url(r'/data/(?P<app_name>[a-z0-9_-]+)/(?P<app_version>[a-z0-9_\.-]+)/?', ...
from setuptools import setup setup( name="asteroids", options = { 'build_apps': { 'include_patterns': [ '**/*.png', '**/*.jpg', '**/*.egg', ], 'gui_apps': { 'asteroids': 'main.py', }, ...
# -*- coding: utf-8 -*- # # K2HR3 OpenStack Notification Listener # # Copyright 2018 Yahoo! Japan Corporation. # # K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers # common management information for the cloud. # K2HR3 can dynamically manage information as "who", "what", "operate". # These are stored...
from tkinter import Tk, Label, Button from converter import Converter class Win(Tk): def __init__(self): Tk.__init__(self, None, None) self.converter = Converter() self.km = 100 self.miles = self.converter.get_miles_from_km(self.km) ...
# -*- coding: UTF-8 -*- from __future__ import unicode_literals import unittest from tagtool import Tag class TagTest(unittest.TestCase): def testTagStr(self): self.assertEqual("[1, 2, 3]", str(Tag([1,2,3])) ) def testEmptyTagsAreEqual(self): self.assertEqual(Tag([]),Tag([])) def testTagsAreEqual(self...
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 2 of the License, or # (at your o...
import json with open("./../../data/raw/raw.txt", "r+") as f: data = f.read() data = data.replace("][", "]\n[") with open("./../../data/raw/raw.json", "w+") as fnew: fnew.write(data) # json.dump(data, fnew) fnew.close()
# Copyright 2016 The Meson development team # 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 ...
import setuptools setuptools.setup( name="site-parser", version="0.1.0", url="https://github.com/borntyping/cookiecutter-pypackage-minimal", author="Alexander Fedotov", author_email="a_fedotov89@mail.ru", description="Simple parser for sites", long_description=open('README.rst').read(), ...
""" Stepper configuration for verbose output """ debuglevel = 1 # 1: print HTTP headers, 0: don't print show_page = True
from .SimpleRect import SimpleRect from .Point2D import Point2D
from django.conf.urls import url from . import views app_name = "images" urlpatterns = [ url( regex=r'^$', view=views.Images.as_view(), name='images' ), url( regex=r'^(?P<image_id>[0-9]+)/$', view=views.ImageDetail.as_view(), name='image-detail' ), u...
import os import time from pygraphblas import semiring from pygraphblas.matrix import Matrix from pygraphblas.types import BOOL from src.BMGraph import BMGraph def transitive_closure_sq(graph): closure = Matrix.sparse(BOOL, graph.states_amount, graph.states_amount) with semiring.LOR_LAND_BOOL: for...
from .tui.Player import Player def main(): Player()
from json import dumps from urllib.parse import quote def create_block_kit_builder_url(block_kit_like_object): """ Takes block_kit_like_object like element, component, surfaces, and objects block_kit_like_object can be built (build()) or unbuilt, see example """ block_kit_builder_url = "https://ap...
from main_objects import ship_blueprint from ConstantVars import GenFunctions, Constants, Colors from Utilities import EyeGazeInstance import random import pygame import time class FriendShip(ship_blueprint.Ship): def __init__(self, friend_name): FRIEND_MAX_HEALTH = 100 TOP_LEFT_INITIAL = GenFunct...
from .models import MyUser from django.contrib.auth.forms import UserCreationForm, UserChangeForm, AuthenticationForm class LoginForm(AuthenticationForm): class Meta: model = MyUser fields = ('email', 'password') class PersonInfoCreationForm(UserCreationForm): class Meta(UserCreationForm): ...
"""Collection of helper methods. All containing methods are legacy helpers that should not be used by new components. Instead call the service directly. """ from homeassistant.components.image_processing import DOMAIN, SERVICE_SCAN from homeassistant.const import ATTR_ENTITY_ID from homeassistant.core import callback ...
# process2.py to create processes using a pool import os from multiprocessing import Process, Pool, current_process as cp from time import sleep def print_message(msg): sleep(1) print("{}-{}: {}".format(os.getpid(), cp().name, msg)) def main(): # creating process from a pool with Pool(3) as proc: ...
class FormControlMixin(object): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for field in self.fields.values(): field.widget.attrs["class"] = "form-control"
import tkinter as tk from tkinter import * #label标签 # win = tk.Tk() # win.title('sunk') # win.geometry("400x400+200+20") # # label1 = tk.Label(win,text = 'good',bg = 'pink') # label2 = tk.Label(win,text = 'nice',bg = 'green') # label3 = tk.Label(win,text = 'cool',bg = 'red') # label4 = tk.Label(win,text = 'test',bg = ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-06-18 13:55 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('listings', '0003_auto_20160618_1342'), ] operati...
# -*- coding: utf-8 -*- # Copyright (c) 2022 Theo Hussey # License: Apache 2.0 # Project: KiAuto (formerly kicad-automation-scripts) """ Tests for 'pcbnew_do export_gencad' For debug information use: pytest-3 --log-cli-level debug """ import os import sys # Look for the 'utils' module from where the script is runnin...
import numpy as np from dragonphy import * class Fir(Filter): def __init__(self, n_taps, weights = [0], n_channels=1): self.n_taps = n_taps self.impulse_response = weights self.n_channels = n_channels def update_weights(weights): self.impulse_response = weights def __call_...
# 使用sympy.diff求导定义函数 ,求解其导数 from sympy import * init_printing(use_unicode=True) x = symbols("x") f = log(x) # 一阶导数 pprint(diff(f, x)) # 二阶导数可以传入第三个参数,表示阶数 pprint(diff(f, x, 2)) print("--------------------------------") f2 = tan(x) pprint(diff(f2, x))
class CLASPException(RuntimeError): """Root exception for CLASP""" pass class ParsingException(CLASPException): """Root exception for parsing""" pass class ValueParsingException(ParsingException): """Root exception for value parsing""" pass class MissingValueException(ValueParsingExceptio...
from random import seed,uniform from simp_py import tft, mon import time def run(): global tft, time,seed,uniform seed(1) color=0xff for i in range(100): for j in range(100): x = round(uniform(0,1) * 320) y = round(uniform(0,1) * 240) z = x % 4 if ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # This file has been created by ARSF Data Analysis Node and # is licensed under the MIT Licence. A copy of this # licence is available to download with this file. # # Author: Dan Clewley # Created: 27/08/2015 import datetime import numpy from scipy.interpolate import i...
""" Created on Feb 14, 2014 .. codeauthor::Ryan Georgi <rgeorgi@uw.edu> """ # Built-in imports ------------------------------------------------------------- import os, sys, re, glob, logging # Internal imports ------------------------------------------------------------- import shutil import stat from os import get...
import os import sys import tempfile from distutils import ccompiler from distutils.errors import CompileError, LinkError from os.path import join import setuptools from setuptools import setup, Extension try: import numpy except ImportError: from subprocess import call call(['pip', 'install', 'numpy']) ...
words = ['some', 'words', 'here', 'what', 'not'] # print(words.index('some')) =? index method. returns index # .append method append shit like words.append("somevalue") words.insert(1, "insert this value at <-that index") words.remove("not") # remove method uses `value` to delete first occurance found # you can use ...
import re from lxml import etree from geolucidate.functions import get_replacements from cadorsfeed.aerodb import replace_aerodromes from cadorsfeed.cadorslib.filters.link_cadors import replace_cadors_links from cadorsfeed.cadorslib.filters.filter import make_link, make_span, do_filter NSMAP = {None: 'http://www.w3...
from .load_Stanford3d_object_room_dataset import StanfordDataset
from exceptions import FieldNotFound class MetaTable(object): def __init__(self, table_name, fields): """ Meta information of tables. :param str table_name: The name of this table. :param dict fields: Field data types. """ self.table_name = table_name self...
# Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
import urllib.request as ur from bs4 import BeautifulSoup as soup def find_productF(search): header = { 'User-Agent' : 'Mozilla/5.0' } link=["_3wU53n","_2cLu-l","_2B_pmu"] search=search.replace(" ","%20") urlF= "https://www.flipkart.com/search?q={}&otracker=search&otracker1=search&marketplace=...
#! /usr/bin/env python from __future__ import print_function from astropy import units as u from astropy.units import cds cds.enable() def orbital_radius(M, omega): G = cds.G return (G * M / omega**2)**(1.0/3.0) revolution = u.cycle.in_units(u.radian) geosynchronous_orbital_radius = orbital_radius(cds.geoMa...
# -*- coding: utf-8 -*- """ various math utilities, notably `eig` and a collection of simple functions in `Mh` """ from __future__ import absolute_import, division, print_function #, unicode_literals # from future.builtins.disabled import * # don't use any function which could lead to different results in Python 2 vs...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.GavintestNewLeveaOne import GavintestNewLeveaOne class AlipayOpenMiniReleaststBatchqueryResponse(AlipayResponse): def __init__(self): super(AlipayOpenMin...
from itertools import chain from oort.sparqltree.autotree import URI_KEY, BNODE_KEY from oort.sparqltree.autotree import is_lang_node, is_datatype_node, is_resource def to_graph(nodelens, tree): return GraphBuilder(nodelens).to_graph(tree) #graphify = to_graph class GraphBuilder(object): """ This buil...
from sqlalchemy.sql.functions import now from db import db from models.base_model import BaseModel from utils.time import Time from datetime import datetime class LeaseModel(BaseModel): __tablename__ = "lease" id = db.Column(db.Integer, primary_key=True) propertyID = db.Column(db.Integer, db.ForeignKey("...
import unittest import os import shutil import random import torch import torchvision.models as models from .context import utils from utils import * class TestUtilFunctions(unittest.TestCase): test_dir = os.path.join(os.getcwd(), 'test_checkpoints') arch_name = 'resnet18' test_net = None test_opt...
#!/usr/local/bin/python """ print_csv_value.py: Prints an item in a CSV """ import pandas as pd import argparse def print_csv_value(filename, field, row): df = pd.read_csv(filename, dtype=str, keep_default_na=False) if field not in df: raise Exception('CSV does not contain field: %s (%s)'%(field, filename))...
import Src.GetData import Src.AnalyzeData import json import re from statistics import mean stravaData = Src.GetData.getData(75133, "b32174d53ebd5bce6f78a2c398efa45654f4e556") #Client_id and Client_secret cleaned_data = Src.AnalyzeData.clean_data(stravaData) outcome_analysis = Src.AnalyzeData.analyze_data(cleaned_dat...
import pandas as pd import cmocean as cmo import geoviews as gv import hvplot.pandas from holoviews import dim import datashader as ds import colorcet as cc from colorcet.plotting import swatch import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def plot(df_coords): ''' data_coords = g...
#Square of N numbers. lst = [] lst2 = [] n = int(input("Enter the number of elements : ")) print("Enter the elements") for x in range(0,n): a = int(input()) lst.append(a) for num in lst: a = num * num lst2.append(a) print("new list =", lst2)
import discord from discord.ext import commands from .utils.prettyList import prettyList from .mofupoints import incrementEmbedCounter from fake_useragent import UserAgent import inspect import random import re import requests from typing import Dict, List, Union Post = Dict[str, Union[str, int, bool]] ...
{ "targets": [ { "target_name": "lzh", "sources": [ "src/binding.cc", "src/lzh.c" ], "include_dirs": [ "<!(node -e \"require('nan')\")", "<!(node -e \"require('cpp-debug')\")" ] } ] }
import pandas as pd # The data hockey_players = pd.read_csv('data/canucks.csv') # Slice the rows and columns # Save the new dataframe as benched_players benched_players = ____.____[____: ____] # Display it ____
from backpack.extensions.curvature import Curvature from backpack.extensions.module_extension import ModuleExtension from backpack.extensions.secondorder.hbp.hbp_options import BackpropStrategy class HBPBaseModule(ModuleExtension): def __init__(self, derivatives, params=None): self.derivatives = derivativ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os import json import re from datetime import datetime from pkg_resources import resource_string, resource_stream from kgschart import KgsChart class TestParser(unittest.TestCase): def helper(self, file, rank_range, time_range): k = Kg...
# -*- coding: utf-8 -*- import textlytics.word_vectorization.doc2vec_sentiment as d2v d2v.run()
# Copyright (c) 2021. Harvard University # # Developed by Research Software Engineering, # Faculty of Arts and Sciences, Research Computing (FAS RC) # Author: Michael A Bouzinier # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. ...
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Functional tests running EXPLAIN statements. # import logging import pytest from tests.common.test_vector import * from tests.common.impala_test_suite import * # Tests the different explain levels [0-3] on a few queries. # TODO: Clean up ...
try: import usocket as _socket except: import _socket try: import ussl as ssl except: import ssl # CPython only supports server_hostname with SSLContext ssl = ssl.SSLContext() def test_one(site, opts): ai = _socket.getaddrinfo(site, 443) addr = ai[0][-1] s = _socket.socket() ...
''' Created on 20 déc. 2021 @author: slinux ''' from .wxRavenRavencoreDesign import * from wxRavenGUI.application.wxcustom.CustomLoading import * import webbrowser from .wxRavenRavencoreHTMLviewer import * from libs.RVNpyRPC import _asset as assetLib from libs.RVNpyRPC._asset import AssetType try: import pype...
from Chapter2.CreateDataset import CreateDataset from util.VisualizeDataset import VisualizeDataset from util import util from pathlib import Path import copy import os import sys DATASET_PATH = './datasets/crowdsignals/csv-participant-one/' RESULT_PATH = './intermediate_datafiles/' RESULT_FNAME = sys.argv[2] if len(s...
"""Common methods for parsing.""" import typing as T class ParseError(RuntimeError): """Base class for all parsing related errors.""" pass class DocstringMeta: """ Docstring meta information. Symbolizes lines in form of :param arg: description :raises ValueError: if something...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
# %% import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib.animation import FuncAnimation from scipy.stats import bernoulli, uniform, norm from svgpathtools import svg2paths from svgpath2mpl import parse_path plt.rcParams["font.size"] = 20 plt...
import asyncio import ujson as json from loguru import logger from aiogram import Dispatcher from bot_loader import redis_client from data.config import admin_ids, tickets_notify_delay from services.messages import create_ticket_msg async def on_startup_notify(dp: Dispatcher): for admin_id in admin_ids: ...
# -*- coding: utf-8 -*- from .fixtures import app from .fixtures import client from .fixtures import base from .fixtures import person_tag_model from .fixtures import person_single_tag_model from .fixtures import person_nested_single_tag_model from .fixtures import string_json_attribute_person_model from .fixtures imp...
""" Makes training and test dataset for synrad model using SEVIR """ # -*- coding: utf-8 -*- import argparse import logging import datetime import os import h5py os.environ["HDF5_USE_FILE_LOCKING"]='FALSE' import sys import numpy as np from src.data.generator import SEVIRGenerator def parse_args(): parser = ar...
#!/usr/bin/env python import subprocess import optparse import re def get_args(): parser = optparse.OptionParser() parser.add_option("-i", "--interface", dest="interface", help="interface to change it's MAC address") parser.add_option("-m", "--mac", dest="new_mac", help="new MAC address") (options, arguments)...