text
stringlengths
2
999k
#!/usr/bin/env python """ Project-wide application configuration. DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE. They will be exposed to users. Use environment variables instead. See get_secrets() below for a fast way to access them. """ import os from authomatic.providers import oauth2 from authomatic import ...
import boto3 exceptions = boto3.client('resourcegroupstaggingapi').exceptions InternalServiceException = exceptions.InternalServiceException InvalidParameterException = exceptions.InvalidParameterException PaginationTokenExpiredException = exceptions.PaginationTokenExpiredException ThrottledException = exceptions.Thr...
import json import requests import pandas as pd import pickle #from utiles import * import numpy as np """Setting the headers to send and accept json responses """ header = {'Content-Type': 'application/json', \ 'Accept': 'application/json'} # creamos un dataset de pruebas df = pd.read_csv('time_se...
""" .. module:: session :synopsis: Main module for oct2py package. Contains the Octave session object Oct2Py .. moduleauthor:: Steven Silvester <steven.silvester@ieee.org> """ import os import re import atexit import doctest import subprocess import sys from .matwrite import MatWrite f...
"""PyTorch Custom Distributions.""" from garage.torch.distributions.tanh_normal import TanhNormal __all__ = ['TanhNormal']
import os import logging import torch import torch.nn as nn import torchvision import torch.backends.cudnn as cudnn import torch.distributed as dist from data import iterator_factory as iter_fac from train import metric from train.model import model from train.lr_scheduler import MultiFactorScheduler def train_model...
# Copyright 2018-2021 Xanadu Quantum Technologies 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 applicabl...
import cv2 import numpy as np import matplotlib.pyplot as plt import os from sklearn import svm import pandas as pd import lightgbm as lgb from sklearn.metrics import classification_report, f1_score, mean_absolute_error from sklearn.model_selection import StratifiedKFold, KFold, ShuffleSplit import pickle from sklearn....
''' Example program for checking ESP LEGO SPIKE simulator Source: LEGO Education SPIKE 2.0.0 Controlling the Light Matrix Create your first program using Python. Copy the code shown below by clicking or tapping the copy icon in the box. Paste the code to the Programming Canvas, where you’ll write your code. The gre...
from abc import ABCMeta, abstractmethod class IBenchmarker(metaclass=ABCMeta): """ """ def __init__(self, config): import util.constant as const try: self._check_config(config) except KeyError: raise except: raise self._benchmar...
SeqSetLib DEFINITIONS IMPLICIT TAGS ::= BEGIN EXPORTS Seq1,Set1; Seq1 ::= SEQUENCE { bool1 BOOLEAN, int1 INTEGER, seq1 SeqIn } Set1 ::= SET { bool1 BOOLEAN, int1 INTEGER, set1 SetIn } SetIn ::= SET { boolIn BOOLEAN, intIn INTEGER } SeqIn ::= SEQUENCE { boolIn BOOLEAN, intIn INTEG...
from context import Mantis, Propagation tweak = [[[0xa],[0],[0],[0]], [[0xa],[0],[0],[0]], [[0],[0],[0],[0]], [[0],[0],[0],[0]]] emptystate = [[[0],[0],[0],[0]], [[0],[0],[0],[0]], [[0],[0],[0],[0]], [[0],[0],[0],[0]]] T = Mantis.MantisState("T", tweak) S = Man...
# -*- coding: utf-8 -*- import datetime import six import warnings from itertools import islice from functools import reduce import pandas as pd import numpy as np from dateutil.relativedelta import relativedelta from sqlalchemy import Column from sqlalchemy.orm.query import Query from sqlalchemy.orm.attributes import...
from __future__ import annotations from functools import reduce from typing import Iterable class Strategy: def __init__(self): self._partitions = None def get(self, feature: str) -> int: raise NotImplementedError def partition_number(self, features: Iterable[str]) -> int: retur...
import unittest import pysal.lib import geopandas as gpd from pysal.explore.segregation.network import get_osm_network, calc_access @unittest.skip("Skipping Network_Tester") class Network_Tester(unittest.TestCase): def test_calc_access(self): variables = ["WHITE_", "BLACK_", "ASIAN_", "HISP_"] s_m...
import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import cv2 # Read in an image, you can also try test1.jpg or test4.jpg image = mpimg.imread('test6.jpg') # Define a function that thresholds the S-channel of HLS # Use exclusive lower bound (>) and inclusive upper (<=) def hls_select...
# Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path. # In a UNIX-style file system, a period . refers to the current directory. Furthermore, a double period .. moves the directory up a level. # For more information, see: Absolute path vs relative path in L...
import pytube as pt tags = { 313: '2160p', 271: '1440p', 137: '1080p', 22: '720p', 18: '360p', 278: '144p', 140: 'MP4 128kb/s (only audio)', 249: 'webm 50Kb/s (only audio)', 251: 'webm 160kb/s (onlu audio)', } def get_available_qualities(url): video = pt.YouTube(ur...
""" Support for displaying collected data over SNMP. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.snmp/ """ import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeas...
# pylint: disable=missing-docstring import unittest import numpy as np import tensorflow as tf import tf_encrypted as tfe from tf_encrypted.layers.activation import Tanh class TestTanh(unittest.TestCase): def setUp(self): tf.reset_default_graph() def test_forward(self): input_shape = [4] input_tanh ...
from abc import ABC, abstractmethod class DataGeneratorBase(ABC): @abstractmethod def __init__(self,args): ''' Coming up with a standardized input data format. :param args: contains networc parameters including the name of the image dataset (e.g. aps, zeiss, northstar, etc.) '''...
""" Django settings for shiny_fire_30114 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ imp...
"""TO-DO: Write a description of what this XBlock is.""" import pkg_resources from web_fragments.fragment import Fragment from xblock.core import XBlock from xblock.fields import Integer, Scope import subprocess class SimulationXBlock(XBlock): """ TO-DO: document what your XBlock does. """ # Fields...
# -*- coding: utf-8 -*- import os import numpy as np import gc import multiprocessing import pandas import datetime import sys from pandas.errors import EmptyDataError from functools import partial def convert_content(content_string, x_dim, pad_before=True): int_list = list(map(np.uint8, str(content_string).en...
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # from logging import getLogger import os import numpy as np import torch from .dataset import StreamDataset, Dataset, ParallelD...
from flask import request, jsonify from lin.redprint import Redprint from app.libs.utils import paginate from app.models.member import Member member_api = Redprint('member') @member_api.route('', methods=['GET']) def get_members(): start, count = paginate() q = request.args.get('q', None) members = Memb...
# Copyright 2021 The NetKet 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 ...
class TaskStatus: def __init__(self, taskId, sequence, status): self.taskId=taskId self.sequence = sequence self.status = status def __str__(self): return "Task %s for %s is %s" %(self.taskId, self.sequence, self.status)
""" Module to read MODFLOW formatted output files. The module contains one important classes that can be accessed by the user. * FormattedHeadFile (Formatted head file. Can also be used for drawdown) """ import numpy as np from ..utils.datafile import Header, LayerFile def is_int(s): try: int(s) ...
import os import sys import argparse import random import torch import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.utils.data import torchvision.transforms as transforms from torch.autograd import Variable import utils from utils import PointLoss from utils import distance_squre import data_util...
#!/usr/bin/env python # # MIT License # # Copyright The SCons Foundation # # 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 us...
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPC help output.""" from test_framework.test_framework import BitcoinTestFramework from test_fram...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: steammessages_cloud.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflecti...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Aug 12 18:57:38 2020 @author: usingh """ import argparse import sys import os import orfipy.translation_tables import orfipy.findorfs import orfipy.version import orfipy.utils as ut import json import logging from orfipy import _max_mem from orfipy impo...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An example client. Run simpleserv.py first before running this. """ from __future__ import print_function from twisted.internet import reactor, protocol # a client protocol class EchoClient(protocol.Protocol): """Once connected, send...
"""initial migration Revision ID: ba0bea714f05 Revises: Create Date: 2021-06-15 12:32:33.620512 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ba0bea714f05' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto ...
#Crie um programa que leia dois numeros e mostre a soma entre entres n1 = int(input('Type a number: ')) n2 = int(input('Type another number: ')) total = n1 + n2 print('The sum between {} and {} is equal to {}.'.format(n1, n2, total))
from audiomate import annotations from audiomate import tracks from audiomate.corpus.subset import subview import pytest from tests import resources class TestMatchingUtteranceIdxFilter: def test_match(self): filter = subview.MatchingUtteranceIdxFilter(utterance_idxs={'a', 'b', 'd'}) assert fi...
"""integration tests for messages.email_ module.""" import pathlib import pytest import int_setup from messages.email_ import Email from messages._exceptions import MessageSendError ############################################################################## # SKIP TESTS IF ENVIRONMENT NOT PREPPED ###############...
def get_create_database_query(db_name: str): return f'CREATE or REPLACE database {db_name}' def get_drop_database_query(db_name: str): return f'DROP DATABASE {db_name}' def get_create_constraint_query(label: str, property_name: str, constraint_name: str = ''): """ Build query to create a constraint ...
import pickle from time import sleep import numpy as np import settings as s from agents import Agent from environment import GenericWorld, WorldArgs from fallbacks import pygame from items import Coin class ReplayWorld(GenericWorld): def __init__(self, args: WorldArgs): super().__init__(args) ...
print('Hello world')
from django.db import models from django.utils.timezone import now # Create your models here. class Gallery(models.Model): title = models.CharField(default='项目标题', max_length=100) description = models.CharField(default='项目简介', max_length=300) image = models.ImageField(default='default.png', upload_to='im...
import array import micropython import utime from machine import Pin from micropython import const class InvalidChecksum(Exception): pass class InvalidPulseCount(Exception): pass MAX_UNCHANGED = const(100) MIN_INTERVAL_US = const(200000) HIGH_LEVEL = const(50) EXPECTED_PULSES = const(84) class DHT11: ...
# Generated by Django 3.0.6 on 2020-05-15 17:14 import annoying.fields from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration):...
import logging from collections import defaultdict import pyvex from .. import Analysis from ..code_location import CodeLocation from ..forward_analysis import ForwardAnalysis, FunctionGraphVisitor from ...keyed_region import KeyedRegion from ...sim_variable import SimStackVariable, SimRegisterVariable l = logging....
# Copyright (c) 2016 IBM Corporation # 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 req...
#!/bin/env python3 import threading import logging import time import subprocess import re IS_SAFE = True NAME = 'IP' logger = logging.getLogger('WIDGET') class mainThread (threading.Thread): def __init__(self, codeName, mainQueue, inputQueue=None): threading.Thread.__init__(self) self.name = N...
# Copyright 2018 Jacob D. Durrant # # 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 writ...
#!/usr/bin/env python3 # 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. r""" Batch acquisition functions using the reparameterization trick in combination with (quasi) Monte-Carlo sampling. S...
"""Factories to help in tests.""" from factory import Sequence from factory.alchemy import SQLAlchemyModelFactory from shopyoapi.init import db from modules.box__default.auth.models import User from modules.box__default.auth.models import Role from sqlalchemy.orm import scoped_session class BaseFactory(SQLAlchemyMod...
#Has functions to do everything your engine module needs import pygame, random, sys from pygame.locals import * from pyaudiogame.speech import speak as spk from pyaudiogame.pygame_input import PygameInput from pyaudiogame.console import Console from pyaudiogame import global_keymap #our program spacific modules: impo...
from __future__ import division import unittest import numpy as np from wyrm.types import Data, BlockBuffer from wyrm.processing import append_cnt from functools import reduce class TestBlockBuffer(unittest.TestCase): def setUp(self): self.empty_dat = Data(np.array([]), [], [], []) self.dat_1 ...
import multiprocessing import threading import tensorflow as tf import numpy as np import gym import os import shutil import matplotlib.pyplot as plt import gym_sandbox import time import multiprocessing GAME = 'police-commnet-discret-2agent-v0' OUTPUT_GRAPH = True LOG_DIR = './.tf-log' N_WORKERS = 4 #multiprocessing....
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # list...
from django.db import models from django.contrib.auth.models import User from django.urls import reverse, reverse_lazy from django.contrib.auth import get_user_model from s3direct.fields import S3DirectField class Post(models.Model): title = models.CharField(max_length=255) author = models.ForeignKey(User, o...
import asyncio import datetime import freezegun import kopf from kopf.reactor.processing import process_resource_event from kopf.structs.containers import ResourceMemories async def test_consistent_awakening(registry, settings, resource, k8s_mocked, mocker): """ A special case to ensure that "now" is consis...
__author__ = 'ALLSECURE' try: import unittest2 as unittest except ImportError: import unittest import tests.test_data_utils import opp.facade class TestFromParams(unittest.TestCase): def test_card_account_from_params(self): card_account_with_result_parameters = opp.facade.CardAccount.from_params(...
# Copyright 2019 Diamond Light Source 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 t...
from django.db import models from django.contrib.auth.models import AbstractUser from sellshop.utils.base_models import BaseModel class Contact(BaseModel): name = models.CharField(verbose_name="Name", max_length=50) email = models.EmailField(verbose_name="Email", null=False, blan...
''' Copyright 2022 Airbus SAS 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 dis...
#!/usr/bin/python3 """This module proccesses an image through YOLO V3 model using cvlib library and stores and print its output. Usage: Function "obj_detect" accepts one argument, call this module like this: "obj_detect(<img object>)" """ from Blob_upload.upload import upload, get_files from uuid import uuid4 ...
# coding: utf-8 """ katib swagger description for katib # noqa: E501 OpenAPI spec version: v0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import katib from katib.models.v1alpha3_trial_assignment import V1alpha...
import itertools import pytest import numpy as np from conftest import skipif from sympy import Integer from sympy.core.numbers import Zero, One # noqa pytestmark = skipif('noops', whole_module=True) # All ops-specific imports *must* be avoided if `backend != ops`, otherwise # a backend reinitialization would be tr...
import pytest from adventofcode.year_2016.day_09_2016 import part_one from adventofcode.year_2016.day_09_2016 import part_two @pytest.mark.parametrize( ["line", "expected"], [ ("ADVENT", 6), ("A(1x5)BC", 7), ("(3x3)XYZ", 9), ("A(2x2)BCD(2x2)EFG", 11), ("(6x1)(1x3)A", 6)...
# coding=utf-8 # *** WARNING: this file was generated by crd2pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .provider import * # Make subpackages available: from . import ( app, meta_v1, )
from marshmallow import Schema, fields class PolicyItemSchema(Schema): alertTypeCode = fields.Str(required=True, attribute='alert_type_code', error_messages={'required': {'code': 'MISSING_ALERT_TYPE_CODE', 'message': 'Missing alert type code'}}) enabled = fields.Bool(required=True, error_messages={'required': ...
class Solution: def minAreaRect(self, points: List[List[int]]) -> int:
############################################################################## # # Copyright (c) 2001, 2002 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. # TH...
# Copyright 2017 Open Source Robotics Foundation, 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...
from polyskel import polyskel import networkx as nx import numpy as np import copy, enum import matplotlib.pyplot as plt from . import polygon from shapely import geometry class Event(enum.Enum): CLOSE = 1 OPEN = 2 SPLIT = 3 MERGE = 4 INFLECTION = 5 INTERSECT = 6 def rad2degree(rad): """...
# -*- coding: utf-8 -*- # Copyright © 2014, German Neuroinformatics Node (G-Node) # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the BSD License. See # LICENSE file in the root of the Project. try: from collections.ab...
#encoding: utf-8 import socket import dpkt import geoip2.database def ip2geo(ip): _reader = geoip2.database.Reader('GeoLite2-City.mmdb') _geo = None try: _geo = _reader.city(ip) except BaseException as e: pass _reader.close() return _geo def unpack_pcap(path): ...
__copyright__ = """ Copyright 2016 Lukasz Tracewski 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 applic...
import argparse import logging import time import cv2 import numpy as np import common from estimator import TfPoseEstimator from networks import get_graph_path, model_wh import platform import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' logger = logging.getLogger('TfPoseEstimator-WebCam') logger.setLevel(logging.C...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import benchmark from telemetry.web_perf import timeline_based_measurement from benchmarks import simple_story_set class TBMSample(benchmark....
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
import os import sys import signal import zipfile import subprocess from time import sleep from randomizer import add_random_ints def run_simulator(scores_key, file_name, level_no): try: ld_export = "export LD_LIBRARY_PATH='/var/www/code-character/sim/code_character_simulator/codechar/lib';" # Mov...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import base64 import itertools import os import textwrap import pytest ...
# Copyright 2013-2021 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) import llnl.util.tty as tty from spack import * class Hpctoolkit(AutotoolsPackage): """HPCToolkit is an integrated ...
import typing import uuid import fiepipelib.locallymanagedtypes.data.abstractmanager class Container(object): """ Common or shared configuration of a container. Typically pulled from a state server and put in the localregistry for later use. Though they can be created locally too, before they're pu...
from django.db import models class Area(models.Model): """ 省区划 自关联的表 ,外键指向本身 """ name = models.CharField(max_length=20, verbose_name='名称') parent = models.ForeignKey('self', on_delete=models.SET_NULL, related_name='subs', null=True, blank=True, verbose_name='上级行政区划')...
import logging from collections import defaultdict import numpy as np from tensorboardX import SummaryWriter WINDOW_SIZE = 100 class MetricCounter: def __init__(self, exp_name): self.writer = SummaryWriter(exp_name) logging.basicConfig(filename='{}.log'.format(exp_name), level=logging.DEBUG) ...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Robin Rosenstock and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class CV_work_history_job_management(Document): pass
import os import csv csvpath = os.path.join('.',"cereal.csv") with open(csvpath, newline = '') as csvfile: print() csvreader = csv.reader(csvfile, delimiter = ",") for row in csvreader: if float(row[7]) >= 5: print(row[0] + " --- " + row[7]) print()
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import copy from aiida.common.utils import conv_to_fortran_withlists from aiida.common.exceptions import InputValidationError, ModificationNotAllowed from ._group_list import list_to_grouped_string __all__ = ['write_win'] def w...
# This is the file for writing the testing programs of Task2B from floodsystem.stationdata import build_station_list, update_water_levels from floodsystem.flood import stations_level_over_threshold def run(): # Build list of stations stations = build_station_list() # Update the current water levels in t...
# encoding: utf-8 """ Test lldb Obj-C exception support. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class ObjCExceptionsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipUnlessDarwin def test_objc_e...
from covid_news_handling import check_for_deleted_news, delete_news, get_accepted_articles, news_api_request import sched, time, logging def test_all(): test_get_accepted_articles() test_delete_news() test_check_for_deleted_news() test_news_API_request() logging.info("News data handling test comple...
""" Revision ID: 0204_service_data_retention Revises: 0203_fix_old_incomplete_jobs Create Date: 2018-07-10 11:22:01.761829 """ import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql revision = "0204_service_data_retention" down_revision = "0203_fix_old_incomplete_jobs" def upgrad...
# postgresql/psycopg2.py # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors r""" .. dialect:: postgresql+psycopg2 :name: psyco...
#!/usr/bin/env python import setuptools setuptools.setup( setup_requires=['pbr'], pbr=True )
################################################################################ # Copyright (c) 2015-2019 Skymind, Inc. # # This program and the accompanying materials are made available under the # terms of the Apache License, Version 2.0 which is available at # https://www.apache.org/licenses/LICENSE-2.0. # # Unless...
import asyncio import enum import logging import queue import threading from asyncio.events import AbstractEventLoop from typing import Callable, Optional, Union from aiortc import RTCPeerConnection, RTCSessionDescription from aiortc.contrib.media import MediaPlayer, MediaRecorder from .receive import VideoReceiver, ...
""" Circle serializers""" # Django REST from rest_framework import serializers # Models from cride.circles.models import Circle class CircleSerializer(serializers.ModelSerializer): class Meta: model = Circle fields = ['name', 'slug_name', 'description', 'rides_taken', 'rides_offered', 'members_limit']
import tensorflow as tf import pandas as pd import numpy as np from tensorflow.python.platform import app from core.Initializer import Initializer from core.Model import create_model from core.development_op import train, validate from core.production_op import feed, create_batch_and_feed from settings import FLAGS fr...
# -*- coding: utf-8 -*- # Copyright (c) 2021, GreyCube Technologies and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestCarSizeCT(unittest.TestCase): pass
""" Copyright (c) 2019 Intel Corporation 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 wri...
# Generated by Django 3.0.5 on 2020-05-15 20:01 from django.db import migrations, models import django.db.models.manager class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( ...
from model.contact import Contact import random import string import os.path import jsonpickle import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of contacts", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 3 f = "data/contacts.json" for o,...