text
stringlengths
1
927k
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from bs4 import BeautifulSoup from urlparse import urljoin import validation_check as vc __author__ = "Robert Wen <robert.wen@nyu.edu>, Caicai Chen <caicai.chen@nyu.edu>" ''' Bing Web Search Engine Crawler ''' class BingWebCrawler(object): ''' Bing Web...
import re import numpy as np from pathlib import Path from scipy.stats.mstats import gmean from src.ema import ModelEma def initialize_amp(model, opt_level='O1', keep_batchnorm_fp32=None, loss_scale='dynamic'): from apex import amp model.nn_module, mod...
# Princeton University licenses this file to You 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 writin...
import hashlib import os import tempfile import six import libcloud.security from libcloud.storage.providers import get_driver from libcloud.storage.types import ContainerDoesNotExistError, ObjectDoesNotExistError from six.moves.urllib.parse import urlparse # Include the current cURL CA bundle as a fallback _base_pat...
from .tokenhandler import TokenHandler # 编译器 class Compiler(object): # 编译 def compile(self, file, targetType): self.file = file self.targetType = targetType self.result = '' if self.targetType == 'zpy': return self.pyToZpy(self.file) elif self.targetType == ...
""" Support for Home Assistant iOS app sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/ecosystem/ios/ """ from homeassistant.components import ios from homeassistant.helpers.entity import Entity from homeassistant.helpers.icon import icon_for_battery_level ...
# SPDX-FileCopyrightText: 2020 by Bryan Siepert, written for Adafruit Industries # # SPDX-License-Identifier: Unlicense import time import board import busio import adafruit_ltr390 i2c = busio.I2C(board.SCL, board.SDA) ltr = adafruit_ltr390.LTR390(i2c) while True: print("UV:", ltr.uvs, "\t\tAmbient Light:", ltr....
from typing import Union, Callable import numpy as np import warnings import torch import torch.nn as nn from sklearn.metrics import f1_score def setup_evaluator(metric: Union[str, Callable]): if isinstance(metric, str): metric = metric.lower() if metric == "acc" or metric == "accuracy": ...
#!/usr/bin/env python3 # This file is covered by the LICENSE file in the root of this project. import sys import numpy as np class iouEval: def __init__(self, n_classes, ignore=None): # classes self.n_classes = n_classes # What to include and ignore from the means self.ignore = np.array(ignore, dt...
import numpy as np import matplotlib.pyplot as plt from scipy import fftpack from matplotlib.colors import LogNorm import cv2 import time start = time.time() #Load input image image_source = cv2.imread('C:/FaksGit/FourierFilter/TestImages/man.png') gray_image = cv2.cvtColor(image_source, cv2.COLOR_BGR2GRAY) #Plot in...
# Sample Test passing with nose and pytest # system modules import math, os.path import sys import pytest import pprint from math import pi # my modules from toolbox import * def test_str_constraint(): x = str_constraint("5.0", 5) assert x x = str_constraint("5.0", 4.75) assert not x x = str_con...
# 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 agreed to in writing, ...
#!/usr/bin/env python import argparse import pdpyras import sys # Disables noisy warning logging from pdpyras import logging logging.disable(logging.WARNING) # Get all users' contact methods. # Originally by Ryan Hoskin def get_users(session): sys.stdout.write("Listing All Users' Contact Methods:\n") for us...
#!/usr/local/bin/python # -*- coding: utf-8 -*- """ """ from micropsi_core import runtime as micropsi __author__ = 'joscha' __date__ = '12.11.12' def test_copy_nodes(): success, nodenet_uid1 = micropsi.new_nodenet("Origin_Nodenet", worldadapter="Default", owner="tester") success, nodenet_uid2 = micropsi.ne...
import os import argparse import horovod.tensorflow as hvd import tarfile def horovod_untar(in_file, out_dir): hvd.init() if hvd.local_rank() == 0: if not os.path.isdir(out_dir): os.makedirs(out_dir) # if not tarfile.is_tarfile(in_file): # raise Exception() tar =...
# encoding: utf-8 # ------------------------------------------------------------------------ # Copyright 2020 All Histolab Contributors # # 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 # # ...
""" This module converts requested URLs to callback view functions. RegexURLResolver is the main class here. Its resolve() method takes a URL (as a string) and returns a tuple in this format: (view_function, function_args, function_kwargs) """ from __future__ import unicode_literals import functools import re im...
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END """ Test end to end flow with: Playback south plugin FFT Filter on playback south plugin and Threshold on PI north PI Server (C) plugin """ import http.client import os import json import time import ...
try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup setup( name='ProP', version='1.0.2', description='Predict projectile requirements through machine learning.', author='Levi Coey', author_email='coeyl@oregonstate.edu', url='https://gith...
# Copyright 2017 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...
# -*- coding: UTF-8 -*- # Copyright 2012-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) from __future__ import unicode_literals from __future__ import print_function from decimal import Decimal from django.conf import settings from django.db import models # from django.core.exceptions import Vali...
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingAverage'] , ['Seasonal_DayOfWeek'] , ['ARX'] );
from django.shortcuts import render import os from pathlib import Path from django.http import HttpResponse # Create your views here. def index(request): return render(request, 'principal/index.html')
__author__ = 'paulm_000' import time import shutil import os import re import sys import datetime import urllib import scrapy def create_dir(name, zipcode): # get the current base file path and create a new directory # use the given name and date to make the new directory # TODO: check to see if the dire...
# 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, overload from ... import _utilities fro...
from slack_bolt import App from .sample_shortcut import sample_shortcut_callback def register(app: App): app.shortcut("sample_shortcut_id")(sample_shortcut_callback)
#------------------------------------------- #One Million Arabic Coder (OMRC) #patch Full Stack Web Dev .1 #Lisson 13 Problem Solving #Please note that i am sharing this code to #find the idea behined the problem not for #copy and pasting ! #and i wish if you can find a mistake or ha #ve a better answer let me know ...
class Settings: """class to manage game settings""" def __init__(self): self.screen_size = (700, 550) self.screen_caption = "Target Practice" self.bg_colour = (20, 20, 20) self.ship_colour = (255, 255, 255) self.ship_width = 30 self.ship_height = 20 self....
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module for changing your Telegram profile details. """ import os from telethon.errors import ImageProcess...
import torch from scipy.spatial.distance import cosine from transformers import BertModel, BertTokenizer import os class SentenceSimilarity: def __init__(self, model_path='bert-base-uncased'): self.tokenizer = BertTokenizer.from_pretrained(model_path) self.model = BertModel.from_pretrained(model_...
import json import os import logging from random import randint class InvalidFileIO(Exception): pass class DataIO(): def __init__(self): self.logger = logging.getLogger("red") def save_json(self, filename, data): """Atomically saves json file""" rnd = randint(1000, 9999) p...
# Copyright (c) 2018 NEC, Corp. # # 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 agr...
"""This module contains the general information for AdaptorEthWorkQueueProfile ManagedObject.""" import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class AdaptorEthWorkQueueProfileConsts(): pass class AdaptorEthWork...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'goalspatial.settings') try: from django.core.management import execute_from_command_line except ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-09-04 03:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ibms', '0001_initial'), ] operations = [ migrations.AlterField( ...
from django.contrib.sitemaps import Sitemap from scuole.states.models import State class StateSitemap(Sitemap): changefreq = 'yearly' priority = 0.5 protocol = 'https' limit = 1000 def items(self): return State.objects.all()
""" Copyright 2020 The OneFlow 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 applicable law or agr...
# Copyright 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 agreed to...
# TensorFlow external dependencies that can be loaded in WORKSPACE files. load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party:nccl/nccl_configure.bzl", "nccl_configure") load("//third_party/mkl:build_defs.bzl", ...
from nanome._internal._util._serializers import _StringSerializer, _ColorSerializer, _Vector3Serializer, _CachedImageSerializer from nanome.util.enums import VertAlignOptions, HorizAlignOptions, ToolTipPositioning from . import _UIBaseSerializer from .. import _Button from nanome._internal._util._serializers import _T...
import os from scrapy.http import HtmlResponse, Request def fake_response_from_file(file_path, url=None): """ Create a Scrapy fake HTTP response from a HTML file @param file_path: The relative filename from the responses directory, but absolute paths are also accepted. @param url...
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.10 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ...
#BEGIN_LEGAL # #Copyright (c) 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 ...
from django.apps import AppConfig class InvestmentReportConfig(AppConfig): """ Configuration class for this app. For legacy reasons the label of this application is report when ideally it should be investment_report. """ name = 'datahub.investment.project.report' label = 'report'
""" Nextstrain command-line interface (CLI) The `nextstrain` program and its subcommands aim to provide a consistent way to run and visualize pathogen builds and access Nextstrain components like Augur and Auspice across computing environments such as Docker, Conda, and AWS Batch. """ import sys import argparse from...
from dataclasses import dataclass from typing import Dict, List, Union from urllib.parse import urlparse import requests import structlog # type: ignore from audit_middleware import Auditor # type: ignore from flask import current_app, has_request_context from requests.adapters import HTTPAdapter from requests.packa...
from plenum.common.messages.node_messages import Nomination, Primary from plenum.server.replica import Replica from plenum.test.test_node import TestNode def checkNomination(node: TestNode, nomineeName: str): matches = [replica.name for instId, replica in enumerate(node.elector.replicas) if node.el...
def is_leap(year): leap = False # Write your logic here if year%400==0: leap=True elif year%100==0: leap=False elif year%4==0: leap=True return leap year = int(input())
## # 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...
"""life_time URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
# just for fun, give channel some meanings about relations # between positions. from modules import * from torch import tensor import torch import numpy as np import torch.nn.functional as F from torch import nn class Group(nn.Module): """ resblocks with same input and output size. """ def __init__(...
import itertools import logging from pathlib import Path from det3d.builder import build_box_coder from det3d.utils.config_tool import get_downsample_factor data_root_prefix = "/mnt/proj50/zhengwu" norm_cfg = None tasks = [dict(num_class=1, class_names=["Car"],),] class_names = list(itertools.chain(*[t["class_names"] ...
import numpy as np from sklearn.neural_network import MLPRegressor from sklearn.model_selection import train_test_split from sklearn.model_selection import KFold from sklearn.model_selection import LeaveOneOut from sklearn.metrics import r2_score def jho(feat, label, opts): ho = 0.3 # ratio of testing ...
# Copyright 2020 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 agreed to...
from PEPit.point import Point from PEPit.expression import Expression def proximal_step(x0, f, gamma): """ This routine performs a proximal step of step-size **gamma**, starting from **x0**, and on function **f**. That is, it performs: .. math:: :nowrap: \\begin{eqnarray} ...
########################################################################### # # Copyright 2021 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/l...
# Markov chain comparison class # create multiple Markov_learning classes, and conduct comparison import numpy as np import Markov_learning as ml import copy class Markov_comp(object): # attributes # it may have multiple Markov_learning objects # maximum, 10 ML=[] # how many MLs? for comparison be...
#!/usr/bin/env python """Test the functionality of Prototypes""" import logging logger = logging.getLogger(__name__) from mock import Mock from nose.tools import assert_raises, eq_ from prototype import Resource from tests.test_common import SAMPLES __author__ = 'Clayton Daley III' __copyright__ = "Copyright 2015, C...
# -*- coding: utf-8 -*- """ tests.test_cli ~~~~~~~~~~~~~~ :copyright: © 2010 by the Pallets team. :license: BSD, see LICENSE for more details. """ # This file was part of Flask-CLI and was modified under the terms of # its Revised BSD License. Copyright © 2015 CERN. from __future__ import absolute_im...
import torch import torch.nn as nn from ..layers.convolutions import Convolutional, Separable_Conv_dila, Separable_Conv, Deformable_Convolutional import torch.nn.functional as F from ..layers.attention_blocks import SELayer class SPP(nn.Module): def __init__(self, depth=512): super(SPP,self).__init__() ...
def operateNumbers(numbers, callback): results = [] for i in numbers: results.append(callback(i)) return results
# Copyright 2017 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...
from datetime import datetime, timedelta, timezone from http import HTTPStatus from asynctest import mock import pytest from atmdb import TMDbClient from tests.helpers import future_from, SimpleSessionMock def test_client_instantiation(client, token): assert client.api_token == token @mock.patch('atmdb.core....
import sys import superannotate as sa try: sa.init(sys.argv[1]) except sa.SABaseException as e: if e.message == "Couldn't authorize": print("Couldn't authorize.") sys.exit(1) else: print("Authorized.")
from mmdet.models import DETECTORS import torch import torch.nn as nn from mmcv.runner import auto_fp16 from mmdet.models.backbones import ResNetV1d from .utils import DepthPredictHead2Up, get_depth_metrics @DETECTORS.register_module() class ResDepthModel(nn.Module): def __init__(self, depth=50, s...
from Walkline.WalklineConfig import * from module import urequests import ujson # import urequests class TCPClient(object): def __init__(self): self._response = None self._status_code = None self._reason = None self._text = None self._json = None def request(self, command: str, data: str): url = "{0}/{...
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
# Retrieves the unique worker ids for experiments # for testing overlap between experiments #!/usr/bin/env python import sys, os ROOT = os.path.abspath('%s/../..' % os.path.abspath(os.path.dirname(__file__))) sys.path.append(ROOT) os.environ['DJANGO_SETTINGS_MODULE'] = 'qurkexp.settings' from decimal import Decimal f...
from __future__ import division, absolute_import __copyright__ = "Copyright (C) 2012 Andreas Kloeckner" __license__ = """ 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...
from i3pystatus import Status from i3pystatus.core.color import ColorRangeModule from pathlib import Path import json import os COLOR_THING_GOOD = "#16A085" COLOR_THING_BAD = "#AA6161" def load_interfaces(): try: with open(Path("~").expanduser() / ".interfaces.json") as inf: data = json.lo...
# -*- coding: UTF-8 -*- # # copyright: 2020-2022, Frederico Martins # author: Frederico Martins <http://github.com/fscm> # license: SPDX-License-Identifier: MIT """Nakfa currency representation(s).""" from decimal import Decimal from typing import Optional, Union from .currency import Currency class Nakfa(Currency)...
from django.conf import settings from django.conf.urls import include, url from openslides.mediafiles.views import protected_serve from openslides.utils.rest_api import router from .core import views as core_views urlpatterns = [ # URLs for /media/ url( r"^%s(?P<path>.*)$" % settings.MEDIA_URL.lstri...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Ship() result.template = "object/ship/shared_bwing_tier3.iff" result.attribute_template_id = -1 result.stfName("...
"""" Director interface for getting requests from the builder.""" from gamebench_api_client.api.requests_retriever.builder.request_builder import AuthRequest, \ SessionRequest from gamebench_api_client.api.requests_retriever.builder.url.url_director import \ URLDirector class RequestDirector: """ Constru...
# Python solution for 'Convert number to reversed array of digits' codewars question. # Level: 8 kyu # Tags: Fundamentals, Numbers, and Arrays # Author: Jack Brokenshire # Date: 11/02/2020 import unittest def digitize(n): """ You have to return the digits of this number within an array in reverse order. ...
import unittest from programy.utils.logging.ylogger import YLoggerSnapshot class YLoggerSnapshotTests(unittest.TestCase): def test_snapshot_with_defaults(self): snapshot = YLoggerSnapshot() self.assertIsNotNone(snapshot) self.assertEquals("Critical(0) Fatal(0) Error(0) Exception(0) Warn...
# Copyright (c) 2010-2011 Lazy 8 Studios, LLC. # All rights reserved. from front.lib import utils from front.models import progress, mission from front.models import message as message_module from front.models import rover as rover_module from front.models import target as target_module from front.models import achiev...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.19.15 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitt...
# The following comments couldn't be translated into the new config version: # needed geometries # #include "Geometry/TrackerGeometryBuilder/data/trackerGeometry.cfi" #es_module = EcalPreshowerGeometryEP {} #es_module = EcalBarrelGeometryEP {} #es_module = EcalEndcapGeometryEP {} #es_module = HcalHardcodeGeometryEP {}...
from django.core.exceptions import BadRequest, PermissionDenied from .books import books_list, BookListView, BookDetailView, BookDeleteView from .index import index, IndexView from .readers import readers_list, ReaderListView from .users import users_list, UserListView, CreateUserView def server_death(request): ...
""" Code to compute and aggregate hashcodes over a large collection of data, e.g. the whole million song dataset, using multiple processes. Many parameters are hard-coded! For the help menu, simply launch the code: python compute_hashcodes_mprocess.py Copyright 2011, Thierry Bertin-Mahieux <tb2332@columbia.edu> ...
# coding=utf-8 # Copyright 2021 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...
import _plotly_utils.basevalidators class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scattercarpet", **kwargs ): super(TextpositionValidator, self).__init__( plotly_name=plotly_name, ...
# Copyright 2018-2019 Andrew Myers, Luca Fedeli, Maxence Thevenet # Remi Lehe # # This file is part of WarpX. # # License: BSD-3-Clause-LBNL import os # This script modifies `WarpX-test.ini` (which is used for nightly builds) # and creates the file `ci-test.ini` (which is used for continous # integration) # The subtes...
# -*- coding: utf-8 -*- # 版权所有 2019 深圳米筐科技有限公司(下称“米筐科技”) # # 除非遵守当前许可,否则不得使用本软件。 # # * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件): # 遵守 Apache License 2.0(下称“Apache 2.0 许可”),您可以在以下位置获得 Apache 2.0 许可的副本:http://www.apache.org/licenses/LICENSE-2.0。 # 除非法律有要求或以书面形式达成协议,否则本软件分发时需保持当前许可“原样”...
#!/usr/bin/env python # encoding: utf-8 # Ali Sabil, 2007 # Radosław Szkodziński, 2010 """ At this point, vala is still unstable, so do not expect this tool to be too stable either (apis, etc) """ import re from waflib import Build, Context, Errors, Logs, Node, Options, Task, Utils from waflib.TaskGen import extensio...
from __future__ import absolute_import from __future__ import unicode_literals import six from compose.cli import verbose_proxy from tests import unittest class VerboseProxyTestCase(unittest.TestCase): def test_format_call(self): prefix = '' if six.PY3 else 'u' expected = "(%(p)s'arg1', True, k...
print 'Hello world!'
# import wandb from . import preinit def set_global( run=None, config=None, log=None, summary=None, save=None, use_artifact=None, log_artifact=None, define_metric=None, alert=None, plot_table=None, mark_preempting=None, ): if run: wandb.run = run if config ...
# Natural Language Toolkit: Texts # # Copyright (C) 2001-2019 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ This module brings together a variety of NLTK functionality for text analysis, and...
""" Copyright © Helicon Tech. All rights reserved. """ import yaml def load_feed(stream): pass
# -*- test-case-name: twisted.web.test.test_cgi -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ I hold resource classes and helper classes that deal with CGI scripts. """ # System Imports import os import urllib # Twisted Imports from twisted.web import http from twisted.internet imp...
from ..utils import Object class GetLoginUrl(Object): """ Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl.Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an er...
from fastapi import APIRouter from app.api.api_v1.endpoints import users from app.api.api_v1.endpoints import th_docs api_v1_router = APIRouter() api_v1_router.include_router(users.user_router, prefix="/users", tags=["users"]) api_v1_router.include_router(th_docs.th_docs_router, prefix="/d/docs", tags=["th_docs"])
from crownstone_core.packets.serviceDataParsers.containers.elements.AdvTypes import AdvType class AdvHubState: def __init__(self): self.type = AdvType.HUB_STATE self.crownstoneId = None self.hubFlags = None self.hubData = None self.timestamp = N...
import os, sys, time, random, struct, os.path s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; if len(sys.argv) > 1: s = sys.argv[1] print("Using encoding map:\n '%s'" % s) else: print("Using MIME standard encoding") map = [0 for x in range(255)]; for i, c in enumerate(s): map[ord(...
"""Base classes for all estimators.""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import warnings from collections import defaultdict import platform import inspect import re import numpy as np from . import __version__ from ._config import get_config from .utils im...
import numpy as np import pytest import unittest from desc.equilibrium import Equilibrium, EquilibriaFamily from desc.grid import ConcentricGrid from desc.profiles import PowerSeriesProfile, SplineProfile from desc.geometry import ( FourierRZCurve, FourierRZToroidalSurface, ZernikeRZToroidalSection, ) cla...
# Copyright 2019-2020 Axis Communications AB. # # For a full list of individual contributors, please see the commit history. # # 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...
"""Updates dashboard tables""" import argparse import datetime import logging import os import pandas as pd import synapseclient from synapseclient.core.utils import to_unix_epoch_time from genie import process_functions logger = logging.getLogger(__name__) def get_center_data_completion(center, df): """ G...