text stringlengths 28 881k |
|---|
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and otherNEWLINE# Spack Project Developers. See the top-level COPYRIGHT file for details.NEWLINE#NEWLINE# SPDX-License-Identifier: (Apache-2.0 OR MIT)NEWLINENEWLINEfrom spack import *NEWLINENEWLINENEWLINEclass RCdcfluview(RPackage):NEWLINE """The 'U.S.'... |
import importlibNEWLINEimport pkgutilNEWLINENEWLINEfrom pkg_resources import get_distribution, DistributionNotFoundNEWLINENEWLINENEWLINEdef get_package_version():NEWLINE """Get package versionNEWLINENEWLINE Returns:NEWLINE str: Installed package version, or 0.0.0.dev if not fully installedNEWLINE """NE... |
import osNEWLINEimport clickNEWLINENEWLINEdef register(app):NEWLINE @app.cli.group()NEWLINE def translate():NEWLINE """translation and localization"""NEWLINE passNEWLINENEWLINE @translate.command()NEWLINE def update():NEWLINE """Update all languages."""NEWLINE if os.system('pybab... |
##############################################################################NEWLINE#NEWLINE# Copyright (c) 2001, 2002, 2009 Zope Foundation and Contributors.NEWLINE# All Rights Reserved.NEWLINE#NEWLINE# This software is subject to the provisions of the Zope Public License,NEWLINE# Version 2.1 (ZPL). A copy of the ZP... |
"""NEWLINE OpenVINO DL WorkbenchNEWLINE Dataset annotator moduleNEWLINENEWLINE Copyright (c) 2021 Intel CorporationNEWLINENEWLINE 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 ... |
# Copyright 2020 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... |
#!/usr/bin/env pythonNEWLINENEWLINE# Copyright (c) 2013 Intel Corporation. All rights reserved.NEWLINE# Use of this source code is governed by a BSD-style license that can beNEWLINE# found in the LICENSE file.NEWLINE# pylint: disable=F0401NEWLINENEWLINEimport osNEWLINEimport shutilNEWLINEimport sysNEWLINEfrom common_fu... |
import bpyNEWLINEfrom numpy import array, zeros, argmin, infNEWLINEfrom numpy.linalg import normNEWLINEfrom mathutils import *NEWLINENEWLINE####==========================================================================NEWLINE# DTW implementation courtesy of Pierre Rouanet:NEWLINE# http://github.com/pierre-rouanet/d... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE# **************************************************************************NEWLINE# Copyright © 2016 jianglinNEWLINE# File Name: __init__.pyNEWLINE# Author: jianglinNEWLINE# Email: [email protected]# Created: 2016-11-25 17:45:36 (CST)NEWLINE# Last Upd... |
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINE# vim: set et sw=4 ts=4:NEWLINENEWLINEfrom PyQt5.QtWidgets import *NEWLINEfrom PyQt5.QtCore import *NEWLINEfrom PyQt5.QtGui import *NEWLINENEWLINEfrom ayat import (suar_names, suar_lengths)NEWLINENEWLINENEWLINEclass SuraAyatDialog(QDialog):NEWLINENEWLINE sub... |
# test importing of required modules and sit2standpy packageNEWLINENEWLINENEWLINEdef test_numpy():NEWLINE import numpyNEWLINENEWLINE returnNEWLINENEWLINENEWLINEdef test_scipy():NEWLINE import scipyNEWLINENEWLINE returnNEWLINENEWLINENEWLINEdef test_pywt():NEWLINE import pywtNEWLINENEWLINE returnNEWLINE... |
#!/usr/bin/env python2NEWLINE#NEWLINE# Distributed under the MIT/X11 software license, see the accompanyingNEWLINE# file COPYING or http://www.opensource.org/licenses/mit-license.php.NEWLINE#NEWLINENEWLINEfrom test_framework.mininode import *NEWLINEfrom test_framework.test_framework import BitcoinTestFrameworkNEWLINEfr... |
"""Application-specific settings."""NEWLINEimport osNEWLINEfrom django.conf import settings as _settingsNEWLINEfrom django.core.exceptions import ImproperlyConfiguredNEWLINENEWLINENEWLINE###############################################################################NEWLINE# Single settings.NEWLINE######################... |
import platformNEWLINEfrom setuptools import setupNEWLINEfrom setuptools import find_packagesNEWLINEfrom setuptools import ExtensionNEWLINENEWLINENEWLINEextra_compile_args = [NEWLINE '-std=c++11',NEWLINE '-O3',NEWLINE '-Wall',NEWLINE '-Wextra',NEWLINE '-Wconversion',NEWLINE '-fno-strict-aliasing',NEWL... |
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINEimport sysNEWLINENEWLINEif __name__ == '__main__':NEWLINE X1 = int(input('Введите x1 '))NEWLINE Y1 = int(input('Введите y1 '))NEWLINE X2 = int(input('Введите x2 '))NEWLINE Y2 = int(input('Введите y2 '))NEWLINENEWLINE if X1 == -X2 and Y1 == -Y2:NE... |
# -*- coding: utf-8 -*-NEWLINEimport osNEWLINEimport sysNEWLINENEWLINEcmd = 'coverage run `which djangocms-helper` aldryn_boilerplates test --cms --extra-settings=test_settings'NEWLINENEWLINEsys.exit(os.system(cmd))NEWLINE |
# MIT LICENSENEWLINE#NEWLINE# Copyright 1997 - 2020 by IXIA KeysightNEWLINE#NEWLINE# Permission is hereby granted, free of charge, to any person obtaining a copyNEWLINE# of this software and associated documentation files (the "Software"),NEWLINE# to deal in the Software without restriction, including without limitatio... |
def to_binary(int_digit, length=4):NEWLINE """Convert a digit into binary string.NEWLINENEWLINE Arguments:NEWLINE int_digit {str} -- the digit needed to be convertNEWLINENEWLINE Keyword Arguments:NEWLINE length {int} -- length of converted string (default: {4})NEWLINENEWLINE Returns:NEWLINE ... |
# import the generic views you want, and the models NEWLINE# they apply to.NEWLINEfrom django.views.generic import ListViewNEWLINENEWLINE# Import the models you want to use.NEWLINEfrom snippets.models import SnippetNEWLINENEWLINE# Create a class for your model that subclassesNEWLINE# the generic view you want. This... |
words =[ "aback","abaft","abandoned","abashed","aberrant","abhorrent","abiding","abject","ablaze","able","abnormal","aboard","aboriginal","abortive","abounding","abrasive","abrupt","absent","absorbed","absorbing","abstracted","absurd","abundant","abusive","accept","acceptable","accessible","accidental","account","accur... |
import osNEWLINEimport timeNEWLINEimport statNEWLINEimport jsonNEWLINEimport zlibNEWLINEimport typingNEWLINEfrom typing import List, Sequence, MutableSequence, OptionalNEWLINEfrom collections import UserDictNEWLINEfrom hashlib import sha256NEWLINEfrom operator import attrgetterNEWLINEfrom torba.client.hash import bette... |
import sysNEWLINEfrom collections import namedtuple, OrderedDictNEWLINEfrom typing import Dict, ListNEWLINENEWLINEimport torchNEWLINEfrom torch import nn as nnNEWLINENEWLINEfrom model.decoder import DecoderNEWLINEfrom model.encoder import EncoderNEWLINEfrom utils import util, nn_utilNEWLINEfrom utils.ast import Abstrac... |
from bingads.v13.bulk.entities.audiences.bulk_campaign_audience_association import BulkCampaignAudienceAssociationNEWLINENEWLINEclass BulkCampaignProductAudienceAssociation(BulkCampaignAudienceAssociation):NEWLINE """ Represents an Campaign Product Audience Association that can be read or written in a bulk file.NEWL... |
from pycocotools.coco import COCONEWLINENEWLINEimport matplotlib.pyplot as pltNEWLINEimport cv2NEWLINENEWLINEimport osNEWLINEimport numpy as npNEWLINEimport randomNEWLINEimport torchNEWLINEimport torchvision.transforms as transformsNEWLINEfrom torch.utils.data import DataLoader,DatasetNEWLINEfrom skimage import io,tran... |
# Licensed under the Apache License, Version 2.0 (the "License"); you mayNEWLINE# not use this file except in compliance with the License. You may obtainNEWLINE# a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# Unless required by applicable law or a... |
from discord.ext import commandsNEWLINEimport discordNEWLINEimport requestsNEWLINEfrom bs4 import BeautifulSoupNEWLINEimport reNEWLINENEWLINEclass neorg_cmds(commands.Cog):NEWLINENEWLINE def __init__(self, bot):NEWLINE self.bot = botNEWLINENEWLINE @commands.command()NEWLINE async def wiki(self, ctx, *, query):NEWLINE ... |
from django.db import modelsNEWLINEtipo_choices=(NEWLINE ('colegio','Colegio'),NEWLINE ('iglesia','Iglesia'),NEWLINE ('plaza','Plaza'),NEWLINE ('restaurante','Restaurante'),NEWLINE ('alojamiento','Alojamiento'),NEWLINE )NEWLINENEWLINEclass admin_agregar (models.Model):NEWLINE cod_ubicacion= models.AutoField(primary_key... |
#NEWLINE# PySNMP MIB module DES-1210-28MEbx (http://snmplabs.com/pysmi)NEWLINE# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DES-1210-28MEbxNEWLINE# Produced by pysmi-0.3.4 at Wed May 1 12:38:52 2019NEWLINE# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4NEWLINE# Using Python ... |
NEWLINE# This file helps to compute a version number in source trees obtained fromNEWLINE# git-archive tarball (such as those provided by githubs download-from-tagNEWLINE# feature). Distribution tarballs (built by setup.py sdist) and buildNEWLINE# directories (produced by setup.py build) will contain a much shorter fil... |
# Copyright 2017 AT&T Intellectual Property. All other 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/lice... |
from datetime import dateNEWLINEfrom datetime import datetimeNEWLINEfrom datetime import timedelta as deltaNEWLINENEWLINEimport sysNEWLINEimport numpy as npNEWLINEimport xarray as xrNEWLINENEWLINEfrom parcels.grid import GridCodeNEWLINEfrom parcels.grid import CurvilinearGridNEWLINEfrom parcels.kernel import KernelNEWL... |
import FWCore.ParameterSet.Config as cmsNEWLINENEWLINEprocess = cms.Process("TEST")NEWLINENEWLINEprocess.source = cms.Source("EmptySource",NEWLINE firstRun = cms.untracked.uint32(1),NEWLINE firstLuminosityBlock = cms.untracked.uint32(2),NEWLINE firstEvent = cms.untracked.uint32(15),NEWLINE numberEventsInRun... |
from typing import Any, Dict, GeneratorNEWLINENEWLINEimport pytestNEWLINEfrom pydantic import BaseModelNEWLINENEWLINEfrom xpresso import App, Dependant, FromFormData, Path, SecurityNEWLINEfrom xpresso.security import OAuth2, OAuth2PasswordRequestFormStrictNEWLINEfrom xpresso.testclient import TestClientNEWLINEfrom xpre... |
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Thu Feb 20 17:06:27 2020NEWLINENEWLINE@author: priyankaNEWLINE"""NEWLINENEWLINE # -*- coding: utf-8 -*-NEWLINENEWLINE# Form implementation generated from reading ui file 'test_v1_tabs.ui'NEWLINE#NEWLINE# Created by: PyQt5 UI code generator ... |
import rlpNEWLINENEWLINEfrom bxutils.logging.log_level import LogLevelNEWLINENEWLINEfrom bxgateway.messages.eth.protocol.eth_protocol_message import EthProtocolMessageNEWLINEfrom bxgateway.messages.eth.protocol.eth_protocol_message_type import EthProtocolMessageTypeNEWLINEfrom bxgateway.messages.eth.serializers.block_h... |
from panda3d.core import DepthOffsetAttrib, NodePath, Vec3, Vec4, TextNodeNEWLINEfrom direct.directnotify import DirectNotifyGlobalNEWLINEfrom direct.fsm.FSM import FSMNEWLINEfrom direct.interval.FunctionInterval import WaitNEWLINEfrom direct.interval.IntervalGlobal import Func, LerpHprInterval, LerpScaleInterval, Lerp... |
"""JSON Web Encryption utilities."""NEWLINENEWLINEimport binasciiNEWLINEimport jsonNEWLINENEWLINEfrom collections import OrderedDictNEWLINEfrom typing import Any, Dict, Iterable, List, Mapping, Optional, UnionNEWLINENEWLINEfrom marshmallow import fields, Schema, ValidationErrorNEWLINENEWLINEfrom ..wallet.util import b6... |
#NEWLINE# Copyright 2019 The FATE 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... |
# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright (C) 2005-2007 Christopher Lenz <[email protected]>NEWLINE# Copyright (C) 2007-2010 Edgewall SoftwareNEWLINE# All rights reserved.NEWLINE#NEWLINE# This software is licensed as described in the file COPYING, whichNEWLINE# you should have received as part of this distribution.... |
# Copyright (C) 2021 Intel CorporationNEWLINE#NEWLINE# SPDX-License-Identifier: MITNEWLINENEWLINEimport osNEWLINEimport base64NEWLINEimport uuidNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.core.cache import cacheNEWLINEfrom rest_framework import statusNEWLINEfrom rest_framework.response import Respo... |
# Licensed to Elasticsearch B.V. under one or more contributorNEWLINE# license agreements. See the NOTICE file distributed withNEWLINE# this work for additional information regarding copyrightNEWLINE# ownership. Elasticsearch B.V. licenses this file to you underNEWLINE# the Apache License, Version 2.0 (the "Licens... |
# Copyright 2017 AT&T Intellectual Property. All other 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/lice... |
def define_targets(rules):NEWLINE rules.py_library(NEWLINE name = "torchgen",NEWLINE srcs = rules.glob(["**/*.py"]),NEWLINE deps = [NEWLINE rules.requirement("PyYAML"),NEWLINE rules.requirement("typing-extensions"),NEWLINE ],NEWLINE visibility = ["//visibility... |
version = '0.0.7'NEWLINEtime = '2021-10-22 16:08:00'NEWLINE |
from django.db import modelsNEWLINEimport django.contrib.auth.modelsNEWLINENEWLINENEWLINE# class Admin(models.Model):NEWLINE# password = models.CharField(max_length=128)NEWLINE# last_login = models.DateTimeField()NEWLINE# is_superuser = models.BooleanField()NEWLINE# first_name = models.CharField(max_len... |
from typing import List, Dict, SetNEWLINEfrom itertools import chainNEWLINEimport reNEWLINEfrom collections import defaultdict, CounterNEWLINENEWLINENEWLINEclass BytePairEncoding(object):NEWLINE """ Byte Pair Encoding classNEWLINE We aren't gonna use this class for encoding. Because it is too slow......NEWLINE ... |
from __future__ import unicode_literalsNEWLINEfrom django.db import modelsNEWLINE#from django.utils import timezoneNEWLINEfrom accounts.models import UserNEWLINENEWLINE NEWLINE# 계산 객체 생성NEWLINEclass Inference(models.Model):NEWLINE author = models.ForeignKey(User, NEWLINE null = True... |
"""Config Flow for PlayStation 4."""NEWLINEfrom collections import OrderedDictNEWLINEimport loggingNEWLINENEWLINEimport voluptuous as volNEWLINENEWLINEfrom homeassistant import config_entriesNEWLINEfrom homeassistant.components.ps4.const import (NEWLINE DEFAULT_NAME, DEFAULT_REGION, DOMAIN, REGIONS)NEWLINEfrom homea... |
# Copyright 2015 The Crashpad 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/LICENSE-... |
from typing import ListNEWLINENEWLINENEWLINEclass InvoiceProfiles:NEWLINE def __init__(self, invoice_profiles: List[str]):NEWLINE self.invoice_profiles = invoice_profilesNEWLINENEWLINE def as_list(self) -> List:NEWLINE return [{"value": invoice_profile} for invoice_profile in self.invoice_profiles]N... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4NEWLINENEWLINE# Copyright 2011 OpenStack FoundationNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License"); you mayNEWLINE# not use this file except in compliance with the License. You may obtainNEWLINE# a copy of the License atNEWLINE#NEWLI... |
from django.db import modelsNEWLINEfrom django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \NEWLINE PermissionsMixinNEWLINENEWLINEclass UserManager(BaseUserManager):NEWLINE def create_user(self, email, password=None, **extra_fields):NEWLINE """creates and saves a new user"""NEWLINE if not e... |
# -*- coding: utf-8 -*-NEWLINE# Generated by Django 1.10.5 on 2017-06-25 16:40NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('websites', '0005_auto_20170625_1... |
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... |
'''NEWLINECreated by auto_sdk on 2020.11.17NEWLINE'''NEWLINEfrom dingtalk.api.base import RestApiNEWLINEclass OapiKacDatavDingGetRequest(RestApi):NEWLINE def __init__(self,url=None):NEWLINE RestApi.__init__(self,url)NEWLINE self.ding_usage_summary_request = NoneNEWLINENEWLINE def getHttpMethod(self):NEWLINE return '... |
from datetime import datetime, dateNEWLINEfrom marqeta.response_models.transaction_model import TransactionModelNEWLINEfrom marqeta.response_models import datetime_objectNEWLINEimport jsonNEWLINEimport reNEWLINENEWLINEclass AdvancedSimulationResponseModel(object):NEWLINENEWLINE def __init__(self, json_response):NEWL... |
import unittestNEWLINENEWLINEfrom tests.mapreduce import MapReduceTestCaseNEWLINENEWLINENEWLINEdef all_tests():NEWLINE suite = unittest.TestSuite()NEWLINE suite.addTest(unittest.makeSuite(MapReduceTestCase))NEWLINE return suiteNEWLINE |
#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... |
#NEWLINE# Copyright 2019 The FATE 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... |
# 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)... |
import FWCore.ParameterSet.Config as cmsNEWLINENEWLINEL1GtRunSettingsViewer = cms.EDAnalyzer("L1GtRunSettingsViewer",NEWLINE prescalesKey = cms.string(""),NEWLINE maskAlgoKey = cms.string(""),NEWLINE maskTe... |
# -*- 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.async_support.base.exchange import ExchangeNEWLINEimport base64NEWLINEimport hashlibNEWLINEfrom ccx... |
# import numpyNEWLINEimport numpy as npNEWLINENEWLINE# importing qiskitNEWLINEimport qiskitNEWLINEfrom qiskit import QuantumCircuit, ClassicalRegister, QuantumRegisterNEWLINEfrom qiskit.compiler import schedule, transpileNEWLINENEWLINEfrom qiskit.test.mock.backends.almaden import FakeAlmadenNEWLINEbackend = FakeAlmaden... |
# Author: Steven J. Bethard <[email protected]>.NEWLINENEWLINE"""Command-line parsing libraryNEWLINENEWLINEThis module is an optparse-inspired command-line parsing library that:NEWLINENEWLINE - handles both optional and positional argumentsNEWLINE - produces highly informative usage messagesNEWLINE - su... |
#!/usr/bin/env pythonNEWLINENEWLINE# Copyright (c) 2013 Intel Corporation. All rights reserved.NEWLINE# Use of this source code is governed by a BSD-style license that can beNEWLINE# found in the LICENSE file.NEWLINE# pylint: disable=F0401NEWLINENEWLINEimport osNEWLINEimport shutilNEWLINEimport sysNEWLINEfrom common_fu... |
"""NEWLINEMetric Learning for Kernel Regression (MLKR), Weinberger et al.,NEWLINENEWLINEMLKR is an algorithm for supervised metric learning, which learns a distanceNEWLINEfunction by directly minimising the leave-one-out regression error. ThisNEWLINEalgorithm can also be viewed as a supervised variation of PCA and can ... |
# coding: utf-8NEWLINE"""NEWLINE Cisco IntersightNEWLINENEWLINE 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 a... |
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINENEWLINEdef test_list():NEWLINE L1 = ['Hello', 'World', 18, 'Apple', None]NEWLINE L2 = [i.lower() for i in L1 if isinstance(i, str)]NEWLINE print(L1)NEWLINE print(L2)NEWLINENEWLINENEWLINEif __name__ == '__main__':NEWLINE print('list compreh... |
from django.conf import settingsNEWLINEfrom hashids import HashidsNEWLINENEWLINENEWLINEdef get_hashids():NEWLINE return Hashids(NEWLINE salt=settings.SECRET_KEY, min_length=4, alphabet="abcdefghijklmnopqrstuvwxyz"NEWLINE )NEWLINENEWLINENEWLINEdef decode_hashid(hashid):NEWLINE hashids = get_hashids()NEWL... |
# Copyright 2016 Confluent Inc.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#NEWLINE# Unless requi... |
#!/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... |
# Generated by Django 2.0 on 2019-12-22 18:26NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('products', '0012_auto_20191222_2354'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.Alt... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE HyperOneNEWLINENEWLINE HyperOne API # noqa: E501NEWLINENEWLINE The version of the OpenAPI document: 0.1.0NEWLINE Generated by: https://openapi-generator.techNEWLINE"""NEWLINENEWLINENEWLINEimport pprintNEWLINEimport re # noqa: F401NEWLINENEWLINEimport sixNEWLINENEWLI... |
# Copyright (c) 2022 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/LICE... |
#!/usr/bin/env pythonNEWLINE## -*- coding: utf-8 -*-NEWLINE# Licensed to Cloudera, Inc. under oneNEWLINE# or more contributor license agreements. See the NOTICE fileNEWLINE# distributed with this work for additional informationNEWLINE# regarding copyright ownership. Cloudera, Inc. licenses this fileNEWLINE# to you un... |
#!/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... |
# 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... |
#MenuTitle: Build Circled GlyphsNEWLINE# -*- coding: utf-8 -*-NEWLINEfrom __future__ import division, print_function, unicode_literalsNEWLINE__doc__="""NEWLINEBuilds circled numbers and letters (U+24B6...24EA and U+2460...2473) from _part.circle and the letters and figures.NEWLINE"""NEWLINENEWLINEfrom Foundation import... |
"""NEWLINEAbstract agent for the gym-idsgame environmentNEWLINE"""NEWLINEfrom abc import ABCNEWLINE#from gym_idsgame.envs.dao.game_config import GameConfigNEWLINENEWLINEclass Agent(ABC):NEWLINE """NEWLINE Abstract class representing an agentNEWLINE """NEWLINENEWLINE def __init__(self, game_config):NEWLINE ... |
import usocket as socketNEWLINEimport uselectNEWLINEfrom utime import ticks_add, ticks_ms, ticks_diffNEWLINENEWLINENEWLINEclass MQTTException(Exception):NEWLINE passNEWLINENEWLINENEWLINEdef pid_gen(pid=0):NEWLINE while True:NEWLINE pid = pid + 1 if pid < 65535 else 1NEWLINE yield pidNEWLINENEWLINENE... |
# pylint:disable=no-memberNEWLINEfrom time import sleepNEWLINEfrom typing import ListNEWLINENEWLINEfrom dagster import Field, Output, opNEWLINEfrom dagster.core.definitions.decorators.graph import graphNEWLINEfrom dagster.core.definitions.output import OutNEWLINENEWLINENEWLINE@opNEWLINEdef sleeper(context, units: List[... |
#!/usr/bin/env pythonNEWLINEimport argparseNEWLINEimport networkx as nxNEWLINEimport numpy as npNEWLINEimport matplotlib as mplNEWLINEimport matplotlib.pyplot as pltNEWLINEfrom matplotlib import rcNEWLINEimport prmfNEWLINEimport prmf.plotNEWLINErc('text', usetex=True)NEWLINENEWLINEDPI = prmf.plot.DPINEWLINEEPSILON = np... |
from Find_the_last_Fibonacci_digit_hardcore_version_6_kyu import last_fib_digitNEWLINEimport unittestNEWLINENEWLINEclass Fibonacci(unittest.TestCase):NEWLINE def test_1(self):NEWLINE n = 7000006NEWLINE result = 3NEWLINE self.assertEqual(last_fib_digit(n), result)NEWLINE def test_1(self):NEWLI... |
#!/usr/bin/env pythonNEWLINENEWLINEimport scipy as spNEWLINEimport netCDF4 as ncNEWLINEfrom scipy import interpolateNEWLINENEWLINE#gi=nc.Dataset('/discover/nobackup/yvikhlia/coupled/Forcings/a288x181_o720x410/INPUT/grid_spec.nc')NEWLINE#loni=gi.variables['x_T'][:]; lati=gi.variables['y_T'][:]NEWLINE#jm,im=loni.shapeNEW... |
from django.conf import settingsNEWLINEfrom rest_framework.routers import DefaultRouter, SimpleRouterNEWLINEfrom django.urls import pathNEWLINEfrom scrape_imdb.movies.views import MovieSerializerView, scrape_moviesNEWLINENEWLINEfrom scrape_imdb.users.api.views import UserViewSetNEWLINENEWLINEif settings.DEBUG:NEWLINE ... |
import osNEWLINENEWLINEimport torchNEWLINEimport torch.nn as nnNEWLINEimport torch.nn.functional as FNEWLINEimport torchvisionNEWLINEimport torchvision.datasets as datasetsNEWLINEimport torchvision.transforms as transformsNEWLINEfrom pl_bolts.datamodules import CIFAR10DataModuleNEWLINEfrom pl_bolts.callbacks import Pri... |
try:NEWLINE from django.conf.urls import url, includeNEWLINEexcept ImportError:NEWLINE from django.urls import url, includeNEWLINENEWLINEurlpatterns = [NEWLINE url(r'^', include('notify.urls', namespace='notifications')),NEWLINE]NEWLINE |
## @fileNEWLINE# This file contained the parser for define sections in INF file NEWLINE#NEWLINE# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>NEWLINE#NEWLINE# This program and the accompanying materials are licensed and made available NEWLINE# under the terms and conditions of the BSD License which ac... |
# Copyright 2019 The Chromium Authors. All rights reserved.NEWLINE# Use of this source code is governed by a BSD-style license that can beNEWLINE# found in the LICENSE file.NEWLINENEWLINEfrom __future__ import absolute_importNEWLINEfrom __future__ import divisionNEWLINEfrom __future__ import print_functionNEWLINENEWLIN... |
import unittestNEWLINENEWLINEfrom cubes.sql.mapper import StarSchemaMapper, distill_namingNEWLINEfrom cubes.model import AttributeNEWLINENEWLINEfrom ..common import CubesTestCaseBase, create_providerNEWLINENEWLINEclass MapperTestCase(CubesTestCaseBase):NEWLINE def setUp(self):NEWLINE super(MapperTestCase, sel... |
from test_common import get_sample_layer, get_opsNEWLINEfrom nose.tools import assert_raisesNEWLINEimport tvmNEWLINENEWLINEdef test_set_tiling_wrong_inputs():NEWLINE layer = get_sample_layer()NEWLINE with assert_raises(Exception):NEWLINE # wrong iv nameNEWLINE layer.set_tiling("n", [4, 1, 1, 1])NEWL... |
"""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 numpy as npNEWLINEimport picameraxNEWLINEimport picamerax.arrayNEWLINEfrom PIL import ImageNEWLINENEWLINEwith picamerax.PiCamera() as camera:NEWLINE with picamerax.array.PiMotionArray(camera) as stream:NEWLINE camera.resolution = (640, 480)NEWLINE camera.framerate = 30NEWLINE camera.start... |
from time import timeNEWLINEfrom base64 import b16encodeNEWLINEfrom functools import partialNEWLINEfrom operator import __eq__, __ne__, __lt__, __le__, __gt__, __ge__NEWLINENEWLINEfrom six import (NEWLINE integer_types as _integer_types,NEWLINE text_type as _text_type)NEWLINENEWLINEfrom OpenSSL._util import (NEWL... |
begin_unitNEWLINEcomment|'# Copyright 2011 Eldar Nugaev'NEWLINEnl|'\n'NEWLINEcomment|'# All Rights Reserved.'NEWLINEnl|'\n'NEWLINEcomment|'#'NEWLINEnl|'\n'NEWLINEcomment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'NEWLINEnl|'\n'NEWLINEcomment|'# not use this file except in complianc... |
# Owner(s): ["oncall: quantization"]NEWLINENEWLINEimport torchNEWLINEimport torch.nn as nnNEWLINEimport torch.nn.intrinsic as nniNEWLINEimport torch.nn.intrinsic.quantized as nniqNEWLINEimport torch.nn.quantized as nnqNEWLINEimport torch.nn.quantized.dynamic as nnqdNEWLINEimport torch.nn.quantized._reference as nnqrNEW... |
import open3d as o3dNEWLINENEWLINENEWLINEFilterScope=o3d.geometry.FilterScopeNEWLINENEWLINEdef removePCDOutlier(pcd,voxel_size=0.001,nb_points=32,radius=0.004):NEWLINE '''NEWLINE 尝试除去点云离群点NEWLINE '''NEWLINE downpcd=pcd.voxel_down_sample(voxel_size=voxel_size)NEWLINE inlierPcd,idxs=downpcd.remove_radi... |
# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Tue Dec 13 01:25:12 2017NEWLINEComplete document analysis:NEWLINE1) Fuzzy String compare for file similarityNEWLINE2) Word frequency counterNEWLINE3) Phrase frequency counterNEWLINE@author: MStattelmanNEWLINE"""NEWLINENEWLINE#ImportsNEWLINEimport pandas as pdNEWLINEimp... |
import gymNEWLINEimport randomNEWLINEimport numpy as npNEWLINEimport argparseNEWLINEfrom arguments import get_argsNEWLINEfrom actorcritic import Actor, second, act, actorNEWLINEimport torchNEWLINEfrom torch.autograd import VariableNEWLINEimport torch.nn.functional as FNEWLINEimport torch.optim as optimNEWLINEimport tor... |
import pytestNEWLINEimport mockNEWLINEimport jsonNEWLINEfrom functools import wrapsNEWLINEfrom unittest.mock import patchNEWLINENEWLINEfrom app import storageNEWLINEfrom data.registry_model.blobuploader import upload_blob, BlobUploadSettingsNEWLINEfrom image.docker.schema2.manifest import DockerSchema2ManifestBuilderNE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.