text
stringlengths
2
999k
# -*- coding: utf-8 -*- """ pygments.lexers._cocoa_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file defines a set of types used across Cocoa frameworks from Apple. There is a list of @interfaces, @protocols and some other (structs, unions) File may be also used as standalone generator for aboves...
# -*- coding: UTF-8 –*- #!/usr/bin/python # Filename : basic.py # 声明变量 apple ,并赋值一个字符串给它 apple = 'im a apple' # 打印出来看看 print apple # => 'im a apple' # 修改变量的内容 apple = 'im a banana' # 再打印出来看看 print apple # 进行逻辑判断 if apple == 'im a apple': print 'yep! it\'s a apple !' else: print 'Nop! it\'s NOT a f***ing ap...
import logging from tangle import Tangled, TreeBuilder, BasicEvaluator def test_node(): Tangled.set_handlers(TreeBuilder(), BasicEvaluator()) @Tangled.tangled_function def average(a, b): """ Decorator ensures that this function can be used in a Tangled graph """ return (a + b) /...
import pytest def basic_auth(username, password): from base64 import b64encode from pyramid.compat import ascii_native_ return 'Basic ' + ascii_native_(b64encode(('%s:%s' % (username, password)).encode('utf-8'))) def auth_header(access_key): return basic_auth(access_key['access_key_id'], access_key[...
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class ItemsConfig(AppConfig): name = "django_templated.items" verbose_name = _("Items") def ready(self): try: import django_templated.items.signals # noqa F401 except ImportError: ...
# -*- coding: utf-8 -*- """ Created on Sat Mar 14 19:13:15 2020 @author: Manuel Camargo """ import itertools import numpy as np import random from nltk.util import ngrams import keras.utils as ku class SequencesCreator(): def __init__(self, one_timestamp, ac_index, rl_index): """constructor""" ...
{ "targets": [ { "target_name": "node_gtk", "sources": [ "src/boxed.cc", "src/callback.cc", "src/closure.cc", "src/debug.cc", "src/error.cc", "src/function.cc", "src/gi.cc"...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayCommerceIotDeviceAudioDeleteModel import AlipayCommerceIotDeviceAudioDeleteModel class AlipayCommerceIotDeviceAudioDeleteReque...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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, overload from .. import...
"""Cryptographic tools.""" from __future__ import annotations from binascii import unhexlify import collections from hashlib import md5, sha256 import hmac import logging from os import urandom from typing import Any, Final, Tuple from urllib.parse import unquote_plus, urlencode, urlparse from cryptography.hazmat.pri...
from .serializers import * from .models import * from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated # Create your views here class College_schoolsView(viewsets.ModelViewSet): permission_classes = [IsAuthenticated] queryset = College_schools.objects.all() ...
import os import os.path as osp from util import get_baidu_poi import argparse def run(args): baidu_web_ak = args.ak city_str = args.city roi_key = args.poi output = args.save if not osp.exists(output): os.makedirs(output) get_baidu_poi(roi_key, city_str, baidu_web_ak, out...
from datetime import datetime, timedelta import operator from textwrap import dedent from typing import Union import warnings import numpy as np from pandas._libs import ( algos as libalgos, index as libindex, join as libjoin, lib) from pandas._libs.lib import is_datetime_array from pandas._libs.tslibs import Out...
"""Scientific constants form scipy.constants, but converted in CGS units (centimetre, gram, second, erg, dyne, etc.) Useful reference: http://www.astro.wisc.edu/~dolan/constants.html """ import scipy.constants as cst # Constant Unit c = cst.c / cst.centi # cm ...
import base64 import cloudpickle import quartic_sdk.utilities.constants as Constants from quartic_sdk.core.entities.base import Base from quartic_sdk.model.helpers import ModelUtils class Model(Base): """ The given class refers to the Model entity which is created based upon the Model object returned fr...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = ['Click>=6.0', 'pyyaml'] setup_requir...
from .wps_subset_countries import ClippingProcess from .wps_subset_continents import ClipcontinentProcess from .wps_subset_regionseurope import ClipregionseuropeProcess from .wps_pointinspection import PointinspectionProcess from .wps_landseamask import LandseamaskProcess # from .wps_climatefactsheet import FactsheetPr...
# coding:utf-8 # --author-- lanhua.zhou from __future__ import print_function import os import json import logging import zfused_api # read database DATABASE_PATH = os.path.dirname(os.path.dirname(__file__)) TYPE_DATABASE_FILE = "{}/database/type.json".format(DATABASE_PATH) PROJECT_TYPE_DATABASE_FILE = "{}/database/...
# # This file is part of LiteX-Boards. # # Copyright (c) 2018-2019 Rohit Singh <rohit@rohitksingh.in> # Copyright (c) 2018 Florent Kermarrec <florent@enjoy-digital.fr> # SPDX-License-Identifier: BSD-2-Clause from litex.build.generic_platform import * from litex.build.xilinx import XilinxPlatform from litex.build.openo...
from __future__ import print_function import os import sys from six import StringIO try: import unittest2 as unittest except ImportError: import unittest from nose.plugins.attrib import attr from contextlib import contextmanager from jnpr.junos import Device from jnpr.junos.exception import RpcError, SwRollbac...
# -*- coding: utf-8 -*- import requests from lxml import etree as tree import hashlib import kara from kara.common import karaerror from kara.executor import abstract_executor class OpaStdSimpleHTTPExecutor(abstract_executor.AbstractHTTPExecutor): def __init__(self, path, parameters_data, sign_keys=None, sign_n...
class Solution: def findCircleNum(self, isConnected: List[List[int]]) -> int: visited = set() count = 0 def dfs(root): if root in visited: return visited.add(root) for child, connected in enumerate(isConnected[root]): if con...
from collections import defaultdict import struct from capstone import CS_OP_IMM, CS_OP_MEM, CS_GRP_JUMP, CS_OP_REG from . import disasm class SzPfx(): PREFIXES = { 1: '.byte', 2: '.word', 4: '.long', 8: '.quad', 16: '.xmmword', } @staticmethod def pfx(sz): ...
from abc import ABCMeta, abstractmethod class Person(metaclass=ABCMeta): def __init__(self, name): self.name = name
# Generated by Django 2.2.24 on 2021-07-30 20:37 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] op...
import os import sys import subprocess as sp from genomepy.plugin import Plugin from genomepy.utils import mkdir_p, cmd_ok, run_index_cmd class BwaPlugin(Plugin): def after_genome_download(self, genome): if not cmd_ok("bwa"): return # Create index dir index_dir = genom...
from ProcessingTools.functions import * from ProcessingTools.PrgressBar import *
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. from augly.utils.asserts import ( is_audio_file, is_image_file, is_video_file, validate_audio_path, validate_image_path, validate_output_path, validate_path, validate_rgb_color, validate_video_path, ) from aug...
# coding:utf-8 import logging from mla.base import BaseEstimator from scipy.special import expit import numpy as np from mla.utils import batch_iterator np.random.seed(9999) sigmoid = expit """ References: A Practical Guide to Training Restricted Boltzmann Machines https://www.cs.toronto.edu/~hinton/absps/guideTR.p...
url = "https://ipchaxun.com/"
from zeit.cms.testing import copy_inherited_functions import zeit.cms.testing import zeit.cms.content.contentsource class ContentSourceBase(object): source = zeit.cms.content.contentsource.CMSContentSource() expected_types = [ 'channel', 'collection', 'file', 'testcontenttype', 'unknown'] def te...
class CacheHeaderMiddleware(object): def __init__(self, get_response): self.get_response = get_response def __call__(self, request): response = self.get_response(request) response['Cache-Control'] = ( 'no-cache="Set-Cookie, Set-Cookie2", no-store, must-revalidate' )...
import torch from torch.nn.functional import one_hot import numpy as np from scipy.special import softmax class NbsLoss(torch.nn.Module): def __init__(self, reduction='mean', base_loss=torch.nn.CrossEntropyLoss(reduction='none')): super().__init__() self.reduction = reduction ...
from rest_framework import serializers from .models import Product class ProductSerializer(serializers.HyperlinkedModelSerializer): image = serializers.ImageField( max_length=None, allow_empty_file=False, allow_null=True, required=False) class Meta: model = Product # fileds = ('url',...
import logging logger = logging.getLogger("GMI") from datatype_parsers import datatype_parsers from update_latest_readings import update_env_latest def parse_line(config, prefix, line_parts, file_object_id): line_data = {} line_data['goes_file_id'] = file_object_id line_config = config['lines'][prefix...
# Copyright 2018 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#!/usr/bin/env python # coding=utf-8 # Filename: gseagen.py # Author: Johannes Schumann <jschumann@km3net.de> import warnings from .rootio import EventReader from .tools import cached_property class GSGReader(EventReader): """reader for gSeaGen ROOT files""" header_key = "Header" event_path = "Events" ...
import json import os import subprocess import sys from contextlib import contextmanager from datetime import datetime from pathlib import Path from time import sleep from typing import List, Union import numpy as np import torch import torch.nn as nn def create_logdir(root: Union[str, Path] = None): if (root i...
import datetime from dojo.importers import utils as importer_utils from dojo.models import Notes, Finding, \ Endpoint, BurpRawRequestResponse, \ Endpoint_Status, \ Test_Import from dojo.utils import get_current_user from django.core.exceptions import MultipleObjectsReturned from django.conf import setting...
# Create your models here. import uuid from django.db import models # from django.contrib.auth.models import User, AbstractUser from django.utils import timezone from Author.models import User, Post import uuid # https://www.youtube.com/watch?v=GcqURKYfv00 ContentType = [ ('text/markdown', 'text/markdown'), (...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Karesansui. # # Copyright (C) 2012 HDE, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, incl...
# coding=utf-8 import xml.sax import subprocess import pgf import sys import os class SloleksHandler(xml.sax.ContentHandler): def __init__(self): self.parents = [] self.key = None self.lemma = None self.pos = None self.pos2 = None self.msd = None self.forms = None self.sloleks = {} def startElemen...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
"""Google Report State implementation.""" from __future__ import annotations from collections import deque import logging from homeassistant.const import MATCH_ALL from homeassistant.core import CALLBACK_TYPE, HassJob, HomeAssistant, callback from homeassistant.helpers.event import async_call_later from homeassistant...
# -*- coding: utf-8 -*- # vim: set ft=python ts=4 sw=4 expandtab: # pylint: disable=line-too-long """ Render a game as a string. """ # This is kind of ugly. It was built by hand and all of the mappings, etc. are # hardcoded. Since it's intended as a development and debugging tool, I don't # really care too much abo...
#!/usr/bin/env python3 import requests import subprocess import json import os CWD = os.path.dirname(os.path.abspath(__file__)) port = list(json.load(open(os.path.join(CWD, "dkm.json"), 'r'))["dev"]["ports"])[0] def test_main(): r = requests.get("http://localhost:" + port + "/").text.strip() assert r == "Hello W...
import sys # inserting pybullet-driving-env to the path sys.path.insert(1, '/home/ck/pybullet-driving-env') import gym import pybullet_driving_env from cogment_verse_environment.base import BaseEnv, GymObservation from cogment_verse_environment.env_spec import EnvSpec class DrivingEnv(BaseEnv): """ Class...
"""Test data fixtures shared by different modules.""" import json import re import typing import httpx import pytest import respx import tests.config as cfg from iov42.core import Client from iov42.core import CryptoProtocol from iov42.core import load_private_key from iov42.core import PrivateIdentity from iov42.cor...
#! /usr/bin/env python import numpy import socket import naf import twixt import smmpp class Resource: def __init__(self, **kwargs): self.location = kwargs.get('location') self.slots = int(kwargs.get('slots', 1)) self.name = kwargs.get('name') self.client = smmpp.Client(self.location, self.slots) def ev...
from django.apps import AppConfig class GroupsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'groups'
from .EntrezDownloader import EntrezDownloader from .jobs import DownloadJob __version__ = '0.2.2'
import json import config from collections import Counter import matplotlib.pyplot as plt import seaborn as sns def flatten_counter_info(counter_dict, range_min=None, range_max=None): max_key = max(counter_dict.keys()) if range_max is None else range_max min_key = min(counter_dict.keys()) if range_min is None...
"""Python setup.py for allin_hotels package""" import io import os from setuptools import find_packages, setup def read(*paths, **kwargs): """Read the contents of a text file safely. >>> read("allin_hotels", "VERSION") '0.1.0' >>> read("README.md") ... """ content = "" with io.open( ...
# author @daoodaba975 # GalsenDev from playsound import playsound playsound('audio.mp3')
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
#!/usr/bin/python3 ''' Simple code showing off how to use a rotary encoder Resources: https://github.com/simonmonk/raspberrypi_cookbook_ed2/blob/master/rotary_encoder.py https://learning.oreilly.com/library/view/custom-raspberry-pi/9781484224069/A432417_1_En_8_Chapter.html https://learn.adafruit.com/tlc5947-tlc59711-p...
from __future__ import unicode_literals import datetime import pickle from operator import attrgetter from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core import management from django.db import connections, router, DEFAULT_DB_ALIAS, transaction from ...
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import os class Config: UPLOADED_PHOTOS_DEST ='app/static/photos' SECRET_KEY = 'SECRET' SQLALCHEMY_TRACK_MODIFICATIONS = False # email configurations MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS = True MAIL_USERNAME = os.environ.get("MAIL_USERNAME") MAIL_PASSWORD = os.e...
#!/home/jyoost/PycharmProjects/saleordashboard1/venv/bin/python3 # $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Docutils XML. """ try: im...
from . import compositioninterfacemechanism from . import defaultprocessingmechanism from . import integratormechanism from . import objectivemechanism from . import processingmechanism from . import transfermechanism from .compositioninterfacemechanism import * from .defaultprocessingmechanism import * from .integrat...
from pythainlp.tokenize import sent_tokenize, word_tokenize from pythainlp import pos_tag text = "ผมชื่อต้นตาล ผมอายุ 40 ปี ผมเล่นเกม" #print(text) sent = sent_tokenize(text) print("จำนวนประโยค : {}".format(str(len(sent)))) #print(sent) for i in range(0,len(sent)): print("Sentence {} is '{}'".format(i+1,str(pos_tag...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.11.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
#!/usr/bin/env python3 import os import shutil import textwrap from pathlib import Path import pdoc.render_helpers here = Path(__file__).parent if os.environ.get("DOCS_ARCHIVE", False): edit_url_map = {} else: edit_url_map = { "mitmproxy": "https://github.com/mitmproxy/mitmproxy/blob/main/mitmproxy/"...
entries = [ { 'env-title': 'classic-acrobot', 'score': -86.616, 'stddev': 25.097, }, { 'env-title': 'atari-beam-rider', 'score': 2809.115, 'stddev': 1298.573, }, { 'env-title': 'atari-breakout', 'score': 384.865, 'stddev': 51.23...
""" pgp.py this is where the armorable PGP block objects live """ import binascii import collections try: import collections.abc as collections_abc except ImportError: collections_abc = collections import contextlib import copy import functools import itertools import operator import os import re import warnin...
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import asyncio import base64 import json import logging import time from collections import defaultdict from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple import aiosqlite from blspy import AugSchemeMPL, G1Element, PrivateKey from chiabip158 import PyBIP158 from cryptography.fe...
import json class Pdk(object): def __init__(self): """Initialize empty container dict""" self.pdk = {} def __str__(self): ret = '' for key, value in self.pdk.items(): ret += f"{key}: {value}\n" return ret def __contains__(self, key): return key...
# -*- coding: utf-8 -*- ''' gds.burp.models ~~~~~~~~~~~~~~~ This module contains the primary objects that make working with Burp's IHttpRequestResponse object's more... Pythonic. ''' from Cookie import SimpleCookie from cgi import parse_header, parse_qs from urlparse import urlparse from .decorators import reify from...
import json import logging import os from urllib.request import Request, urlopen from urllib.error import URLError, HTTPError WEBHOOK_URL = os.environ['WEBHOOK_URL'] logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): logger.info("Event: " + str(event)) alarm = js...
# Generated by Django 2.1.5 on 2019-01-08 11:38 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Girls', fields=[ ('id', models.AutoField(au...
import argparse import os from spread_classification.utils import Followers import shutil import random def transfer(from_dataset, to_dataset, ratio): all_keys = from_dataset.keys() sampled_keys = random.sample(all_keys, int(ratio * len(all_keys))) for key in sampled_keys: to_dataset[key] = from_da...
import os import torch import torch.nn as nn import torch.nn.functional as F from layers import * class Identity(nn.Module): def __init__(self): super(Identity, self).__init__() def forward(self, x): return x class Flatten(nn.Module): def __init__(self): super().__init__() ...
import random from unittest import mock from hypothesis import given, assume from hypothesis import strategies as s from cortexpy.edge_set import empty from cortexpy.graph.parser.streaming import ( kmer_generator_from_stream_and_header, kmer_list_generator_from_stream_and_header, ) from cortexpy.test.builder....
#!/usr/bin/env python3 # Solves the Compare and Contrast magpieCTF-2022 challenge. import requests import json HOST = "127.0.0.1" PORT = 8000 FLAG = "magpie{|\/|ix1ng_|\|umb3r$_t0g3t43r}" def solve() -> bool: data = { "answer": "omniflags stole all control" } resp = requests.post(f"http://{HOST}:...
""" https://github.com/ManiacalLabs/BiblioPixel/blob /master/bibliopixel/colors/juce.py which came from https://github.com/timedata-org/timedata/blob /master/src/cpp/timedata/color/names_table_inl.h which came from Juce: http://juce.com. """ COLORS = { 'Alice blue': 0xF0F8FF, 'Antique white 1': 0xFFEFDB, ...
#!/usr/bin/env python # -*- coding:utf-8 -*- from flask import Blueprint from flask_restful import Api from handlers.post_company_handler import PostCompanyHandler from handlers.supply_handler import SupplyHandler, SupplySelectHandler from handlers.category_handler import AgeGroupHandler, FunctionHandler, AgeGroupAddF...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('survey', '0001_initial'), ] operations = [ migrations.AlterField( model_name='questionflow', name='v...
import json import time from django.contrib import auth from django.contrib.auth import login from django.contrib.auth.decorators import login_required from django.contrib.auth.hashers import make_password from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render from django.urls i...
import pandas as pd import numpy as np from .engineobj import SqPandasEngine from suzieq.utils import build_query_str, humanize_timestamp class BgpObj(SqPandasEngine): @staticmethod def table_name(): return 'bgp' def get(self, **kwargs): """Replacing the original interface name in retur...
""" The methods for loading Home Assistant integrations. This module has quite some complex parts. I have tried to add as much documentation as possible to keep it understandable. """ import asyncio import functools as ft import importlib import json import logging import pathlib import sys from types import ModuleTyp...
import unittest from zserio.hashcode import calc_hashcode, HASH_SEED class HashCodeTest(unittest.TestCase): def test_calc_hashcode(self): array1 = [1, 2, 3, 4] array2 = [1, 2, 3, 3] array3 = [1, 2, 3, 4] self.assertNotEqual(self._hashcode(array1), self._hashcode(array2)) s...
from .base import PostgresModel from .partitioned import PostgresPartitionedModel from .view import PostgresMaterializedViewModel, PostgresViewModel __all__ = [ "PostgresModel", "PostgresViewModel", "PostgresMaterializedViewModel", "PostgresPartitionedModel", ]
from .AzureStorageConfig import AzureStorageConfig
# Copyright 2018 Therp BV <https://therp.nl> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
# -*- coding: utf-8 -*- """ Test Composite Map """ import os import pytest import numpy as np import astropy.units as u from astropy.coordinates import SkyCoord import matplotlib.pyplot as plt import sunpy import sunpy.map import sunpy.coordinates import sunpy.data.test from sunpy.tests.helpers import figure_test fr...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import re from typing import cast from lisa import ( LisaException, Node, SkippedException, TestCaseMetadata, TestSuite, TestSuiteMetadata, UnsupportedDistroException, ) from lisa.features import SecureBootEnabled from...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# -*- coding: utf-8 -*- from unittest.mock import call from lark.lexer import Token from lark.tree import Tree as LarkTree from pytest import fixture, raises from storyscript.exceptions.CompilerError import CompilerError from storyscript.parser import Tree @fixture def tree(): return Tree('data', []) @fixtur...
# # Copyright (c) 2018 - 2019 Thomas Offergeld (offergeld@ifht.rwth-aachen.de) # Institute for High Voltage Technology # RWTH Aachen University # # This module is part of cimpyorm. # # CIMPy is licensed under the BSD-3-Clause license. # For further information see LICENSE in the project's root directory. # import...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "choroplethmapbox.hoverlabel" _path_str = "choroplethmapbox.hoverlabel.font" _valid_props = {"c...
""" IMesgHandler Author: Tawn Kramer Base class for a handler expected by SimClient """ from typing import Any, Dict from gym_donkeycar.core.client import SDClient class IMesgHandler: def on_connect(self, client: SDClient) -> None: pass def on_recv_message(self, message: Dict[str, An...
from bitcoinrpc.authproxy import AuthServiceProxy user = input("user: ") password = input("password: ") port = input("port: ") access = AuthServiceProxy("http://" + user + ":" + password + "@127.0.0.1:" + port) getblockchaininfo = access.getblockchaininfo() getnewaddress = access.getnewaddress() getbestblockhash = acce...
# Copyright 2018-2019 The glTF-Blender-IO authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
##################################################################### # # # /plugins/connection_table/__init__.py # # # # Copyright 2013, Monash University ...
"""This code simulates the prediction code of the of the connectivity model. """ import gzip import pickle import uuid import numpy as np import scipy.linalg as sl import sklearn.preprocessing from .utils import constants from . import feature_extraction, utils class FeatureExtractor: """A class warping the scalin...
from pydiablo.d2data import D2Data import bisect # This should probably be an enum, but it's more convenient this way NORMAL = '' NIGHTMARE = 'N' HELL = 'H' # TODO: Move these to class level constants # mlvl bonuses (can't find these in data files) SUPER_UNIQUE_MONSTER_MLVL_BONUS = 3 UNIQUE_MONSTER_MLVL_BONUS = 3 MIN...
import os import unittest from conans.test.utils.genconanfile import GenConanfile from conans.test.utils.tools import TestClient class UserChannelTestPackage(unittest.TestCase): def test(self): # https://github.com/conan-io/conan/issues/2501 client = TestClient() conanfile = """from cona...
# global parameters num_videos_per_gpu = 12 num_workers_per_gpu = 3 train_sources = 'ucf101', 'hmdb51', 'activitynet200' test_sources = 'ucf101', 'hmdb51', 'activitynet200' root_dir = 'data' work_dir = None load_from = None resume_from = None reset_layer_prefixes = ['cls_head'] reset_layer_suffixes = None # model set...