text
stringlengths
1
927k
import os from flask import ( Flask, flash, render_template, redirect, request, session, url_for, json, abort) from flask_pymongo import PyMongo from pymongo.collection import ReturnDocument from bson.objectid import ObjectId from werkzeug.security import generate_password_hash, check_password_hash from helpers...
"""Tests for vm.py.""" import dis import textwrap from pytype import blocks from pytype import compat from pytype import errors from pytype import utils from pytype import vm from pytype.pyc import pyc from pytype.tests import test_base from pytype.tests import test_utils import six class TraceVM(vm.VirtualMachine...
# 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) from spack import * class RPng(RPackage): """This package provides an easy and simple way to read, write and display...
# -*- coding: utf-8 -*- from hearthstone.entities import Entity from entity.spell_entity import SpellEntity class LETL_040P7(SpellEntity): """ 虚空吞噬者5 <b>嘲讽</b>。在你施放一个暗影技能后,获得+3/+5。 """ def __init__(self, entity: Entity): super().__init__(entity) self.damage = 0 def p...
from test.data import context1, context2, tarek import pytest from rdflib import ConjunctiveGraph, Graph, Literal from rdflib.namespace import OWL, Namespace from rdflib.plugins.stores.memory import Memory from rdflib.term import URIRef foaf1_uri = URIRef("http://xmlns.com/foaf/0.1/") foaf2_uri = URIRef("http://xmln...
from django.test import TestCase, Client from molo.core.models import Main, SiteLanguageRelation, Languages from molo.core.tests.base import MoloTestCaseMixin from molo.core.utils import generate_slug from molo.surveys.models import ( SurveysIndexPage, MoloSurveyPage, MoloSurveyFormField ) from wagtail.cor...
"""arxiv search routes."""
""" Flask-JWT-Extended ------------------- Flask-Login provides jwt endpoint protection for Flask. """ from setuptools import setup setup(name='JX-Flask-JWT-Extention', version='0.0.2', url='https://github.com/caser789/flask-jwt', license='MIT', author='Xue Jiao', author_email='jiao.xueji...
import asyncio import logging from datetime import datetime try: import websockets except ModuleNotFoundError: print("This example relies on the 'websockets' package.") print("Please install it by running: ") print() print(" $ pip install websockets") import sys sys.exit(1) from ocpp.routi...
"""EpochArray tests""" import nelpy as nel from nelpy.core import * class TestEpochArray: def test_partition(self): ep = EpochArray([0,10]) partitioned = ep.partition(n_epochs=5) assert ep.n_epochs == 1 assert partitioned.n_epochs == 5 # epochs_a = nel.EpochArray([[0, 5], [5,10],...
# coding=utf-8 """AzureVMInstanceMetadata module.""" import urllib2 import json from .backupexception import BackupException def lazy_property(fn): """Decorator that makes a property lazy-evaluated.""" attr_name = '_lazy_' + fn.__name__ @property def _lazy_property(self): if not hasattr(self,...
#!/usr/bin/env python3 # Copyright (c) 2018 The Worldcoin 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 WorldcoinTestFramework from test_frame...
import sqlite3 import sys from . import colorbrewer try: from datasette import hookimpl has_datasette = True except ImportError: has_datasette = False if has_datasette: @hookimpl def prepare_connection(conn): register(conn) def register(conn): if sys.version_info >= (3, 8): ...
#!/usr/bin/env python3 # # Copyright (C) 2021 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 re...
#!/usr/bin/python # -*- coding: utf-8 -*- # 加密密钥 SECRET_KEY="H2rqkNJVi9f4Uo4WQ5HIqlydxeNlyTSEz5lU/De9qfI=" #SERVER='127.0.0.1' SERVER='m0058.baiduwebgame.com' PORT=9911 USER="elasticsearchapi" PASSWD="NjS2zQ7sAyyTymz0dS-RYstC_EFkH1sE"
# Copyright 2011 OpenStack Foundation # Copyright 2013 Rackspace Hosting # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 co...
from .data import PolicyConstraints from .proposals import RewardWeightUpdateProposal, TaxRateUpdateProposal __all__ = ["PolicyConstraints", "TaxRateUpdateProposal", "RewardWeightUpdateProposal"]
# -*- coding: utf-8 -*- """ @Author: Alistair Magee Adds support for subcategories on pelican articles """ import os from collections import defaultdict from operator import attrgetter from functools import partial from pelican import signals from pelican.urlwrappers import URLWrapper, Category from pelican.utils imp...
""" Prevents multiple threads from trying to import at the same time and hitting an import lock. Implemented because airflow's web server regularly re-imports all DAGs and all tasks therein -- and unfortunately, our tasks import so many dependencies that reloading them takes enough time (by some random distribution) th...
from logging import basicConfig, getLogger, DEBUG logger = getLogger(__name__) OBJECT = 'DFW section' MODULE = 'Services' def get_list(client): """ """ request = client.__getattr__(MODULE).ListSections() response, _ = request.result() return response['results'] def get_id(client, data): if...
# 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 agreed to in writing, ...
# <auto-generated> # This code was generated by the UnitCodeGenerator tool # # Changes to this file will be lost if the code is regenerated # </auto-generated> def to_celsius(value): return value - 273.15 def to_fahrenheit(value): return ((value - 273.15) * 1.8) + 32.0 def to_rankine(value): return value * 1.8
#!/usr/bin/env python2 # Copyright (c) 2014-2015 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 replace by fee code # from test_framework.test_framework import ShiabitTestFramework from test_...
from flask import Flask, render_template, Response from processor.simple_streamer import SimpleStreamer as VideoCamera # from processor.pedestrian_detector import PedestrianDetector as VideoCamera # from processor.motion_detector import MotionDetector as VideoCamera # from processor.qr_detector import QRDetector as Vid...
from netmiko import ConnectHandler import getpass passwd = getpass.getpass() with open('config.txt','r') as f: device_list = f.read().splitlines() print(device_list) my_list = list() for ip in device_list: cisco_device = { 'device_type': 'cisco_ios', 'ip': ip, 'username': 'parth'...
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class CreateOrDeletePublishRecordForApiV2Response(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
# Copyright 2010 New Relic, 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 writ...
# ---------------------------------------------------------------------------- # Copyright (c) 2017-, labman development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # -----------------------------------------------------...
import contextlib import inspect import os import sys from contextlib import contextmanager import pytest from ddtrace.vendor import wrapt import ddtrace from ddtrace import Tracer, Span from ddtrace.compat import httplib, to_unicode from ddtrace.constants import SPAN_MEASURED_KEY from ddtrace.encoding import JSONEnc...
# THIS FILE WAS AUTOMATICALLY GENERATED BY deprecated_modules.py import sys # mypy error: Module X has no attribute y (typically for C extensions) from . import _least_angle # type: ignore from ..externals._pep562 import Pep562 from ..utils.deprecation import _raise_dep_warning_if_not_pytest deprecated_path = 'sklear...
# -*- coding: utf-8 -*- # Copyright (c) 2020. # # Created by AnyKeyShik Rarity # # Telegram: @AnyKeyShik # GitHub: https://github.com/AnyKeyShik # E-mail: nikitag594@gmail.com class NotFoundException(Exception): pass class AnimeNotFoundException(NotFoundException): pass class CommandNotFoundExce...
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import click import os import string import random from jina.flow import Flow RANDOM_SEED = 10 # 5 os.environ['PARALLEL'] = str(2) os.environ['SHARDS'] = str(2) def get_random_ws(workspace_path, length=8): ra...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # """ This is the main module in vnc_cfg_api_server package. It manages interaction between http/rest, address management, authentication and database interfaces. """ from gevent import monkey monkey.patch_all() from gevent import hub # from neutron p...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Reference: #from __future__ import print_function #from utils.heaton_utils import * import numpy as np import warnings import os import pandas as pd import matplotlib.pyplot as plt import sys import glob #pip install counter from collections import Counter import pic...
from db import db from models.absence_authorization import AbsenceAuthorizationModel from models.attendance import AttendanceModel from models.bank_account import BankAccountModel from models.deduction import DeductionModel from models.dependent import DependentModel from models.emergency_contact import EmergencyContac...
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
from sharpy.managers.building_solver import WallType from sharpy.managers.roles import UnitTask from sharpy.plans.acts import * from sharpy.plans.acts.protoss import * from sharpy.plans.require import * from sharpy.plans.tactics import * from sharpy.plans import BuildOrder, Step, SequentialList, StepBuildGas from shar...
#!/usr/bin/python #coding=utf-8 from org.geo.config.global_param import AgentStatus, ResidentAgent, PoliceAgent from org.geo.entity.agent_base import Agent, Location from org.geo.config.global_param import * from org.geo.entity.agent_resident import * from org.geo.config.global_param import AgentStatus, ResidentAgent, ...
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
import json import pandas as pd import dash import dash_html_components as html import dash_bio from common_features import nested_component_layout, nested_component_app_callback _data = None _mtcars_data = pd.read_csv( "tests/dashbio_demos/dash-clustergram/data/mtcars.tsv", delimiter="\t", skiprows=4 ).set_ind...
import tkinter as tk import tkinter.filedialog import tkinter.messagebox import tkinter.ttk import os import model import player AUDIO_PLAYER_NAME = "Achtung Baby" class View: loop_choices = [("No Loop", 1), ("Loop Current", 2), ("Loop All", 3)] def __init__(self, root, model, player): self.root = ...
# Copyright The OpenTelemetry Authors # # 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 ...
# ----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. # -----------------------------------------------------------------...
#Learning Python import os #Remove duplicates in a string x = 'madammadammadam' s = set() for c in x: if(c in s): continue else: s.add(c) print(c) print(s)
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from django.contrib import admin from .models import Category,Image,Location # Register your models here. admin.site.register(Category) admin.site.register(Location) admin.site.register(Image)
""" Purpose Example of how to provision an EKS cluster, create the IAM Roles for Service Accounts (IRSA) mappings, and then deploy various common cluster add-ons (AWS Load Balancer Controller, ExternalDNS, EBS & EFS CSI Drivers, Cluster Autoscaler, AWS Managed OpenSearch and fluentbit, Metrics Server, Calico Network P...
import os from time import time import numpy as np from mpi4py import MPI from mxnet import nd def distribute_mpiranks(local_rank, local_size, size, nodes_for_eval, gpu_per_node): # assign top "nodes_for_eval" nodes for evaluation. Rest of the nodes go to training total_ranks = list(range(size)) train_ran...
''' Revealer Do you have something to hide? Secret backup plug-in for the electrum wallet. Tiago Romagnani Silveira, 2017 ''' import os import random import traceback from decimal import Decimal from functools import partial import sys import qrcode from PyQt5.QtPrintSupport import QPrinter from PyQt5.QtCore impo...
from django.http import Http404 from django.core.paginator import Paginator from django.views.generic import ListView, DetailView, View, UpdateView, FormView from django.shortcuts import render, redirect, reverse from django.contrib.auth.decorators import login_required from django.contrib import messages from django.c...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------------------------- # - Generated manually! Required for...
#-*-coding:utf-8-*- def table(n): if n>0: print("| | | | | | |") print("| | | | | | |") print("+-----+-----+-----+-----+-----+-----+") table(n-1) n = eval(input()) print("+-----+-----+-----+-----+-----+-----+") print("| | MON | TU...
# Copyright (c) 2020 Matt Struble. All Rights Reserved. # # Use is subject to license terms. # # Author: Matt Struble # Date: Nov. 18 2020 from importlib import import_module from .fork import Fork # noqa. F401 from .util import get_gpu_stats # noqa. F401 # Import different versions of furcate with specific framewo...
from django.core.checks import Error class DatabaseConnectionError(Error): def __init__(self, inner_exception: BaseException, obj): super().__init__( id='crm.E001', msg=str(inner_exception), hint='Please check database configuration.', obj=obj )
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pant...
d = {'arr': [1, 2, 3], 'x': {'y': 100, 'z': {'u': 200}}} o = ele2jobj(d) arr = [[100],[200,300]] o = ele2jobj(arr) del o.x.y o d del o.arr1 >>> d = {'arr': [1, 2, 3], 'x': {'y': 100, 'z': {'u': 200}}} >>> o = ele2jobj(d) >>> >>> del o.arr1 >>> o {'arr': [1, 3], 'x': {'y': 100, 'z': {'u': 200}}} >>> >>> d {'arr':...
from django.db import models from config import settings class TimestampMixin(models.Model): """ A TimestampMixin is used to add fields for automatically recording the timestamp of create and update operations on a model. """ created_at = models.DateTimeField(auto_now_add=True) updated_at = ...
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String from sqlalchemy.orm import RelationshipProperty from .database import Base class Team(Base): __tablename__ = "teams" id = Column(Integer, primary_key=True, index=True) team = Column(String(64), index=True, unique=True) wins = Column(...
import sys from PyQt5.QtCore import pyqtSignal, QTime, QTimer from pyqt_responsive_label.responsiveLabel import ResponsiveLabel class TimerLabel(ResponsiveLabel): doubleClicked = pyqtSignal() prepared = pyqtSignal() started = pyqtSignal() paused = pyqtSignal() restarted = pyqtSignal() resetS...
from concurrent.futures import ThreadPoolExecutor, wait import datetime from traceback import format_exc from typing import List import haversine as hs import json import pytz from .cycle_routes import CycleRoutesService from .santander_cycles import SantanderCycles from .tier_scooters import TierScooterService from ....
class Queue(): # Queue Initialization def __init__(self): self.MAX = 5 self.queue = [] # OVERFLOW CONDITION def OVERFLOW(self): if len(self.queue) == self.MAX: return True else: return False # UNDERFLOW CONDITION def UNDERFLOW(self): if len(self.queue) == 0: return True else: return Fals...
########## 6.1.2. Transformando alvo em regressão ########## # TransformedTargetRegressor transforma os destinos y antes de ajustar um modelo de regressão. As previsões são mapeadas de volta ao espaço original por meio de uma transformação inversa. Toma como argumento o regressor que será usado para previsão e o ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
import gym import numpy as np import cProfile from connect_four.evaluation.board import Board from connect_four.envs.connect_four_env import ConnectFourEnv env = gym.make('connect_four-v0') ConnectFourEnv.M = 6 ConnectFourEnv.N = 7 # The empty 6x7 board has no solution set for Black because White is guaranteed to w...
from django.apps import AppConfig class Pokus1Config(AppConfig): name = 'pokus1'
from text.symbols import symbols raw_path = './LJSpeech/' data_path = './data/' melpath = './data/mel/' quantpath = './data/quant/' voc_mode = 'MOL' extension = '.wav' ignore_tts = False norm_peaks = True mu_law = True sample_rate = 22050 n_fft = 2048 hop_length = 275 win_length = 1100 min_level_db = -100 ref_le...
from QATrainingFrontend.models import db, WrongKeys, Pages, Config, Tracking, Users, Containers from six.moves.urllib.parse import urlparse, urljoin from werkzeug.utils import secure_filename from functools import wraps from flask import current_app as app, g, request, redirect, url_for, session, render_template, abor...
#!/usr/bin/env python3 # # Copyright (c) 2015 - 2022, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, th...
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
from PIL import Image import os import shutil import numpy as np def main(): in_learned_skeletons_path = "dataset/point/skelnet_black_skel_test_black_epoch252" in_learned_black_skeletons_test_normal_path = "dataset/point/skelnet_black_skel_test_normal_epoch252" in_skeletonize_path = "dataset/point/skeleto...
import unittest import os import platform import pygame SDL1 = pygame.get_sdl_version()[0] < 2 DARWIN = "Darwin" in platform.platform() class MouseTests(unittest.TestCase): @classmethod def setUpClass(cls): # The display needs to be initialized for mouse functions. pygame.display.init() ...
# pip install meilisearch from meilisearch import Client # Connect to database client = Client("http://127.0.0.1:7700", "password") # Create index client.create_index("index_name") # Insert information client.index("index_name").add_documents( [ { "id": 1, "sku": 134218478, ...
from django.utils.translation import ugettext_lazy as _ import pycountry __all__ = ['YESNO', 'YESNOMAYBE', 'SECTIONS', 'BACKLINKS', 'LANGUAGES'] YESNO = ( (1, _('Yes')), (2, _('No')), ) YESNOMAYBE = ( (0, _('Maybe')), (1, _('Yes')), (2, _('No')), ) SECTIONS = ( (1, _('Fiction')), (2, ...
# import curses # import datetime # # stdscr = curses.initscr() # curses.noecho() # stdscr.nodelay(1) # set getch() non-blocking # # stdscr.addstr(0,0,"Press \"p\" to show count, \"q\" to exit...") # line = 1 # try: # while 1: # c = stdscr.getch() # if c == ord('p'): # stdscr.addstr(line...
# -*- 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...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: dan@reciprocitylabs.com # Maintained By: vraj@reciprocitylabs.com import factory import random from ggrc import db from ggrc import models def ra...
""" Test collections """ from __future__ import absolute_import from builtins import object from sqlalchemy import Table from elixir import * import elixir def setup(): metadata.bind = 'sqlite://' def teardown(): cleanup_all() class TestCollections(object): def teardown(self): cleanup_all() ...
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import sys import argparse import ConfigParser from provision_bgp import BgpProvisioner from vnc_api.vnc_api import * class ControlProvisioner(object): def __init__(self, args_str=None): self._args = None if n...
vowels = ['a', 'e', 'i', 'o', 'u'] found = [] word = input('Type your word here to search for the vowels: ') for letter in word: if letter in vowels and letter not in found: found.append(letter) for vowel in found: print(vowel)
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019-2020 Fortinet, Inc. # # This program 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 3 of th...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-05 20:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('elections', '0005_auto_20170823_1648'), ] operatio...
from typing import Optional, Any import time import re import warnings from netmiko.no_enable import NoEnable from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG from netmiko.cisco_base_connection import CiscoBaseConnection from netmiko.exceptions import NetmikoAuthenticationException from netmiko import ...
from wand.image import WandImage from io import BytesIO from image_lite.filters import ( Filter, FormatMixin, PhotoFXMixin, ResizeCropMixin, ResizeCropSmartMixin, ) from image_lite import image_ops_wand from image_lite.constants import FORMAT_APP_TO_UCLIB, FORMAT_UCLIB_TO_APP from image_lite.decisio...
""" Subspace Product API The version of the OpenAPI document: 1.0 Contact: sales@subspace.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from subspace_openapi_client.api_client import ApiClient, Endpoint as _Endpoint from subspace_openapi_clien...
from easydict import EasyDict as edict from pathlib import Path import torch from torch.nn import CrossEntropyLoss def get_config(training=True): conf = edict() conf.data_path = Path('models/data') conf.work_path = Path('weights/') conf.model_path = conf.work_path / 'models' conf.log_path = conf.w...
# Packages import matplotlib.pyplot as plt import numpy as np import os import tensorflow as tf import tensorflow.keras.layers as tfl from tensorflow.keras.preprocessing import image_dataset_from_directory from tensorflow.keras.layers.experimental.preprocessing import RandomFlip, RandomRotation # Creating the datase...
#!/usr/bin/env python """ fix_request_6420.py MOHC.coupled.SImon.sistr[xy]ubot SistrxubotStandardNameAdd and SistryubotStandardNameAdd """ import argparse import logging.config import sys import django django.setup() from pre_proc_app.models import DataRequest, FileFix __version__ = '0.1.0b1' DEFAULT_LOG_LEVEL =...
#!/usr/bin/env python # # Copyright 2017 Pixar Animation Studios # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted...
"""Tests GLMRegressor converter.""" import unittest from distutils.version import StrictVersion import numpy as np from sklearn.exceptions import ConvergenceWarning try: from sklearn.utils._testing import ignore_warnings except ImportError: from sklearn.utils.testing import ignore_warnings from sklearn.ensembl...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p1beta1/proto/text_annotation.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 _messa...
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. from __future__ import print_function import argparse import dace import numpy as np from typing import List # For optimizations from dace.transformation.dataflow import (DoubleBuffering, MapCollapse, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.InsObject import InsObject from alipay.aop.api.domain.InsPerson import InsPerson class InsApplication(object): def __init__(self): self._biz_data = None self....
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Flask Quorum # Copyright (C) 2008-2012 Hive Solutions Lda. # # This file is part of Hive Flask Quorum. # # Hive Flask Quorum 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 Softwar...
import bpy from bpy.props import * from .. id_keys import getAllIDKeys from .. utils.unicode import toValidString, fromValidString class IDKeySearch(bpy.types.Operator): bl_idname = "an.choose_id_key" bl_label = "ID Key Search" bl_options = {"REGISTER"} bl_property = "item" def getSearchItems(self...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 1 10:35:28 2020 @author: afo """ from os import listdir from os.path import isfile, join, abspath import os from inspect import getsourcefile import pandas as pd from datetime import datetime, timedelta import pandas_datareader as pdr # Function ...
# This program says hello and asks for my name. print('Hello, world!') print('What is your name?') # ask for their name myName = input() print('It is good to meet you, ' + myName) print('The length of your name is:') print(len(myName)) print('What is your age?') # ask for their age myAge = input() print('You wil...
# -*- coding: utf-8 -*- # Copyright 2022 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 logging import getLogger from newton_zero.config import Config, PlayWithHumanConfig from newton_zero.play_game.game_model import PlayWithHuman from newton_zero.env.newton_env import NewtonEnv, Player, Winner from random import random logger = getLogger(__name__) def start(config: Config): PlayWithHumanCon...
# Copyright (c) 2013 Mirantis Inc. # Copyright (c) 2015 Red Hat # # 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...