text
stringlengths
1
927k
import platform from sys import exit from os import system from sys.stdin import isatty from os.path import dirname, realpath from colorama import init, Fore, Back from tkinter.messagebox import showerror if platform.system() is 'Windows': __vista = platform.release == 'Vista' __supported = platform.release >...
""" yq: Command-line YAML processor - jq wrapper for YAML documents yq transcodes YAML documents to JSON and passes them to jq. See https://github.com/kislyuk/yq for more information. """ # PYTHON_ARGCOMPLETE_OK from __future__ import absolute_import, division, print_function, unicode_literals import sys, argparse,...
#!/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 = [ 'scipy', 'matplotlib', 'numpy', ...
# import the necessary packages import numpy as np import tensorflow as tf from tensorflow.keras.models import Model from tensorflow.keras.models import Sequential from tensorflow.keras.layers import BatchNormalization from tensorflow.keras.layers import AveragePooling2D from tensorflow.keras.layers import MaxPooling2D...
"""Common CLI boilerplate for Noisemaker""" import click from noisemaker.constants import DistanceFunction, InterpolationType, PointDistribution, ValueDistribution, ValueMask, VoronoiDiagramType, WormBehavior import noisemaker.masks as masks # os.environ["TF_CPP_MIN_LOG_LEVEL"] = "1" # os.environ["CUDA_VISIBLE_DEVI...
import json import time from typing import Callable, Optional, List, Any, Dict import aiohttp from blspy import AugSchemeMPL, G2Element, PrivateKey import chia.server.ws_connection as ws from chia.consensus.pot_iterations import calculate_iterations_quality, calculate_sp_interval_iters from chia.farmer.farmer import ...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. import os from typing import List, Optional from cdm.enums import CdmLogCode, CdmObjectType, CdmStatusLevel from cdm.utilities import AttributeResolutionDirectiveS...
from dataclasses import dataclass __all__ = [ "TokensBundle", ] @dataclass(frozen=True) class TokensBundle: access_token: str refresh_token: str expires_in: int
""" Notes ----- Calculate & Plot DAS using HAPI. This package can be used independently with python script. An UI is also provided called qclasUI.py. Author ------ Da Pan, Department of Civil and Environmental Engineering, Princeton University Email: dp7@princeton.edu Created Date ------------ 02/10/2016 Edited Dat...
import requests import lxml from lxml.html.clean import Cleaner from django.http import Http404, HttpResponseForbidden from django.conf import settings from django.urls import reverse from django.template.loader import render_to_string from django.utils.html import strip_tags from django.core.mail import get_connection...
import itertools import matplotlib.pyplot as plt import numpy as np from nasbench import api from naslib.search_spaces.nasbench1shot1.search_space import SearchSpace from naslib.search_spaces.nasbench1shot1.utils import upscale_to_nasbench_format, OUTPUT_NODE, INPUT, CONV1X1, OUTPUT from naslib.search_spaces.nasbench...
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
from urllib.parse import urlparse from . app import app from . sqlite import setup_bd url = urlparse('http://0.0.0.0:8000') host, port = url.hostname, url.port setup_bd() app.run(host=host, port=port, debug=True)
# -*- coding: utf-8 -*- import sys import itertools import functools import inspect PY2 = int(sys.version_info[0]) == 2 PY26 = PY2 and int(sys.version_info[1]) < 7 if PY2: import urlparse urlparse = urlparse text_type = unicode binary_type = str string_types = (str, unicode) unicode = unicode ...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu """ 829. 连续整数求和 给定一个正整数 N,试求有多少组连续正整数满足所有数字之和为 N? 示例 1: 输入: 5 输出: 2 解释: 5 = 5 = 2 + 3,共有两组连续整数([5],[2,3])求和后为 5。 示例 2: 输入: 9 输出: 3 解释: 9 = 9 = 4 + 5 = 2 + 3 + 4 示例 3: 输入: 15 输出: 4 解释: 15 = 15 = 8 + 7 = 4 + 5 + 6 = 1 + 2 + 3 + 4 + 5 middle_ret肯定为有...
# 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 python3 from arrow import Arrow from pathlib import Path from os import environ from subprocess import run from tempfile import mkdtemp from shutil import rmtree from pprint import pprint class DCIM(): def __init__(self, device=None, source=None, target=None, confirm=False, date_path=True): ...
import time import helper def time_measure(func): """ Decorator function to measure time """ def inner(*args_, **kwargs_): """ args_ contains: [team_id, ...] """ t0_ = time.time() output = func(*args_, **kwargs_) print("[{0}] Execution time of '{1}': {2}...
# -*- 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...
# # 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...
# -*- coding: utf-8 -*- import pandas as pd import numpy as np def propiedad_tiene(cualidades, propiedad): """Devuelve un 1 si la propiedad tiene alguna de las cualidades en 'cualidades', 0 si no.""" tiene_cualidad = False if not(pd.isnull(propiedad["description"])): descripcion = propiedad["descri...
filteredElementCollector = FilteredElementCollector(doc) walls = filteredElementCollector.OfClass(Wall) for wall in walls: for parameter in wall.Parameters: print parameter.Definition.Name, parameter.AsValueString()
"""Tests for the ``/auth/tokens/influxdb`` route.""" from __future__ import annotations from pathlib import Path from unittest.mock import ANY import jwt import pytest from _pytest.logging import LogCaptureFixture from httpx import AsyncClient from gafaelfawr.config import Config from gafaelfawr.factory import Comp...
from contextlib import ContextDecorator from typing import Callable, IO, Union from functools import wraps from time import time from termcolor_logger import ColorLogger time_logger = ColorLogger('Timeit', 'white') class timeit(ContextDecorator): custom_print: str skip: bool total: Union[float, None] ...
from collections import Sized, OrderedDict import matplotlib.pyplot as plt from matplotlib import collections as mc import numpy as np import ipywidgets import IPython.display as ipydisplay from menpo.base import name_of_callable from menpo.image import MaskedImage, Image from menpo.image.base import _convert_patches...
import re import json from streamlink.plugin import Plugin from streamlink.stream import HLSStream _url_re = re.compile(r"http(?:s)?://(?:\w+\.)?rtl.nl/video/(?P<uuid>.*?)\Z", re.IGNORECASE) class rtlxl(Plugin): @classmethod def can_handle_url(cls, url): return _url_re.match(url) def _get_strea...
# https://app.codesignal.com/company-challenges/mz/zCYv3tuxRE4JajQNY def questEfficiencyItem(hours, points, time_for_quests): # Time is short, you want to complete as many quests as possible # but it's difficult to do so. So we want to maximize the points # we can obtain with quests in a given limited time....
from functools import wraps import logging from PySide.QtCore import QPointF, QRectF, Qt, QPoint from PySide.QtGui import QPainter, QBrush, QColor, QApplication, QMouseEvent, QResizeEvent, QPen from ...utils import get_out_branches from ...utils.graph_layouter import GraphLayouter from ...utils.cfg import categorize_...
import os import shutil import sys import tempfile import types from importlib2._fixers import (swap, SimpleNamespace, new_class, _thread, builtins) from importlib2._fixers._modules import mod_from_ns def fix_builtins(builtins=builtins): sys.modules.setdefault('builtins', builtins...
#!/usr/bin/env python """ This script generates Terraform scripting needed for daemons that deploy infrastructure. """ import os import glob import json import boto3 import argparse daemons_root = os.path.abspath(os.path.dirname(__file__)) parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("...
import typing as t import pygame from labyrinth.labyrinth import Labyrinth from view.banana import Banana from view.dot import Dot from view.ghost import Ghost from view.pacman import Pacman MAX_DISPLAY_WIDTH = 1000 MAX_DISPLAY_HEIGHT = 500 class View: cell_size: int sprites: t.Dict[str, pygame.sprite.Spri...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re import time import requests import multiprocessing import argparse from lxml import html from urllib.parse import urljoin from urllib.parse import urlparse from fake_useragent import UserAgent from lxml.etree import ParserError from lxml.etree import XMLSyntaxE...
"""baseline_mr dataset.""" import tensorflow_datasets as tfds import tensorflow as tf # TODO(baseline_mr): Markdown description that will appear on the catalog page. _DESCRIPTION = """ Description is **formatted** as markdown. It should also contain any processing which has been applied (if any), (e.g. corrupted ex...
import unittest from recordclass import litelist import gc import pickle import sys class litelistTest(unittest.TestCase): def test_len(self): a = litelist([]) self.assertEqual(len(a), 0) a = litelist([1]) self.assertEqual(len(a), 1) def test_items(self): a = ...
# Tencent is pleased to support the open source community by making GNES available. # # Copyright (C) 2019 THL A29 Limited, a Tencent company. 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...
# # Copyright (c) 2020 Gabriel Nogueira (Talendar) # # 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 # to use, copy, modify, merge...
# -*- coding: utf-8 -*- # # michael a.g. aïvázis <michael.aivazis@para-sim.com> # parasim # (c) 1998-2021 all rights reserved # # the framework import ampcor # the extension from ampcor.ext import ampcor as libampcor # declaration class OffsetMap(ampcor.flow.product, family="ampcor.products.offsets....
'''https://leetcode.com/problems/maximum-subarray/ 53. Maximum Subarray Easy 15507 728 Add to List Share Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. A subarray is a contiguous part of an array. Example 1: Input: nums ...
""" Author: Philipp Steinrötter (steinroe) """ from .tenant_iot_service import TenantIoTService from .utils import build_query from .response import Response class SensorService(TenantIoTService): def __init__(self, instance, user, password, ten...
from datetime import datetime from django.contrib.auth.models import AbstractUser from django.db import models def current_year(): return datetime.now().year class User(AbstractUser): telegram_user = models.CharField('usuario de telegram', max_length=64, blank=True) telegram_id = models.IntegerField('I...
# Copyright 2014 - Mirantis, Inc. # Copyright 2015 - StackStorm, 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 # # Unl...
# Generated by Django 2.1 on 2018-11-13 01:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hsse_api', '0031_auto_20181111_1424'), ] operations = [ migrations.AlterField( model_name='auditinspection', name='cre...
from __future__ import unicode_literals from django.apps import AppConfig class AccountConfig(AppConfig): name = 'account'
import pickle import traceback import numpy as np from flask import Flask, request from config import MODELPATH, DEBUG app = Flask(__name__) model = pickle.load(open(MODELPATH, 'rb')) @app.route("/predict", methods=["POST"]) def predict(): """{"input": [5.8, 2.8, 5.1, 2.4]}""" try: content = reque...
import re from collections import defaultdict from pathlib import Path base_url = 'https://developer.mozilla.org/en-US/docs/Web/API/' doc_base_url = 'https://pkg.go.dev/github.com/life4/gweb/{package}#{obj}' link = re.escape(f'// {base_url}') rex = re.compile(rf'(?:{link}([a-zA-Z/-]+))+\nfunc \([a-z]+ \*?([a-zA-Z]+)\)...
# -*- coding: utf-8 -*- """ Created on Tue Apr 7 17:58:09 2020 @author: Leonardo Saccotelli """ import numpy as np """ FORMULA DEI TRAPEZI Al metodo vengono passati: - la funzione integranda - l'estremo inferiore di integrazione - l'estremo superiore di integrazione """ def Trapezoid(f_x, a, b): ...
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json from datetime import datetime import pendulum import pytest from airbyte_cdk.models import SyncMode from facebook_business import FacebookAdsApi, FacebookSession from facebook_business.exceptions import FacebookRequestError from source_facebook_...
""" Utilities for working with the local dataset cache. This file is adapted from the AllenNLP library at https://github.com/allenai/allennlp Copyright by the AllenNLP authors. """ import os import logging import shutil import tempfile import json from urllib.parse import urlparse from pathlib import Path from typing ...
# Copyright 2018 Adrien Guinet <adrien@guinet.me> # # 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...
#!/usr/bin/env python3 """ The script tries to unpack the given executable file by using any of the supported unpackers, which are at present: * generic unpacker * upx Required argument: * (packed) binary file Optional arguments: * desired name of unpacked file * use extended exit codes Returns: *...
import os import tqdm import numpy as np import requests import youtokentome as yttm from argparse import ArgumentParser from zipfile import ZipFile from config import * from data.preprocessing import * from utils import * DATA_FILE_PATH = f'{DATA_PATH}/data.zip' DATA_URL = 'https://opus.nlpl.eu/download.php?f=OpenSu...
import numpy import theano import theano.tensor as T from deeplearning import rbm class DBN(): def __init__(self, vsize=None, hsizes=[], lr=None, bsize=10, seed=123): assert vsize and hsizes and lr input = T.dmatrix('global_input') self.layers = [] for hsize in hsizes: ...
# Copyright (c) 2013 dotCloud, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
Smarty Affix Zeroes Smarty Affix Zeroes: The program must accept two integers M and N as the input. The program must print the integers from M to N with smarty affix zeroes as the output. Boundary Condition(s): 1 <= M < N <= 10^8 Input Format: The first line contains M and N separated by a space. Output Format: The fi...
#11915010 Raghu Punnamraju #11915043 Anmol More #11915001 Sriganesh Balamurugan #11915052 Kapil Bindal import pandas as pd from ast import literal_eval from cdqa.utils.filters import filter_paragraphs from cdqa.utils.download import download_model, download_bnpp_data from cdqa.pipeline.cdqa_sklearn import QAPipeline ...
""" AI Challenger观点型问题阅读理解 focal_loss.py @author: yuhaitao """ # -*- coding:utf-8 -*- import tensorflow as tf def sparse_focal_loss(logits, labels, gamma=2): """ Computer focal loss for multi classification Args: labels: A int32 tensor of shape [batch_size]. logits: A float32 tensor of shape...
# -*- 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.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from cc...
from setuptools import setup, find_packages with open('README.md', 'r', encoding='utf-8') as fh: long_description = fh.read() setup( name='gym_wordle', version='0.1.3', author='David Kraemer', author_email='david.kraemer@stonybrook.edu', description='OpenAI gym environment for training agents ...
#!/usr/bin/python # -*- coding: utf-8 -*- """Text editor class for your favourite editor.""" from __future__ import unicode_literals # # (C) Gerrit Holl, 2004 # (C) Pywikibot team, 2004-2015 # # Distributed under the terms of the MIT license. # __version__ = '$Id: f734bda982fdfb5c124c2601234d24204182ffb0 $' # import ...
# coding=utf-8 # Copyright 2020 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 os import functools import multiprocessing import platform import random import subprocess import time import webbrowser import pyautogui import pyperclip from PIL import Image from botcity.base import BaseBot, State from botcity.base.utils import is_retina, only_if_element from . import config, os_compat try...
import json from aleph.core import db from aleph.model import Entity from aleph.tests.util import TestCase class CollectionsApiTestCase(TestCase): def setUp(self): super(CollectionsApiTestCase, self).setUp() self.rolex = self.create_user(foreign_id='user_3') self.col = self.create_collec...
"""ICML 2018 experiment for MNIST and CIFAR-10.""" import argparse import logging import os import subprocess import sys import time import warnings import numpy as np import scipy.stats # Needed for standard error of the mean scipy.stats.sem from sklearn.base import clone from sklearn.decomposition import PCA # Add...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. import argparse from awscrt import io, mqtt, auth, http from awsiot import mqtt_connection_builder import sys import threading import time from uuid import uuid4 import json # This sample uses the Message Broke...
""" test the scalar Timestamp """ import calendar from datetime import ( datetime, timedelta, ) import locale import pickle import unicodedata from dateutil.tz import tzutc import numpy as np import pytest import pytz from pytz import ( timezone, utc, ) from pandas._libs.tslibs.timezones import ( ...
class WebItem(object): def __init__(self): self.post_id = None self.parent_id = None self.thread_starter_id = None self.post_url = None self.site_url = None self.source_id = None self.type = None self.hash = None self.post_date = None self.parsed_post_date = None self.crawl...
import twitter # https://github.com/bear/python-twitter from datetime import datetime class TwitpicClient(object): def __init__(self): self.api = twitter.Api(consumer_key='zejoKxmd6rFVKE3UNyxIUFvJR', consumer_secret='xCh6Ad08Ni91T4fvjYUj3sj8OW8buWH2kAp4t3sooKRNZcj1cu', ...
""" @brief test log(time=200s) """ import unittest from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import ExtTestCase from pymyinstall.packaged import small_set class TestDifference(ExtTestCase): def test_diff(self): fLOG( __file__, self._testMethodName, ...
# import discord from discord.ext import commands import bot.checks class Sheeptrainer(commands.Cog, command_attrs={"hidden": True}): _GUILD = 296463400064647168 def __init__(self, bot): self.bot = bot @bot.checks.in_guild(_GUILD) async def cog_check(self, ctx): print("a") r...
#!/usr/bin/env python2 from datetime import date from setuptools import setup, find_packages import os import re from glob import glob APPVER = ( line.strip() for line in open('mailpile/defaults.py', 'r') if re.match(r'^APPVER\s*=', line) ).next().split('"')[1] try: # This borks sdist. os.remove('.SEL...
import sys from train import train from separate import separate import os from os.path import join as pjoin import logging from datetime import datetime def get_logger(logger_name, file_name): logger = logging.getLogger(logger_name) file_handler = logging.FileHandler(file_name) stream_handler = logging.S...
import numpy as np import pytest import importlib import theano import lasagne from lasagne.utils import floatX, as_tuple def conv2d(input, kernel, pad): """Execute a 2D convolution. Parameters ---------- input : numpy array kernel : numpy array pad : {0, 'valid', 'same', 'full'} Return...
# Copyright 2020 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...
import matplotlib.colors import matplotlib.pyplot as plt import numpy as np from pcl_helper import * nbinscol = 32 nbinsnor = 20 def rgb_to_hsv(rgb_list): rgb_normalized = [1.0*rgb_list[0]/255, 1.0*rgb_list[1]/255, 1.0*rgb_list[2]/255] hsv_normalized = matplotlib.colors.rgb_to_hsv([[rgb_normalized]])[0][0] ...
#!/usr/bin/env python3 #**************************************************************************************************************************************************** # Copyright (c) 2014 Freescale Semiconductor, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without #...
# coding=utf-8 # # # 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 writi...
from run import MainHandler from .cluster import ClusterHandler from util import * class ClusterXYZHandler(ClusterHandler): def __init__(self, args, **kwargs): super().__init__(args, **kwargs) self.n_stages = self.n_main_stages + self.n_substages n_substages = ClusterHandler.n_substages #  o...
try: from databroker.v0 import Broker except ModuleNotFoundError: from databroker import Broker from hxntools.handlers.xspress3 import Xspress3HDF5Handler from hxntools.handlers.timepix import TimepixHDF5Handler db = Broker.named("hxn") # db_analysis = Broker.named('hxn_analysis') db.reg.register_handler(Xsp...
"Define a convenience macro for examples integration testing" load("@build_bazel_rules_nodejs//internal/bazel_integration_test:bazel_integration_test.bzl", "rules_nodejs_integration_test") load("//:tools/defaults.bzl", "codeowners") def example_integration_test(name, owners = [], **kwargs): "Set defaults for the ...
# we import the Twilio client from the dependency we just installed # from twilio.rest import TwilioRestClient from twilio.rest import Client def send_text(message): # the following line needs your Twilio Account SID and Auth Token client = Client("AC3e84e9cae2390af9a661c1ab35955444", "4a8bf26cb30107ec85d98f6...
# coding: utf-8 # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. from __future__ import absolute_import import sys import unittest im...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from math import hypot, atan2, sin, cos, pi, degrees import numpy as np from matplotlib import pyplot as plt def vplain(x1, y1, x2, y2): """ set up line equation vp[0] * x + vp[1] * y + vp[2] = 0 x1, y1 - horizontal coordinates of the start point o...
# USAGE # python demo_guided.py --base-model $CAFFE_ROOT/models/bvlc_googlenet \ # --image initial_images/clouds.jpg \ # --guide-image initial_images/seed_images/starry_night.jpg \ # --output examples/output/seeded/clouds_and_starry_night.jpg # import the necessary packages from batcountry import BatCountry from PIL i...
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = "E07000131" addresses_name = ( "local.2019-05-02/Version 1/Democracy_Club__02May2019 Harborough DC.tsv" ) stations_name = ( "local.2019-05-...
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( arr , l , h ) : if l >= h : return if arr [ l ] > arr [ h ] : t = arr [ l ] arr [ l...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
y={0:{'Jesse Leite',23,'Best computer Engineer'},1:{'Lana Rhoades',22,'Best pleasure professional'}} with open('file.txt', 'w') as file: file.write("Python and Jesse built this file!") with open('file.txt', 'a') as file: file.write('\nJesse\n'+str(y)+'\n'+str(y)) inf=[] with open('file.data', 'r') as file: for row i...
# Copyright (c) OpenMMLab. All rights reserved. from .metrics import metrics, eval_metrics, pre_eval_to_metrics from .eval_hooks import EvalHook, DistEvalHook
# -*- coding: utf-8 -*- """ This module contains methods for processing and aggregating coverage files generated by ``bedtools``. """ import pandas as pd import numpy as np import re import os from .reader import read_sample_info cov_cols = ['Target', 'min_coverage', 'sum_coverage', 'basepairs', 'cov_per_bp', 'fract...
""" $description Global live streaming and video hosting social platform. $url vimeo.com $type live, vod $notes Password protected streams are not supported """ import logging import re from html import unescape as html_unescape from urllib.parse import urlparse from streamlink.plugin import Plugin, PluginArgument, P...
""" diagram_type_instances.py """ population = [ {'Name': 'class', 'Abbreviation': 'CD', 'About': 'Show data, logic and constraints in a domain'}, {'Name': 'state machine', 'Abbreviation': 'SMD', 'About': 'lifecycle of a class or assigner relationship'}, {'Name': 'class collaboration', 'Abbreviat...
# 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 app...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
# Copyright 2020 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 -*- # This file is part of ranger, the console file manager. # This configuration file is licensed under the same terms as ranger. # =================================================================== # # NOTE: If you copied this file to ~/.config/ranger/commands_full.py, # then it will NOT be loade...
from setuptools import find_packages, setup def long_description(): return """ ## Dagster Dagster is a data orchestrator for machine learning, analytics, and ETL. Dagster lets you define pipelines in terms of the data flow between reusable, logical components, then test locally and run anywhere. With a unified v...
import argparse import random import itertools import os import tempfile import warnings warnings.filterwarnings("ignore") from awesome_align.tokenization_bert import BasicTokenizer def main(): parser = argparse.ArgumentParser() parser.add_argument( "--data_file", default=None, type=str, required=True,...
# coding: utf-8 from __future__ import absolute_import from swagger_server.models.inline_response2004 import InlineResponse2004 from . import BaseTestCase from six import BytesIO from flask import json class TestEvidenceController(BaseTestCase): """ EvidenceController integration test stubs """ def test_ge...
from conans import ConanFile, tools required_conan_version = ">=1.33.0" class CpppeglibConan(ConanFile): name = "cpp-peglib" description = "A single file C++11 header-only PEG (Parsing Expression Grammars) library." license = "MIT" topics = ("conan", "cpp-peglib", "peg", "parser", "header-only") ...