text
stringlengths
2
999k
# -*- coding: utf-8 -*- # # Copyright 2017-2019- Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in co...
# generated from catkin/cmake/template/order_packages.context.py.in source_root_dir = '/home/jian/catkin_ws/src' whitelisted_packages = ''.split(';') if '' != '' else [] blacklisted_packages = ''.split(';') if '' != '' else [] underlay_workspaces = '/opt/ros/melodic'.split(';') if '/opt/ros/melodic' != '' else []
from __future__ import unicode_literals from builtins import object import copy import deepdish as dd import numpy as np from .tools.normalize import normalize as normalizer from .tools.reduce import reduce as reducer from .tools.align import align as aligner from .tools.format_data import format_data from ._shared.hel...
import unittest import heatx_network from pyomo.environ import ConcreteModel class TestSimulationTools(unittest.TestCase):\ def test_declare_heatx_unit(self): h = ConcreteModel() assert type(heatx_network.declare_heatx_unit(h)) == ConcreteModel, \ "Warning: Incorrect type" ...
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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 applicabl...
import json def foreach(iterable, fn): for v in iterable: fn(v) def filter_sols(best_draco, best_graphscape, name): best_draco_specs = set(json.dumps(sorted(c.props[name])) for c in best_draco) sols = list(filter(lambda c: json.dumps(sorted(c.props[name])) in best_draco_specs, best_graphscape)) if (len(...
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.EGL import _types as _cs # End users want this... from OpenGL.raw.EGL._types import * from OpenGL.raw.EGL import _errors from OpenGL.constant import Constant as _C imp...
# -*- 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...
#! /usr/bin/python import sys import os import json import grpc import time import subprocess from google.oauth2 import service_account import google.oauth2.credentials import google.auth.transport.requests import google.auth.transport.grpc from google.firestore.v1beta1 import firestore_pb2 from google.firestore.v1be...
# Copyright 2017 Huawei Technologies Co.,LTD. # 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 # # Unl...
import os, inspect from dolfin import * import numpy from scipy.sparse import coo_matrix import ExactSol from scipy2Trilinos import scipy_csr_matrix2CrsMatrix from PyTrilinos import Epetra, ML, AztecOO, Teuchos import MatrixOperations as MO import matplotlib.pylab as plt path = os.path.abspath(os.path.join(inspect.get...
from django import forms from django.core import exceptions from django.forms.models import inlineformset_factory from django.utils.translation import ugettext_lazy as _ from treebeard.forms import movenodeform_factory from oscar.core.loading import get_class, get_model from oscar.core.utils import slugify from oscar....
# coding=utf-8 from functools import wraps from flask import current_app, jsonify from flask.ext.login import current_user from . import response class SubBlueprint(object): def __init__(self, name, blueprint, url_prefix=''): self.name = name self.blueprint = blueprint self.url_prefix = ur...
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import hashlib import logging import os import shutil import subprocess import tempfile try: from threading import Thread except ImportEr...
# import Tensors as tensor from .Tensors import * from .LinAlg import * from .Numeric import *
class Solution: def threeSumMulti(self, arr, target): c = Counter(arr) ans, M = 0, 10**9 + 7 for i, j in permutations(c, 2): if i < j < target - i - j: ans += c[i]*c[j]*c[target - i - j] for i in c: if 3*i != target: ans += c[i...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems 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.o...
from abc import ABC, abstractmethod from enum import Enum, auto from itertools import chain from typing import ( Any, ClassVar, Dict, FrozenSet, Iterable, Iterator, List, Optional, Sequence, Set, Tuple, Type, TypeVar, ) from datamodel_code_generator.format import Pyt...
from imutils.object_detection import non_max_suppression import numpy as np import argparse import time import cv2 ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", type=str, help="path to input image",default ="path to input image" ) ap.add_argument("-east", "--east", type=str, help="path to input ...
from __future__ import unicode_literals import os.path import optparse import re import sys from .downloader.external import list_external_downloaders from .compat import ( compat_expanduser, compat_get_terminal_size, compat_getenv, compat_kwargs, compat_shlex_split, ) from .utils import ( pre...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) This file specifically includes utilities for security. """ import threading import struct import hashlib ...
from __future__ import print_function from itertools import chain import sys import random import collections import Constants import MusicTheory prnFlag = False class RhythmChords () : ''' ''' def __init__ ( self, wbLevers, scale, chord, ids, duration ) : self.desc = 'rhy...
import pygame from const import * import random class Meteor(pygame.sprite.Sprite): def __init__(self, images): pygame.sprite.Sprite.__init__(self) # self.image = pygame.Surface((30, 30)) # self.image.fill(BROWN) self.image_orig = random.choice(images) self.ima...
import pickle import sys import torch import numpy as np def latent_code_to_smiles(latent_code, vae_file_name): try: with open('Data/one_hot_dictionary.data', 'rb') as f_one_hot_dictionary: one_hot_dictionary = pickle.load(f_one_hot_dictionary) except IOError: print('Err...
# Copyright 2016 Mario Graff (https://github.com/mgraffg) and Ranyart R. Suarez (https://github.com/RanyartRodrigo) # 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...
import asyncio import traceback import struct import pycommons.logger from seriesdb.client import Client logger = pycommons.logger.get_instance(__name__) initial = 1 step = 1 count = 0 def build_rows(): keys = [] values = [] global initial for i in range(initial, initial+step): keys.append(s...
# encoding: utf-8 """ Pokemons module ============ """ from app.extensions.api import api_v1 def init_app(app, **kwargs): # pylint: disable=unused-argument """ Init pokemons module. """ # Touch underlying modules with app.app_context(): from . import models from . import resource...
#!/usr/bin/env python3 import sys import re import traceback from PyQt5.QtGui import QPainter, QPixmap, QIcon, QStandardItemModel, QStandardItem, QColor from PyQt5 import QtCore from PyQt5.QtCore import QRect, QSize, Qt, QObject, QTimer, pyqtSignal, QSettings, QModelIndex, QVariant, QAbstractItemModel, QSortFilterPro...
import os import random from os.path import join # from tqdm import tqdm import aug as am import Helpers as hp from util import * base_dir = os.getcwd() save_base_dir = join(base_dir, 'dpjsave') check_dir(save_base_dir) imgs_dir = [f.strip() for f in open(join(base_dir, 'sea.txt')).readlines()] labels_dir = hp.re...
# 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! *** from enum import Enum __all__ = [ 'AccessRights', 'DefaultAction', 'EncodingCaptureDescription', 'EndPointProvisioningState', 'Ent...
import os import shutil import tempfile from typing import Optional from PyQt5.QtCore import Qt, pyqtSignal, QEventLoop, QRect from PyQt5.QtGui import QPalette, QPen, QPainter, QPixmap from PyQt5.QtWidgets import ( QWidget, QDialog, QLabel, QPushButton, QScrollArea, QHBoxLayout, QVBoxLayout, QListWidget, QAbst...
#!/usr/bin/env python # Copyright 2018 Division of Medical Image Computing, German Cancer Research Center (DKFZ). # # 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...
from data_collection.management.commands import BaseHalaroseCsvImporter class Command(BaseHalaroseCsvImporter): council_id = "W06000012" addresses_name = "NPTalbot_polling_station_export-2017-04-13.csv" stations_name = "NPTalbot_polling_station_export-2017-04-13.csv" elections = ["local.neath-port-tal...
# -*- encoding: UTF-8 -*- """Use getTransform Method to get the yaw and pitch to control the head to point the arm end-effector""" import qi import argparse import sys import motion # import time # import random from scipy import signal import numpy as np from threading import Thread class HeadMotionThread(Thread)...
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for deftchaind node under test""" import decimal import errno from enum import Enum import http....
""" Copyright (C) 2021 Red Hat, Inc. (https://github.com/Commonjava/charon) 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...
#!/usr/bin/env python3 # Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 r"""Top Module Generator """ import argparse import logging as log import random import subprocess import sys from collections import OrderedDict from...
# SPDX-License-Identifier: MIT # Copyright (c) 2019 Intel Corporation """ Source subclasses are responsible for generating an integer value given an open source project's source URL. """ import abc from typing import AsyncIterator, List, Optional, Callable from ..base import ( BaseDataFlowFacilitatorObjectContext,...
""" This module implements node objects which represent operations on tabular datasets and can be combined together to assemble SQL queries. In the `render` step, FunSQL compiles the assembled node tree into a SQL query. """ from functools import partial from typing import Any, Optional, Union, Callable from .comm...
""" Handles the operation of the background music. @author: RichardFlanagan - A00193644 @version: 16 April 2014 """ import pygame pygame.mixer.init() class MusicPlayer(): def __init__(self, debugParam): """ Initialize variables. """ self.game = "../res/music/Luftrausers.ogg" ...
expect("0000000001 USER+000 FindFunction_WhichIsBroken 0 78") expect("@timestamp Trg-Done QS_RX_COMMAND") expect(" Tick<0> Ctr=*") expect("@timestamp IO_CALL IO_Write %d %d" %(CommandReg, ProgramCmd))
__author__ = 'Paul Osborne' __version__ = '0.2.3'
# -*- coding: utf-8 -*- """ This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following lines in the [options.entry_points] section in setup.cfg: console_scripts = firerock = firestone_engine.calculate:run Then run `python se...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsis3 # Author: Even Rouault <even dot rouault at spatialys dot com> # ############################################################################### # Copy...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import time import unittest from openr.cli.utils.utils import find_adj_list_deltas, parse_prefix_database from openr....
# Copyright (c) 2021, Luis Pillaga and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class CurriculumVitae(Document): pass
""" Functions to be used in fabfiles and other non-core code, such as run()/sudo(). """ from __future__ import with_statement from glob import glob import os import os.path import re import stat import subprocess from context_managers import warnings_only from contextlib import closing from network import output_thr...
# @Date: 2020-04-05T14:08:33+10:00 # @Last modified time: 2020-04-13T15:36:05+10:00 from __future__ import division, unicode_literals, print_function, absolute_import from labscript_utils import PY2 if PY2: str = unicode import h5py import numpy as np import pyvisa from labscript import Device, LabscriptError, ...
def is_triangular(k): """ k, a positive integer returns True if k is triangular and False if not """ n = 1 total = 0 while total <= k: # print(total, n) if total == k: return True total += n n += 1 return False print(is_triangular(1)) print(i...
from configparser import ConfigParser def config(filename='database.ini', section='postgresql_local'): # create a parser parser = ConfigParser() # read config file parser.read(filename) # get section, default to postgresql db = {} if parser.has_section(section): params...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from controllers import TrainingController from deepy.core.env import FLOATX from deepy.core import graph import logging as loggers logging = loggers.getLogger(__name__) class LearningRateAnnealer(TrainingController): """ Learning rate anneale...
############################################# # Author: Hongwei Fan # # E-mail: hwnorm@outlook.com # # Homepage: https://github.com/hwfan # ############################################# import os from anycurve import losscurve class a2v_curve(): def __init__(self, cfg): ...
# -*- coding: utf-8 -*- """TextSummarizerWithUI.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1nIahtDqCXsXLHvhDacYz9dUldz9Fof4o """ #!pip install gradio --quiet import gradio as gr import time print(gr.__version__) #!pip install transformers...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayUserTradeSearchRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._alipay_order_no = None ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for Twisted's deprecation framework, L{twisted.python.deprecate}. """ import sys, types import warnings from os.path import normcase from twisted.trial.unittest import TestCase from twisted.python import deprecate from twisted.python....
from enum import IntFlag from typing import List, Optional, Union from .operation import Operation from .utils import check_ed25519_public_key from ..keypair import Keypair from ..muxed_account import MuxedAccount from ..signer import Signer from ..strkey import StrKey from ..utils import pack_xdr_array, unpack_xdr_ar...
""" Results for SARIMAX tests Results from R, KFAS library using script `test_ucm.R`. See also Stata time series documentation. Author: Chad Fulton License: Simplified-BSD """ from numpy import pi irregular = { 'models': [ {'irregular': True}, {'level': 'irregular'}, {'level': 'ntrend'}, ...
import fractions x = fractions.Fraction(1, 3) print(x) print(x * 2) print(fractions.Fraction(100, 50)) print(fractions.Fraction(100, 0)) """ /usr/local/bin/python3 /Users/moqi/Documents/Code/dive-into-python3-practice/c03/p070_test_fractions.py 1/3 2/3 2 Traceback (most recent call last): File "/Users/moqi/Documen...
from engine.cards.card import Card from engine.cards.sticker import Sticker from engine.cards.expression import Expression # from card import Card # from sticker import Sticker # from expression import Expression class VariableSetter(Card): ''' For information on card and attributes and methods, refer p...
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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, either version 3 of the License, or # (at your option) an...
__author__ = 'sstober'
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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, including without limitation the rights t...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors impor...
# Copyright (c) 2013 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
#!/usr/bin/env python # Copyright 2017 Johns Hopkins University (Shinji Watanabe) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from __future__ import print_function from __future__ import unicode_literals import argparse import codecs from io import open import sys PY2 = sys.version_info[0] == 2 sys...
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from typing import TYPE_CHECKING from .base import AsyncCredentialBase from .._authn_client import AsyncAuthnClient from ..._base import ClientSecretCredentialBase, Cer...
# Copyright 2015 Ufora 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 i...
# <Copyright 2019, Argo AI, LLC. Released under the MIT license.> import numpy as np from argoverse.utils.cv2_plotting_utils import ( draw_point_cloud_in_img_cv2, draw_polygon_cv2, draw_polyline_cv2, plot_bbox_polygon_cv2, ) def test_draw_point_cloud_in_img_cv2_smokescreen() -> None: """ We ...
""" SmartRegisterItemInfo操作用モジュール """ import os from aws.dynamodb.base import DynamoDB class SmartRegisterItemInfo(DynamoDB): """SmartRegisterItemInfo""" __slots__ = ['_table'] def __init__(self): """初期化メソッド""" table_name = os.environ.get("PAY_PAY_ITEM_INFO_DB") super().__init__...
import getpass import sys from cli.src.Config import Config def prompt_for_value(prompt): input_text = '' while input_text == '': input_text = input(prompt) return input_text def prompt_for_password(prompt): password = '' while password == '': password = getpass.getpass(prompt) ...
def flatten_shot(shot, game_id): """Flatten the schema of a shot record.""" shot_id = shot[0] shot_data = shot[1] return {'game_id': game_id, 'shot_id': shot_id, 'shot_type': shot_data['type'], # 't_half': shot_data['t']['half'], # 't_min': shot_data['t']...
import os import sklearn.metrics import numpy as np import sys import time from . import sentence_encoder from . import data_loader import torch from torch import autograd, optim, nn from torch.autograd import Variable from torch.nn import functional as F class FewShotREModel(nn.Module): def __init__(self, sentenc...
# -*- test-case-name: twisted.web.test.test_template -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ HTML rendering for twisted.web. @var VALID_HTML_TAG_NAMES: A list of recognized HTML tag names, used by the L{tag} object. @var TEMPLATE_NAMESPACE: The XML namespace used to identi...
import os import numpy as np import facenet def save_position_into_file(src, dest): # storing bounding boxes' centers with their respective images name d = {} with open(src) as f: for line in f: line = line.split() line[0] = line[0].split('/')[-1] d[line[0]] = ( ...
import os import sys import pytest sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) from base import TestBaseClass class TestClassOelintVarsDescriptionSame(TestBaseClass): @pytest.mark.parametrize('id', ['oelint.vars.descriptionsame']) @pytest.mark.parametrize('occurrence', [1]) @pytest.m...
""" Test of basic dataseries behavior. """ import unittest from numpy import arange, array, allclose from chaco.api import ArrayDataSource, PointDataSource class ArrayDataTestCase(unittest.TestCase): def test_basic_set_get(self): myarray = arange(10) sd = ArrayDataSource(myarray) self.as...
""" Display one shapes layer ontop of one image layer using the add_shapes and add_image APIs. When the window is closed it will print the coordinates of your shapes. """ import numpy as np from skimage import data from skimage.io import imsave import napari from vispy.color import Colormap with napari.gui_qt(): ...
from . import Request from numpy.typing import ArrayLike import numpy as np from typing import Optional, Dict, Any, Tuple, Union, List from dataclasses import dataclass @dataclass class ImageProperties: """Standardized Metadata ImageProperties represent a set of standardized metadata that is available un...
import time from datetime import datetime from beastx import Lastupdate def get_readable_time(seconds: int) -> str: count = 0 ping_time = "" time_list = [] time_suffix_list = ["s", "m", "h", "days"] while count < 4: count += 1 if count < 3: remainder, r...
import warnings import numpy as np from pandas import ( Categorical, DataFrame, Series, ) from .pandas_vb_common import tm class Construction: params = ["str", "string"] param_names = ["dtype"] def setup(self, dtype): self.series_arr = tm.rands_array(nchars=10, size=10 ** 5) ...
import unittest, sys from matlib.vectors import ( Vector, Points, add, subtract, multiply, length, distance, perimeter, scale, shift, flip, make_vector, make_vectors ) from tests.utilities import almost_equal sys.path.append('./') class TestMakeVector(unittest.TestCase): """test methods for ...
from aocd import get_data from itertools import takewhile, repeat print((parse := lambda bs: ( ( (size := 6) and (int(bs[:3],2), int("".join(((size := size+5) and bs[ptr+1:ptr+5] for ptr in takewhile(lambda i: (i == 6 or bs[i-5] == '1'), ...
#!/usr/bin/env python import fileinput keyboard = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] bathroom_keypad = [ [0, 0, 1, 0, 0], [0, 2, 3, 4, 0], [5, 6, 7, 8, 9], [0, "A", "B", "C", 0], [0, 0, "D", 0, 0], ] x, y = 1, 1 bx, by = 0, 2 code = "" bathroom_code = "" for instr in fileinput.input(): for ...
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import pkgutil import importlib import inspect import sys from abc import ABCMeta, abstractmethod from azureml._cli.cli_comman...
import sys from pyspark import SparkContext if __name__ == "__main__": file = sys.argv[1] #raw train file sc = SparkContext(appName="query_ad_pair_ctr") data = sc.textFile(file).map(lambda line: line.strip().strip("\n").encode("utf8", "ignore").split(',')) query_ad_pair_ctr = data.map(lambda fields: (...
# -*- coding: utf-8 -*- # Copyright (c) 2018-2021, earthobservations developers. # Distributed under the MIT License. See LICENSE for more info. from functools import reduce from urllib.parse import urljoin import pandas as pd from wetterdienst.metadata.period import Period from wetterdienst.metadata.resolution impor...
import argparse import os import matplotlib import matplotlib.pyplot as plt import pandas as pd matplotlib.use("Agg") # Needed to run without X-server def main(): parser = argparse.ArgumentParser() parser.add_argument("--title", type=str, default="") parser.add_argument( "--file", actio...
#!/usr/bin/env python # -*- coding: utf-8 -*- file="lines.txt" f = open(file,"r") for line in f: print line
from .neuralcodes import NeuralCodes16
{ 'conditions': [ ['OS=="win"', { 'variables': { 'GTK_Root%': 'C:/GTK', # Set the location of GTK all-in-one bundle 'with_jpeg%': 'false', 'with_gif%': 'false', 'with_rsvg%': 'false', 'variables': { # Nest jpeg_root to evaluate it before with_jpeg 'jpeg_roo...
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 pyarrow = pytest.importorskip("pyarrow") def test(): array = ak.repartition(ak.Array(range(10)), [3, 3, 3, 1]) arrow = ak.t...
# coding: utf-8 """ Lightly API Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@lightly...
# 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 may ...
from json import dumps import requests if __name__ == '__main__': robot_url = 'http://localhost:8088/run' robot_params = \ { "actions": [ { "what": "open", "url": "https://www.whatismybrowser.com/detect/what-is-my-user-agent/" ...
""" Django logging settings. """ from logging.config import dictConfig LOGGING = { "version": 1, "disable_existing_loggers": False, "formatters": { "console": { "format": "%(asctime)s :: %(levelname)s :: %(name)s :: %(message)s", }, }, "handlers": { "console": {...
# Copyright (c) 2020 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 appli...
import logging from typing import Union, Optional, List from gullveig import bootstrap_default_logger # Configure default logging def _configure_default_server_logger(): logger = logging.getLogger('gullveig-server') bootstrap_default_logger(logger) _configure_default_server_logger() class AnalyticsSource...
from abc import ABC, abstractmethod import requests import time import os class BaseCollector(ABC): @abstractmethod def collect(self): pass def get_vcenters(self): current_iteration = self.get_iteration() url = "http://localhost:8000/vcenters/{}".format(current_iteration) ...