text
stringlengths
1
927k
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Pretty printing wrapper """ def pprint( *args, detect_password : bool = True, nopretty : bool = False, **kw ): """ Pretty print an object according to the configured ANSI and UNICODE settings. If detect...
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Simulation/MagFEMM.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Simulation/MagFEMM """ from os import linesep from sys import getsizeof fro...
#!/usr/bin/env python3 from .config import Config from inspect import currentframe, getframeinfo from netaddr import IPNetwork class HostGroup(object): @property def name(self): return self._name @property def has_inline_groups(self): return len(self._inline_hostgroups) @propert...
# recursive def _factorial(num): if num < 0: raise ValueError("number must be positive.") if num == 0: return 1 else: return num*_factorial(num - 1) # iterative def factorial(num): result = 1 if num < 0: raise ValueError("number must be positive.") while num > 0:...
"""Help command unit tests """ import importlib import pytest import two1.cli @pytest.mark.unit def test_help_text_format(): """Confirm each command's help ends with a period and is <45 chars. This test uses metaprogramming to generate the list of functions of the form two1.commands.buy.buy, asserting ...
""" Adapted with permission from ReportLab's DocEngine framework """ import os from datetime import timedelta from decimal import Decimal from collections import namedtuple from subprocess import Popen, PIPE from django.conf import settings from importlib import import_module def run_shell_command(command, cwd): ...
import FWCore.ParameterSet.Config as cms tbeamTest = cms.EDAnalyzer("TBeamTest", TopFolderName = cms.string("TBeamTest"), OuterTrackerDigiSource = cms.InputTag("mix", "Tracker"), OuterTrackerDigiSimSource = cms.InputTag("simSiPixelDigis", "Tracker"), SimTrackSource = cms.InputTag("g4SimHits"), Geom...
from serpapi.serp_api_client import * from serpapi.serp_api_client_exception import SerpApiClientException class YoutubeSearch(SerpApiClient): """YoutubeSearch enables to search google scholar and parse the result. ```python from serpapi import YoutubeSearch query = YoutubeSearch({"search_query": "chai...
from collections import namedtuple, OrderedDict from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import NoReverseMatch from rest_framework import views from rest_framework.routers import BaseRouter, flatten, replace_methodname from rest_framework.urlpatterns import format_suffix_p...
try: from unittest import mock except ImportError: import mock from graphql_ws.gevent import GeventConnectionContext, GeventSubscriptionServer class TestConnectionContext: def test_receive(self): ws = mock.Mock() connection_context = GeventConnectionContext(ws=ws) connection_conte...
# -*- coding: utf-8 -*- import torch import pdb import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from ..box_utils import match, log_sum_exp, decode, center_size, crop from data import cfg, mask_type, activation_func class MultiBoxLoss(nn.Module): """SSD Weighted Loss Funct...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################# # Modificado a partir de un fichero escrito por: # # Copyright (c) 2022 Lorenzo Carbonell <a.k.a. atareao> # ######################################...
import re import sys import math from random import shuffle from functools import partial from typing import Any, Dict, List, Tuple from multiprocessing import cpu_count from multiprocessing.pool import ThreadPool as Pool import numpy from tqdm.contrib import concurrent from pandas import DataFrame, Series, Int64Dtype...
from ._sample import download_sample_data
#!/usr/bin/env python3 # coding: utf-8 """ Common source for utility functions used by ABCD-BIDS task-fmri-pipeline Greg Conan: gconan@umn.edu Created: 2021-01-15 Updated: 2021-11-12 """ # Import standard libraries import argparse from datetime import datetime # for seeing how long scripts take to run from glob impo...
import re from decimal import Decimal from typing import List from usaspending_api.common.elasticsearch.json_helpers import json_str_to_dict from usaspending_api.disaster.v2.views.elasticsearch_base import ( ElasticsearchDisasterBase, ElasticsearchSpendingPaginationMixin, ) class RecipientSpendingViewSet(Ela...
# 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, s...
class physics:#universal physics(excluding projectiles because i hate them) def __init__(self,world,gravity = 2): self.gravity = gravity self.world = world def isAtScreenBottom(self,obj):#unused if obj.y + obj.size[1] <= screenSize[1]: return True else: ...
# coding: utf-8 # **Introduction** # In this post, you will discover the Keras Python library that provides a clean and convenient way to create a range of deep learning models on top of Theano or TensorFlow. # # All creidts to -- "http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/" # # Le...
# Copyright 2016-2020 The GPflow Contributors. 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 argparse import numpy as np import matplotlib.pyplot as plt from lib.file_parser import read_csv # Set random seed np.random.seed(42) # Menambahkan argumen dalam cli parser = argparse.ArgumentParser() parser.add_argument("-obj", "--objective", help="Specify objective function of the optimi...
from __future__ import annotations import pytest from dials.algorithms.indexing.ssx.analysis import ( combine_results_dicts, generate_html_report, generate_plots, make_cluster_plots, make_summary_table, ) def generate_test_results_dict(n_lattices=1): results = { 0: [ { ...
#! /usr/bin/env python ############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this wo...
""" First pytest file for m2g. Basic assertions that don't mean anything for now just to make sure pytest + travis works.""" import os import pytest import m2g from m2g.utils.cloud_utils import s3_get_data from pathlib import Path from m2g.utils.gen_utils import create_datadescript, DirectorySweeper KEYWORDS = ["sub...
import argparse import time import os from selenium import webdriver from selenium.webdriver.support import expected_conditions from selenium.webdriver.support.ui import WebDriverWait USERNAME = os.environ['TWITTER_USERNAME'] PASSWORD = os.environ['TWITTER_PASSWORD'] parser = argparse.ArgumentParser() parser.add_arg...
# -*- coding: utf-8 -*- # Copyright 2018 New Vector 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 la...
# -*- coding: utf-8 -*- ''' Manage groups on FreeBSD ''' from __future__ import absolute_import # Import python libs import logging # Import salt libs import salt.utils log = logging.getLogger(__name__) try: import grp except ImportError: pass # Define the module's virtual name __virtualname__ = 'group' ...
"""You Only Look Once Object Detection v3""" # pylint: disable=arguments-differ from __future__ import absolute_import from __future__ import division import os import numpy as np import mxnet as mx from mxnet import gluon from mxnet import autograd from mxnet.gluon import nn from .darknet import _conv2d, darknet53 fr...
""" The gaussfun module implements functions for diffusion and Gaussian derivatives for data of any dimension. Contents of this module: * gaussiankernel - Create a Gaussian kernel * gaussiankernel2 - Create a 2D Gaussian kernel * diffusionkernel - Create a discrete analog to the Gaussian kernel * gfilter - Fi...
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup # fetch values from package.xml setup_args = generate_distutils_setup( packages=['ps4_controller'], package_dir={'': 'src'}, ) setup(**setup_args)
from yahooquery import Ticker import zz t = Ticker('AAPL') hist = t.history(period='1y') for (i_h, p_h),(i_l, p_l) in zz.zigzag(hist['high'], hist['low']): print(f'PEAK Index: {i_h}, price: {p_h}, VALLEY Index: {i_l}, price: {p_l}')
# -*- coding: utf-8 -*- """ @file @brief Helpers about processes. """ from .flog import fLOG def reap_children(timeout=3, subset=None, fLOG=fLOG): """ Terminates children processes. Copied from `psutil <http://psutil.readthedocs.io/en/latest/index.html?highlight=terminate#terminate-my-children>`_. Tri...
from __future__ import ( annotations, ) from typing import ( Generator, NoReturn ) class StdReader: def __init__( self, ) -> NoReturn: import sys self.buf = sys.stdin.buffer self.lines = ( self.async_readlines() ) self.chunks: Generator def async_readlines( self, )...
# pylint: disable=invalid-name,unused-variable,unused-argument,no-member """Conv2D schedule on x86""" import tvm from tvm import autotvm from tvm.autotvm.task.dispatcher import ApplyGraphBest from tvm.autotvm.task.nnvm_integration import deserialize_args from tvm.autotvm.task import register, get_config from .. import ...
STATS = [ { "num_node_expansions": 0, "search_time": 0.0380291, "total_time": 0.168408, "plan_length": 65, "plan_cost": 65, "objects_used": 281, "objects_total": 374, "neural_net_time": 0.07210159301757812, "num_replanning_steps": 22, "...
# -*- coding:utf-8 -*- # # Copyright (C) 2019-2020, Maximilian Köhl <koehl@cs.uni-saarland.de> from __future__ import annotations import dataclasses as d import typing as t import dataclasses import fractions from .. import model from ..model import actions, expressions, types, properties, operators from . import ...
# generated from genmsg/cmake/pkg-genmsg.context.in messages_str = "/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myPoseMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myHokuyoMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myGPSMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_...
from modulo import soma print(soma(15,30))
import os os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import numpy as np import tensorflow as tf import tensorflow_probability as tfp import unittest from jacques import kernels class Test_Kernel_Smooth_Quantile_Fn(unittest.TestCase): def test_quantile_smooth_bw(self): tau = np.concatenate( [n...
# Copyright (c) 2008-2012 testtools developers. See LICENSE for details. """Helpers for tests.""" __all__ = [ 'LoggingResult', ] import sys from extras import safe_hasattr from testtools import TestResult from testtools.content import StackLinesContent from testtools import runtest # Importing to preserv...
from telethon import events from Speedo.sql.autopost_sql import add_post, get_all_post, is_post, remove_post from . import * @speedo.on(Speedo_cmd(pattern="autopost ?(.*)")) @speedo.on(sudo_cmd(pattern="autopost ?(.*)", allow_sudo=True)) async def _(event): if (event.is_private or event.is_group): return ...
items = { "blink": { "active": [ { "name": "Blink", "desc": "Teleport to a target point up to 1200 units away. \n\nBlink Dagger cannot be used for 3 seconds after taking damage from an enemy hero or Roshan." } ], "id": 1, "img": "/apps/dota2/images/items/blink_lg.png?t=1558...
""" Amatino API Python Bindings Entity Update Arguments Author: hugh@amatino.io """ from amatino.internal.encodable import Encodable from amatino.internal.entity_create_arguments import NewEntityArguments from amatino.internal.constrained_string import ConstrainedString from typing import Optional class EntityUpdateA...
import json import click from .airkorea import MsrstnAcctoRltmMesureDnsty from .kma import UltraSrtFcst, UltraSrtNcst, VilageFcst, WthrDataList def _out(records): for record in records: print(record.dict()) @click.group() def datagokr(): pass @datagokr.command() @click.option("-s", "--service-ke...
import argparse import sys from setuptools import find_packages, setup def get_version(name): version = {} with open('dagster_cron/version.py') as fp: exec(fp.read(), version) # pylint: disable=W0122 if name == 'dagster-cron': return version['__version__'] elif name == 'dagster-cron...
# -*- coding: utf-8 -*- from __future__ import division from sys import argv import pandas as pd import numpy as np import os,time import warnings warnings.filterwarnings('ignore') ########################################### def reduce_mem(df): starttime = time.time() numerics = ['int16', 'int32', 'int64', 'flo...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, sanitized_Request, unescapeHTML, update_url_query, ...
class DoublyLinkedListNode: def __init__(self, node_data): self.data = node_data self.next = None self.prev = None def to_str(head): # better lookup for test data :P data = [] while head: data.append(str(head.data)) head = head.next return ', '.join(data) ...
from __future__ import absolute_import from .site import Site # noqa
from outlookdisablespamfilter.shared import transfer_spam_emails
# 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...
from setuptools import setup, find_packages setup( name='SpamFilter', version='1.0', description='filter spam using predictive text modeling', long_description='contains libraries to build ML pipeline and predict spam messages using logistic regression', author='Vinodh Mohan', author_email='Vin...
def extractRicelampWordpressCom(item): ''' Parser for 'ricelamp.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loiterou...
from sys import maxsize import re class Contact: def __init__(self, name=None, firstname=None, middlename=None, lastname=None, address=None, id=None, email=None, email2=None, email3=None,all_emails_from_home_page=None, homephone=None, mobilephone=None, workphone=None, secondaryp...
from django.shortcuts import render, HttpResponse from django.views.decorators.csrf import csrf_exempt from share.util_file import log_event import json import hashlib, hmac, base64 import os from main_settings.settings import BASE_DIR from .models import WebhookLog from .shell_cmd import Cmds from .hook import GithubH...
--- readchar/readchar.py.orig 2021-09-11 13:08:37 UTC +++ readchar/readchar.py @@ -6,7 +6,7 @@ import sys if sys.platform.startswith("linux"): from .readchar_linux import readchar -elif sys.platform.startswith("freebsd"): +elif sys.platform.startswith("freebsd") or sys.platform.startswith('dragonfly'): fro...
#========================================================================== # # Copyright NumFOCUS # # 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/l...
import pytest import torch import torch.distributed as dist from deepspeed.runtime.utils import partition_uniform from deepspeed.runtime.utils import partition_balanced from deepspeed.runtime.utils import prefix_sum_inc from deepspeed.runtime.utils import PartitionedTensor from .common import distributed_test @dis...
''' Created on 18 Dec 2017 @author: bogdan tmx file transformed into : gizapp format; tag-seg xml format tab separated HunAlign format (possible to shift around, etc. in a spreadsheet) ''' import sys, os, re import pathlib import xml.etree.ElementTree as ET from et_xmlfile.tests.common_imports import ElementTree ...
import io import torch import posixpath from ..model.summary import ClassificationSummary, ConditionalAccuracySummary from . import action_representation as ar def _print_summary(summary, conditional_accuracies, marginal_labels=['S', 'D', 'IA', 'IB']): result = io.StringIO() def marginal_statistics(stats): ...
import re from datetime import datetime from collections import namedtuple def format_cef( vendor, product, product_version, event_id, event_name, severity, extensions): """Produces a CEF compliant message from the arguments. :parameter str vendor: Vendor part of the product type identifier ...
def evaluate(operand, a, b): if operand: return a else: return b def inv_evaluate(operand, a, b): if operand: return not a else: return not b class Shield(object): def __init__(self): self.s0 = False; def move(self,i1, i2, i3, o1, o2, o3): tmp2...
#!/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 json import unittest from .shape_bzl import ( Fail, _check_type, _codegen_shape, shape, str...
from typing import Dict, List, Optional import numpy as np from sklearn.metrics import accuracy_score, f1_score, log_loss def calc_metrics( y_true: np.ndarray, y_pred: np.ndarray, y_prob: Optional[np.ndarray] = None, metrics: List[str] = ["loss"] ) -> Dict[str, float]: result = {} for metric in metrics: ...
"""Open file paths at the current cursor position.""" import functools import logging import os import re from itertools import chain import sublime import sublime_plugin platform = sublime.platform() log = logging.getLogger("OpenContextPath") class OpenContextPathCommand(sublime_plugin.TextCommand): """Open ...
from AccessControl.SecurityInfo import ClassSecurityInfo from Products.ATContentTypes.content import schemata from Products.Archetypes import atapi from Products.Archetypes.ArchetypeTool import registerType from Products.CMFCore.utils import getToolByName from bika.lims.browser.bika_listing import BikaListingView from ...
import random from selenium.common.exceptions import NoSuchWindowException from selenium.webdriver.common.by import By from . import * URL = "https://web.vconf.garr.it/webapp/conference" logger = logging.getLogger(__name__) warnings.filterwarnings("ignore", category=UserWarning) def run(room='videodrone', y4m='./...
n=int(input()) for i in range(n): A,B,C= map(int,input().split()) if A+B+C==180: print("YES") else: print("NO")
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.dataproc_v1.proto import ( workflow_templates_pb2 as google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2, ) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_oper...
import sys import json from .field_index import FieldIndex from collections import Counter def parse_field_indexes(fields): """" :param argv: the format of argv will look like 1,3,4-7, where 1, 3, 4-7 are column indexes :return: FieldIndex(name, (1), (3), (4, 7)) """ name = 'Dummy' return Fiel...
import tkinter as tk import random as rd #import playsound as ps from functools import partial def initiate(mode): global flag window = tk.Tk() window.attributes("-fullscreen", True) window.title("Minesweeper - {0}".format(mode)) window.iconbitmap("mine.ico") revealedButtons = list() if ...
# 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 ...
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file path #Code starts here data = pd.read_csv(path) data.rename(columns={'Total':'Total_Medals'}, inplace=True) print(data.head()) # -------------- #Code starts here data['Better_Event'] =...
"""Support for the Abode Security System locks.""" import abodepy.helpers.constants as CONST from homeassistant.components.lock import LockEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from...
from django.apps import AppConfig class MickeyConfig(AppConfig): name = 'mickey'
# 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 ...
import logging import os import time from igibson.render.mesh_renderer.mesh_renderer_cpu import MeshRenderer, MeshRendererSettings from igibson.utils.constants import AVAILABLE_MODALITIES from igibson.utils.utils import dump_config, parse_config, parse_str_config class VrOverlayBase(object): """ Base class r...
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "moveit_core;pluginlib;roscpp;tf_conversions".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NA...
""" A command is a list of nodes that mostly terminate on a node that is executable, unless they are the start of a infinite loop. At the time of writing this that is only applicable to the execute commands. At the time i wrote this code leutenant had no way of including commands like these, so it was/is important t...
zaimportuj sys # This jest a test module dla Python. It looks w the standard # places dla various *.py files. If these are moved, you must # change this module too. spróbuj: zaimportuj os wyjąwszy: print("""Could nie zaimportuj the standard "os" module. Please check your PYTHONPATH environment variable.""...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 17 10:33:24 2021 @author: Jose Antonio """ #of the paper Towards Char... using GNNs import torch_geometric.nn as pyg_nn import torch import torch.nn as nn import torch.nn.functional as F from torch_scatter.composite import scatter_softmax class ...
import argparse from train import start_training import cv2 from skimage import feature import numpy as np import dlib import tensorflow as tf import keras def get_cmd_args(): """ Parse user command line arguments""" parser = argparse.ArgumentParser() parser.add_argument("-d","--dataset_dir",default="dat...
# Generated by Django 2.1.7 on 2019-12-09 09:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clist', '0022_auto_20191203_1112'), ] operations = [ migrations.AlterField( model_name='contest', name='title', ...
from django.contrib import admin from .models import ContactRequest, Publications, Member, GroupInformation, ResearchField from tinymce.widgets import TinyMCE from django.db import models class PublicationsAdmin(admin.ModelAdmin): ordering = ['-year'] class MembersAdmin(admin.ModelAdmin): ordering = ['-init...
"""The tests for the Modbus fan component.""" from pymodbus.exceptions import ModbusException import pytest from homeassistant.components.fan import DOMAIN as FAN_DOMAIN from homeassistant.components.modbus.const import ( CALL_TYPE_COIL, CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTE...
n = int(input("Input number:" )) hours = n % (60 * 24) // 60 minutes = n % 60 print(hours, minutes)
#!/usr/bin/env python3 """Read boot.bin and src.elf and produce debug.bin.""" import os import sys import struct from enum import IntEnum, IntFlag def printf(fmt, *args, **kwargs): print(fmt % args, end='', **kwargs) def readStruct(fmt, file, offset=None): """Read struct from file.""" if offset is not N...
""" @author: Zongyi Li This file is the Fourier Neural Operator for 1D problem such as the (time-independent) Burgers equation discussed in Section 5.1 in the [paper](https://arxiv.org/pdf/2010.08895.pdf). """ import logging import os import numpy as np import torch import torch.nn as nn import torch.nn.functional as ...
#!/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.AlipayMarketingCampaignRuleCrowdCountModel import AlipayMarketingCampaignRuleCrowdCountModel class AlipayMarketingCampaignRuleCrowdC...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('widget_def', '0017_auto_20150622_1444'), ] operations = [ migrations.AddField( model_name='tiledefinition', ...
#!/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 os from setuptools import setup, find_packages, Extension import sys if sys.version_info < (3, 6): sys.exi...
import gzip map={} sites = [] reads = {} header_lines = [] # Get info from original 3pSites file with gzip.open(snakemake.input.raw_table, "rt") as infile: for line in infile: # Header lines if line.startswith("#"): l= line.rstrip().split(";") col=int(l[0].lstrip("#")) ...
# Generated by Django 2.2.15 on 2020-08-11 00:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('poller', '0002_auto_20200217_1127'), ] operations = [ migrations.CreateModel( name='AdobeCampaign', fields=[ ...
"""blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/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-based vi...
"""SuperAnnotate format annotation JSON helpers""" import json from .exceptions import SABaseException def fill_in_missing(annotation_json): for field in ["instances", "comments", "tags"]: if field not in annotation_json: annotation_json[field] = [] if "metadata" not in annotation_json: ...
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Copyright (c) 2017-2020 The Qtum Core developers # Copyright (c) 2020 The BCS Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test pr...
class intSet(object): """An intSet is a set of integers The value is represented by a list of ints, self.vals. Each int in the set occurs in self.vals exactly once.""" def __init__(self): """Create an empty set of integers""" self.vals = [] def insert(self, e): """Assumes e...
# Copyright (c) 2017, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of co...
# 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 from ... import _utilities, _tables from...
# 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...