content
stringlengths
5
1.05M
# get storage account name, container name from input dbutils.widgets.text("input", "","") datafile = dbutils.widgets.get("input") storage_account_name = getArgument("storage_account_name") storage_container_name = getArgument("storage_container_name") # mount the blob storage that represents the target data mount_poi...
from django.shortcuts import render # Create your views here. # ============== APIView开始 ================== """ from rest_framework.views import APIView from .models import * from .serializers import * from rest_framework.response import Response from rest_framework.status import * class BooksAPIView(APIView): ...
# Copyright 2014-2020 Insight Software Consortium. # Copyright 2004-2009 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt import unittest from . import parser_test_case from pygccxml import parser from pygccxml import declarations class Test(p...
#!/usr/bin/env python3 import sys import statistics def help(): print(''' Usage: ------------ meanMedianMinMax < <path> Description: ------------ Calculates min, max, mean, and median from a list of numbers given on stdin and outputs to stdout. ''') sys.exit(0) if '-h' in ...
# Author: Deeraj Nagothu # ENF estimation from video recordings using Rolling Shutter Mechanism # Import required packages import numpy as np import cv2 import pickle import pyenf #from scipy import signal, io import scipy.io.wavfile import math from scipy.fftpack import fftshift import matplotlib.pyplot a...
from . import GlobalConstants as GC from . import configuration as cf from . import Image_Modification, Utility, Weapons, Engine, TextChunk from . import BaseMenuSurf, HelpMenu # === GENERIC ITEM OBJECT ======================================== class ItemObject(object): next_uid = 100 def __init__(sel...
# An implementation of Breath First Search # https://en.wikipedia.org/wiki/Breadth-first_search # # Methods implemented: # 1- add edges to the graph # 2- breath first search from queue import Queue from collections import defaultdict # A directed representation of a graph class Graph: def __in...
#!/usr/bin/python3 # http://www.tkdocs.com/tutorial/index.html ''' Tkinter python3 program the following packages are required: python3-tk https://docs.python.org/3/library/tkinter.ttk.html ''' import tkinter as tk from tkinter import ttk from subprocess import call class TkApp(object): def __init__(self): ...
""" Utilities - CVPRO BY: MOHAK BAJAJ CODING HEAVEN """ import math import time import logging import cv2 import numpy as np import copy def stackImages(_imgList, cols, scale): """ Stack Images together to display in a single window :param _imgList: list of images to stack :param co...
import pythongis as pg # load large raster d = pg.raster.data.RasterData(#r"C:\Users\kimo\Downloads\F101992.v4b_web.stable_lights.avg_vis.tif") r"C:\Syria Nightlights\data\nightlights\priogridones\F101993.v4b_web.stable_lights.avg_vis.tif") #d.view(1000,500) print d # crop test c = pg.raster.manager.crop(d, ...
import os import unittest import sys import re def run_tests(): ls_paths = [] cwd = os.getcwd() #Find all relevant subdirectories that contain unit tests root_dir = "src" for root, dirs, files in os.walk(root_dir): dirs.sort() for file in files: if "pycache" not in roo...
import serial, time, datetime, struct import sys import os import pymysql import binascii cnx=pymysql.connect(user='root',password='root',host='localhost',database='Humanrexx') if cnx: print('localhost connected') cur=cnx.cursor() try: ser = serial.Serial('/dev/ttyUSB0',57600,timeout=1) except: ...
# -*- coding: utf-8 -*- from datetime import datetime from json import loads import pika, rospy from . import app from . import storage class VoltawareClient: def __init__(self): rospy.loginfo('Initialize Voltaware client...') login = rospy.get_param('~login') password = rospy.get_param...
from py3d.shapes import Shape, Cube, Prism
""" Adapted from pyftdi library by: B Forys, brandon.forys@alumni.ubc.ca Run this script to test an LED or similar input on a breakout board. Call the LEDTest() class in this script to test a specific GPIO port on the board """ from pyftdi.ftdi import Ftdi from pyftdi.gpio import GpioController, GpioException from os ...
import pandas as pd df = pd.read_csv('test.csv') a = 'abc' b = a + 'cdd' print(df)
# Generated by Django 2.0 on 2019-05-18 15:24 import datetime import itertools from random import randrange from django.db import migrations, models def update_dob(apps, schema_editor): # This needs to exist only once, this should NOT be copied over. Person = apps.get_model('app', 'Person') for person ...
import configparser import psycopg2 from sql_queries import copy_table_queries, insert_table_queries def load_staging_tables(cur, conn): """ Load original datasets into staging tables Arguments: cur: DB cursor conn: DB connect session Return: None """ for query in copy_tabl...
""" Using sqlalchemy to connect to the database, create a scoped session and connects that to flask. For more, refer to the sqlalchemy documentation [1] and the official flask docs for using sqlalchemy [2] [1]: https://docs.sqlalchemy.org/en/13/orm/tutorial.html [2]: https://flask.palletsproj...
import os import sys import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models as models from src.utils import nms, IoU, parametrize, unparametrize class RPN(nn.Module): INPUT_SIZE = (1600, 800) OUTPUT_SIZE = (100, 50) OUTPUT_CELL_SIZE = float(INPUT_SIZ...
import numpy as np import matplotlib.pylab as plt import scipy.stats as stats def plot_log_population2(population_old, population_new, _title, _xlabel, _ylabel, _bins): try: if np.allclose(population_old, population_new): return except: pass plt.figure(figsize=(10,5)) if Fa...
class UserResourceNames: USER_REDIRECT = "redirect" DETAILS = "details" DELETE_USER_CONFIRMED = "delete_user_confirmed"
from enum import Enum # https://developers.google.com/drive/api/v3/about-auth class Scope(Enum): ALL = 'https://www.googleapis.com/auth/drive' READONLY = 'https://www.googleapis.com/auth/drive.readonly' APPFOLDER = 'https://www.googleapis.com/auth/drive.appfolder' FILE ...
from argparse import ArgumentParser from jinja2 import Template import math from svg_digit_paths import DigitPathGenerator SVG_HEADER = '''<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="{{width_cm}}cm" height="{{h...
#!/usr/bin/env python # coding: utf-8 # In[ ]: class Solution: def xorOperation(self, n: int, start: int) -> int: #Defining the nums array nums=[int(start+2*i) for i in range (n)] #Initializing the xor xor=nums[0] for i in range(1,len(nums)): ...
class jvalue: def __init__(self, value=None): self.value = value class jobject: def __init__(self, value=None): self.value = value class jclass(jobject): def __init__(self, value=None): super().__init__(value) class jstring(jobject): def __init__(self, value=None): ...
# Copyright 2015-2020 Jan Feitsma (Falcons) # SPDX-License-Identifier: Apache-2.0 #!/usr/bin/env python3 # # Broadcast commands to robots. # # 2015-12-15 JFEI creation import sys, os import socket import time import struct sys.path.append("/home/robocup/falcons/code/packages/facilities/common/src") from FalconsTrace ...
#!/usr/bin/env python # coding: utf-8 # ## Problem 1: Simple scatter plot using random # # We can generate random numbers using using a method `random.rand()` from the [NumPy package](https://numpy.org/). This example generates 10 random values: # # ``` # import numpy as np # random_numbers = np.random.rand(10) # ...
#!/usr/bin/env python3 # python2 or python3 compatible import os import sys import yaml import signal import logging import logging.config import runner_service.configuration as configuration from runner_service.utils import fread, create_self_signed_cert from runner_service.app import create_app def signal_stop(*...
# Googly Eyes Expression (6515) pam = 2081004 sparkling = 5160025 sm.setSpeakerID(pam) sm.sendNext(''.join(["La la la! Oh, hello! What can I do for you? " "Wow, isn't this a Harp's Tail? You're really giving me all these? " "This will be great for keeping these eggs nice and warm! " "Thank you so very much! \r\n\r\n...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ All o...
from utils import data_loader import collections import numpy as np # data_loader.loadDataSeg("test") # SSDBoxSizes = collections.namedtuple('SSDBoxSizes', ['min', 'max']) # Spec = collections.namedtuple('Spec', ['feature_map_size', 'shrinkage', 'box_sizes', 'aspect_ratios']) # # the SSD orignal specs # specs = [ # ...
#!/usr/bin/env python3 """ Example mutator for testing individual 32 bit values. The mutator appends 1k of garbage data to the input file and modifies an single 32bit value of the original data per iteration. """ # Copyright (c) 2020 tick <tickelton@gmail.com> # SPDX-License-Identifier: ISC import os import configpa...
# Uncalibrated pile-up estimator for PFJets import math import FWCore.ParameterSet.Config as cms dummy_functor = cms.PSet( Class = cms.string("Polynomial"), c0 = cms.double(-1.0) ) # FFTJet puleup estimator module configuration fftjetPileupEstimatorPf_uncal = cms.EDProducer( "FFTJetPileupEstimator", ...
#Exercicio 8.15 ''' Dica: envie o nível atual como parâmetro e utilize-o para calcular a quantidade de espaços em branco à esquerda de cada elemento #Dica nao usada ''' L = [1, [2, 3, 4, [5, 6, 7]]] for e in L: if type(e) == list: for i in e: if type(i) == list: for a in i: ...
# -*- coding: utf-8 -*- # SPDX-License-Identifier: MIT from __future__ import absolute_import from datetime import datetime import os import koji import mock import pytest import module_build_service from module_build_service.builder.utils import get_rpm_release from module_build_service.common.models import BUILD_ST...
def findDecision(obj): #obj[0]: Passanger, obj[1]: Weather, obj[2]: Time, obj[3]: Coupon, obj[4]: Coupon_validity, obj[5]: Gender, obj[6]: Age, obj[7]: Maritalstatus, obj[8]: Children, obj[9]: Education, obj[10]: Occupation, obj[11]: Income, obj[12]: Bar, obj[13]: Coffeehouse, obj[14]: Restaurant20to50, obj[15]: Direct...
''' Looking at country spellings Having tidied your DataFrame and checked the data types, your next task in the data cleaning process is to look at the 'country' column to see if there are any special or invalid characters you may need to deal with. It is reasonable to assume that country names will contain: The set...
__all__ = ['reduce_tensor'] from .utils import to_numpy from torch import distributed import torch import numpy as np def reduce_tensor(tensor, rank, op=distributed.ReduceOp.SUM, dst=0, reduce_type='reduce'): """Reduce tensor cross ranks. Args: tensor: tensor need to be reduced. rank(int): ...
from __future__ import annotations from .base import Endpoint, IDEndpoint, SortOrder, endpoint from ..fields import * from typing import Union from ..schemas.models import * from ..schemas.responses import * from ..schemas.requests import * from ..schemas.enums import * class AppPreviewSetsEndpoint(Endpoint): path...
from django.contrib import admin from chat.models import Friend, FriendRequest, Thread, ChatMessage # Register your models here. admin.site.register(Friend) admin.site.register(FriendRequest) class ChatMessage(admin.TabularInline): model = ChatMessage class ThreadAdmin(admin.ModelAdmin): inlines = [ChatMes...
from .cut_vgg19 import Cut_VGG19 from .discriminator import Discriminator from .rdn import RDN from .rrdn import RRDN
#!/usr/bin/env python import snapshot, sys if len(sys.argv) == 3: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], "")) else: print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3]))
import requests def validate_post(res): if res.status_code == requests.codes.created: return res.json() else: res.raise_for_status() def validate_get(res): if res.status_code == requests.codes.ok: return res.json() else: res.raise_for_status() def build_params(**kwa...
import os import unittest import decimal from lxml import etree from apps.sepa.sepa import SepaAccount, SepaDocument from .base import SepaXMLTestMixin class ExampleXMLTest(SepaXMLTestMixin, unittest.TestCase): """ Attempt to test recreating an example XML file """ def setUp(self): super(ExampleXML...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_union_find ---------------------------------- Tests for `python_algorithms.union_find` module. """ import unittest from python_algorithms.basic.union_find import UF class TestUnionFind(unittest.TestCase): def setUp(self): self.N = 10 ...
from sqlalchemy import Column, Integer, String, DateTime, Table, text from sqlalchemy.ext.declarative import declarative_base import datetime from com.pe_database import ENGINE, Base, metadata, MyTable class Order(Base): pass # __tablename__ = "pe_order" # id = Column(Integer, primary_key=True) # use...
from __future__ import print_function import torch from _config import Config as config import model import trainer import _utils from pathlib import Path import sys import time torch.backends.cudnn.benchmark = True path = Path(config.CHECKPOINT_PATH) path.mkdir(parents=True, exist_ok=True) stats_file = open(path / '...
from django.db import models from django.db.models import JSONField from .Organism import Organism from .TaxID import TaxID from .Tag import Tag from .GenomeContent import GenomeContent import os from OpenGenomeBrowser import settings from functools import cached_property class Genome(models.Model): """ Repre...
import hypothesis.strategies as st import numpy as np import pytest from hypothesis import given from hypothesis.extra import numpy as hnp from mygrad import Tensor from mygrad.errors import InvalidGradient from mygrad.operation_base import Operation from tests.utils import does_not_raise class OldOperation(Operatio...
''' Copyright (c) 2019, Ameer Haj Ali (UC Berkeley), and Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
from pybls21.s21client import S21Client
# Str09.py ''' print('숫자 1번 입력'); n1 = int(input()) print('숫자 2번 입력'); n2 = int(input()) print(n1+n2) ''' ''' print('숫자 2개 입력') n1, n2 = input().split(' ') print(int(n1)+int(n2)) ''' print('숫자 2개 입력') n1, n2 = map(int, input().split(' ')) print(n1+n2)
import sys import os from datetime import datetime try: import paramiko from paramiko import SSHClient except ImportError: print("please 'pip install paramiko'!!!!") raise sys.path.append(os.path.dirname('.')) def main(): cur_date = datetime.now() print('setting date: ', cur_date.isoformat())...
# coding: utf-8 import pprint import re # noqa: F401 import six from ks_api_client.configuration import Configuration class MarginDet(object): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict...
import argparse import os import sys def add_script(): res = "<script>\n" \ "function updateView(key, el, ons){" \ "let s = el.innerHTML;" \ "let root = document.documentElement;" \ "if (s.startsWith(\"Hide\")) { " \ "el.innerHTML = s.replace(\"Hide\", \"Show\"); ...
""" File input/output for localization data in Elyra files. """ from __future__ import annotations import io import logging import pandas as pd import locan.constants from locan.data import metadata_pb2 from locan.data.locdata import LocData from locan.locan_io.locdata.utilities import ( convert_property_names...
import sqlite3 import json from datetime import datetime from traceback import print_tb from helpers import create_table_if_not_exists, get_db_path, get_timeframe_path, format_data, \ acceptable, get_timeframes timeframes = get_timeframes() sql_transaction = [] # start_row = 0 start_row = 145000000 # ...
#!/usr/bin/env python3 import numpy.ma as ma import numpy as np import matplotlib.pyplot as plt import matplotlib.cbook as cbook import matplotlib.transforms as mtransforms # This script is to compare rmse from e3sm_diags tables and those from cmip6 models in a pre-compiled csv file. # The script was written by Chris...
from defs import * import behaviors __pragma__('noalias', 'name') __pragma__('noalias', 'undefined') __pragma__('noalias', 'Infinity') __pragma__('noalias', 'keys') __pragma__('noalias', 'get') __pragma__('noalias', 'set') __pragma__('noalias', 'type') __pragma__('noalias', 'update') def run_settler(creep, targetRoom...
""" CourtID: ill Court Short Name: Ill. Author: Rebecca Fordon Reviewer: Mike Lissner History: * 2016-06-22: Created by Rebecca Fordon """ from juriscraper.lib.string_utils import convert_date_string from juriscraper.OralArgumentSite import OralArgumentSite class Site(OralArgumentSite): def __init__(self, *args...
from __future__ import print_function import base64 import csv import json import sys from collections import Counter from functools import wraps import numpy as np import pandas as pd import zerorpc from nestor import keyword as kex def exception_handler(func): @wraps(func) def func_or_exception(*args, **k...
listaPares = [] listaImpares = [] listaCompleta = [] while True: num = int(input('Digite o numero: ')) listaCompleta.append(num) if num % 2 == 0: listaPares.append(num) else: listaImpares.append(num) still = str(input('Continuar[sim/não]: ')).strip().lower()[0] if still == 'n': ...
## -*- coding: UTF-8 -*- ## api_client.py ## ## Copyright (c) 2019 libcommon ## ## 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...
# SOMA def soma(): z = float(0) w = float(0) x = (float(input('Quantos números deseja calcular? '))) while z < x: y = (float(input('Digite o número: '))) w = w + y z = z + 1 print(''' O resultado é:''', w) print('') # SUBTRAÇÃO def subtracao(): z = float(0) x = ...
import pickle def audio_condition(): # natural versus narration narration_users = ['user2', 'user4', 'user7', 'user8', 'user10','user14','user16','user18','user20'] natural_users = ['user3','user5','user6','user9','user11','user12','user15','user17','user19'] filename = '../data/narration_users.pkl' ...
from UserPortal import app from WarnoConfig import config if __name__ == '__main__': cfg = config.get_config_context() app.run(debug=True, host='0.0.0.0', port=cfg['setup']['user_portal_port'])
from django.test import TestCase from django.db import DataError from .mixins import TwoUserMixin, ProposalGroupMixin, ProposalTestHelper from consensus_engine.models import ProposalGroup, Proposal, ChoiceTicket, ProposalChoice from django.core.exceptions import PermissionDenied from consensus_engine.utils import Propo...
# Generated by Django 3.1.3 on 2020-11-04 22:18 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('account', '0001_initial'), ] operations = [ migrations.CreateModel( name='F...
import os from setuptools import setup, find_packages runtime_dependencies = [ 'pandas', 'tqdm' ] build_dependencies = [ 'wheel', ] dev_dependencies = build_dependencies + [ 'pylint', 'flake8', 'flake8-docstrings', 'pytest', 'pytest-cov', 'pytest-html', 'pytest-xdist', 'coverage', ] setup( ...
"""User fixtures.""" import uuid import pytest @pytest.fixture def user_data(): """Return user creation data.""" return { "id": uuid.uuid4(), "username": "jsmith", "first_name": "John", "last_name": "Smith", "password": "correcthorsebatterystaple", "auth_token"...
import unittest class SomeClass(unittest.TestCase): def test_something(self): pass def do_something(self): pass def test_something_else(self): x = 2 class OtherClass(unittest.TestCase): def test_something_other(self): print("Hello") class AnotherClass: def ...
# ---------------- ETFS ---------------- URL_LINKS_ETFS = 'https://sistemaswebb3-listados.b3.com.br/fundsPage/3' # ---------------- FIIS ---------------- URL_LINKS_FIIS = 'https://fiis.com.br/lista-de-fundos-imobiliarios/' # ---------------- ACOES ---------------- URL_BASE_DADOS_ACAO = 'https://sistemaswebb3-l...
import sentry_sdk from loguru import logger from fastapi import FastAPI from sentry_sdk.integrations.asgi import SentryAsgiMiddleware from sentry_sdk.integrations.redis import RedisIntegration from sentry_sdk.integrations.logging import ignore_logger from app.core import config def setup_sentry(app: FastAPI): if...
print("STRING FORMATTING\n-----------------") # -> STRINGS, COMMAND "print" AND SOME VARIABLE USE: print(1+3) print(3*5) print() print('The end') print("Python's strings are easy to use") print('We can include "quotes" in strings') print("Hello" + " World") greeting = "Hello" name = "Carlos" print(greeting + name) prin...
#!/usr/bin/env python3.5 import json from json import JSONDecodeError import sys from urllib.parse import urlsplit import argparse import os import os.path parser = argparse.ArgumentParser(description='Split a CDRv2 JSON file up by URL host') parser.add_argument('-o', '--outputdir', help='output directory (default .)'...
from netCDF4 import Dataset import xarray as xr import pandas as pd import numpy as np import datetime import math from genNetCDF import fixType from sys import exit # Create NetCDF file containing the forcing data class Forcing: # from ideal test attributes = {"history": "Dec 20 00:00:00 2021"} dataDir = ...
# Copyright 2016 Ifwe 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 writing, so...
''' /django_api/users/urls.py ------------------------- Organize the api urls of User ''' from django.urls import path from . import views urlpatterns = [ path('all_scores', views.all_scores), path('one_score', views.one_score), path('add_score', views.add_score), path('update_score', views.update_sc...
""" initialize shared modules """ from src.shared.client_init import ClientInfo
#!/usr/bin/python3 import cobra as cb import pandas as pd import re import sys import getopt import os.path import copy import csv import math import cobra.flux_analysis.variability import subprocess import shutil, errno import statistics from cobra import Reaction import cometspy as c import numpy as np import matplo...
from django.contrib import admin from django.forms import TextInput, Textarea, SelectMultiple from django.db import models from sam.models import * class TagAdmin(admin.ModelAdmin): """ The admin model for a Tag """ admin.site.register(Tag, TagAdmin) class WebsiteAdmin(admin.ModelAdmin): """ The admin m...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on: Wed Oct 14 10:40:00 2020 Description: Function for formatting input string using markdown formatting code. """ __author__ = ["Karolina Pantazatou"] __credits__ = "ICOS Carbon Portal" __license__ = "GPL-3.0" __v...
import cv2 import sys sys.path.append(".") from library import * from acc_test_library import * from libLocalDesc import * from tqdm import tqdm CosProxThres = 0.4 SignAlingThres = 4000 SameKPthres = 4 from AffRANSAC import HomographyFit, Look4Inliers, NFAclass, ORSAInliers def LaunchAndRecord_Aff_RANSAC_H(MS, p, kp...
""" Utility funcitions for drowing graphics """ import numpy as np import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as p3 import matplotlib.animation as animation def update(num, data, line): line.set_data(data[:2, :num]) line.set_3d_properties(data[2, :num]) """ Function that animate points...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2016 Eugene Frolov <eugene@frolov.net.ru> # # 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 # # ...
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pandas as pd import os # In[2]: #function to get current directory def getCurrentDirectory(): listDirectory = os.listdir('../') return listDirectory # In[3]: #function to read csv file def readCsvFile(path): crimes_original =...
from flake8.formatting.base import BaseFormatter from xml.etree import ElementTree as ET class Flake8junit(BaseFormatter): """Flake8's error text to JUnit XML converter.""" def _is_error(self, code): return len(code) > 0 and code[0] not in ('w', 'W') def start(self): super(Flake8junit, s...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from nestargs import NestedArgumentParser from nestargs.parser import NestedNamespace as Namespace from omegaconf import OmegaConf, DictConfig...
from setuptools import setup, find_packages PROJECT_NAME = "CEN-UIU" PROJECT_PACKAGE_NAME = "cen_uiu" PROJECT_GITHUB_USERNAME = "neotje" PACKAGES = find_packages() REQUIRED = [ "pywebview[gtk]>=3.4" "pyserial>=3.5", "dbus-python>=1.2.16", "screeninfo>=0.6.7", "websockets>=10.1", "aiohttp>=3....
import pytest from hypothesis import given from hypothesis.strategies import just @pytest.mark.anyio @given(x=just(1)) async def test_hypothesis_wrapper(x): assert isinstance(x, int)
''' Main pipeline for analysing chatlogs scraped from PAN12 xml file. ''' import os import numpy as np import pandas as pd import matplotlib.pyplot as plt #### Files necessary for pre-processing original xml data # set path of working dir path = 'C:/Users/Darren Cook/Documents/PhD Research/csa_chats/' os.chdir(pa...
from django.contrib.auth import get_user_model from rest_framework import status from mixer.backend.django import mixer from datetime import date from pedidos.models import Pedido from pedidos.serializers import PedidoSerializer from equipamentos.models import Equipamento from reservas.models import Reserva from core ...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
from project.repo_wrapper import * import pathlib def get_TEST_REPO_SVN_FILE( arg_path ): return { "REPO_TYPE" : svn_file, "REPO_BASE_URL" : pathlib.Path( arg_path ).as_uri(), "REPO_LOCAL_ROOT" : arg_path, "SVN_ADMIN_USER" : "test_svn_admin", "SVN_ADMIN_PASSWORD" : "test_key", "SVN_ADMIN...
import logging import sys from os.path import isfile import numpy as np from phi import math from phi.field import Scene class SceneLog: def __init__(self, scene: Scene): self.scene = scene self._scalars = {} # name -> (frame, value) self._scalar_streams = {} root_logger = logg...
#### DICTIONARY ## ========== ## NYI = Not Yet Implemented ## WIP = Work In Progress #### COLORS ## ====== ## Bluesky: "#88e1f2" | Blackish: "#3a3535" | Deep blue: "#21243d" # ## Yellow: "#ffd082" | Pink: "#ff7c7c" | Grey: "#888" # BACKGROUND_COLOR = "#21243d" VISITED_COLOR = "#ffd082" GOAL_COL...
# -*- coding: utf-8 -*- # Copyright 2020 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 require...
""" Shadofer#6681 """ import asyncio from json import dumps, loads from os import environ import websockets from dotenv import load_dotenv server_port = None def main(): # Handles client startup. load_dotenv() global server_port server_port = environ.get('PORT', 5000) print(f'Establishi...
############################################################################## # # Copyright (c) 2009 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...