text
stringlengths
2
999k
import pandas as pd def merge_data(train_values, train_target, test_values): """ Function to import all data and concatenate it into one dataframe. :return: one dataframe only with train and test features together with train labels """ data = train_values.join(train_target) return pd.concat(...
from collections import defaultdict from django.conf import settings from django.db import models, transaction, IntegrityError from django.db.models.query import (QuerySet, ValuesQuerySet, DateQuerySet, CHUNK_SIZE) from django.db.models.query_utils import Q from django.utils.translation import get_language from hv...
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
# How to use # # Train the model and save the model weights # python lenet_mnist_keras.py --train-model 1 --save-trained 1 # # Train the model and save the model weights to a give directory # python lenet_mnist_keras.py --train-model 1 --save-trained 1 --weights data/lenet_weights.hdf5 # # Evaluate the model from pre-t...
""" Filename: random.py Author: Daisuke Oyama Generate MarkovChain and DiscreteDP instances randomly. """ import numpy as np import scipy.sparse from numba import jit from .core import MarkovChain from .ddp import DiscreteDP from .utilities import sa_indices from ..util import check_random_state from ..random impor...
# Copyright (c) SenseTime Research and its affiliates. All Rights Reserved. """Centralized catalog of paths.""" import os from copy import deepcopy class DatasetCatalog(object): DATA_DIR = "datasets" DATASETS = { ####################### ImageNet VID ####################### "DET_train_30classes...
#!/usr/bin/env python3 import requests import pytz, datetime, dateutil.parser import jinja2, markdown, html import collections import argparse, sys, os import pyshorteners import pyshorteners.exceptions from .liteshort import Shortener as lss import random import subprocess import tweepy import pprint import json from...
"""This file contains code for use with "Think Bayes", by Allen B. Downey, available from greenteapress.com Copyright 2012 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function from dice import Dice import thinkplot class Train(Dice): """Represents hy...
from flask import Flask app = Flask(__name__) @app.route("/test-resource-1", methods=["GET"]) def question_random(): """Returns a random question.""" return {"data": "test-resource-1"} @app.route("/tests/<resource_id>", methods=["GET"]) def get_question(resource_id): """Returns a question by id.""" ...
#!/usr/bin/python # encoding: utf-8 import sys from workflow import Workflow, web, MATCH_SUBSTRING, MATCH_STARTSWITH from workflow.background import run_in_background import helpers, configuration GITHUB_SLUG = 'rsnts/alfred-zebra' def CallAPI(endpoint): url = config['api_url'] + endpoint params = { 'tok...
from machine import Pin, Timer led1 = Pin(16, Pin.OUT) led2 = Pin(15, Pin.OUT) led1.value(0) led2.value(1) def tick(timer): led1.toggle() led2.toggle() Timer().init(freq=2, callback=tick)
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from data_explorer.models.base_model_ import Model from data_explorer.models.facet import Facet # noqa: F401,E501 from data_explorer import util class FacetsResponse...
# 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"); you may not u...
# coding: utf-8 from __future__ import unicode_literals import attr from .network.network_interface import NetworkResponse from .util.log import sanitize_dictionary class BoxException(Exception): """ Base class exception for all errors raised from the SDK. """ def __str__(self): return '{}'...
#!/usr/bin/python # -*- coding: utf-8 -*- import wx import wx.lib.ogl as ogl class ShapeSearch(ogl.CompositeShape): def __init__(self, canvas): ogl.CompositeShape.__init__(self) self.SetCanvas(canvas) constraining_shape = ogl.BitmapShape() constraining_shape.SetBitmap(wx.Bitmap( 'icons/search.png', wx.BI...
""" This module provides mechanisms to use signal handlers in Python. Functions: signal(sig,action) -- set the action for a given signal (done) pause(sig) -- wait until a signal arrives [Unix only] alarm(seconds) -- cause SIGALRM after a specified time [Unix only] getsignal(sig) -- get the sig...
# -*- coding: utf-8 -*- # # Authors: Denis A. Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Juergen Dammers <j.dammers@fz-juelich.de> # # License: BSD (3-clause) from inspect import isfunction from collections import namedtuple from copy import deepcopy from...
import sys from logging import warning from pathlib import Path from oras import Oras # initializations owner = sys.argv[1] target_platform = str(sys.argv[2]) conda_prefix = sys.argv[3] token = sys.argv[4] # create oras object and login with the token oras = Oras(owner, token, conda_prefix, target_platform) oras.lo...
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from rbb_swagger_server.models.base_model_ import Model from rbb_swagger_server import util class Tag(Model): """NOTE: This class is auto generated by the swagger...
# -- 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. #-----------------------------------------------------------------...
# -*- test-case-name: effect.test_sync -*- """ Tools for dealing with Effects synchronously. """ from ._base import perform from ._utils import wraps class NotSynchronousError(Exception): """Performing an effect did not immediately return a value.""" def sync_perform(dispatcher, effect): """ Perform a...
#!/usr/bin/env python from __future__ import division import os, sys, argparse import datetime import gzip import model # TODO: dump some info # Parse command line arguments parser = argparse.ArgumentParser(description="Test scikit-learn WrongForm model accuracy.") parser.add_argument('model_file', metavar='model_fi...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # Copyright (C) 2020-2021 PowerLZY. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. class CuckooCriticalError(Exception): """Cuckoo struggle in a crit...
import argparse from utils.video import VideoMaker image_folder="./images" def create_movie(image_folder="images",output_file_name="output.mp4"): video = VideoMaker(image_folder,output_file_name) video.create_video() if __name__ == '__main__': ap = argparse.ArgumentParser() ap.add_argument("-i", "--i...
a=input().strip() b=input().strip() c=input().strip() if a.spilt()[-1] != b.split()[0] and a.split()[-1] != c.spilt()[0]: print(a) if b.spilt()[-1] != a.split()[0] and b.split()[-1] != c.spilt()[0]: print(b) else: print(c)
import argparse import logging import os import re import shutil import subprocess import tempfile import uuid try: import requests except ImportError: raise SystemExit( 'Please install the python requests library to use this application.' ) logger = logging.getLogger(__name__) logger.setLevel(lo...
#!/usr/bin/python3 # This file is part of libmodulemd # Copyright (C) 2016 Red Hat, Inc. # Copyright (C) 2017-2018 Stephen Gallagher # # Fedora-License-Identifier: MIT # SPDX-2.0-License-Identifier: MIT # SPDX-3.0-License-Identifier: MIT # # This program is free software. # For more information on the license, see COP...
import random from keras import backend as K from keras.callbacks import Callback class CustomLRScheduler(Callback): def __init__(self, warmup_epochs, max_lr, min_lr, patience=10, factor=0.1, down_factor=0, up_factor=0, up_prob=0, up_every=0, success_backdown=0, monitor='val_los...
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.13 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # pyt...
import hashlib import json import os import uuid from django import forms from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.core.pag...
# Copyright (C) 2015 KillerInstinct # # 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 the License, or # (at your option) any later version. # # This program is distributed in...
# coding: utf-8 # -------------------------------------------------------------------------------- # <copyright company="Aspose" file="get_task_timephased_data_request.py"> # Copyright (c) 2020 Aspose.Tasks Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a co...
from typing import List from setuptools import find_packages, setup def get_install_requires() -> List[str]: return open("docker/requirements_pip.txt").read().splitlines() def get_readme() -> str: return open("README.md").read() setup( name="mvtec", version="0.0.1", description="Toolbox for U...
import os import glob import json import pickle import argparse import subprocess from tqdm import tqdm from functools import partial from multiprocessing import Pool, cpu_count from lang_processors.java_processor import JavaProcessor from lang_processors.python_processor import PythonProcessor from lang_processors.cp...
# Copyright (c) Microsoft Corporation and contributors. # Licensed under the MIT License. import ot import numpy as np from sklearn.utils import check_array from .base import BaseAlign from .sign_flips import SignFlips from .orthogonal_procrustes import OrthogonalProcrustes class SeedlessProcrustes(BaseAlign): ...
from bson.objectid import ObjectId from gridfs import GridFS from pymongo.database import Database from app.db.error.non_existent_error import NonExistentError class FileRepository(): def __init__(self, db: Database): self.fs = GridFS(db) def get_file(self, id: ObjectId) -> bytes: if not ...
# Specify what key and signature algorithms meet your organizations level of security here. # Included is the AWS ACM default when creating new certificates as an example. SECURE_KEY_ALGORITHMS = { "RSA-2048", # AWS ACM default } SECURE_SIGNATURE_ALGORITHMS = { "SHA256WITHRSA", # AWS ACM default } def poli...
from config import Config cfg = Config.init() APP_NAME = "xws" APP = "{app}/{serial}".format(app=APP_NAME, serial=cfg.getSYS("serial")) CONNECT = "{app}/connect".format(app=APP) ACTION_SET = "{app}/actions/set".format(app=APP) ACTION_STATUS = "{app}/actions/status".format(app=APP) LOGS = "{app}/logs/".format(app=APP...
import colorsys import numpy as np from time import time class ChannelEncoder: def __init__(self, nchans=None, bounds=None, mflag=None, cscale=1.0): """ """ self.mflag = mflag self.nchans = nchans self.boun...
#! /usr/bin/env python from __future__ import print_function from argparse import ArgumentParser import logging import os import re import sys import yaml LOGGER = logging.getLogger("upgrade_dbt_schema") LOGFILE = "upgrade_dbt_schema_tests_v1_to_v2.txt" COLUMN_NAME_PAT = re.compile(r"\A[a-zA-Z0-9_]+\Z") # compatibil...
# The MIT License (MIT) # Copyright (c) 2018 by EUMETSAT # # 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,...
import sys import boto3 client = boto3.client('sqs') if __name__ == '__main__': if len(sys.argv) < 2: print('Missing argument for stage.') exit() stage = sys.argv[1] name = f'scheduler-queue-v2-{stage}' print(f'Creating queue {name}') create_response = client.create_queue( ...
import click from typing import ( Any, ) from staking_deposit.key_handling.key_derivation.mnemonic import ( get_mnemonic, ) from staking_deposit.utils.click import ( captive_prompt_callback, choice_prompt_func, jit_option, ) from staking_deposit.utils.constants import ( MNEMONIC_LANG_OPTIONS, ...
# 此关卡如果遇到 死循环,按3次 Ctrl + C 强制退出 # 此关卡如果遇到 死循环,按3次 Ctrl + C 强制退出 # 此关卡如果遇到 死循环,按3次 Ctrl + C 强制退出 # for...in...循环语句 for i in [1, 2, 3, 4, 5]: print(i) # 有一群数字在排队办业务,也就是列表[1,2,3,4,5] # 它们中的每一个被叫到号的时候(for i in),就轮流进去一个空房间办业务 # 每一个数字进去房间之后,都对计算机说:“喂,我要办这个业务:帮忙把我自己打印出来”,也就是print(i) # 然后计算机忠实的为每一个数字提供了打印服务,将1,2,3,4,5都打...
site = "http://www.galkan.net/" author = "Galkan - %s"% site version = "1.0"
""" Copyright 2014-2021 by Taxamo 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 ...
"""Tests of chromosome.py """ import unittest from reversi.genetic_algorithm import Chromosome class TestChromosome(unittest.TestCase): """chromosome """ def test_chromosome(self): Chromosome.fitness("self") Chromosome.reset_fitness("self") Chromosome.is_optimal("self") C...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("cases", "0014_label_uuid_not_null")] operations = [ migrations.CreateModel( name="Conta...
import os import nibabel as nib import sys import numpy as np import warnings from os.path import join as jph from bruker2nifti._getters import get_list_scans, nifti_getter from bruker2nifti._utils import ( bruker_read_files, normalise_b_vect, from_dict_to_txt_sorted, set_new_data, apply_reorienta...
#!/usr/bin/env python3 """This script uses an existing linear covariance analysis as input. Suppose you have covariances saved at 0, 600, 1200, and 1800 seconds (mission elapsed time), but you want one at 300 seconds. You can run this script with the arguments 'label 300 three_hundred' and it will generate a time, cov...
# Django settings for protocoller project. import os SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) ADMINS = ( ('Dmitry Sukhov', 'dmitry.sukhov@gmail.com'), ) MANAGERS = ADMINS DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": os.path.join(SITE_ROOT, 'db', ...
""" module for assign-reviewer api test Copyright (c) 2018 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Red...
import tensorflow as tf import tensorlayer as tl import argparse from data.mx2tfrecords import parse_function import os # from nets.L_Resnet_E_IR import get_resnet # from nets.L_Resnet_E_IR_GBN import get_resnet from nets.L_Resnet_E_IR_fix_issue9 import get_resnet from losses.face_losses import arcface_loss from tensor...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
filename = 'spam.txt' print(filename.endswith('.txt')) print(filename.startswith('file:')) #for multiple choices, use a tuple filenames = ['Makefile', 'foo.c', 'bar.py', 'spam.c', 'spam.h'] myFiles = [name for name in filenames if name.endswith(('.c', '.h'))] print(myFiles) print(any(name.endswith('.py') for name in...
import os.path import shutil from string import Template PIKE_DIR = os.path.dirname(__file__) SAMPLES_DIR = os.path.join(PIKE_DIR, 'samples') def sample_path(sample): path = os.path.join(SAMPLES_DIR, sample) return os.path.realpath(path) def copy_sample(sample, target): source = os.path.join(SAMPLES_D...
# Copyright (c) 2017-2022 Reveal Energy Services, 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 appl...
# Copyright 2021 Zilliz. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
from RLTest import Env from base import FlowTestsBase from redis import ResponseError from redisgraph import Graph, Node, Edge from pathos.pools import ProcessPool as Pool GRAPH_ID = "G" # Graph identifier. CLIENT_COUNT = 16 # Number of concurrent connections. people = ["Roi", "A...
# -*- coding: utf-8 -*- # # flake8: noqa # Disable Flake8 because of all the sphinx imports # # 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 lice...
#!/usr/bin/env python import os import io import re import yaml #pip install pyyaml from pomerium.client import Client from pomerium.pb.policy_pb2 import ListPoliciesRequest from pomerium.pb.namespaces_pb2 import ListNamespacesRequest from pomerium.pb.routes_pb2 import SetRouteRequest, Route #########################...
""" This file offers the methods to automatically retrieve the graph Odoribacter splanchnicus. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 20...
# coding=utf-8 # Copyright 2021 The Edward2 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 o...
"""<internal>""" ''' zlib License (C) 2020-2021 DeltaRazero All rights reserved. ''' # *************************************************************************************** class _: '<imports>' import abc from . import textio from .misc import ptr_t # *******************************************...
import sys from excel4lib.generator.generator import * from excel4lib.lang import * from excel4lib.macro.routine import Excel4Routines class Excel4ExecGenerator(Excel4Generator): ''' `Excel4ExecGenerator` allows to generate Excel 4.0 Macro that runs system command via EXEC method. ''' description = "...
from sanic.views import HTTPMethodView from sanic.response import json, text, html from jinja2 import Environment, PackageLoader, select_autoescape, FileSystemLoader import os class BaseController(HTTPMethodView): def __init__(self): self.json = json self.text = text self.html = html ...
from . import api_v1 from flog.errors import api_err_response def bad_request(message): return api_err_response(400, "bad request", message) def unauthorized(message): return api_err_response(401, "unauthorized", message) def forbidden(message): return api_err_response(403, "forbidden", message) cla...
# Copyright (c) 2020 Raytheon BBN Technologies, Inc. All Rights Reserved. # # This document does not contain technology or Technical Data controlled under either # the U.S. International Traffic in Arms Regulations or the U.S. Export Administration # # Distribution A: Approved for Public Release, Distribution Unlimite...
# Copyright (c) 2021 PaddlePaddle 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 appli...
# Copyright 2012 NEC 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 ag...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA 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 cop...
# Authors: Robert Luke <mail@robertluke.net> # # License: BSD (3-clause) from configparser import ConfigParser, RawConfigParser import glob as glob import re as re import numpy as np from ..base import BaseRaw from ..constants import FIFF from ..meas_info import create_info, _format_dig_points from ...annotations im...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-unsafe import tempfile import unittest from pathlib import Path from typing import Iterable, Optional from unittest.mock import Magi...
from .iam_docker_run import main main()
import sys import pprint def get_edges(fh): return [tuple(line.strip().split('-')) for line in fh] def build_path_graph(edges): graph = {} for (a,b) in edges: if a in graph: graph[a].update(set([b])) else: graph[a] = set([b]) # And the same but in the oppo...
from __future__ import annotations from dataclasses import dataclass from datetime import timedelta from typing import Callable, Dict, List, Optional from homeassistant.components.sensor import ( STATE_CLASS_MEASUREMENT, STATE_CLASS_TOTAL, STATE_CLASS_TOTAL_INCREASING, SensorEntity, ) from homeassista...
import serial ser = serial.Serial("COM4", 115200) with open("readings.txt", "r", encoding="utf-8", errors="ignore") as file: for line in file.readlines(): ser.write(int(float(line.strip())*10))
import math print("nome do arquivo") name = input() arquivo = open(name, "r") v = (arquivo.readline()) v = v[:-1] n = int(v) #tamanho da matriz l = [0]*(n+1) #matriz auxiliar A = [0]*n #matriz A que será modificada gerando uma matriz triangular superior C = [0]*n #matriz A que permanecerá intacta, para pode fazer o cal...
# optimizers.py import copy import numpy as np from losses import * class Optimizers(object): def __init__(self): self.loss = 0 pass def compute_gradient(self): pass def backward(self): pass class GradientDescent(Optimizers): def __init__(self, mo...
from functools import partial from typing import List, Tuple, Union import numpy as np import pandas as pd from tqdm import tqdm from snorkel.labeling.lf import LabelingFunction from snorkel.types import DataPoint from .core import ApplierMetadata, BaseLFApplier, RowData, _FunctionCaller PandasRowData = List[Tuple[...
#!/usr/bin/env python import numpy as np import pylab as pl import sys,string,os sys.path.insert(1, os.path.join(sys.path[0], '..')) ### import parent dir dependencies from misopy import index_gff as ifg import subprocess import multiprocessing import time import unique import traceback samplelis=[] samp=[] sample_rea...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 OpenStack 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 # # ...
import logging from .arch import Arch, register_arch, Endness from .archerror import ArchError from .tls import TLSArchInfo l = logging.getLogger(__name__) class ArchAVR8(Arch): bits = 32 vex_arch = None name = 'AVR8' qemu_name = 'avr' linux_name = 'avr' # ??? triplet = 'avr-linux-gnu' # ??...
"""Tools for working with CodaLab.""" import pickle as pickle import json import os import platform import shutil import sys import tempfile from contextlib import contextmanager import matplotlib.image as mpimg from gtd.io import shell __author__ = 'kelvinguu' # need to be specified by user worksheet = None site =...
import glob import matplotlib.pyplot as plt from scipy.interpolate import interp1d from trios.utils.sunposition import sunpos from trios.utils import utils as u from trios.process import * coordf = glob.glob("/DATA/OBS2CO/data/info/mesures_in_situ.csv")[0] coords = pd.read_csv(coordf, sep=';') awrfiles = glob.glob("...
# import selenium from selenium import webdriver from selenium.webdriver.common.keys import Keys import time from selenium.webdriver.chrome.options import Options #Use your own web browser from user_agent import generate_user_agent, generate_navigator import json DRIVERPATH ="your browser driver path" options = Option...
#!/usr/bin/env python3 # Copyright (c) The Libra Core Contributors # SPDX-License-Identifier: Apache-2.0 import json import random import re import sys import time from pyhelpers.cli import execute_cmd_with_json_output from pyhelpers.s3_lock import _get_lock, try_lock, unlock, _lock_exists # global values for compat-...
from __future__ import absolute_import import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket from .exceptions import ( ClosedPoolError, ProtocolError, EmptyPoolError, HeaderParsingError, HostChangedError, Locatio...
from abc import ABC, abstractmethod from Interpreter_models import Context class Expression(ABC): @abstractmethod def interpret(self, context=Context): pass
''' The MIT License (MIT) Copyright (c) 2015 Jiannan Ouyang 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, merg...
#criando uma classe "Pessoa", que posteriormente será importada ,no #arquivo "main" #aonde tem o if deve ser usado soemnte o retun e msg que está escrita #pois deve haver um método #get para os outros métoods que vão conter ações ou valores class Pessoa: #cridndo método connstrutor,e passando parametros para ele ...
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..epi import ApplyTOPUP def test_ApplyTOPUP_inputs(): input_map = dict(args=dict(argstr='%s', ), datatype=dict(argstr='-d=%s', ), encoding_file=dict(argstr='--datain=%s', mandatory=True, ), ...
""" Components/Dropdown Item ======================== .. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/dropdown-item.png :align: center Usage ----- .. code-block:: python from kivy.lang import Builder from kivymd.app import MDApp KV = ''' Screen MDDrop...
# coding:utf-8 #!/usr/bin/python # # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # # # ------------------------------------------------------------------------...
""" Created by Philippenko, 10 January 2020. This class generate data for Logistic and Least-Square regression """ from copy import deepcopy import numpy as np from numpy.random.mtrand import multivariate_normal from scipy.linalg.special_matrices import toeplitz import torch from math import floor from src.utils.Con...
#!/usr/bin/env python ''' Copyright (C) 2020, WAFW00F Developers. See the LICENSE file for copying permission. ''' NAME = 'SecKing (SecKing)' def is_waf(self): schemes = [ self.matchHeader(('Server', r'secking(.?waf)?')) ] if any(i for i in schemes): return True return False
import numpy as np import pandas as pd import fastai from fastai.collab import * from data_management import* def load_data_fastai(path_data, path_rewritedata): """Create a new csv for fastai and load the data""" new_dataset(path_data, path_rewritedata) data = pd.read_csv(path_rewritedata) data2 = Coll...
# 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. import torch from models import registry from testing import test_case class TestFreezing(test_case.TestCase): def test_free...
""" SUSOD python package config. Author: Alex Harding <alex.harding@whale-net.net> """ from setuptools import setup setup( name='SUSOD', version='1.0.0', packages=['SUSOD'], include_package_data=True, install_requires=[ 'Flask', 'pycodestyle', 'pydocstyle', 'gmusicapi', 'mysql-connector', 'nodeenv' ...