text stringlengths 2 999k |
|---|
# coding: utf-8
"""
FINBOURNE Drive API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.1.185
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibi... |
# Copyright (c) 2011 Tencent Inc.
# All rights reserved.
#
# Author: Michaelpeng <michaelpeng@tencent.com>
# Date: October 20, 2011
"""
This is the test module for cc_binary target.
"""
import blade_test
class TestCcBinary(blade_test.TargetTest):
"""Test cc_binary."""
def setUp(self):
"""setup m... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import mock
import datetime
import json
import pytest
from oauthlib.oauth2 import InvalidRequestFatalError
from oauthlib.common import Request as OAuthRequest
from pyramid import httpexceptions
from h._compat import urlparse
from h.view... |
###########################################################################################
# Implementation of the stochastic depth algorithm described in the paper
#
# Huang, Gao, et al. "Deep networks with stochastic depth." arXiv preprint arXiv:1603.09382 (2016).
#
# Reference torch implementation can be found a... |
# -*- coding: utf-8 -*-
'''
This module handles the orders, orderbook and calculating PNLs.
by @robswc
'''
# TODO Clean up code.
# TODO Make things more efficient.
import statistics
from trade_exporting import write
# Test variables.
limit_price = 500
account_value = 10000
last_price = 1000
'''
I figured separa... |
'''
Module which implements the synapse module API/convention.
'''
coremods = (
'synapse.models.dns.DnsModule',
'synapse.models.orgs.OuModule',
'synapse.models.syn.SynModule',
'synapse.models.auth.AuthModule',
'synapse.models.base.BaseModule',
'synapse.models.risk.RiskModule',
'synapse.model... |
# Copyright (c) 2019 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 app... |
# train.py
from utils import *
from model import *
from config import Config
import sys
import torch.optim as optim
from torch import nn
import torch
if __name__=='__main__':
config = Config()
train_file = '../data/ag_news.train'
if len(sys.argv) > 2:
train_file = sys.argv[1]
test_file = '../d... |
"""
Model Checkpointing
===================
Automatically save model checkpoints during training.
"""
import os
import re
import numpy as np
from typing import Optional
import torch
from pytorch_lightning import _logger as log
from pytorch_lightning.callbacks.base import Callback
from pytorch_lightning.utilities i... |
from django import forms
from ex3.book_app.models import Book
class BookForm(forms.ModelForm):
class Meta:
model = Book
fields = '__all__'
class BookEditForm(BookForm):
pass
class BookDeleteForm(BookForm):
pass
|
#!/usr/bin/env python
###############################################################################
# Copyright 2017 The Apollo 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 ... |
from tarterus import maparray
|
# Lint as: python3
"""GKE service account permissions.
Verifying if Google Kubernetes Engine service account is created and assigned
the Kubernetes Engine Service Agent role on the project.
"""
from gcp_doctor import lint, models
from gcp_doctor.queries import crm, gce, iam
# defining role
ROLE = 'roles/container.ser... |
# -*- coding: utf-8 -*-
"""
symmetry.py - Check for symmetry
"""
from __future__ import unicode_literals
import logging
from lgr.char import RangeChar
from lgr.utils import format_cp
logger = logging.getLogger(__name__)
def check_symmetry(lgr, options):
"""
Check that all variants are defined in a symmetri... |
# Copyright 2016 Cloudbase Solutions Srl
# 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 r... |
__author__ = 'Nick Hirakawa'
from parse import *
from query import QueryProcessor
import operator
def main():
qp = QueryParser(filename='../text/queries.txt')
cp = CorpusParser(filename='../text/corpus.txt')
qp.parse()
queries = qp.get_queries()
cp.parse()
corpus = cp.get_corpus()
proc = QueryProcessor(queri... |
# 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... |
# Defines Keras layer class for undirected attributed graph embedding
# based on description in http://arxiv.org/pdf/1509.09292v2.pdfv
'''
Now intended for keras 1.0, not 0.3
'''
import numpy as np
import keras.backend as K
import theano.tensor as T # should write custom back-end eventually, but this is quick fix
im... |
import pytest
import logging
import os
import pandas as pd
import scripts_helpers
import minst.logger
import minst.sources.uiowa as uiowa
import minst.sources.rwc as rwc
import minst.sources.philharmonia as philz
logging.config.dictConfig(minst.logger.get_config('INFO'))
def test_build_default_uiowa(workspace, ui... |
import argparse
import cloudpickle
import sys
import types
from enum import Enum
import logging
logging.basicConfig(format='%(message)s')
logging.getLogger().setLevel(logging.INFO)
class ObjectType(Enum):
FUNCTION = 1
CLASS = 2
NOT_SUPPORTED = 3
def get_execution_obj_type(obj):
# Check if a function ... |
#!/usr/bin/python
#
# Miro controller
#
from PyQt5.QtCore import Qt, QTimer, QElapsedTimer
from basal_ganglia.bg_gurney import *
from hypothalamus.motivational_system import *
from model import *
import miro_functions.ball_approach_avoid.ball_detector as detector
class MiroController:
def __init__(self):
... |
# Copyright 2015 The TensorFlow 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 applica... |
#
# Code by Alexander Pruss and under the MIT license
#
from mine import *
def draw_surface(xf,yf,zf,a0,a1,asteps,b0,b1,bsteps,ox,oy,oz,scalex,scaley,scalez,mcblock,mcmeta):
for i in range(asteps):
u = (a0 * (asteps-1-i) + a1 * i) / asteps
for j in range(bsteps):
v = (b0 * (bsteps-1-j) +... |
from AdaptiveHuffmanCoding import AdaptiveHuffmanCoding
import sys
import math
def entropy(string):
freq = {}
for char in string:
if char in freq:
freq[char] += 1
else:
freq[char] = 1
H = 0
for i in freq:
H += freq[i] / len(string) * -math.log(freq[i] ... |
from abc import ABC, abstractmethod
from stateful_simulator.datatypes.DataTypes import TimeSeriesChunk, FeatureVector
class Featurizer(ABC):
@abstractmethod
def featurize(self, df: TimeSeriesChunk) -> FeatureVector:
pass
|
from __future__ import absolute_import
class BaseValidator:
#
# Inbound
#
def validate_inbound_account(self, account):
raise NotImplementedError("must be implemented by subclasses")
def validate_inbound_block_hash(self, block_hash):
raise NotImplementedError("must be implemented b... |
r"""
Graded modules
"""
# ****************************************************************************
# Copyright (C) 2008 Teresa Gomez-Diaz (CNRS) <Teresa.Gomez-Diaz@univ-mlv.fr>
# 2008-2013 Nicolas M. Thiery <nthiery at users.sf.net>
#
# Distributed under the terms of the GNU General Public Lic... |
"""A list of all SQL key words.
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-ver15
"""
RESERVED_KEYWORDS = [
"ADD",
"ALL",
"ALTER",
"AND",
"ANSI_DEFAULTS",
"ANSI_NULL_DFLT_OFF",
"ANSI_NULL_DFLT_ON",
"ANSI_NULLS",
"ANSI_... |
#! /usr/bin/env python
"""
usage: stalk <name> [--org ORG] [-U] [--np] [--followers] [--follows]
[--since SINCE] [--until UNTIL]
positional arguments:
name name of the user
optional arguments:
--org ORG Organization Name
-U, --update Update this program to latest version. M... |
import programmingalpha
from programmingalpha.tokenizers import get_tokenizer
from programmingalpha.alphaservices.HTTPServers.flask_http import AlphaHTTPProxy
from onmt.translate.translation_server import ServerModelError
from flask import jsonify
from programmingalpha.Utility import getLogger
logger=getLogger(__name_... |
__author__ = 'Imaginary'
|
class Solution:
def licenseKeyFormatting(self, S: str, K: int) -> str:
S = S.replace("-", "").upper()[::-1]
return '-'.join(S[i:i+K] for i in range(0, len(S), K))[::-1]
|
# -*- coding: utf-8 -*-
# -------------------------------------------#
# author: sean lee #
# email: xmlee97@gmail.com #
#--------------------------------------------#
import os
import concurrent.futures as futures
from functools import partial
from typing import (
List... |
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
import numpy as np
import pycuda.driver as cuda
import pycuda.autoinit
from cuda_functions_sp import cu_matrix_kernel
from image_functions import convolve_undersample
import sys
def numpy3d_to_array(np_array, allow_surface_bind=False, layered=True):
d, h, w = np_array.shape
descr = cuda.ArrayDescriptor3D()
... |
#coding=utf-8
import os
import django
from channels.routing import get_default_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bot.settings')
django.setup()
application = get_default_application()
|
"""Fetcher based on dipy."""
import os
import sys
import contextlib
from os.path import join as pjoin
from hashlib import sha256
from shutil import copyfileobj
import tarfile
import zipfile
if sys.version_info[0] < 3:
from urllib2 import urlopen
else:
from urllib.request import urlopen
# Set a user-writeab... |
# Copyright 2018-2020 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... |
import plotly
import plotly.graph_objs as go
dict_fig ={}
# Add data
x = ['hour1', ' ', ' ', ' ', ' ', 'hour6', ' ', ' ', ' ',
' ', ' ', 'hour12', ' ', ' ', ' ', ' ', ' ', 'hour18',
' ', ' ... |
import math
import numpy as np
from selfdrive.controls.lib.pid import PIController
from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT
from selfdrive.controls.lib.lateral_mpc import libmpc_py
from common.numpy_fast import interp
from common.realtime import sec_since_boot
from selfdrive.swaglog import cloudlog... |
"""
@author: Zongyi Li
This file is the Fourier Neural Operator for 1D problem such as the (time-independent) Burgers equation discussed in Section 5.1 in the [paper](https://arxiv.org/pdf/2010.08895.pdf).
"""
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter... |
# import the necessary packages
import os
import sys
import requests
import ssl
from flask import Flask
from flask import request
from flask import jsonify
from flask import send_file
from app_utils import download
from app_utils import generate_random_filename
from app_utils import clean_me
from app_utils import cle... |
from collections import Counter
from string import punctuation
def load_text(input_file):
"""Load text from a text file and return as a string.
Parameters
----------
input_file : str
Path to text file.
Returns
-------
str
Text file contents.
Examples
--------
... |
# pyOCD debugger
# Copyright (c) 2015-2019 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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... |
import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group == ... |
"""GB-specific Form helpers."""
import re
from django.forms import ValidationError
from django.forms.fields import CharField, Select
from django.utils.translation import gettext_lazy as _
from .gb_regions import GB_NATIONS_CHOICES, GB_REGION_CHOICES
class GBPostcodeField(CharField):
"""
A form field that v... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=2
# total number=19
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... |
# Generated by Django 2.2.18 on 2021-03-28 16:40
from django.db import migrations
import versatileimagefield.fields
class Migration(migrations.Migration):
dependencies = [("event", "0019_schedule_type_enums")]
operations = [
migrations.AddField(
model_name="event",
name="soc... |
# coding: utf-8
"""
Copyright 2016 SmartBear Software
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 applica... |
import discord
import Dscrd as _D
import common as _c
import TeacherFunc as Do
import os
from discord.ext import commands
from Cours import *
from Devoirs import *
import payloadhandler
class Teacher(discord.Client):
def __init__(self, devoirhandler, courshandler):
super(Teacher,self).__init__()
s... |
from pyramid.view import view_config
from pyramid.response import Response
RESPONSE_BODY = u"OK"
@view_config(route_name='probe_status')
def probe_status_view(request):
"""probe status endpoint
This endpoint allows to check if the service is available and to
decommission the service.
Decommissioni... |
# -*- coding: utf-8 -*-
# jinja2自定过滤器
def datetimeformat_readable(value, format='%Y-%m-%d %H:%M:%S'):
"""
时间格式化
:param value: datetime
:param format:
:return: str
"""
if not value:
return ''
return value.strftime(format)
def byte_with_unit_readable(value):
"""
将byte转为... |
#!/usr/bin/env python
import sys
sys.path.append('../neural_networks')
import numpy as np
import numpy.matlib
import pickle
import copy
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import matplotlib.pyplot as plt
import os
import time
import copy
from gym_collision_avoidance.envs.policies.CADRL.s... |
from collections import OrderedDict
from .renderer import Renderer
from great_expectations.render.types import (
RenderedComponentContent,
RenderedSectionContent,
RenderedDocumentContent
)
class SiteIndexPageRenderer(Renderer):
@classmethod
def _generate_data_asset_table_section(cls, data_asset_n... |
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
class QuantizationDetails(object):
NONE = 0
CustomQuantization = 1
def QuantizationDetailsCreator(unionType, table):
from flatbuffers.table import Table
if not isinstance(table, Table):
return None
i... |
from metadatadb_driver_interface.constants import CONFIG_OPTION
from metadatadb_driver_interface.utils import start_plugin
class MetadataDb:
"""High-level, plugin-bound Metadata DB functions.
Instantiated with an subclass implementing the ledger plugin
interface (:class:`~.AbstractPlugin`) that will autom... |
# coding: utf-8
# <h1>Table of Contents<span class="tocSkip"></span></h1>
# <div class="toc"><ul class="toc-item"><li><span><a href="#Introduction" data-toc-modified-id="Introduction-1"><span class="toc-item-num">1 </span>Introduction</a></span></li><li><span><a href="#Reading-modis-data" data-toc-modified... |
# import the necessary packages
from tensorflow.keras.callbacks import LambdaCallback
from tensorflow.keras import backend as K
import matplotlib.pyplot as plt
import numpy as np
import tempfile
class LearningRateFinder:
def __init__(self, model, stopFactor=4, beta=0.98):
# store the model, stop factor, and beta va... |
import sys
import importlib
import glob
from pathlib import Path
from panda3d.core import NodePath
from ursina.vec3 import Vec3
from panda3d.core import Vec4, Vec2
from panda3d.core import TransparencyAttrib
from panda3d.core import Shader
from panda3d.core import TextureStage, TexGenAttrib
from ursina.texture import ... |
"""
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
import time
from collection... |
# coding: utf-8
import sys
sys.path.append('..') # 부모 디렉터리의 파일을 가져올 수 있도록 설정
from common.trainer import Trainer
from common.optimizer import Adam
from simple_cbow import SimpleCBOW
from common.util import preprocess, create_contexts_target, convert_one_hot
window_size = 1
hidden_size = 5
batch_size = 3
max_epoch = 1... |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# -*- coding: utf-8 -*-
"""
------------------------------------------------
util.rest.__init__.py
------------------------------------------------
Author: Tony Ben (email: nanjinghhu@vip.qq.com)
Create: 11/29/2021
------------------------------------------------
ChangeLog
---------------------------------... |
# Title: install_exploit v.1 - Install Metasploit Exploits
# Date: Sept. 27, 2017
# Author: Ethan Frazier
# Version: install_exploit v.1
#!/bin/usr/python3
from termcolor import colored
from os import system, path
from sys import argv
from argparse import ArgumentParser
EXPLOITS_DIR = "~/.msf4/modules... |
#!/usr/bin/env python
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 2008-2016 California Institute of Technology.
# Copyright (c) 2016-2020 The Uncertainty Quantification Foundation.
# License: 3-clause BSD. The full license text is available at:
# - https://github.com/uqfoundation/di... |
from django.contrib import admin
from django.urls import path
from django.urls import include
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title="Developers' Kurultay")
urlpatterns = [
path('admin/', admin.site.urls),
path('auth/', include('dj_rest_auth.urls')),
... |
import unittest
from talipp.indicators import TEMA
from TalippTest import TalippTest
class Test(TalippTest):
def setUp(self) -> None:
self.input_values = list(TalippTest.CLOSE_TMPL)
def test_init(self):
ind = TEMA(10, self.input_values)
print(ind)
self.assertAlmostEqual(in... |
# Copyright (c) 2017 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... |
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import itertools
from collections import defaultdict
from dataclasses import dataclass
from typing import ClassVar, Iterable, List, Optional, Tuple, Type, cast
from pants.base.deprecated ... |
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
from common import ParseFlags
from common import TestDriver
# Platform-specific decorators.
# These decorators can be used to only run a test fu... |
#!/usr/bin/env python3
# Copyright 2018 The Meson development team
#
# 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 a... |
# -*- coding: utf-8 -*-
#
from rdflib import RDF, RDFS, Namespace
RDFS_Resource = RDFS.term('Resource')
RDF_first = RDF.term('first')
SH = Namespace('http://www.w3.org/ns/shacl#')
|
"""This file implements the gym environment of minitaur.
"""
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0,parentdir)
import math
import time
import gym
from gym import spaces
fr... |
from sqlalchemy import Column, Table, ForeignKey
from sqlalchemy import Integer, String, DateTime, Float
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.ext.hybrid import hybrid_property
from flask_login import UserMixin
db = declarative_base()
user_good... |
from django.conf.urls import url
from django.urls import include
from rest_framework import serializers, viewsets
from rest_framework.response import Response
from rest_framework.routers import DefaultRouter
from wrappr_backend.detection.models import Context, Frame, Result, Object
class ContextSerializer(serializer... |
from model.group import Group
from random import randrange
def test_delete_some_group(app):
if app.group.count() == 0:
app.group.create(Group(name="test"))
old_groups = app.group.get_group_list()
index = randrange(len(old_groups))
app.group.delete_group_by_index(index)
new_groups = app.gro... |
import os
import sys
import platform
import codecs
import uuid
import base64
import logging
import io
import utils
from configobj import ConfigObj
from validate import Validator
from options import Options
from comicapi.utils import which, addtopath
from folders import AppFolders
class ComicStreamerConfig(ConfigObj)... |
from turtle import Turtle
class ScoreBoard(Turtle):
def __init__(self):
super().__init__()
self.penup()
self.score=0
with open('data.txt') as data:
self.highscore=int(data.read())
# self.highscore=0
self.color('white')
self.hideturtle... |
class Solution:
def strStr(self, haystack: str, needle: str) -> int:
# 1st brute-force solution
# O(kn) time | O(k) space
if needle == "":
return 0
k = len(needle)
n = len(haystack)
for i in range(n - k + 1):
if haystack[i:i+k] == needle:
... |
import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['None'] , ['LinearTrend'] , ['Seasonal_Hour'] , ['AR'] ); |
import pyniNVStrings
def to_device(strs):
"""
Create nvstrings instance from list of Python strings.
Parameters
----------
strs : list
List of Python strings.
Examples
--------
>>> import nvstrings
>>> s = nvstrings.to_device(['apple','pear','banana','orange'])
>>> pr... |
import unittest
from mpf.core.segment_mappings import TextToSegmentMapper, bcd_segments
class TestSegmentDisplay(unittest.TestCase):
def test_text_to_mapping(self):
mapping = TextToSegmentMapper.map_text_to_segments("1337.23", 10, bcd_segments, embed_dots=True)
self.assertEqual(
[bcd... |
from pathlib import Path
import typedBot as tB
from typedBot import Point
tB.newPage(500, 500)
imagePath = Path("tests/data/drawBot.pdf")
w, h = tB.imageSize(imagePath)
tB.save()
factor = 250 / w
tB.scale(factor, factor)
tB.image(imagePath, Point(0, 0))
tB.restore()
imagePath = Path("tests/data/drawBot.png")
w, h = t... |
# coding: utf-8
"""
Nodeum API
The Nodeum API makes it easy to tap into the digital data mesh that runs across your organisation. Make requests to our API endpoints and we’ll give you everything you need to interconnect your business workflows with your storage. All production API requests are made to: http... |
# -*- coding: utf-8 -*-
# Copyright 2020 TensorFlowTTS Team.
#
# 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 applicab... |
"""Blockchain Center Model"""
import logging
from typing import List, Union
import pandas as pd
import requests
from bs4 import BeautifulSoup
from requests.adapters import HTTPAdapter, RetryError
from urllib3.util.retry import Retry
from gamestonk_terminal.decorators import log_start_end
from gamestonk_terminal.helpe... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... |
'''
Copyright (C) 2021 CG Cookie
http://cgcookie.com
hello@cgcookie.com
Created by Jonathan Denning, Jonathan Williamson, and Patrick Moore
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... |
# -*-coding:Utf-8 -*
# Copyright (c) 2014 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# lis... |
from __future__ import absolute_import, unicode_literals
from kombu import Exchange, Queue
from django.apps import apps
from django.db.models.signals import post_delete, pre_delete
from django.utils.translation import ugettext_lazy as _
from acls import ModelPermission
from acls.links import link_acl_list
from acls.... |
# A test suite for pdb; not very comprehensive at the moment.
import doctest
import imp
import pdb
import sys
import unittest
import subprocess
import textwrap
from test import support
# This little helper class is essential for testing pdb under doctest.
from test.test_doctest import _FakeInput
class PdbTestInput(... |
# -*- coding: utf-8 -*-
"""
"""
import argparse
import sys
import logging
import elasticsearch
import pulsar
import json
import os
import socket
from datetime import date
__author__ = "Phat Loc"
__copyright__ = "Phat Loc"
__license__ = "mit"
__version__ = '0.0.1.'
_logger = logging.getLogger(__name__)
def init_el... |
class Goods:
def __init__(self, name=' ', date=' ', price=0, num=0, waybill=' '):
price = int(price)
num = int(num)
self.__name = name
self.__date = date
self.__price = abs(price)
self.__num = abs(num)
self.__waybill = waybill
@property
... |
"""
Download hooks for Pooch.fetch
"""
import sys
import requests
try:
from tqdm import tqdm
except ImportError:
tqdm = None
class HTTPDownloader: # pylint: disable=too-few-public-methods
"""
Download manager for fetching files over HTTP/HTTPS.
When called, downloads the given file URL into th... |
"""=============
Example : calibrator.py
Author : Saifeddine ALOUI
Description :
A tool to calibrate gaze motion inside the screen
<================"""
import pygame
from FaceAnalyzer import FaceAnalyzer
from FaceAnalyzer.helpers.geometry.euclidian import is_point_inside_rect, get_z_line_equation,... |
N, M = map(int, input().split())
INF = float('inf')
cost = [[INF]*N for _ in range(N)]
for n in range(N):
cost[n][n] = 0
for m in range(M):
a, b, t = map(int, input().split())
cost[a][b] = t
for i in range(N): # 中継点
for j in range(N): # 始点
for k in range(N): # 終点
cost[j][k] = min(co... |
class BitPortClient:
pass
|
# Copyright 2017 Vector Creations Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
# Copyright (c) nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/vulnerablecode/
# The VulnerableCode software is licensed under the Apache License version 2.0.
# Data generated with VulnerableCode require an acknowledgment.
#
# You may not use this software except in compliance ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.