text
stringlengths
2
999k
#!/usr/bin/env python3 # # Electrum - lightweight Bitcoin client # Copyright (C) 2018 Thomas Voegtlin # # 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 withou...
from sympy.ntheory import totient from sys import setrecursionlimit setrecursionlimit(2000) def tetrate_mod_n(base, exponent, modulo): if exponent == 2: return pow(base, base, modulo) tot = totient(modulo) e = tetrate_mod_n(base, exponent - 1, tot) return pow(base, e, modulo) print(tetrat...
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Tag, Recipe from recipe.serializers import TagSerializer TAGS_URL = reverse('recipe:tag-list') class ...
import torch from torch import nn, optim import torch.nn.functional as F from torch.distributions import Categorical import copy import gym import environment # lgtm[py/unused-import] import pyBaba from tensorboardX import SummaryWriter device = torch.device("cuda" if torch.cuda.is_available() else "cpu") env = gy...
#!/usr/bin/env python # noinspection PyUnresolvedReferences import vtkmodules.vtkRenderingOpenGL2 from vtkmodules.vtkCommonColor import vtkNamedColors from vtkmodules.vtkCommonDataModel import vtkPolyData from vtkmodules.vtkFiltersSources import ( vtkPointSource, vtkSphereSource ) from vtkmodules.vtkInteractio...
# flake8: noqa # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License...
import unittest from unittest import TestCase from sqlalchemy.orm.exc import MultipleResultsFound from wopmars.tests.resource.model.FooBase import FooBase from wopmars.SQLManager import SQLManager from wopmars.utils.OptionManager import OptionManager class TestWopmarsSession(TestCase): def setUp(self): ...
import numpy as np def ede(a, epsilon = 0.5, weights = None): """ Compute the Atkinson Equally-Distributed Equivalent. The Atkinson EDE and Index are only suitable for distributions of desirable quantities (where having more of the quantity is desirable), e.g., income. Parameters ---------- ...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (2019) The Electrum Developers # # 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 w...
''' You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken...
# Generated by Django 2.2.6 on 2020-11-06 09:29 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('posts', '0010_auto_20201103_2339'), ] operations = [ migrations.AlterModelOptions( name='group', options={'ordering': ('titl...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
import datetime import functools import inspect import json import logging import os from typing import Callable, Dict, Optional import async_lru import gamla import redis from cloud_utils.cache import file_store, redis_utils _RESULT_HASH_KEY = "result_hash" _LAST_RUN_TIMESTAMP = "last_run_timestamp" class Version...
# # Copyright (C) 2009 The Android Open Source Project # # 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...
# 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 collections import itertools import re from ._structures import In...
from .compgcn import CompGCN, CompGCNLayer from .dgi import DGI, DGIModel from .disengcn import DisenGCN, DisenGCNLayer from .gat import PetarVSpGAT, SpGraphAttentionLayer from .gcn import GraphConvolution, TKipfGCN from .gcnii import GCNIILayer, GCNII from .gdc_gcn import GDC_GCN from .grace import GRACE, GraceEncoder...
from logging import exception import sys, os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from classes.downloader import Downloader from scripts import setup from typing import Dict class Track: '''Track informations and processing.''' def __init__(self, track: Dict, tr...
# -*- coding: utf-8 -*- # Scrapy settings for news_comment_spider project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://doc.scrapy.org/en/latest/topics/settings.html # https://doc.scrapy.org/en/...
import django from fluent_pages.tests.testapp.models import WebShopPage from fluent_pages.tests.utils import AppTestCase, override_settings from fluent_pages.urlresolvers import app_reverse, mixed_reverse, PageTypeNotMounted, MultipleReverseMatch class PluginTests(AppTestCase): """ Test cases for plugins ...
#!/usr/bin/python # Copyright 2019 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 ...
#!/usr/bin/python from PIL import Image import numpy as np def depth_read(filename): # loads depth map D from png file # and returns it as a numpy array, # for details see readme.txt depth_png = np.array(Image.open(filename), dtype=int) # make sure we have a proper 16bit depth map here.. not 8bi...
''' Utility functions models code ''' import numpy as np import numpy.lib.recfunctions as nprf import numpy.linalg as L from scipy.interpolate import interp1d from scipy.linalg import svdvals from statsmodels.distributions import (ECDF, monotone_fn_inverter, StepFunction)...
#Crie um programa que vai gerar cinco numeros aleatórios e colocar em uma tupla. #Depois disso, mostre a listagem de numeros gerados e tambem indique o menor e o maior valor que estão na tupla. from random import randrange tupla = (randrange(0, 11), randrange(0, 11), randrange(0, 11), randrange(0, 11)) print(f'Os numer...
import numpy as np from tqdm import tqdm import sys import tensorflow.compat.v1 as tf import h5py T = tf.float64 tf.disable_v2_behavior() from .utils import bin_data, doppler, get_session from .interp import interp from .history import History import os pwd = os.path.dirname(os.path.realpath(__file__))+'/' class Mod...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains widgets to to drag PySide windows and dialogs """ from __future__ import print_function, division, absolute_import from Qt.QtCore import Qt, Signal, QPoint, QSize, QTimer from Qt.QtWidgets import QApplication, QWidget, QFrame, QPushButton from Qt...
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin test...
from erdos.message import Message class WaypointsMessage(Message): """ This class represents a message to be used to send waypoints.""" def __init__(self, timestamp, waypoints=None, target_speed=0, wp_angle=0, wp_vector=0, wp_angle_speed=0, wp_vector_speed=0, stream_name='de...
"""Utility for sending signed transactions to an Account on Starknet.""" # Source: https://github.com/perama-v/GoL2/blob/main/tests/utils/Signer.py # Commit Hash: a5c05c15be1569730da04fc4f1f2e89be38c69be # License: MIT from starkware.crypto.signature.signature import private_to_stark_key, sign from starkware.starknet...
from __future__ import unicode_literals from django.conf import settings from django.contrib.auth.tokens import default_token_generator from django.utils import translation from emailing.emails import HtmlEmail def send_confirmation_mail(user, template, extra_context, subject): translation.activate(settings.LANG...
# model settings model = dict( type='FasterRCNN', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), style='pyto...
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "very-secret-key" DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "app", ] MIDDLEWARE = [ "django.middleware.security.Secur...
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import Post, Profile, Comments from pyuploadcare.dj.forms import FileWidget from pyuploadcare.dj.models import ImageField class SignupForm(UserCreationForm): email = forms.Email...
from .base import * try: from .local import * except: pass try: from .production import * except: pass try: from .imac import * except: pass try: from .macbookpro import * except: pass
import os import six import requests import icalendar from django.views.generic.base import View, ContextMixin from django.http import HttpResponse, Http404 from django.core.exceptions import ImproperlyConfigured from pytz import timezone from dateutil.parser import parse # PDFreactor's python wrapper doesn't support...
# Copyright 2021 Hoplite Industries, 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 i...
from collections import defaultdict from neuronpp.core.decorators import distparams from neuronpp.core.cells.netcon_cell import NetConCell from neuronpp.core.hocwrappers.synapses.single_synapse import SingleSynapse class SynapticCell(NetConCell): def __init__(self, name=None, compile_paths=None): NetConC...
from __future__ import print_function from flask import redirect, request, jsonify, Markup from os import system from core import functions from core.base_module import * import uuid import mechanicalsoup import bs4 import re, sys, time, random import time import json class GmailModule(BaseModule): de...
#!/usr/bin/env python3 # Author: Volodymyr Shymanskyy # Usage: # ./run-wasi-test.py # ./run-wasi-test.py --exec ../custom_build/wasm3 --timeout 120 # ./run-wasi-test.py --exec "wasmer run --mapdir=/:." --separate-args # ./run-wasi-test.py --exec "wasmer run --mapdir=/:. wasm3.wasm --" --fast import argparse i...
from .amine import * from .aldehyde import * from .halogen import * from .misc import *
import builtins import importlib import inspect import io import linecache import os.path import types from contextlib import contextmanager from pathlib import Path from typing import Any, BinaryIO, Callable, cast, Dict, List, Optional, Union from weakref import WeakValueDictionary import torch from torch.serializati...
# Copyright 2021 Coastal Carolina University # # 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, merge, publ...
import os import pandas as pd import numpy as np import uproot import h5py from twaml.data import dataset from twaml.data import scale_weight_sum from twaml.data import from_root, from_pytables, from_h5 branches = ["pT_lep1", "pT_lep2", "eta_lep1", "eta_lep2"] ds = from_root( ["tests/data/test_file.root"], name="m...
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch def test_dgcnn_gf_module(): if not torch.cuda.is_available(): pytest.skip() from mmdet3d.ops import DGCNNGFModule self = DGCNNGFModule( mlp_channels=[18, 64, 64], num_sample=20, k...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
"""Contains embedding model implementation""" import numpy as np import torch import torch.nn as nn from torch.distributions.categorical import Categorical class DynamicBernoulliEmbeddingModel(nn.Module): def __init__( self, V, T, m_t, dictionary, sampling_distribut...
# -*- coding: utf-8 -*- # # Ayame documentation build configuration file, created by # sphinx-quickstart on Tue Feb 03 21:49:06 2015. # # 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...
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # Copyright 2015 and onwards 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/license...
from django.db import models from django.contrib.auth.models import AbstractUser from datetime import datetime class CustomUser(AbstractUser): phoneNumber = models.CharField(blank=True, max_length=255) color = models.CharField( '颜色', blank=True, max_length=9, default=r"#ffffffff") # "#ff123456" ge...
import datetime import scrapy from itemloaders.processors import MapCompose from w3lib.html import remove_tags from mtianyanSpider.items import MysqlItem, ElasticSearchItem from mtianyanSpider.settings import SQL_DATETIME_FORMAT from mtianyanSpider.sites.zhihu.es_zhihu import ZhiHuQuestionIndex, ZhiHuAnswerIndex from ...
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 import datetime import logging from typing import Any import os from jsonpickle import encode, decode from errbot.storage.base import StorageBase, StoragePluginBase from gcloud import datastore log = logging.getLogger('errbot.storage.gcd') ACCOUNT_FILE_ENTRY = 'a...
import argparse # __import_begin__ import os # Pytorch imports import torch from torch.optim import Adam from torch.utils.data import DataLoader, random_split from torch.nn import functional as F from torchvision import transforms from torchvision.datasets import MNIST # Ray imports from ray.util.sgd import TorchTra...
""" Uploads and runs a simple repy file to make sure no errors gets thrown, and proceeds to download and remove the file from the node to test seash's file recognition. """ #pragma out The specified file(s) could not be found. Please check the filename. import seash import sys # Prevent printing to console by using ...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: orderer/ab.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 reflection as _re...
"""Create your test for the appointment DRF urls.""" import pytest from django.urls import resolve, reverse from onebarangay_psql.appointment.models import Appointment pytestmark = pytest.mark.django_db class TestAppointmentViewSetUrls: """Test DRF URls for AnnouncementViewSet.""" def test_appointment_deta...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import os import gzip import pandas import rdflib from indra.util import read_unicode_csv, write_unicode_csv try: from urllib import urlretrieve except ImportError: from urllib.request import urlretrieve imp...
# 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 __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_li...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # This signature was contributed by RedSocks - http://redsocks.nl # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class trojanmrblack(Signature): ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- '''Script to setup GraphSense keyspaces.''' from argparse import ArgumentParser from cassandra.cluster import Cluster DEFAULT_TIMEOUT = 60 KEYSPACE_PLACEHOLDER = 'btc_transformed' class StorageError(Exception): '''Class for Cassandra-related errors''' def __in...
#!/usr/bin/env python import json import logging import re import time import unittest import urllib2 from vtproto import topodata_pb2 import environment import tablet import utils # range '' - 80 shard_0_master = tablet.Tablet(use_mysqlctld=True) shard_0_replica = tablet.Tablet(use_mysqlctld=True) shard_0_rdonly =...
"Iris Controller" from flask import abort, jsonify, request, current_app from flask_accepts import responds, accepts from flask_praetorian import roles_required from flask_restplus import Namespace, Resource from app import api, guard from app.models import User from app.services.iris_service import IrisClf iris_api ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 from twilio.rest import TwilioRestClient from lib.constants import BASE_URL import requests account_sid = "AC564a7022d50ef41d59bb316ec4f0aabd" # Your Account SID from www.twilio.com/console auth_token = "ebecd1386153ef898ff84afeb8f7b1c4" # Your Auth T...
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
model_config = { 'vae_mid': 20, 'num_words': 35285, 'vocab_size': 35285, 'bow_mid_hid': 512, 'seq_mid_hid': 512, 'seq_len': 100, 'num_heads': 8, 'dropout': 1, 'is_traing': True } data_config = { 'data_path': 'data/data.bin', 'vocabulary_path': 'data/vocabulary.json', 'st...
from typing import List, Tuple from blspy import AugSchemeMPL from clvm import KEYWORD_FROM_ATOM from clvm_tools.binutils import disassemble as bu_disassemble from sector.types.blockchain_format.coin import Coin from sector.types.blockchain_format.program import Program, INFINITE_COST from sector.types.blockchain_for...
import signal import logging import os import shutil import csv import json import datetime import pickle import gensim import subprocess import traceback import networkx as nx from django.core.management.base import BaseCommand, CommandError from django.conf import settings from rdflib.namespace import split_uri fr...
#!/usr/bin/env python3 from flask import render_template, request, make_response, jsonify from app import app from app.mongo import mongodb from . import admin @admin.route('/setting', methods=['GET']) def basicset_index(): collection = app.config.get('BASICSET_COLLECTION') setting = mongodb[collection].fi...
import tensorflow as tf import tensorflow.keras as keras def alexnet(input_shape, classes_num=100): """ AlexNet: Described in: http://arxiv.org/pdf/1404.5997v2.pdf Parameters from: github.com/akrizhevsky/cuda-convnet2/blob/master/layers/ """ # Creating initializer, optimizer and the regula...
""" 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 writing,...
"""Sub-interfaces Classes.""" from fmcapi.api_objects.apiclasstemplate import APIClassTemplate from fmcapi.api_objects.device_services.devicerecords import DeviceRecords from fmcapi.api_objects.object_services.securityzones import SecurityZones from fmcapi.api_objects.device_services.physicalinterfaces import Physical...
# -*- coding: utf-8 -*- """ Created on Thu Mar 18 19:04:04 2021 @author: Admin """ import os import json import cv2 from contouring_semantic_segmentation import* # ignore the background since we do not want to contour the background! # This assumes that it is jpeg class_dictionary = {'concrete':1, 'steel...
def getHistoricalTerminologyDict(): history_terminology = { "Stone Age": [ "Stone Age", "prehistoric", "cave paintings", "Paleolithic", "Mesolithis", "Neolithic", "stone", "Old Stone", "Middle Stone Age", "New Stone Age", ...
from datetime import datetime import pytz from daq.instrument.instrument import Instrument from shared.data.message import Message from shared.data.status import Status import asyncio from shared.utilities.util import time_to_next, string_to_dt, dt_to_string from daq.interface.interface import Interface class ADInst...
""" Package: app Package for the application models and services This module also sets up the logging to be used with gunicorn """ import logging from flask import Flask from .models import Inventory, DataValidationError # Create Flask application app = Flask(__name__) app.config['SECRET_KEY'] = 'please, tell nobody....
#!/usr/bin/env python # coding: utf-8 '''UAV SAR Download API Software for Earth Big Data Processing, Prediction Modeling and Organzation (SEPPO) (c) 2020 Earth Big Data LLC Author: Josef Kellndorfer, Date: 2020-01-30 ''' from __future__ import print_function try: from urllib.request import urlopen # Python 3 # ...
# * Optimizer: Adamw # Referenced the 3rd-party codes. #-*- coding: utf-8 -* import math import torch from torch.optim.optimizer import Optimizer class AdamW(Optimizer): """Implements Adam algorithm. Arguments: params (iterable): iterable of parameters to optimize or dicts defining par...
"""Provides functionality for performing database operations on search related tables.""" import typing import fastapi import sqlalchemy.orm import auth.authentication import models.database import models.payment import models.search import schemas.payment import schemas.search class SearchRepository: """Class...
from collections.abc import Iterable from google.transit import gtfs_realtime_pb2 as gtfs_realtime from gtfs_realtime_translators.factories import TripUpdate, FeedMessage def test_models_schema_output(): entity_id = '1' arrival_time = 1234 trip_id = '1234' stop_id = '2345' route_id = '3456' ...
# # Vortex OpenSplice # # This software and documentation are Copyright 2006 to TO_YEAR ADLINK # Technology Limited, its affiliated companies and licensors. All rights # reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in ...
''' Created on Jan 2, 2015 @author: scarriere ''' from event.OutgoingEvent import OutgoingEvent from mathUtils.Direction import Direction class ThrowMissileEvent(OutgoingEvent): def __init__(self, characterId, direction): self.characterId = characterId self.direction = Direction(direction) ...
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
from typing import Optional from dexp.processing.filters.sobel_filter import sobel_filter from dexp.processing.utils.blend_images import blend_images from dexp.processing.utils.element_wise_affine import element_wise_affine from dexp.processing.utils.fit_shape import fit_to_shape from dexp.utils import xpArray from de...
from pathlib import Path from django.core.management import BaseCommand from django.core.paginator import Paginator from grandchallenge.cases.models import Image, ImageFile, image_file_path class Command(BaseCommand): def handle(self, *args, **options): images = ( Image.objects.all().order_b...
from .pyk4a import * from .pyk4abt import *
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions impor...
from django.urls import path from rest_framework.routers import SimpleRouter from .views import ( CoursesAPIView, ReviewsAPIView, CourseAPIView, ReviewAPIView, CourseViewSet, ReviewViewSet ) router = SimpleRouter() router.register('courses', CourseViewSet) router.register('reviews', ReviewVie...
'''Installation scrip run by pip''' from setuptools import setup, find_packages setup( name='competitive_programming_tools', version='0.1', packages=find_packages(), install_requires=[ 'click', 'colorama', ], entry_points={ 'console_scripts': [ 'cpt = competi...
import time from unittest.mock import patch import pytest import requests from huggingface_hub.hf_api import HfApi USER = "__DUMMY_TRANSFORMERS_USER__" FULL_NAME = "Dummy User" PASS = "__DUMMY_TRANSFORMERS_PASS__" ENDPOINT_STAGING = "https://moon-staging.huggingface.co" ENDPOINT_STAGING_DATASETS_URL = ENDPOINT_STAG...
from flask import Flask from telebot import TeleBot from flask_sqlalchemy import SQLAlchemy from FreeKassa import FK class Config(object): SQLALCHEMY_DATABASE_URI = 'sqlite:///main.db' SQLALCHEMY_TRACK_MODIFICATIONS = False app = Flask(__name__) app.config.from_object(Config) db = SQLAlchemy(app) kassa ...
import numpy as np import pytest from pandas._libs import join as libjoin from pandas import Categorical, DataFrame, Index, merge import pandas._testing as tm class TestIndexer: @pytest.mark.parametrize( "dtype", ["int32", "int64", "float32", "float64", "object"] ) def test_outer_join_indexer(se...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: syft_proto/generic/pointers/v1/pointer_dataset.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflec...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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...
# -*- coding: utf-8 -*- ''' tests for user state user absent user present user present with custom homedir ''' # Import python libs from __future__ import absolute_import import os import grp # Import Salt Testing libs from salttesting import skipIf from salttesting.helpers import ( destructiveTest, ensure_i...
import operator import os import itertools from sklearn import svm from sklearn import tree from sklearn.dummy import DummyClassifier from sklearn.ensemble import RandomForestClassifier, BaggingClassifier from sklearn.feature_selection import SelectKBest, chi2 from sklearn.linear_model import LogisticRegression from s...
import json import logging import sys import time from io import BytesIO from pathlib import Path import requests import unittest from hive.main import view from hive.main.hive_backup import HiveBackup from hive.util.constants import INTER_BACKUP_FILE_URL, HIVE_MODE_TEST from hive.util.error_code import NOT_FOUND fro...
load("@bazelruby_rules_ruby//ruby/private:binary.bzl", "ruby_binary") # This wraps an rb_binary in a script that is executed from the workspace folder def rubocop(name, bin, deps): bin_name = name + "-ruby" ruby_binary( name = bin_name, main = bin, deps = deps, ) runner = "@baz...
n = input('Digite um Numero/Letra/Palavra ou uma pequena frase: ') print(n.isnumeric()) print(n.isalpha())
# Copyright (c) 2015 Nicolas JOUANIN # # See the file license.txt for copying permission. import logging import ssl import websockets import asyncio import sys import re from asyncio import CancelledError from collections import deque from functools import partial from transitions import Machine, MachineError from hbm...
import sys sys.path.append('../') import pytest import spacexpython from .tutils import * def test_api(): api_data = '' api_result = alphaOrder(readJSONFile('info/api.json')) try: api_data = alphaOrder(spacexpython.info.api()) except spacexpython.utils.SpaceXReadTimeOut: pytest.xfail(...
# encoding: utf-8 ########################################################################################################### # # # Reporter Plugin # # Read the docs: # https://github.com/schriftgestalt/GlyphsSDK/tree/master/Python%20Templates/Reporter # # ##############################################################...
"""Polygons and their linear ring components """ import sys import warnings from ctypes import c_void_p, cast, POINTER import weakref from shapely.algorithms.cga import signed_area from shapely.geos import lgeos from shapely.geometry.base import BaseGeometry, geos_geom_from_py from shapely.geometry.linestring import...