text stringlengths 28 881k |
|---|
from asyncio import FutureNEWLINEfrom math import ceilNEWLINEfrom unittest.mock import MagicMockNEWLINEfrom typing import Sequence, Dict, Optional, TypeNEWLINENEWLINEimport pytestNEWLINEfrom _pytest.monkeypatch import MonkeyPatchNEWLINEfrom marshmallow_jsonapi import fieldsNEWLINEfrom starlette.applications import Star... |
# UniBorg (telegram userbot)NEWLINE# Copyright (C) 2020 The AuthorsNEWLINENEWLINE# This program is free software: you can redistribute it and/or modifyNEWLINE# it under the terms of the GNU Affero General Public License as published byNEWLINE# the Free Software Foundation, either version 3 of the License... |
from .city import City NEWLINENEWLINE# base link: Raw Data: https://data.detroitmi.gov/Public-Safety/DPD-911-Calls-for-Service-September-20-2016-Presen/wgv9-drfcNEWLINE# raw data : https://www.dallasopendata.com/api/views/qv6i-rri7/rows.csv?accessType=DOWNLOADNEWLINENEWLINEclass Detroit(City):NEWLINE NEWLINE BASE... |
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINE# Copyright (c) 2015,2016 Jérémie DECOCK (http://www.jdhp.org)NEWLINENEWLINE# Permission is hereby granted, free of charge, to any person obtaining a copyNEWLINE# of this software and associated documentation files (the "Software"), to dealNEWLINE# in th... |
from io import BytesIONEWLINENEWLINEfrom PIL import ImageNEWLINEfrom flask import send_fileNEWLINENEWLINEfrom utils import httpNEWLINEfrom utils.endpoint import Endpoint, setupNEWLINENEWLINENEWLINE@setupNEWLINEclass Rip(Endpoint):NEWLINE params = ['avatar0']NEWLINENEWLINE def generate(self, avatars, text, usernam... |
"""netflixclone URL ConfigurationNEWLINENEWLINEThe `urlpatterns` list routes URLs to views. For more information please see:NEWLINE https://docs.djangoproject.com/en/1.11/topics/http/urls/NEWLINEExamples:NEWLINEFunction viewsNEWLINE 1. Add an import: from my_app import viewsNEWLINE 2. Add a URL to urlpatterns... |
# Copyright 2020, The TensorFlow Authors.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLIN... |
#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# Unless required by applicable law or agreed to... |
# Copyright The IETF Trust 2018, All Rights ReservedNEWLINE# -*- coding: utf-8 -*-NEWLINEfrom __future__ import unicode_literals, print_function, divisionNEWLINENEWLINEimport datetimeNEWLINEimport i18naddressNEWLINEimport lxmlNEWLINEimport osNEWLINEimport reNEWLINE#import sysNEWLINEimport sixNEWLINEimport unicodedataNE... |
# Generated by Django 3.0.3 on 2020-03-11 12:12NEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.db import migrations, modelsNEWLINEimport django.db.models.deletionNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('fedireads', '0014_status_remote... |
from py_asciimath import PROJECT_ROOTNEWLINEfrom py_asciimath.translator.translator import (NEWLINE ASCIIMath2MathML,NEWLINE ASCIIMath2Tex,NEWLINE MathML2Tex,NEWLINE)NEWLINENEWLINENEWLINEif __name__ == "__main__":NEWLINE print("ASCIIMath to MathML")NEWLINE asciimath2mathml = ASCIIMath2MathML(log=False, i... |
#!/usr/bin/env pythonNEWLINENEWLINE'''NEWLINEEC2 external inventory scriptNEWLINE=================================NEWLINENEWLINEGenerates inventory that Ansible can understand by making API request toNEWLINEAWS EC2 using the Boto library.NEWLINENEWLINENOTE: This script assumes Ansible is being executed where the enviro... |
# -*- coding: utf-8 -*-NEWLINE"""NEWLINE 'accounts' resource and schema settings.NEWLINENEWLINE :copyright: (c) 2014 by Nicola Iarocci and CIR2000.NEWLINE :license: BSD, see LICENSE for more details.NEWLINE"""NEWLINEfrom common import base_schema, required_stringNEWLINENEWLINE_schema = {NEWLINE 'u': require... |
# Copyright 2018 Capital One Services, LLCNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# U... |
#!/usr/bin/env pythonNEWLINE#NEWLINE# Electrum - lightweight Bitcoin clientNEWLINE# Copyright (C) 2012 thomasv@gitoriousNEWLINE#NEWLINE# Permission is hereby granted, free of charge, to any personNEWLINE# obtaining a copy of this software and associated documentation filesNEWLINE# (the "Software"), to deal in the Softw... |
from __future__ import annotationsNEWLINENEWLINEimport subprocessNEWLINEimport sysNEWLINEfrom urllib.parse import ParseResultNEWLINENEWLINEimport requestsNEWLINENEWLINEimport murfeyNEWLINENEWLINENEWLINEdef check(api_base: ParseResult, install: bool = True, force: bool = False):NEWLINE """NEWLINE Verify that the c... |
from django.conf.urls import urlNEWLINEfrom . import viewsNEWLINEfrom django.conf.urls.static import staticNEWLINEfrom django.conf import settingsNEWLINENEWLINEurlpatterns=[NEWLINE url('^$',views.home,name='home'),NEWLINE url(r'^add/news$',views.add_news,name='addnews'),NEWLINE url(r'^add/business$',views.add_... |
import pytestNEWLINEimport torchNEWLINEimport torch.nn.functional as FNEWLINEimport torchtestNEWLINENEWLINEfrom scattering_compositional_learner import ScatteringCompositionalLearnerNEWLINENEWLINENEWLINE@pytest.mark.parametrize('image_size', [80, 160])NEWLINEdef test_forward(image_size):NEWLINE x = torch.rand(4, 16,... |
import getpassNEWLINEimport os.path as pathNEWLINEimport osNEWLINEimport numpy as npNEWLINEfrom scipy.stats import describeNEWLINENEWLINEHOST, PORT = "141.37.176.188", 22NEWLINEBASE_URL = "/michael/DoD/baumer_test_prod_var/512x512_samplescale1.0_patchscale1.0/samples"NEWLINEBASE_DIR = "__sftpcache__"NEWLINENEWLINEclass... |
from dataclasses import dataclass, asdictNEWLINEfrom typing import ListNEWLINENEWLINEfrom bson import ObjectIdNEWLINEfrom passlib.hash import pbkdf2_sha256 as sha256NEWLINEfrom pymongo.database import DatabaseNEWLINENEWLINEfrom app import dbNEWLINEdb: DatabaseNEWLINENEWLINENEWLINE@dataclassNEWLINEclass UserModel:NEWLIN... |
import numpy as npNEWLINEimport pandas as pdNEWLINEimport tensorflow as tfNEWLINEtf.enable_eager_execution()NEWLINEfrom sklearn.preprocessing import StandardScalerNEWLINEimport pickleNEWLINEimport sysNEWLINEsys.path.append('../../rumm')NEWLINEimport langNEWLINEimport netsNEWLINEimport bayesianNEWLINENEWLINE# constantsN... |
# import datetimeNEWLINE# import websocketNEWLINE# import requestsNEWLINE# import timeNEWLINE# import jsonNEWLINE#NEWLINE# def connectToWebSocket():NEWLINE# print(datetime.datetime.now(), "| [GatewayManager]: Connecting to websocket...")NEWLINE# websocket.enableTrace(True)NEWLINE# print(datetime.datetime.no... |
# coding: utf-8NEWLINE#NEWLINE# Copyright 2014 The Oppia Authors. All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.... |
r"""NEWLINECommon DigraphsNEWLINENEWLINEAll digraphs in Sage can be built through the ``digraphs`` object. In order toNEWLINEbuild a circuit on 15 elements, one can do::NEWLINENEWLINE sage: g = digraphs.Circuit(15)NEWLINENEWLINETo get a circulant graph on 10 vertices in which a vertex `i` has `i+2` andNEWLINE`i+3` a... |
N = int(input(''))NEWLINEfor i in range(1, N + 1):NEWLINE if i % 2 == 0:NEWLINE print('%d^2' %i, '=', i **2) |
from django.db import modelsNEWLINENEWLINENEWLINEclass PersistentQuery(models.Model):NEWLINE name = models.CharField("Query name", max_length=80)NEWLINE query_id = models.SlugField("Query ID", max_length=80, primary_key=True, blank=True, db_index=True)NEWLINE insert_pk = models.CharField("Insert PK", blank=Tru... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LI... |
"""NEWLINEUnit and regression test for the analyze_foldamers package.NEWLINE"""NEWLINENEWLINE# Import package, test suite, and other packages as neededNEWLINEimport analyze_foldamersNEWLINEimport pytestNEWLINEimport sysNEWLINEimport osNEWLINEimport pickleNEWLINEfrom cg_openmm.cg_model.cgmodel import CGModelNEWLINEfrom ... |
#!/usr/bin/pythonNEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINE# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>NEWLINE# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)NEWLINENEWLINEfrom __future__ import absolute_import, division, print_functionNEWLINE__metaclass_... |
"""Unit tests for the copy module."""NEWLINENEWLINEimport sysNEWLINEimport copyNEWLINEimport copy_regNEWLINENEWLINEimport unittestNEWLINEfrom test import test_supportNEWLINENEWLINEclass TestCopy(unittest.TestCase):NEWLINENEWLINE # Attempt full line coverage of copy.py from top to bottomNEWLINENEWLINE def test_exc... |
#!/usr/bin/env/ pythonNEWLINEprint ("Hola mundo")NEWLINENEWLINE# TIPOS DE DATOSNEWLINENEWLINE# Esto e unha cadeaNEWLINEc = "Hola mundo"NEWLINENEWLINE# Esto e un enteiroNEWLINEe = 23NEWLINENEWLINE# Esto e un longNEWLINElong = 23NEWLINENEWLINE# Numero en octalNEWLINEoctal = 0o27NEWLINENEWLINE# Numero en HexadecimalNEWLIN... |
# Generated by Django 3.2 on 2021-06-24 12:18NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('blog_email', '0001_initial'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.AlterField(N... |
from config import BLACK, WHITE, EMPTYNEWLINEfrom random import randintNEWLINENEWLINEclass Evaluator(object):NEWLINE def __init__(self, level):NEWLINE super().__init__()NEWLINE self.level = levelNEWLINE if(level == 1):NEWLINE self.WEIGHT_MATRIX = self.WORST_WEIGHT_MATRIXNEWLINE ... |
from holoviews.element.comparison import ComparisonTestCaseNEWLINEfrom pyviz_comms import Comm, JupyterCommNEWLINENEWLINENEWLINEclass TestComm(ComparisonTestCase):NEWLINENEWLINE def test_init_comm(self):NEWLINE Comm()NEWLINENEWLINE def test_init_comm_id(self):NEWLINE comm = Comm(id='Test')NEWLINE ... |
_base_ = [NEWLINE 'r50_sz224_4xb64_head1_lr0_1_step_ep20.py',NEWLINE]NEWLINENEWLINE# optimizerNEWLINEoptimizer = dict(paramwise_options={'\\Ahead.': dict(lr_mult=100)})NEWLINE |
from aistore.client import Client, BckNEWLINENEWLINEclient = Client("http://localhost:31337")NEWLINENEWLINE# Initialize transformNEWLINEwith open('md5_pod.yaml', 'r') as f:NEWLINE spec = f.read()NEWLINE transform_id = client.etl_init(spec=spec)NEWLINENEWLINE# Transform objectsNEWLINEfor i in range(0, 10):NEWLINE ... |
from kivy.app import AppNEWLINEfrom kivy.uix.boxlayout import BoxLayoutNEWLINEfrom kivy.uix.gridlayout import GridLayoutNEWLINEfrom kivy.uix.button import ButtonNEWLINEfrom kivy.uix.label import LabelNEWLINEfrom kivy.uix.textinput import TextInputNEWLINEfrom kivy.uix.widget import WidgetNEWLINENEWLINEfrom ExerciseRunni... |
import discordNEWLINEimport yamlNEWLINEfrom discord.ext import tasks, commandsNEWLINENEWLINEfrom discord_slash import SlashCommandNEWLINEfrom discord_slash.utils.manage_commands import create_optionNEWLINENEWLINEfrom util.inspect import process_url, process_siteNEWLINENEWLINEwith open("conf.yaml", "r") as c: cfg = yaml... |
"""Handle sound for a given maze"""NEWLINENEWLINEimport pygameNEWLINEimport pygame.mixerNEWLINENEWLINEfrom ..designpattern import event, observerNEWLINEfrom ..model import events, mazeNEWLINEfrom . import entity_soundNEWLINEfrom . import load_soundNEWLINENEWLINENEWLINE# TODO: Adjust volume of different sounds ?NEWLINEc... |
#!/usr/bin/pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright (c) 2016 Red Hat, Inc.NEWLINE#NEWLINE# This file is part of AnsibleNEWLINE#NEWLINE# Ansible is free software: you can redistribute it and/or modifyNEWLINE# it under the terms of the GNU General Public License as published byNEWLINE# the Free Soft... |
import argparseNEWLINEimport templateNEWLINENEWLINEparser = argparse.ArgumentParser(description='EDSR and MDSR')NEWLINENEWLINEparser.add_argument('--debug', action='store_true',NEWLINE help='Enables debug mode')NEWLINEparser.add_argument('--template', default='.',NEWLINE help='You ... |
# Copyright 2020, The TensorFlow Authors.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLIN... |
import datetimeNEWLINEprint(datetime.date.today().year)NEWLINEprint(datetime.date.today().month)NEWLINEprint(datetime.date.today().day)NEWLINE |
from selenium.webdriver.common.keys import KeysNEWLINEimport timeNEWLINEimport randomNEWLINENEWLINEfrom selenium_ui.base_page import BasePageNEWLINEfrom selenium_ui.jira.pages.selectors import UrlManager, LoginPageLocators, DashboardLocators, PopupLocators, \NEWLINE IssueLocators, ProjectLocators, SearchLocators, Bo... |
import numpy as npNEWLINEfrom gym.envs.registration import registerNEWLINENEWLINEfrom onpolicy.envs.highway.highway_env import utilsNEWLINEfrom onpolicy.envs.highway.highway_env.envs.common.abstract import AbstractEnvNEWLINEfrom onpolicy.envs.highway.highway_env.road.lane import LineType, StraightLaneNEWLINEfrom onpoli... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE# @Time : 2018/12/24 10:05 AMNEWLINE# @Author : zhangzhenNEWLINE# @Site : NEWLINE# @File : torch_lstm_classification.pyNEWLINE# @Software: PyCharmNEWLINEimport torchNEWLINEimport torchvisionNEWLINEfrom torch import nnNEWLINEimport torch.utils.data as D... |
"""Builder class used to transform a mypy AST to the IR form.NEWLINENEWLINEThe IRBuilder class maintains transformation state and provides accessNEWLINEto various helpers used to implement the transform.NEWLINENEWLINEThe top-level transform control logic is in mypyc.irbuild.main.NEWLINENEWLINEmypyc.irbuild.visitor.IRBu... |
import reNEWLINENEWLINE_TESTS = [NEWLINE "//REL/RELIDO",NEWLINE "TS//SI-G/TK//RS/OC/NF",NEWLINE "TS//SI-ABC-DEF//OC/NF",NEWLINE "TS//SI-G ABCD EFGH-XYZ//OC/NF",NEWLINE "TS//ANB/SI/TK/XNB//NF",NEWLINE "TS//SAR-BP-123/CA-XYZ YYY//NF",NEWLINE "TS//RD-CNWDI//NF",NEWLINE "S//FRD-SIGMA 14 18//REL",NEW... |
import osNEWLINEfrom threading import BrokenBarrierErrorNEWLINEimport timeNEWLINENEWLINEfrom multiprocess.context import TimeoutErrorNEWLINEfrom multiprocess.managers import StateNEWLINEimport numpy as npNEWLINEimport pytestNEWLINENEWLINEfrom catkit.multiprocessing import Process, SharedMemoryManagerNEWLINENEWLINETIMEO... |
import datetimeNEWLINEimport mockNEWLINEimport pytestNEWLINEfrom urllib.request import HTTPErrorNEWLINENEWLINEfrom marshmallow.exceptions import ValidationErrorNEWLINEimport responsesNEWLINEfrom werkzeug.security import generate_password_hash, check_password_hashNEWLINENEWLINEfrom database.models import AttestationType... |
# encoding: utf-8NEWLINE"""Event loop integration for the ZeroMQ-based kernels."""NEWLINENEWLINE# Copyright (c) IPython Development Team.NEWLINE# Distributed under the terms of the Modified BSD License.NEWLINENEWLINEfrom functools import partialNEWLINEimport osNEWLINEimport sysNEWLINEimport platformNEWLINENEWLINEimport... |
# mock.pyNEWLINE# Test tools for mocking and patching.NEWLINE# Maintained by Michael FoordNEWLINE# Backport for other versions of Python available fromNEWLINE# http://pypi.python.org/pypi/mockNEWLINENEWLINE__all__ = (NEWLINE 'Mock',NEWLINE 'MagicMock',NEWLINE 'patch',NEWLINE 'sentinel',NEWLINE 'DEFAULT',... |
#!/usr/bin/pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright: (c) 2018, F5 Networks Inc.NEWLINE# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)NEWLINENEWLINEfrom __future__ import absolute_import, division, print_functionNEWLINE__metaclass__ = typeNEWLINENEWLINEDO... |
# /run.pyNEWLINEimport osNEWLINEfrom dotenv import load_dotenv, find_dotenvNEWLINENEWLINEfrom src.app import create_appNEWLINENEWLINEload_dotenv(find_dotenv())NEWLINENEWLINEenv_name = os.getenv('FLASK_ENV')NEWLINEapp = create_app(env_name)NEWLINENEWLINEif __name__ == '__main__':NEWLINE port = os.getenv('PORT')NEWLINE ... |
import inspectNEWLINEimport jsonNEWLINENEWLINENEWLINEclass JsonSerializer(json.JSONEncoder):NEWLINE _KEYS_TRANSFORMATIONS: dict = {'three_ds': '3ds',NEWLINE 'account_holder_type': 'account-holder-type',NEWLINE 'payment_network': 'payment-network',NE... |
from flask_wtf import FlaskFormNEWLINEfrom wtforms import StringField,PasswordField,SubmitField, BooleanFieldNEWLINEfrom wtforms.validators import Required,Email,EqualToNEWLINEfrom ..models import UserNEWLINEfrom wtforms import ValidationErrorNEWLINENEWLINENEWLINEclass RegistrationForm(FlaskForm):NEWLINENEWLINE emai... |
from pymongo import MongoClient, DESCENDINGNEWLINENEWLINEimport settingsNEWLINEfrom .functions import filteredNEWLINENEWLINEif not settings.MONGODB_URL:NEWLINE raise RuntimeError('MONGODB_URL is not set')NEWLINENEWLINEclient = MongoClient(settings.MONGODB_URL, connect=False)NEWLINENEWLINENEWLINEclass Modlog:NEWLINE ... |
# -*- coding: utf-8 -*-NEWLINENEWLINE# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:NEWLINE# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-codeNEWLINENEWLINEfrom ccxt.kucoin import kucoinNEWLINEfrom ccxt.base.errors import AuthenticationErrorNEWLINEfrom ccxt.base.er... |
import torchNEWLINEimport torch.nn as nnNEWLINEimport torch.nn.functional as FNEWLINEfrom mmcv.cnn import normal_init, kaiming_initNEWLINEimport numpy as npNEWLINENEWLINEfrom mmdet.ops import ModulatedDeformConvPack, RoIAlign, soft_nmsNEWLINEfrom mmdet.core import multi_apply, bbox_areas, force_fp32NEWLINEfrom mmdet.co... |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENS... |
# drawFace.pywNEWLINE# A program which draws facesNEWLINE"""Write and test a function to meet this specification.NEWLINENEWLINEdrawFace(center, size, win) center is a Point, size is an int, and win is aNEWLINEGraphWin. Draws a simple face of the given size in win.NEWLINENEWLINEYour function can draw a simple smiley (or... |
import loggingNEWLINENEWLINEimport numpyNEWLINEfrom numpy.linalg import pinvNEWLINENEWLINEfrom colormath import color_constantsNEWLINENEWLINElogger = logging.getLogger(__name__)NEWLINENEWLINENEWLINE# noinspection PyPep8NamingNEWLINEdef _get_adaptation_matrix(wp_src, wp_dst, observer, adaptation):NEWLINE """NEWLINE ... |
import purerpcNEWLINEimport greeter_pb2NEWLINENEWLINENEWLINEclass GreeterServicer(purerpc.Servicer):NEWLINE async def SayHello(self, input_message):NEWLINE raise NotImplementedError()NEWLINENEWLINE async def SayHelloGoodbye(self, input_message):NEWLINE raise NotImplementedError()NEWLINENEWLINE as... |
# -*- coding: utf-8 -*-NEWLINE##############################################################################NEWLINE#NEWLINE# OpenERP, Open Source Management SolutionNEWLINE# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).NEWLINE#NEWLINE# This program is free software: you can redistribute it and/or modif... |
from __future__ import absolute_importNEWLINEfrom __future__ import divisionNEWLINEfrom __future__ import print_functionNEWLINENEWLINEimport cv2NEWLINEfrom IPython import displayNEWLINEfrom PIL import ImageNEWLINENEWLINENEWLINEdef cv2_imshow(a):NEWLINE """A replacement for cv2.imshow() for use in Jupyter notebooks.N... |
# Copyright 2019 Huawei Technologies Co., LtdNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE... |
from ingest.api.ingestapi import IngestApiNEWLINEfrom ingest.exporter.bundle import BundleService, BundleNEWLINEfrom ingest.exporter.metadata import MetadataServiceNEWLINEfrom ingest.exporter.staging import StagingServiceNEWLINENEWLINENEWLINEclass SubmissionEnvelopeParseException(Exception):NEWLINE passNEWLINENEWLIN... |
## This file is part of ScapyNEWLINE## See http://www.secdev.org/projects/scapy for more informationsNEWLINE## Copyright (C) Philippe Biondi <phil@secdev.org>NEWLINE## Copyright (C) Gabriel Potter <gabriel@potter.fr>NEWLINE## This program is published under a GPLv2 licenseNEWLINENEWLINE"""NEWLINEPython 2 and 3 link cla... |
# !PythonNEWLINENEWLINE# Chapter 4 practice projectsNEWLINENEWLINEgrid = [['.','.','.','.','.','.'],NEWLINE ['.','0','0','.','.','.'],NEWLINE ['0','0','0','0','.','.'],NEWLINE ['0','0','0','0','0','.'],NEWLINE ['.','0','0','0','0','0'],NEWLINE ['0','0','0','0','0','.'],NEWLINE ... |
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root forNEWLINE# license information.NEWLINE#NEWLINE# Code generated by Microsoft (R)... |
from kivy.app import AppNEWLINEfrom kivy.uix.boxlayout import BoxLayoutNEWLINEfrom kivy.uix.gridlayout import GridLayoutNEWLINEfrom kivy.uix.button import ButtonNEWLINEfrom kivy.uix.label import LabelNEWLINEfrom kivy.uix.textinput import TextInputNEWLINEfrom kivy.uix.widget import WidgetNEWLINENEWLINEfrom ExerciseRunni... |
from __future__ import print_functionNEWLINENEWLINEimport osNEWLINEimport astNEWLINEimport jsonNEWLINEimport globNEWLINEimport reNEWLINEimport sysNEWLINEimport demisto_clientNEWLINEfrom threading import Thread, LockNEWLINEfrom demisto_client.demisto_api.rest import ApiExceptionNEWLINEfrom demisto_sdk.commands.common.to... |
# Copyright (C) 2013 Jaedyn K. DraperNEWLINE#NEWLINE# Permission is hereby granted, free of charge, to any person obtainingNEWLINE# a copy of this software and associated documentation files (the "Software"),NEWLINE# to deal in the Software without restriction, including without limitationNEWLINE# the rights to use, co... |
raise NotImplementedError('plugin not implemented')NEWLINE |
from typing import ListNEWLINENEWLINEfrom ..metadata import ShardMetadataNEWLINENEWLINEdef _check_shard_metadata_pair_overlap(shard1: ShardMetadata, shard2: ShardMetadata):NEWLINE """NEWLINE Checks if two shards overlap.NEWLINE """NEWLINENEWLINE # For each dim of each shard, check if one shard resides on th... |
from holoviews.element.comparison import ComparisonTestCaseNEWLINEfrom pyviz_comms import Comm, JupyterCommNEWLINENEWLINENEWLINEclass TestComm(ComparisonTestCase):NEWLINENEWLINE def test_init_comm(self):NEWLINE Comm()NEWLINENEWLINE def test_init_comm_id(self):NEWLINE comm = Comm(id='Test')NEWLINE ... |
# Functions to load ODELAY generated MATFILESNEWLINENEWLINE# Internal LibrariesNEWLINEimport clickNEWLINEimport csvNEWLINEfrom datetime import datetimeNEWLINEimport jsonNEWLINEimport osNEWLINEimport pathlibNEWLINEimport reNEWLINEimport sysNEWLINEimport timeNEWLINENEWLINE# External LibrariesNEWLINEimport cv2NEWLINEfrom ... |
import osNEWLINEimport sysNEWLINENEWLINEINTERP = os.path.expanduser("~/venv/bin/python3")NEWLINEif sys.executable != INTERP:NEWLINE os.execl(INTERP, INTERP, *sys.argv)NEWLINENEWLINEsys.path.append(os.getcwd())NEWLINEfrom blokdata.app import app as applicationNEWLINENEWLINE# For running on the server with passenger e... |
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."NEWLINE__license__ = "Apache-2.0"NEWLINENEWLINEimport numpy as npNEWLINENEWLINEfrom . import BaseExecutableDriverNEWLINENEWLINEif False:NEWLINE from ..types.sets import DocumentSetNEWLINENEWLINENEWLINEclass BaseIndexDriver(BaseExecutableDriver... |
#!/usr/bin/env pythonNEWLINENEWLINEfrom __future__ import print_functionNEWLINENEWLINEfrom builtins import rangeNEWLINEimport osNEWLINEimport reNEWLINEimport sysNEWLINEimport globNEWLINEimport jsonNEWLINEimport mathNEWLINEimport bisectNEWLINEimport randomNEWLINEimport signalNEWLINEif sys.version_info[0]>2:NEWLINE impo... |
# coding=utf-8NEWLINE# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***NEWLINE# *** Do not edit by hand unless you're certain you know what you are doing! ***NEWLINENEWLINEfrom . import _utilitiesNEWLINEimport typingNEWLINE# Export this package's modules as members:NEWLINEfrom .app ... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE KubernetesNEWLINENEWLINE No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)NEWLINENEWLINE OpenAPI spec version: v1.13.5NEWLINE NEWLINE Generated by: https://github.com/swagger-api/swagger-codegen.gitNEWLINE"""NEWLI... |
import numpy as npNEWLINEimport matplotlib.pyplot as pltNEWLINENEWLINE# plt.style.use("dark_background")NEWLINENEWLINEfrom matplotlib.patches import PolygonNEWLINEfrom matplotlib.collections import PatchCollectionNEWLINEfrom matplotlib.collections import PolyCollectionNEWLINENEWLINEfrom mpl_toolkits.axes_grid1 import A... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE Isilon SDKNEWLINENEWLINE Isilon SDK - Language bindings for the OneFS API # noqa: E501NEWLINENEWLINE OpenAPI spec version: 4NEWLINE Contact: sdk@isilon.comNEWLINE Generated by: https://github.com/swagger-api/swagger-codegen.gitNEWLINE"""NEWLINENEWLINENEWLINEfrom _... |
NEWLINEfrom e2cnn.kernels import KernelBasis, EmptyBasisExceptionNEWLINEfrom e2cnn.gspaces import *NEWLINEfrom e2cnn.nn import FieldTypeNEWLINEfrom .. import utilsNEWLINENEWLINEfrom .basisexpansion import BasisExpansionNEWLINEfrom .basisexpansion_singleblock import block_basisexpansionNEWLINENEWLINEfrom collections imp... |
import abcNEWLINEimport numpy as npNEWLINENEWLINEfrom . import _base_modelNEWLINENEWLINENEWLINEclass SklearnModel(_base_model.BaseModel, abc.ABC):NEWLINE """NEWLINE Parent class based on :obj:`~easyPheno.model._base_model.BaseModel` for all models with a sklearn-like API to shareNEWLINE functionalities. See :o... |
# coding=utf-8NEWLINE# *** WARNING: this file was generated by the Pulumi SDK Generator. ***NEWLINE# *** Do not edit by hand unless you're certain you know what you are doing! ***NEWLINENEWLINEimport warningsNEWLINEimport pulumiNEWLINEimport pulumi.runtimeNEWLINEfrom typing import Any, Mapping, Optional, Sequence, Unio... |
import sysNEWLINEsys.path.append('build')NEWLINEimport MatterSimNEWLINEimport timeNEWLINEimport mathNEWLINEimport cv2NEWLINEimport numpy as npNEWLINENEWLINEWIDTH = 800NEWLINEHEIGHT = 600NEWLINEVFOV = math.radians(60)NEWLINEHFOV = VFOV*WIDTH/HEIGHTNEWLINETEXT_COLOR = [230, 40, 40]NEWLINENEWLINEcv2.namedWindow('Python RG... |
#!/usr/bin/env pythonNEWLINENEWLINE#NEWLINE# Licensed to the Apache Software Foundation (ASF) under one or moreNEWLINE# contributor license agreements. See the NOTICE file distributed withNEWLINE# this work for additional information regarding copyright ownership.NEWLINE# The ASF licenses this file to You under the Ap... |
# Licensed to the Apache Software Foundation (ASF) under one or moreNEWLINE# contributor license agreements. See the NOTICE file distributed withNEWLINE# this work for additional information regarding copyright ownership.NEWLINE# The ASF licenses this file to You under the Apache License, Version 2.0NEWLINE# (the "Lic... |
# qubit number=4NEWLINE# total number=45NEWLINEimport pyquilNEWLINEfrom pyquil.api import local_forest_runtime, QVMConnectionNEWLINEfrom pyquil import Program, get_qcNEWLINEfrom pyquil.gates import *NEWLINEimport numpy as npNEWLINENEWLINEconn = QVMConnection()NEWLINENEWLINEdef make_circuit()-> Program:NEWLINENEWLINE ... |
NEWLINEimport numpy as npNEWLINENEWLINEclass Variable():NEWLINENEWLINE def __init__(self, data, creator=None):NEWLINENEWLINE if data is None:NEWLINE raise ValueError("data is not allowed to be None.")NEWLINE if not isinstance(data, np.ndarray):NEWLINE data = np.array(data)NEWLINE... |
# coding=utf-8NEWLINE# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLI... |
#!/usr/bin/env pythonNEWLINE# Copyright (C) 2012-2013, The CyanogenMod ProjectNEWLINE# (C) 2017-2018,2020-2021, The LineageOS ProjectNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain ... |
#NEWLINE# This file is part of LiteX-Boards.NEWLINE#NEWLINE# Copyright (c) 2021 Franck Jullien <franck.jullien@collshade.fr>NEWLINE# SPDX-License-Identifier: BSD-2-ClauseNEWLINENEWLINEfrom litex.build.generic_platform import *NEWLINEfrom litex.build.efinix.platform import EfinixPlatformNEWLINEfrom litex.build.efinix im... |
import timeNEWLINEfrom importlib import import_moduleNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.contrib.sessions.backends.base import UpdateErrorNEWLINEfrom django.contrib.sessions.middleware import SessionMiddlewareNEWLINEfrom django.core.exceptions import SuspiciousOperationNEWLINEfrom django.ut... |
#FatiamentoNEWLINEfrase = 'Curso em video python'NEWLINE#Ex01|Obs: Desmostra um celula no parametro indicadoNEWLINEprint(frase[3])NEWLINE#Ex02/OBS: sempre será escluido última casa para mostragem NEWLINEprint(frase[3:15])NEWLINE#Ex03|Obs: seleção e alternação na mostragem definido parametro NEWLINEprint(frase[3:21:2])N... |
import kerasNEWLINEfrom keras import modelsNEWLINEfrom keras.models import load_modelNEWLINEimport randomNEWLINEfrom preprocessing import get_kmer_from_realdata,DataGenerator_from_realdataNEWLINEfrom voting import get_final_resultNEWLINEfrom generate_report import save_reportNEWLINENEWLINE#path for testing fileNEWLINEf... |
"""Handle sound for a given maze"""NEWLINENEWLINEimport pygameNEWLINEimport pygame.mixerNEWLINENEWLINEfrom ..designpattern import event, observerNEWLINEfrom ..model import events, mazeNEWLINEfrom . import entity_soundNEWLINEfrom . import load_soundNEWLINENEWLINENEWLINE# TODO: Adjust volume of different sounds ?NEWLINEc... |
from flask import Flask, render_templateNEWLINEfrom flask_sqlalchemy import SQLAlchemyNEWLINEimport osNEWLINENEWLINEapp = Flask(__name__)NEWLINENEWLINEdb_path = os.path.join(os.path.dirname(__file__), 'database.db')NEWLINEdb_uri = 'sqlite:///{}'.format(db_path)NEWLINEapp.config['SQLALCHEMY_DATABASE_URI'] = db_uriNEWLIN... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.