text
stringlengths
1
927k
"""Generate and work with PEP 425 Compatibility Tags.""" from __future__ import absolute_import import distutils.util import logging import platform import re import sys import sysconfig import warnings from collections import OrderedDict import pip._internal.utils.glibc from pip._internal.utils.compat import get_ext...
"""Main function of ABMT for the paper: Adversarial Brain Multiplex Prediction From a Single Brain Network with Application to Gender Fingerprinting View Network Normalization Details can be found in: (1) the original paper Ahmed Nebli, and Islem Rekik. ----------------------------------------------...
""" Hyperelliptic curves over a general ring EXAMPLES:: sage: P.<x> = GF(5)[] sage: f = x^5 - 3*x^4 - 2*x^3 + 6*x^2 + 3*x - 1 sage: C = HyperellipticCurve(f); C Hyperelliptic Curve over Finite Field of size 5 defined by y^2 = x^5 + 2*x^4 + 3*x^3 + x^2 + 3*x + 4 :: sage: P.<x> = QQ[] sage: f ...
# Copyright The PyTorch Lightning team. # # 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...
# coding: utf-8 """ LUSID API The version of the OpenAPI document: 0.11.2275 Contact: info@finbourne.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import io import json import logging import re import ssl import certifi # python 2 and python 3 compati...
import os from glob import glob import torch def mkdir_ifnotexists(directory): if not os.path.exists(directory): os.mkdir(directory) def get_class(kls): parts = kls.split('.') module = ".".join(parts[:-1]) m = __import__(module) for comp in parts[1:]: m = getattr(m, comp) retur...
# 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...
# 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 __a...
# 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-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" fil...
""" Write a Python program to combine values in python list of dictionaries. """ from collections import Counter item_list = [{'item': 'item1', 'amount': 400}, {'item': 'item2', 'amount': 300}, {'item': 'item1', 'amount': 750}] result = Counter() for d in item_list: result[d['item']] += d['amount'] print(result)
#### 等待处理###显示等待和隐式等待 # time.sleep()这个是显示等待,又叫强制等待 # from selenium import webdriver # from selenium.webdriver.common.by import By #引入这个by # from selenium.webdriver.support.ui import WebDriverWait #引入等待条件 # from selenium.webdriver.support import expected_conditions as EC #根据什么条件等待 # driver = webdriver.Chrome() # ...
# -*- coding: utf-8 -*- ''' Installation of packages using OS package managers such as yum or apt-get ========================================================================= Salt can manage software packages via the pkg state module, packages can be set up to be installed, latest, removed and purged. Package managem...
#!/usr/bin/env python from __future__ import absolute_import from email.utils import parseaddr import functools import htmlentitydefs import itertools import logging import operator import psycopg2 import re from ast import literal_eval from openerp.tools import mute_logger # Validation Library https://pypi.python.org...
"""This is a copy of the htmlEncode function in Webware. @@TR: It implemented more efficiently. """ htmlCodes = [ ['&', '&amp;'], ['<', '&lt;'], ['>', '&gt;'], ['"', '&quot;'], ] htmlCodesReversed = htmlCodes[:] htmlCodesReversed.reverse() def htmlEncode(s, codes=htmlCodes): """ Returns the HTML...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import re import sys ExternalEncoding = sys.getdefaultencoding() Tag_pattern_ = re.compile(r'({.*})?(.*)') def showIndent(outfile, level, pretty_print=False): for i in range(level - 1): outfile.write(" ") def quote_xml(inStr): ...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
# -*- coding: utf-8 -*- # pylint: disable=undefined-variable,no-name-in-module from datetime import datetime, timedelta, timezone import time UNIX_EPOCH = datetime(1970, 1, 1, tzinfo=timezone.utc) def now(): return datetime.now(timezone.utc) def now_in_millis(): return int(round(time.time() * 1000)) def...
# -*- coding: utf-8 -*- __author__ = "Didier Dupertuis, Benjamin Trubert, Kévin Huguenin" __copyright__ = "Copyright 2019, The Information Security and Privacy Lab at the University of Lausanne (https://www.unil.ch/isplab/)" __credits__ = ["Didier Dupertuis", "Benjamin Trubert", "Kévin Huguenin", "Mathias Humbert"] _...
from __future__ import print_function import sympy from galgebra import ga base=ga.Ga('e0 e1',g=[1,1],coords=sympy.symbols('x,y',real=True)) e0,e1 = base.mv() M=[[1,2],[3,4]] Mvec = [e0+2*e1,3*e0+4*e1] #print M[0][0],M[0][1] #print M[1][0],M[1][1] print(base.lt(Mvec)) print(base.lt(M)) print(sympy.Matrix(M))
from selfdescribing import SelfDescribing __author__ = "Jon Reid" __copyright__ = "Copyright 2011 hamcrest.org" __license__ = "BSD, see License.txt" class Matcher(SelfDescribing): """A matcher over acceptable values. A matcher is able to describe itself to give feedback when it fails. Matcher implement...
class LinearColorKeyFrame(ColorKeyFrame, ISealable, IKeyFrame): """ Animates from the System.Windows.Media.Color value of the previous key frame to its own System.Windows.Media.Animation.ColorKeyFrame.Value using linear interpolation. LinearColorKeyFrame() LinearColorKeyFrame(value: Color) LinearColorKeyF...
import unittest import numpy as np from RyStats.inferential import (unequal_variance_ttest, equal_variance_ttest, one_sample_ttest, repeated_ttest) from RyStats.inferential.ttests import _p_value_and_confidence_intervals class TestEqualVariance(uni...
import torch import numpy as np import math def bbox_iou(box1, box2, x1y1x2y2=True, GIoU=False, DIoU=False, CIoU=False, eps=1e-9): # Returns the IoU of box1 to box2. box1 is 4, box2 is nx4 box2 = box2.T # 4xn # Get the coordinates of bounding boxes if x1y1x2y2: # x1, y1, x2, y2 = box1 b1_x1,...
""" A customized client for FedSarah. Reference: Ngunyen et al., "SARAH: A Novel Method for Machine Learning Problems Using Stochastic Recursive Gradient." (https://arxiv.org/pdf/1703.00102.pdf) """ import os import time from dataclasses import dataclass from plato.clients import simple @dataclass class Report(sim...
# model settings model = dict( type='SOLOv2', pretrained='open-mmlab://resnext101_64x4d', backbone=dict( type='ResNeXt', depth=101, groups=64, base_width=4, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, style='pytorch', dcn=d...
#This algorithms create final pairs godfather-laureate according to the marks each godfathers and laureates gives at the end of their meetings # #The aim of this algorithms is to maximize the satisfaction rate of the pairS (average of all the marks godfathers and laureates give to their associated pair) # input fil...
from autokeras.nn.layers import * import numpy as np def test_global_layer(): layer = GlobalAvgPool2d() inputs = torch.Tensor(np.ones((100, 50, 30, 40))) assert layer(inputs).size() == (100, 50)
"""empty message Revision ID: 847f24db2b48 Revises: Create Date: 2021-09-14 20:46:44.700753 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '847f24db2b48' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
class Solution: def nextBeautifulNumber(self, n: int) -> int: i = n+1 while True: strn = str(i) map_n = {} for ch in strn: if ch not in map_n: map_n[ch] = 1 else: ...
from wordgameA import * import time # # # Computer chooses a word # # def compChooseWord(hand, wordList, n): """ Given a hand and a wordList, find the word that gives the maximum value score, and return it. This word should be calculated by considering all the words in the wordList. If no w...
from machine import Pin from apa102 import APA102 import time class Lights: counter = None apa = None def __init__(self): clock = Pin(12, Pin.OUT) # Green data = Pin(13, Pin.OUT) # Yellow self.apa = APA102(clock, data, 56) self.counter = 0 def set_l...
from django.conf.urls.defaults import patterns, url from django.contrib.comments.feeds import LatestCommentFeed import feeds urlpatterns = patterns('scipy_central.feeds.views', # latest comments url(r'^comments/$', LatestCommentFeed(), name="spc-rss-latest-comments"), # all revision comments url(r'^comments/(?P<it...
import os import numpy as np import matplotlib as mpl mpl.use('Qt5Agg') from medis.params import tp, mp, cp, sp, ap, iop import medis.Detector.get_photon_data as gpd import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from medis.Utils.plot_tools import loop_frames, quicklook_im, view_datacube, compare...
import numpy as nm from sfepy.base.base import assert_ from sfepy.linalg import dot_sequences from sfepy.terms.terms import Term, terms class ZeroTerm(Term): r""" A do-nothing term useful for introducing additional variables into the equations. :Definition: .. math:: 0 :Arguments: ...
from retro_data_structures.conversion.asset_converter import AssetConverter, Resource, AssetDetails from retro_data_structures.conversion.errors import UnsupportedTargetGame, UnsupportedSourceGame from retro_data_structures.game_check import Game _BONE_NAME_MAPPING = { "Skeleton_Root": 1, "root": 0, "Elect...
#!/usr/bin/env python # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-array/blob/master/LICENSE import codecs import collections import numbers try: from collections.abc import Iterable except ImportError: from collections import Iterable import numpy import awkward.type import awkward.uti...
import gym from env_wrappers import * def init(env_name, args, final_init=True): if env_name == 'levers': env = gym.make('Levers-v0') env.multi_agent_init(args.total_agents, args.nagents) env = GymWrapper(env) elif env_name == 'number_pairs': env = gym.make('NumberPairs-v0') ...
#!/usr/bin/env python # 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 wr...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import operator import random import math import json import threading import numpy as np import tensorflow as tf import tensorflow_hub as hub import h5py import util import coref_ops import conll im...
import unittest from challenge2 import findSingleton class TestFindSingleton(unittest.TestCase): def test_base_case(self): aList = [2, 3, 4, 2, 3, 5, 4, 6, 4, 6, 9, 10, 9, 8, 7, 8, 10, 7] bList = [2,'a', 'l', 3, 'l', 4, 'k', 2, 3, 4, 5, 'a', 6, 'c', 4, 'm', 6, 'm', 'k', 9, 10, 9, 8, 7, 8, 10, 7] ...
import pytest import numpy as np from aizynthfinder.context.scoring import ( StateScorer, NumberOfReactionsScorer, AverageTemplateOccurenceScorer, NumberOfPrecursorsScorer, NumberOfPrecursorsInStockScorer, PriceSumScorer, RouteCostScorer, ScorerCollection, ScorerException, ) from ai...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.InvoiceItemQueryOpenModel import InvoiceItemQueryOpenModel from alipay.aop.api.domain.InvoiceTradeFundItem import InvoiceTradeFundItem from alipay.aop.api.domain.Invoi...
#!/usr/bin/env python3 # This file is Copyright (c) 2013-2014 Sebastien Bourdeauducq <sb@m-labs.hk> # This file is Copyright (c) 2014-2019 Florent Kermarrec <florent@enjoy-digital.fr> # This file is Copyright (c) 2014 Yann Sionneau <ys@m-labs.hk> # License: BSD import os import argparse from fractions import Fraction...
"""ngo_geomap URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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-ba...
# 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 sys import numpy as np import rospy import tf import geometry_msgs.msg from geometry_msgs.msg import PoseStamped, Pose from pyrobot.util...
# Smart Bulb Lixada! Control With Bluez # Author: Niklas Grebe # Original Script by: Tony DiCola # # This script will cycle a Smart Bulb Lixada! Bluetooth Low Energy light bulb # through a rainbow of different hues. # # Dependencies: # - You must install the pexpect library, typically with 'sudo pip install pexpect'. #...
import urllib import platform import random import requests import os from flask import Flask, render_template, url_for, request from flask import jsonify app = Flask(__name__) event_text = 'Demo app for ECS' print(event_text) @app.route('/') def index(): images = [ url_for('static', filename='beachops...
#!/usr/bin/env python from win32com.client import selecttlb items = selecttlb.EnumTlbs() def getDescsFromTlb(): return map((lambda x: x.desc), items) print 'Enter a part of string you want to search in description of dll items: ' search_string = raw_input(': ') if not search_string: print 'Nothing entered...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torchvision.transforms import Normalize import pickle from training.diffaug import DiffAugment from training.networks_stylegan2 import FullyConnectedLayer from pg_modules.blocks import conv2d, DownBlock, DownBlockPatch from pg_m...
import sys import uuid from dataclasses import dataclass from typing import Any, List, Optional, TYPE_CHECKING, Tuple, Type, Union from pydantic import BaseModel, create_model from pydantic.typing import ForwardRef, evaluate_forwardref from sqlalchemy import UniqueConstraint import ormar # noqa I101 from ormar.excep...
""" ETL step wrapper for RedshiftCopyActivity to load data into Redshift """ from .etl_step import ETLStep from ..pipeline import RedshiftNode from ..pipeline import RedshiftCopyActivity class LoadRedshiftStep(ETLStep): """Load Redshift Step class that helps load data into redshift """ def __init__(self,...
class DataGridViewCellMouseEventArgs(MouseEventArgs): """ Provides data for mouse events raised by a System.Windows.Forms.DataGridView whenever the mouse is moved within a System.Windows.Forms.DataGridViewCell. DataGridViewCellMouseEventArgs(columnIndex: int,rowIndex: int,localX: int,localY: int,e: MouseEventArg...
""" This module provides a standard way of registering and executing filter hooks. """ # A mapping from eventName to an array of filters. __filters = {} # Return codes that can be set by filters. ABORT = 0 CONTINUE = 1 FINISHED = 2 def registerFilterForEvent(filter, eventName, loadOrder=10): """ Registers a ...
import numpy as np from murt.utils import objreader import os import sys COMPONENT_PATH = os.path.join(sys.prefix, "murt-assets") class Object(): def __init__(self, object_name, file_path=None, directory_path=None): self.object_name = object_name self.scale, self.translate, self.rotate = \ ...
# 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. """ This file implements: Ghazvininejad, Marjan, et al. "Constant-time machine translation with conditional masked language models." arXiv pre...
""" Chicken Poker random bot. """ import logging logging.basicConfig(filename='chp_bot.log', level=logging.DEBUG, filemode='w') log = logging.getLogger(__name__) log.info("Starting") # # Networking # import sys def deserialize_round(round_string): """ param: round_string is expected to be list of integers sep...
import os from IPython.lib import passwd c.NotebookApp.ip = '*' c.NotebookApp.port = 8888 c.NotebookApp.open_browser = False c.MultiKernelManager.default_kernel_name = 'python3' # sets a password if PASSWORD is set in the environment if 'PASSWORD' in os.environ: c.NotebookApp.password = passwd(os.environ['PASSWOR...
# input N, X, r = map(int, input().split()) MOD = pow(10, 9) # compute # output print(X * (pow(r, N, MOD) - 1) % MOD)
from gym.envs.registration import register register(id='snake-v0', entry_point='gym_snake.envs:SnakeEnv')
from django.urls import reverse from django.utils.http import urlencode from fixturedb.factories.win import create_win_factory import pytest from rest_framework import status from test_helpers.hawk_utils import hawk_auth_sender as _hawk_auth_sender from wins.constants import BUSINESS_POTENTIAL, HQ_TEAM_REGION_OR_P...
from polymer import Polymer poly = Polymer('input.txt') print(f'Part 1: {poly.element_difference2(10)}') print(f'Part 2: {poly.element_difference2(40)}')
# Copyright 2014, Doug Wiegley, A10 Networks. # # 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...
#!/usr/bin/env python3 """ Author : Ken Youens-Clark <kyclark@gmail.com> Date : 2020-02-07 Purpose: Load "data_with_overlays" into SQLite """ import argparse import configparser import csv import os import re import mysql.connector import sys from pprint import pprint # --------------------------------------------...
from styx_msgs.msg import TrafficLight import tensorflow as tf import numpy as np class TLClassifier(object): def __init__(self, is_site): #TODO load classifier # main code source : object_detection_tutorial.ipynb from Google's model-zoo on GitHub if is_site: PATH_TO_FROZEN_GRAP...
#!/usr/bin/env python # coding: utf-8 # # Author: Kazuto Nakashima # URL: https://github.com/kazuto1011 # Created: 2016-06-07 config = { 'server_IP': '192.168.4.170', 'PORT': 49952, 'xml_file': 'C:/Users/nemuriscan/Desktop/NemuriScanLog/NemuriScanStateInfo.xml' }
"""Constants for the epson integration.""" DOMAIN = "epson_monitor" SERVICE_SELECT_CMODE = "select_cmode" ATTR_CMODE = "cmode" HTTP = "http" #URL = "http://10.129.101.4:8123/api/states/switch.pei_xun_shi_tou_ying_ji_dian_yuan_socket_1" URL = "http://10.129.101.4:8123/api/states/switch.15ceng_pei_xun_shi_wi_fizhi_nen...
from pdf2image import convert_from_path, convert_from_bytes from os import path, makedirs from hashlib import sha256 import numpy as np import base64 class Transformer(): #read pdf from file path and convert to jpegs def save_pdf_as_image(inputPath:str, outputPath:str): if not path.exists(outputPath)...
# (C) Copyright 2018-2021 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
# coding: utf-8 """ Decision Lens API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import impor...
class Node: def __init__(self, key): self.key, self.left, self.right = key, None, None def bfs(node): if not node: return q = [] q.append(node) while len(q): temp = q.pop(0) if temp.left: q.append(temp.left) if temp.right: q.append(...
import pytest from dagster import ( Any, Bool, DagsterInvalidDefinitionError, Dict, Float, InputDefinition, Int, List, Nothing, Optional, OutputDefinition, Path, PipelineDefinition, Set, String, Tuple, lambda_solid, pipeline, ) from dagster.core.t...
''' Copyright 2022 Airbus SAS 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 dis...
#!/usr/bin/python import subprocess as sp import re, tempfile import shutil, os, sys ################################################## # Loging import logging def _init_log(): name = 'app' x = logging.getLogger(name) x.setLevel(logging.WARNING) # x.setLevel(logging.DEBUG) h = logging.StreamHandle...
import heapq import operator from . import bitops from . import Fingerprints def count_tanimoto_hits_fp(query_fp, targets, threshold): return sum(1 for target in targets if bitops.byte_tanimoto(query_fp, target[1]) >= threshold) ## def iter_count_tanimoto_hits(queries, targets, threshold): ## ...
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None def __str__(self): l, p = [self.val], self.next while (p != None): l.append(p.val) p = p.next return str(l) class Solution: def removeN...
import json import pathlib import requests import requests.exceptions as requests_exceptions from datetime import datetime, timedelta from airflow import DAG from airflow.operators.python_operator import PythonOperator from airflow.operators.bash_operator import BashOperator default_args = { 'owner': 'airflow',...
""" Copyright (C) 2018-2020 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 i...
import numpy as np import torch from datasets import load_dataset import gensim.downloader as api from util import batch from LSTM import RNN from embedding import gensim_to_torch_embedding # DATASET dataset = load_dataset("conllpp") train = dataset["train"] # inspect the dataset train["tokens"][:1] train["ner_tags...
# Aggregate all `grpc-web` rules to one loadable file load(":closure_grpc_compile.bzl", _closure_grpc_compile="closure_grpc_compile") load(":commonjs_grpc_compile.bzl", _commonjs_grpc_compile="commonjs_grpc_compile") load(":commonjs_dts_grpc_compile.bzl", _commonjs_dts_grpc_compile="commonjs_dts_grpc_compile") load(":t...
import gnumpy as gp import numpy as np def relu_hard(x, computeGrad = False): if (not computeGrad): f = (1/2.)*(x+gp.sign(x)*x) return f g = gp.sign(x) return g def relu(x, computeGrad = False): negslope = .01 a = (1+negslope)/2.; b = (1-negslope)/2. if (not computeGrad): ...
#I want to rerun things with the ARP rather than the AEC... import sys import os exp_path = os.path.dirname(os.path.abspath(__file__)) print(exp_path) project_path = os.path.abspath(os.path.join(exp_path, "..", "..")) sys.path.insert(0, project_path) print(sys.path) import src.experiment_utils as eutils import src.ut...
import os from swaglyrics.cli import lyrics from swaglyrics import SameSongPlaying from flask import Flask, render_template from SwSpotify import spotify, SpotifyNotRunning app = Flask(__name__, template_folder=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')) # use relative path of the template f...
# Copyright (c) 2016 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
# -*- coding: utf-8 -*- from cms.forms.fields import PlaceholderFormField from cms.models.fields import PlaceholderField from cms.models.placeholdermodel import Placeholder from cms.models.pluginmodel import CMSPlugin from cms.plugin_pool import plugin_pool from cms.utils import get_language_from_request, cms_static_ur...
# Parsing the config files configfile: "config.json" # Parse the required files BAMDIR = config["resources"]["bam"] REF = config["resources"]["reference"] # Parse path for tools GATK = config["tools"]["GATK"] BEAGLE = config["tools"]["BEAGLE"] BCFTOOLS = config["tools"]["BCFTOOLS"] LOAD_JAVA = config["tools"]["JAVA"]...
# 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...
import string import math from codestat_token import Token from codestat_tokenizer import Tokenizer from token_builders import ( InvalidTokenBuilder, WhitespaceTokenBuilder, NewlineTokenBuilder, IntegerTokenBuilder, IntegerExponentTokenBuilder, PrefixedIntegerTokenBuilder, RealTokenBuilder, RealExponen...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test mask bands in VRT driver # Author: Even Rouault <even dot rouault at mines dash paris dot org> # #####################################...
""" Raspberry Pi Single Channel Gateway Learn Guide: https://learn.adafruit.com/raspberry-pi-single-channel-lorawan-gateway Author: Brent Rubell for Adafruit Industries """ # Import Python System Libraries import json import time import subprocess import uuid # Import Adafruit Blinka Libraries import busio from digita...
from Acquisition import aq_inner from Acquisition import aq_parent from bika.lims.permissions import * def upgrade(tool): """Added D3.js library and D3 Control-chart for Instrument QC """ # Hack prevent out-of-date upgrading # Related: PR #1484 # https://github.com/bikalabs/Bika-LIMS/pull/1484 ...
import datetime import os import re import sqlite3 from Crypto.Cipher import AES from Crypto.Protocol.KDF import PBKDF2 from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, get_next_unused_name, open_sqlite_db_readonly def decrypt(ciphertxt,...
# This file is part of ReACORN, a reimplementation by Élie Michel of the ACORN # paper by Martel et al. published at SIGGRAPH 2021. # # Copyright (c) 2021 -- Télécom Paris (Élie Michel <elie.michel@telecom-paris.fr>) # # The MIT license: # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
# coding: utf-8 """ Pure1 Public REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from...
### # # Lenovo Redfish examples - Get power redundancy # # Copyright Notice: # # Copyright 2018 Lenovo 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.o...
#!/usr/bin/env python3 # gopherci.py - Dispatcher for commit events, spawns the appropriate build job. # NOTE: Don't use SetParameter(...) here; build_triggered jobs don't inherit # environment. # Operation: # When a repository updates, gopherci is called with the repository # name and branch (two arguments). # - If ...
# Top 50 in/out migration counties for 5-yr estimates, each year b/w 05-09 to 13-17 import pandas as pd import numpy as np census5yr = pd.read_csv('ca_counties_mig_5yr_0917.csv') ca0917 = census5yr[((census5yr.County1FIPS > 6000) & (census5yr.County1FIPS < 7000)) & (census5yr.County2FIPS < 60000) & (census5yr.State2Na...
print("Mary had a little lamb.") print("Its fleece was white as {}.".format('snow')) print("And everywhere that Mary went.") print("."*10)#what'd that do? end1="C" end2="h" end3="e" end4="e" end5="s" end6="e" end7="B" end8="u" end9="r" end10="g" end11="e" end12="r" #watch that comma at the end. try removing it to see...
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose Pty Ltd" file="StampLine.py"> # Copyright (c) 2003-2021 Aspose Pty Ltd # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy # of t...
#!/usr/bin/env python3 """Demo showing how to use TriFingerPlatformLog.""" import argparse import cv2 import robot_fingers from trifinger_cameras import utils def main(): parser = argparse.ArgumentParser() parser.add_argument("robot_log", type=str, help="Robot log file") parser.add_argument("camera_log"...