text stringlengths 2 999k |
|---|
# Copyright 2019 Intel 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 agreed to in wri... |
import numpy as np
import scipy.io as sio
from sklearn.preprocessing import normalize
def load_data(data_name, is_normalize=True):
X_list = [] # view set
if data_name in ['noisemnist_3k','Caltech101-20', 'Caltech101-7', 'yale_mtv', 'LandUse_21', 'Texture_25', 'Scene_15']:
data_dir = '../data/' + data_... |
#!/usr/bin/env python3
#
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test gettxoutproof and verifytxoutproof RPCs."""
from test_framework.messages import CMerkleBlock, FromHex, ToHex
from test_framework.test_framework impo... |
# 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 ... |
import numpy as np
import pytest
from pandas import (
CategoricalIndex,
DataFrame,
Index,
MultiIndex,
Series,
)
import pandas._testing as tm
@pytest.fixture
def education_df():
return DataFrame(
{
"gender": ["male", "male", "female", "male", "female", "male"],
... |
from __future__ import print_function
from future.utils import iteritems
import pytest
import xarray as xr
import numpy as np
from xarray.testing import assert_allclose, assert_equal
from xgcm.autogenerate import generate_axis, generate_grid_ds, \
_parse_boundary_params, _parse_position, \
_position_to_relati... |
from django.shortcuts import render
from django.http import HttpResponse
from first_app.models import Topic,Webpage,AccessRecord
# Create your views here.
# Our original index view function
# Corresponds to original_index.html (rename it to index.html to use it!)
# def index(request):
# my_dict = {'insert_me':"No... |
import numpy as np
def slope_func(x,y):
tmp = 0.0
#
# code block
#
tmp += 25.726409509885706 * x**0 * y**0
print tmp
tmp += -7.959002774480191 * x**0 * y**1
print tmp
tmp += -15.508167202030295 * x**0 * y**2
print tmp
tmp += 2.965402639113657 * x**0 * y**3
print tmp
tmp += 2.9... |
from model import cnn1, mlp1, mlp2, cnn2, wide_resnet, lenet5 |
from os.path import join, dirname, realpath
from re import match
# Load file
with open(join(dirname(realpath(__file__)), "input.txt")) as f:
claims_file = f.readlines()
# Parse claims from file lines into list of tuples
claims = []
for claim_file in claims_file:
m = match("^#(?P<row>\d+) @ (?P<x>\d+),(?P<y>\d... |
"""
Support for LiteJet switch.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.litejet/
"""
import logging
from homeassistant.components import litejet
from homeassistant.components.switch import SwitchDevice
DEPENDENCIES = ['litejet']
ATTR_NUM... |
# Copyright 2020-2021 Huawei Technologies Co., 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 agre... |
import numpy as np
import random
import matplotlib.pyplot as plt
M = 6
a = 0.5
def get_p(k):
return 1. / (k ** a)
ps = np.zeros(1+M)
for i in range(1, M+1):
ps[i] = get_p(i)
n = 1000000
sim_list = np.zeros(n, dtype=np.int32)
sim_list[0] = 2
for i in range(1, n):
if sim_list[i-1] == 1:
p1 = ps[1... |
#!/home/tubby/.virtualenv/bin/python3
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
|
import abc
import numpy as np
class BaseShapeFunction(object, metaclass=abc.ABCMeta):
def __init__(self, n_objectives: int) -> None:
self._n_objectives = n_objectives
def __call__(self, m: int, x: np.ndarray) -> float:
assert 1 <= m <= self.n_objectives
assert x.shape == (self.n_obj... |
"""
Test that we are able to broadcast and receive progress events from lldb
"""
import lldb
from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
import lldbsuite.test.lldbutil as lldbutil
import threading
class TestProgressReporting(TestBase):
mydir = TestBase.compute_mydir(__file__)
... |
import tensorflow as tf
from swarm import utils
import sys
class fss:
def __init__(
self,
loss_op,
layer_sizes,
iter=2000,
pop_size=30,
w_scale=100,
stepInd=0.01,
stepVol=0.01,
x_min=-1,
x_max=1,
xavier_init=False,
ve... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
from bottle import Bottle, Route, run,response,request
import json
app = Bottle()
students=[
{
"id":"10001",
"firstName":"Marry",
"lastName":"Jane",
"score":57
},
{
"id":"10002",
"firstName":"Tommy",
"lastName":"Miller",
"score":91
},
... |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
author comger@gmail.com
"""
import tornado.ioloop
from optparse import OptionParser
from kpages import LogicContext, run_test, pro_test, run_doc, reflesh_config, set_default_encoding
def _get_opt():
parser = OptionParser("%prog [options]", version="%prog v0.9"... |
# class MkMemoIO implements file-like objects that read/write a
# memo field in a Metakit database (either on file, or in memory).
#
# A simple adaptation of the StringIO.py module, by Jean-Claude Wippler.
#
# This implements (nearly) all stdio methods.
#
# f = MkMemoIO(view, memoprop, rownum) # setup for view[rownum]... |
from setuptools import setup
import addict
SHORT='Addict is a dictionary whose items can be set using both attribute and item syntax.'
LONG=('Addict is a module that exposes a dictionary subclass that allows items to be set like attributes. '
'Values are gettable and settable using both attribute and item syntax.... |
import threading
from singleton_decorator import singleton
from ibranch.scraping_scheduler.configuration.Configurator import Configuration
@singleton
class FlowShaper:
def __init__(self):
cfg = Configuration()
cache_types = cfg.getProperty("traffic_limit").keys()
self._mutexes = dict()
... |
SECRET_KEY = 'SUP3R_SEKR3T'
DEBUG = True
|
import importlib
import os
import sys
import warnings
from dynaconf.utils import raw_logger
from dynaconf.utils import RENAMED_VARS
from dynaconf.utils import warn_deprecations
from dynaconf.utils.files import find_file
from dynaconf.utils.parse_conf import parse_conf_data
try:
from dotenv import load_dotenv
exce... |
#!/usr/bin/env python
from distutils.core import setup, Extension
import numpy
setup(ext_modules=[Extension('geometry_c', ['geometry_c.c'])],
include_dirs=[numpy.get_include()])
# hack to copy build extension into this directory so we can use it without
# setting paths.
import glob
import shutil
for src in glob... |
"""Helper class for AsyncSamplesOptimizer."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import random
import ray
from ray.rllib.utils.actors import TaskPool
from ray.rllib.utils.annotations import override
from ray.rllib.utils.memo... |
# coding=utf-8
import base64
import hashlib
import hmac
import json
import time
import uuid
import requests
from .exceptions import (
KucoinAPIException, KucoinRequestException, MarketOrderException, LimitOrderException
)
class Client(object):
REST_API_URL = 'https://openapi-v2.kucoin.com'
SANDBOX_API... |
"""
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... |
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
#
# 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... |
from __future__ import print_function
import time
import socket
import subprocess
import argparse
import uuid
import functools
import tornado.web
import tornado.websocket
import tornado.ioloop
import tornado.httpclient
import tornado.gen
import tornado.escape
import setting
import miner
import leader
import fs
con... |
import torch
import torch.nn as nn
import numpy as np
import logging
import pickle as pkl
path = ""
|
from dotenv import load_dotenv
from infrastructure.gateways.database import DatabaseGateway
from sqlalchemy import insert
from sqlalchemy import Table
from sqlalchemy.sql.schema import MetaData
class Block():
def __init__(self):
load_dotenv()
self.databaseGateway = DatabaseGatew... |
# base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
# Base16 qutebrowser template by theova and Daniel Mulford
# Synth Midnight Terminal Dark scheme by Michaël Ball (http://github.com/michael-ball/)
base00 = "#050608"
base01 = "#1a1b1c"
base02 = "#28292a"
base03 = "#474849"
base04 = "#a3a5a6"
base05 = ... |
from django import forms
from .models import Student,Award
class StudentForm(forms.ModelForm):
class Meta:
model= Student
exclude= ['awards','owner']
class AwardForm(forms.ModelForm):
class Meta:
model= Award
fields='__all__' |
class Movie:
def __init__(self, title, rlsyr, runTime, genre, link):
self.__title = title
self.__rlsyr = rlsyr
self.__runTime = runTime
self.__genre = genre
self.__link = link
def printMovie(self):
print('Movie Title: ', self.__title)
print('Release Year:... |
# Copyright (c) 2017 Sony 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 copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
from instaloader import Instaloader, Profile
from tkinter import *
import os
import glob
class Parser:
def __init__(self):
self.L = Instaloader()
self.username = ''
self.second_username = ''
self.first_username = ''
self.my_login = ''
self.my_password = ''
s... |
# Generated by jsangmeister on 2021-04-08 11:27
from django.db import migrations
from ...poll.migrations.poll_migration_helper import remove_entitled_users_duplicates
class Migration(migrations.Migration):
dependencies = [
("assignments", "0023_assignmentpoll_change_fields_2"),
]
operations = ... |
import datetime as dt
from unittest.mock import call, patch
from django.utils import timezone as djangotime
from model_bakery import baker
from gueenrmm.test import gueenTestCase
from .models import AutomatedTask
from .serializers import TaskSerializer
from .tasks import create_win_task_schedule, remove_orphaned_win... |
import numpy as np
def insertion_sort(vetor):
n = len(vetor)
for i in range(1,n):
selecionado = vetor[i]
j = i - 1
while j >= 0 and selecionado < vetor[j]:
vetor[j+1] = vetor[j]
j -= 1
vetor[j+1] = selecionado
return vetor
ordenado = insertion_sort(np.array([15,34,8,3]))
ord... |
__all__ = [
"name",
"get_conf",
]
name = "dltk_environments"
def get_conf(splunk):
try:
conf = splunk.confs[name]
except KeyError:
raise Exception("conf %s not found (ns=%s)" % (
name,
splunk.namespace,
))
return conf
|
#!/usr/bin/env python
"""Provides count functions for pyAvroPhonetic.
-----------------------------------------------------------------------
Copyright (C) 2013 Kaustav Das Modak <kaustav.dasmodak@yahoo.co.in.
This file is part of pyAvroPhonetic.
pyAvroPhonetic is free software: you can redistribute it and/or modif... |
from __future__ import print_function
import os
import argparse
import torch
import torch.backends.cudnn as cudnn
import numpy as np
from torch.autograd import Variable
from data import BaseTransform, VOC_300,VOC_512,COCO_300,COCO_512, COCO_mobile_300
from data import VOC_CLASSES as labelmap
from layers.functions impo... |
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import logging
import os.path
from abc import ABCMeta, abstractmethod
from collections.abc import MutableSequence, MutableSet
from pants.build_graph.target import Target
from pants.engine... |
name = 'John'
age = 25
address = 'USA'
percentage = 85.5
print(name)
print(age)
print(address)
print(percentage)
|
#-*- coding:utf-8 -*-
#
# This file is part of MoCGF - a code generation framework
# 20141114 Joerg Raedler jraedler@udk-berlin.de
#
# the data dictionary read from the api is the first argument,
# other arguments may be introduced later...
def filter01(d, systemCfg, generatorCfg, logger):
logger.info('Hello, th... |
import json
import os
from typing import List, Optional, Sequence
import pytest
from eth_utils.address import to_checksum_address
from rotkehlchen.assets.resolver import AssetResolver
from rotkehlchen.chain.ethereum.manager import EthereumManager, NodeName
from rotkehlchen.chain.manager import ChainManager
from rotke... |
import os
import unittest
from unittest.mock import patch
from configparser import ConfigParser
import uuid
from kb_faprotax.kb_faprotaxServer import MethodContext
from installed_clients.authclient import KBaseAuth as _KBaseAuth
from installed_clients.WorkspaceClient import Workspace
from kb_faprotax.kb_faprotaxImpl ... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from smtplib import SMTPException
import logging
from django.core.mail import EmailMessage
from django.contrib.sites.shortcuts import get_current_site
from django.utils.translation import ugettext as _
from django.template.loader import render_to_string
... |
import json,os,sys, random
import requests, urllib.parse,subprocess,time
from requests.auth import HTTPBasicAuth
from requests_toolbelt.utils import dump
from datetime import datetime, timedelta
import logging
logger = logging.getLogger('KillCoinapi')
headers = {'content-encoding': 'gzip','content-type':'application... |
# -*- coding: UTF-8 -*-
"""
:Script: createcompass.py
:Author Dan_Patterson@carleton.ca
:Modified: 2017-04-02
: if north angle is needed, you can use this to convert
:if fromNorth:
: ang = np.mod((450.0 - ang), 360.)
"""
# --------------------------------------------------------------------------
imp... |
from compas.geometry import Point, Vector, Line, Frame, Box
from compas.utilities import flatten
from compas.datastructures import Mesh
from compas_occ.conversions import compas_line_to_occ_line
from compas_occ.conversions import compas_point_from_occ_point
from compas_occ.conversions import compas_point_to_occ_point
... |
import mysql.connector
import config
import time
from datetime import datetime, timedelta
########################################################################################################################
# This procedure will find and tag the bad energy values.
#
# Step 1: get the time slot to clean.
# Step 2:... |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: streamlit/proto/PageConfig.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
... |
from django.db import models
class Categoria(models.Model):
nome_cat = models.CharField(max_length=50, verbose_name='Nome categoria')
def __str__(self):
return self.nome_cat
|
import os
from logging import StreamHandler
from sys import stdout
from flask import Flask
# from flask_pymongo import PyMongo
# from pymongo import MongoClient
def create_app():
from api.similarity_api import similarity_api
from api.mutual_friend_api import mutual_friend_api
from api.job_api import job_ap... |
from . import xdr as stellar_xdr
from .exceptions import ValueError
from .type_checked import type_checked
__all__ = ["TimeBounds"]
@type_checked
class TimeBounds:
"""TimeBounds represents the time interval that a transaction is valid.
The UNIX timestamp (in seconds), determined by ledger time,
of a low... |
""" Running an example planning environment with custom-hand-built costmap and trajectory. """
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import numpy as np
import time
from bc_gym_planning_env.envs.base.env import PlanEnv
from bc_gym_planning_env.env... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.10.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... |
import numpy as np
import pandas as pd
import quantipy as qp
from quantipy.core.helpers.functions import emulate_meta
import savReaderWriter as srw
import copy
import json
def write_sav(path_sav, data, **kwargs):
"""
Write the given records to a SAV file at path_sav.
Using the various definitions indicat... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
# -*- coding: utf-8 -*-
import finicityapi.models.child_institution
class CertifiedInstitution(object):
"""Implementation of the 'Certified Institution' model.
TODO: type model description here.
Attributes:
name (string): Institution's name
id (long|int): Institution's Id
... |
from pylab import plot,grid,title,subplot,xlabel,ylabel,text,subplots_adjust,fill_between,mean,connect,show
from shogun import GaussianKernel
from shogun import LibSVM, LDA
from shogun import PRCEvaluation
import util
util.set_title('PRC example')
util.DISTANCE=0.5
subplots_adjust(hspace=0.3)
pos=util.get_realdata(Tr... |
# Generated by Django 2.2 on 2021-08-04 14:56
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0011_update_proxy_permissions'),
]
operations = [
migrations.CreateModel(
name='UserProfile',
... |
from python_overload_simple_cast import *
class Ai:
def __init__(self, x):
self.x = x
def __int__(self):
return self.x
class Ad:
def __init__(self, x):
self.x = x
def __float__(self):
return self.x
ai = Ai(4)
ad = Ad(5.0)
add = Ad(5.5)
try:
fint(add)
go... |
''' Holds the population structure.
This one needs some more cleaning up for sure.
Not sure if population class should be abstract or not, still thinking about it.
Created on: 1-27-2021
Version: Python 3.8.5
Created by: Bayley King (https://github.com/king2b3)
'''
import abc
import random
ra... |
# -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... |
from rest_framework import viewsets, mixins, status
from rest_framework.permissions import IsAuthenticated
from rest_framework.authentication import TokenAuthentication
from rest_framework.decorators import action
from rest_framework.response import Response
from . import serializers
from core.models import Tag, Ingre... |
import json
from textwrap import dedent
from typing import Dict, Iterator, Optional, Union
import retryrequests
from ._logger import logger
from ._sponsor import Sponsor
class GitHubV4Client:
def __init__(self, token: str) -> None:
self.__token = token
def exec_query(
self, query: str, vari... |
from textwrap import dedent
class examples():
"""
A descriptor whose only purpose is to print help text
"""
def __get__(self, *args, **kwargs):
print(
dedent("""
from easier import Fit
#=================================================================
... |
# Copyright (c) 2017-2018 Dell EMC Inc.
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import json
from ansible.module_utils.urls import open_url
from ansible.module_utils._text import t... |
import tensorflow as tf
import tensorflow_federated as tff
import nest_asyncio
from federated_simulator import FederatedSimulator
from federated_external_model import batch_format, create_keras_model
nest_asyncio.apply()
emnist_train, emnist_test = tff.simulation.datasets.emnist.load_data()
federated_simulator = Fede... |
# Dataloader of Gidaris & Komodakis, CVPR 2018
# Adapted from:
# https://github.com/gidariss/FewShotWithoutForgetting/blob/master/dataloader.py
from __future__ import print_function
import os
import os.path
import numpy as np
import random
import pickle
import json
import math
import torch
import torch.utils.data as ... |
from django.http.response import HttpResponse
from django.template import loader
from django.shortcuts import render
#advenure_x/ending/template/ending.html
def end(request):
context = {}
return render(request, 'end.html', context)
def ending(request):
return render(request, 'ending.html', {})
|
#!/usr/bin/env python
# Copyright 2021 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.
# This is generated, do not edit. Update BuildConfigGenerator.groovy and
# 3ppFetch.template instead.
from __future__ import print_fun... |
# coding: utf-8
"""
BillForward REST API
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
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... |
# date: 2019.09.03
#
from flask import Flask, Response, render_template, send_file
import time
app = Flask(__name__)
@app.route("/")
def index():
return "Hello World 3"
def get_image():
while True:
yield(b'--frame\r\n'
b'Content-Type: image/jpeg\r\n'
b'\r\n'+ img + b'... |
import os
import sys
from datetime import datetime
from netCDF4 import date2num
from pyniva import Vessel, TimeSeries, token2header
import pandas as pd
from ferrybox import ferryBoxStationClass as fb
import csv
__author__ = 'Trond Kristiansen'
__email__ = 'trond.kristiansen@niva.no'
__created__ = datetime(2019, 1, 22)... |
#
# Copyright (c) Microsoft Corporation. All Rights Reserved.
#
import sys
# pick up some paths if were are run as main
if __name__ == "__main__":
mypath = sys.path[0]
sys.path.insert(0,mypath+'/..')
sys.path.insert(0,mypath+'/../tkui')
# print "path: {}".format(sys.path)
import pickle
import string
f... |
import setuptools
import sys
tests_require = ['nose', 'mock']
if sys.version_info < (2, 7, 0):
tests_require.append('unittest2')
desc = ('A pure python, thread-safe, minimalistic and pythonic RabbitMQ '
'client library')
setuptools.setup(name='rabbitpy',
version='0.19.0',
... |
import json
from collections import defaultdict
from queue import Queue
from django.contrib import messages
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.http import HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from smartshark.datacollection.plugin... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import normal_init, bias_init_with_prob
from mmcv.ops import batched_nms
from ..builder import HEADS
from .anchor_head import AnchorHead
from .rpn_test_mixin import RPNTestMixin
import pdb
@HEADS.register_module()
class RPNHead(RPNTestM... |
import json
with open('configfiles/config.json') as json_data_file:
config = json.load(json_data_file)
print("Opened config")
try:
with open('configfiles/secret_config.json') as secret_json:
secret_config = json.load(secret_json)
# Merge two dictionaries, secret config replaces normal conf... |
# Copyright 2022 Google
#
# 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, soft... |
from logging_level import LoggingLevel
LOGGING_LEVEL = LoggingLevel.INFO |
print_log('\n13. Reading new verkey from wallet\n')
verkey_in_wallet = await signus.key_for_local_did(wallet_handle, trust_anchor_did)
print_log('Trust Anchor Verkey in wallet: ', verkey_in_wallet)
print_log('\n14. Building GET_NYM request to get Trust Anchor verkey\n')
get_nym_request = await ledger.build_g... |
#
# 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 us... |
import numpy as np
import matplotlib.pyplot as plt
# --------------------------------------------------------------------
# Enviroment: Manages enviroment drawing and signals
# --------------------------------------------------------------------
class Environment:
def __init__( self, xmin, xmax ):
self.food_sources ... |
from typing import Optional
import click
from opta.amplitude import amplitude_client
from opta.commands.apply import _apply
from opta.commands.push import _push, get_push_tag, is_service_config
from opta.core.terraform import Terraform
from opta.exceptions import UserErrors
from opta.layer import Layer
from opta.util... |
# coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... |
import csv
import json
collection = {}
def to_list(v):
return v.replace(' ','').split(',')
SKIPPED_FIELDS = ["length", "type"]
with open("sessions.csv") as f:
reader = csv.DictReader(f)
for row in reader:
_id = row.pop("item")
doc = {}
for k, v in row.items():
if v==... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2018-08-10 20:39
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... |
# -*- coding: utf-8 -*-
# Copyright (c) 2019, Sachin Mane and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class DashboardRolesAccess(Document):
pass
|
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# This module implements the base CCDPROC functions
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numbers
import numpy as np
import math
from astropy.extern import six
from astropy.uni... |
import uuid
from datetime import date, timedelta
from unittest.mock import ANY, MagicMock, Mock, call, patch
import graphene
import pytest
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import ValidationError
from freezegun import freeze_time
from prices import Money, TaxedMoney
from... |
# pylint: disable=C,R,W
"""Compatibility layer for different database engines
This modules stores logic specific to different database engines. Things
like time-related functions that are similar but not identical, or
information as to expose certain features or not and how to expose them.
For instance, Hive/Presto s... |
from nose.tools import *
import mock
from tests.factories import UserFactory, ProjectFactory
from framework.auth.decorators import Auth
from website.addons.dataverse.model import (
AddonDataverseUserSettings, AddonDataverseNodeSettings, DataverseFile
)
from website.addons.dataverse.tests.utils import DataverseAddo... |
from typing import List, Tuple, Union, TYPE_CHECKING
import numpy as np
import pygame
from highway_env.road.lane import LineType, AbstractLane
from highway_env.road.road import Road
from highway_env.vehicle.graphics import VehicleGraphics
from highway_env.road.objects import Obstacle, Landmark
if TYPE_CHECKING:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.