text
stringlengths
1
927k
""" Selection Controls ================== Copyright (c) 2015 Andrรฉs Rodrรญguez and KivyMD contributors - KivyMD library up to version 0.1.2 Copyright (c) 2019 Ivanov Yuri and KivyMD contributors - KivyMD library version 0.1.3 and higher For suggestions and questions: <kivydevelopment@gmail.com> This file is d...
#!/usr/bin/python # -*- encoding:utf-8 -*- #ไฝฟ็”จๆ–นๆณ• ''' ไธ“ๅฑžๅฎฟไธปๆœบๆ‰น้‡ๆŒ‚็›˜ python Vm DedicatedVmAddDataDisk.py.py 50 filename 50 ไปฃ่กจๆ•ฐๆฎ็›˜ๅคงๅฐๅ€ผ ''' #filename ็š„ๆ–‡ไปถๆ ผๅผ็คบไพ‹ ''' 192.168.1.1 192.268.1.2 ''' #็คบไพ‹ๆ–‡ไปถ ''' DedicatedVmAddDataDisk ''' from kscore.session import get_session import sys import time from kscore.exceptions import ClientEr...
import unittest from Default import Default class DefaultTest(unittest.TestCase): def test(self): default = Default() self.assertEqual(default.calculate(1), 1) unittest.main()
""" Defines a form to provide validations for course-specific configuration. """ from django import forms from openedx.core.djangoapps.video_config.forms import CourseSpecificFlagAdminBaseForm from openedx.core.djangoapps.video_pipeline.models import ( CourseVideoUploadsEnabledByDefault, VEMPipelineIntegration...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v1/proto/errors/change_status_error.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message...
"""COMMAND : .hii""" from telethon import events import asyncio from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="hii")) async def _(event): if event.fwd_from: return animation_interval = 3 animation_ttl = range(0, 103) #input_str = event.pattern_match.group(1) #if...
from setuptools import Extension, find_packages, setup setup( name="AlphaFamImpute", version="1.0.2", author="Andrew Whalen", author_email="awhalen@roslin.ed.ac.uk", description="An imputation program for phasing and imputation in a full sib family.", long_description="An imputation program for...
''' This file is a part of Test Mile Arjuna Copyright 2018 Test Mile Software Testing Pvt Ltd Website: www.TestMile.com Email: support [at] testmile.com Creator: Rahul Verma 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 ...
from sage.all import * import random def brute_ecdlp(P, Q, E): """ Brute Force algorithm to solve ECDLP and retrieve value of secret key `x`. Use only if group is very small. Includes memoization for faster computation [Warning]: Tested for Weierstrass Curves only :parameters: E : sage...
# SPDX-License-Identifier: MIT from pytest_mock.plugin import MockerFixture as MockFixture import pytest from upkeep import CONFIG_GZ, KernelConfigError, rebuild_kernel def test_rebuild_kernel_no_config_yes_gz(mocker: MockFixture) -> None: def isfile(x: str) -> bool: if x == '.config': return...
#!/usr/bin/env python3 # Copyright (c) 2016-2017 DigiByte Core Developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # This script will locally construct a merge commit for a pull request on a # github repository, inspect it,...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from jinja2 import Markup from pyramid.view import view_config, view_defaults from pyramid.httpexceptions import HTTPFound from sqlalchemy import func from h import form from h import i18n from h import models from h.models.organization import Organizati...
import click from . import cli from .params import project from meltano.core.db import project_engine from meltano.core.project import Project from meltano.core.config_service import ConfigService from meltano.core.plugin.settings_service import PluginSettingsService @cli.group(invoke_without_command=True) @click.ar...
import torch from ..env import Tragedy def test_defaults(): env = Tragedy(regen_properties={"type":"constant", "rate": 0.075}) obs = env.reset() print("start", obs) new_obs, reward, done, _ = env.step(torch.tensor([0,]*4)) print("obs", new_obs) print("reward", reward) print("done", done) ...
""" WSGI config for ideapros_llc_home_s_32960 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdef...
from defs import * __pragma__('noalias', 'name') __pragma__('noalias', 'undefined') __pragma__('noalias', 'Infinity') __pragma__('noalias', 'keys') __pragma__('noalias', 'get') __pragma__('noalias', 'set') __pragma__('noalias', 'type') __pragma__('noalias', 'update') def make_parts(max_energy): parts = [CARRY, C...
#plots U/UcL vs. r/(x-x0) #plot file directory/name at end of function definition from __future__ import division import numpy as np from data_tools import get_inputFileParameter import matplotlib matplotlib.use('PDF') # or Agg (for png), SVG, PS import matplotlib.pyplot as plt from data_tools import commentHd...
# put in the same directory as your ipynb file import math import PIL.Image as Image # we won't go through this in detail def ScaleRotateTranslate(image, angle, center = None, new_center = None, scale = None,expand=False): if center is None: return image.rotate(angle) angle = -angle/180.0*math.pi ...
# A Tk widget wich changes based on the state of a given "commander" widget. import tkinter as tk class DynamicSelector(tk.Frame): """ A Tk widget which changes based on the state of a given "commander" widget. """ def __init__(self, master, workingDirectory): self.workingDirectory = workin...
from ascetic.contrib.versioning.exceptions import AlreadyRegistered, NotRegistered from ascetic.contrib.versioning.interfaces import IRegistry class Registry(IRegistry): def __init__(self): self._fields_mapping = dict() self._object_accessor_mapping = dict() def register(self, model, fields, ...
# MIT License # # Copyright (c) 2020 Red Hat, 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,...
def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Age, obj[4]: Education, obj[5]: Occupation, obj[6]: Bar, obj[7]: Coffeehouse, obj[8]: Restaurant20to50, obj[9]: Direction_same, obj[10]: Distance # {"feature": "Coupon", "instances": 8147, "metric_value": 0.4734, "depth": 1} if obj[2]>1:...
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # 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 typing import Iterable, List, TYPE_CHECKING from . import get_console from .segment import Segment from .terminal_theme import DEFAULT_TERMINAL_THEME if TYPE_CHECKING: from .console import RenderableType JUPYTER_HTML_FORMAT = """\ <pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Me...
from gazette.spiders.base.doem import DoemGazetteSpider class BaMacajubaSpider(DoemGazetteSpider): TERRITORY_ID = "2919603" name = "ba_macajuba" state_city_url_part = "ba/macajuba"
from setuptools import setup, find_packages with open('README.md', 'r', encoding='utf8') as f: readme = f.read() setup( name='dataclasses-json', version='0.5.1', packages=find_packages(exclude=('tests*',)), package_data={"dataclasses_json": ["py.typed"]}, author='lidatong', author_email='c...
#1.0 from zipfile import ZipFile #2.0 file_name = "2021VAERSDATA.csv.zip" #3.0 with ZipFile(file_name, 'r') as zip: zip.printdir() #3.1 print('Extracting all the files now...') zip.extractall() print('Done!')
#!/usr/bin/env python3 # rabbitMQ password hashing algo as laid out in: # http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2011-May/012765.html from __future__ import print_function import base64 import os import hashlib import struct import sys # This is the password we wish to encode password = sys.argv[1] # ...
import numpy as np from scipy import signal from wavegen import cosine_wave from utilities import power #------------------------- # Helper functions def combine(iterator, num_elems): ''' Pairs up a fixed number of elements at a time ''' window = [iter(iterator)]*num_elems for combo in zip(*window): ...
"""Add registration form to event acls Revision ID: b6dd0a4ed40d Revises: c0fc1e46888b Create Date: 2020-06-19 15:26:01.961716 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = 'b6dd0a4ed40d' down_revision = 'c0fc1e46888b' branch_labels = None depends_on = None ...
# Generated by Django 3.2.8 on 2021-11-21 19:53 from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True ...
from time import perf_counter from collections import deque def combat(p1, p2): p1 = deque(p1) p2 = deque(p2) while p1 and p2: p1_card = p1.popleft() p2_card = p2.popleft() if p1_card > p2_card: p1.extend((p1_card, p2_card)) else: p2.extend((p2_card,...
from __future__ import annotations from typing import NoReturn from . import LinearRegression from ...base import BaseEstimator import numpy as np class PolynomialFitting(LinearRegression): """ Polynomial Fitting using Least Squares estimation """ def __init__(self, k: int) -> PolynomialFitting: ...
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy class Python03Item(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass class ProductoItem(scrapy.Item...
broker_url = 'redis://127.0.0.1/15'
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 NXEZ.COM. # http://www.nxez.com # # Licensed under the GNU General Public 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.gnu.org/licen...
#!/usr/bin/env python3 # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import os import numpy import torch from collections import OrderedD...
from flask import jsonify, g from app import db from app.api import bp from app.api.auth import basic_auth @bp.route('/tokens', methods=['POST']) @basic_auth.login_required def get_token(): token = g.current_user.get_token() db.session.commit() return jsonify({'token': token}) def revoke_token(): ...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .transform import * from fvcore.transforms.transform import * from .transform_gen import * __all__ = [k for k in globals().keys() if not k.startswith("_")]
# USAGE # python pi_face_recognition.py --cascade haarcascade_frontalface_default.xml --encodings encodings.pickle # import the necessary packages from imutils.video import FPS, VideoStream from datetime import datetime import face_recognition import argparse import imutils import pickle import time import cv2 import ...
import logging import os import time from dataclasses import dataclass, field from enum import Enum from typing import List, Optional, Union import torch from filelock import FileLock from torch.utils.data.dataset import Dataset from ...tokenization_roberta import RobertaTokenizer, RobertaTokenizerFast from ...tokeni...
๏ปฟ# -*- coding: utf-8 -*- import ply.lex as lex import ply.yacc as yacc import re import numpy # This is a Lexer and Parser for LAS 1.2/2.0 files header las_info = {} gmnem_base = None las_info['version'] = {} las_info['well'] = {} las_info['parameters'] = {} las_info['logs'] = {} las_info['curves_order'] = [] # ...
import os, inspect, time, math import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from random import * from PIL import Image from sklearn.decomposition import PCA PACK_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+"/.." def make_dir(path): try: os.mkdi...
from typing import TYPE_CHECKING, List from django.utils.translation import pgettext_lazy from saleor.extensions import ConfigurationTypeField from saleor.extensions.base_plugin import BasePlugin from . import ( GatewayConfig, authorize, capture, create_form, get_client_token, list_client_sou...
""" Module for image operations """ import numpy as np import tensorflow as tf def apply_grey_patch(image, top_left_x, top_left_y, patch_size): """ Replace a part of the image with a grey patch. Args: image (numpy.ndarray): Input image top_left_x (int): Top Left X position of the applied ...
import torch import torch.nn as nn import torch.nn.functional as F from dmb.modeling.stereo.layers.basic_layers import conv_bn, conv_bn_relu, BasicBlock from dmb.modeling.stereo.layers.basic_layers import conv_in_relu, BasicBlock_IN class PSM_Encoder_Instance(nn.Module): """ Backbone proposed in PSMNet. A...
""" Implementation of a Radial Basis Function (RBF) Network. @author Gabriel Nogueira (Talendar) @author Marcel Otoboni """ from mlp.multilayer_perceptron import MultilayerPerceptron import numpy as np from sklearn.cluster import KMeans class RBFNetwork: """ Implementation of a Radial Basis Function (RBF) Netwo...
import os from os.path import dirname from unittest import TestCase import src.superannotate as sa class TestCloneProject(TestCase): PROJECT_NAME_1 = "test create from full info1" PROJECT_NAME_2 = "test create from full info2" PROJECT_DESCRIPTION = "desc" PROJECT_TYPE = "Vector" TEST_FOLDER_PATH...
import asyncio import logging import os import shutil import unittest import rlog from omega.logreceivers.redis import RedisLogReceiver from tests import init_test_env class TestRedisLogging(unittest.IsolatedAsyncioTestCase): async def asyncSetUp(self) -> None: self.cfg = init_test_env() async def ...
text = input("Texto: ") sequence = input("Sequencia: ") count = 0 for word in text.split(): temp = "" sequenceIndex = 0 for i in range(len(word)): if word[i] == sequence[sequenceIndex]: sequenceIndex += 1 temp += word[i] if temp == sequence: coun...
# Lint as: python3 # 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 ...
__author__ = "Christopher Tomkins-Tinch" __copyright__ = "Copyright 2022, Christopher Tomkins-Tinch" __email__ = "tomkinsc@broadinstitute.org" __license__ = "MIT" # built-ins import os, sys from contextlib import contextmanager import pickle import time import threading import functools # intra-module from snakemake....
""" @file @brief Helpers for notebooks. """ from IPython.core.magic import magics_class, line_magic from jyquickhelper import RenderJsDot from pyquickhelper.ipythonhelper import MagicCommandParser, MagicClassWithHelpers from pyquickhelper.cli.cli_helper import create_cli_parser from ..onnx_inference import OnnxInferenc...
import json import os import glob if not os.path.exists('poscars'): os.mkdir('poscars') def write_poscar(data, output): oqmd_id = data['_oqmd_entry_id'] atoms = {} for s in data['_oqmd_sites']: ele = s.strip().split('@')[0].strip() pos = s.strip().split('@')[1].strip() if ele...
"""Losses utilities used in algorithms.""" from .entropy_loss import EntropyLoss from .kl_loss import KLLoss from .pathwise_loss import PathwiseLoss
from time import * from base import * def convert(): print("\n"+f"""\ {CRed}Valeur ร  convertir{CEnd} """) energies = float(input(cmdline)) energiesChoices(energies) def energiesChoices(quantity): print("\n"+f"""\ {CRed}Unitรฉ de vitesses de base \n {CBlue}[1]{CEn...
#!/usr/bin/env python from distutils.core import setup, Extension setup( name = 'zbar', version = '0.10', author = 'Jeff Brown', author_email = 'spadix@users.sourceforge.net', url = 'http://zbar.sourceforge.net', description = 'read barcodes from images or video', license = 'LGPL', long...
from __future__ import unicode_literals # Copyright (c) 2006-2019 Andrey Golovigin # # 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 r...
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-30 11:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('control_milight', '0013_lightgroup_on_until_task'), ] operations = [ migrations.Dele...
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import argparse import logging import os # version, , represent versions and specifications, internal from yotta.lib import version # Component, , represents an installed com...
import sys from rich.console import Console from android_resources_checker.validator import UnusedResourcesException class Application(object): def __init__( self, resources_fetcher, resources_modifier, analyzer, reporter, validator ): self.resources_fetcher = resources_fetcher self....
import os import functools CORPUS_DIR = str(os.getcwd())[:str(os.getcwd()).index('spellingcorrector/')] \ + 'data/corpus.txt' NWORD = {} def checkCorpus(fn): @functools.wraps(fn) def new_func(*args, **kwargs): t = os.path.isfile(CORPUS_DIR) if t == False: raise IOEr...
from fasture import specs import time def some_func(one, two): """This takes time to compute""" time.sleep(25) return one + two @specs.fasture_job_impl def fasture_job(json_payload: dict) -> dict: """Show this as summary in openAPI and the rest as long description """ # some validation ...
from sys import stderr from time import sleep stderr.write("loading... ") def test__stderr__1(): sleep(0.25) stderr.write("Spoon!\n") def test__stderr__2(): sleep(0.25) stderr.write("Kilroy was here.\n") assert False stderr.write("done\n")
"""Utilities to combine converted images into atlas and to create manifest.""" import math import os from absl import logging from PIL import Image # Manifest Key names MANIFEST_IMAGE_NAME_KEY = 'image_name' MANIFEST_SOURCE_IMAGE_KEY = 'source_image' MANIFEST_OFFSET_X_KEY = 'offset_x' MANIFEST_OFFSET_Y_KEY = 'offset_...
#! /usr/bin/env python import rospy from std_srvs.srv import Empty, EmptyResponse # you import the service message python classes generated from Empty.srv. def my_callback(request): print("My_callback has been called") return EmptyResponse() # the service Response class, in this case EmptyResponse #retur...
import json from six.moves import urllib from dcos import config, http, rpcclient, util from dcos.errors import DCOSException, DCOSHTTPException logger = util.get_logger(__name__) def create_client(toml_config=None): """Creates a Marathon client with the supplied configuration. :param toml_config: configu...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class Mpe2(AutotoolsPackage): """Message Passing Extensions (MPE): Parallel, shared X wi...
from django.urls import path from .views import * urlpatterns = [ path('', AllMessages.as_view(), name='messages'), path('im', RoomView.as_view(), name='room_view'), path('seroo', SearchRoom.as_view(), name='searching-room'), path('dialog-add/<str:username>/', DialogAddView.as_view(), name='add-dialog'...
""" ROSM880102 - Side chain hydropathy, corrected for solvation (Roseman, 1988) - 0.28197135416666663 ZIMJ680104 - Isoelectric point (Zimmerman et al., 1968) - 0.2740677083333333 OOBM770104 - Average non-bonded energy per residue (Oobatake-Ooi, 1977) - 0.24981510416666666 SNEP660101 - Principal component I (Sneath, 196...
array([[0.63069109, 2.80611932], [0.63367125, 2.69079621], [0.6467188 , 2.57569291], [0.66972231, 2.46183988], [0.70251506, 2.35022569], [0.74487589, 2.24177514], [0.79652923, 2.1373277 ], [0.85714459, 2.03761659], [0.92633571, 1.94324872], [1.00365975, 1.8...
# Copyright 2017 Mycroft AI 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 in writin...
#!python3 # -*- coding: utf-8 -*- """ uiautomation for Python 3. Author: yinkaisheng@live.com Source: https://github.com/yinkaisheng/Python-UIAutomation-for-Windows This module is for UIAutomation on Windows(Windows XP with SP3, Windows Vista and Windows 7/8/8.1/10). It supports UIAutomation for the applications which...
# Copyright (c) 2020-2021 Matematyka dla Ciekawych ลšwiata (http://ciekawi.icm.edu.pl/) # Copyright (c) 2020-2021 Robert Ryszard Paciorek <rrp@opcode.eu.org> # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Soft...
import argparse import os import collections from os import system import re from collections import defaultdict parser = argparse.ArgumentParser() parser.add_argument( "-f", "--folder", default=".", help="Specifies which folder to make the naviagtable bat file", ) parser.add_argument( "-n", ...
from py3rijndael import RijndaelCbc, ZeroPadding import math KEY_SIZE = 32 BLOCK_SIZE = 32 class ParameterError(Exception): pass def zeroPad_multiple(string, value): l = len(string) if l % value == 0: return string newL = int(value * math.ceil(float(l)/value)) return string.ljust(newL, b...
#!/usr/bin/env python ############################################ # Zeitcoin Utility, Log and Encyption Class ############################################ import uuid, time, hashlib, shutil, random, os, sys from M2Crypto import Rand, RSA, BIO, EVP from twisted.internet import defer from zeitcoindb import hashtable fr...
# encoding=utf-8 """ @Time: 2019/7/8 10:09 @Author: liushuo @File: get_data.py @Desc: @Software: PyCharm """ import boto3 import pandas as pd # s3 = boto3.resource('s3') # bucket = s3.Bucket('s3-billing') # data1 = data2 = None # for obj in bucket.objects.all(): # if '936669166135-aws-billing-csv-2017-10.csv' =...
# Copyright (c) 2016, Neil Booth # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. import re import resource from os import environ from collections import namedtuple from ipaddress import ip_address from torba.server.util import class_log...
# -*- coding: utf-8 -*- # Copyright ยฉ 2022, Neuroethology Lab Uni Tuebingen # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the BSD License. See # LICENSE file in the root of the Project. import re import os import glob imp...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
from setuptools import setup, find_packages setup( name='fsm_strip_length_damage_analysis', version='1.0.1', url='https://github.com/petarmaric/fsm_strip_length_damage_analysis', license='BSD', author='Petar Maric', author_email='petarmaric@uns.ac.rs', description='Console app and Python A...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # CMD code copied from git_cl.py in depot_tools. import config import cStringIO import download import logging import optparse imp...
# Generated by Django 3.0.5 on 2020-04-18 17:36 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Destination', fields=[ ('id', models.AutoFi...
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # Copyright (c) 2019 Baidu.com, Inc. All Rights Reserved # ################################################################################ """ File: source/encoders/embedder.py """ import l...
#!/usr/bin/env python #-*- mode: Python;-*- import ConfigParser import json import logging import os import sys import tempfile import traceback import click from requests.exceptions import HTTPError from ecxclient.sdk import client import util cmd_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'c...
# 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 pandas import os path, _ = os.path.split(__file__) kidera_factors = pandas.read_csv(os.path.join(path, 'kidera.csv'), header=None, index_col=0) symbol_lookup = { 'ALA': 'A', 'ARG': 'R', 'ASN': 'N', 'ASP': 'D', ...
""" Created on Dec 17, 2017 @author: ionut """ import datetime import logging import momoko import psycopg2 from tornado.gen import coroutine class DBClient: """ Handle database communication using momoko """ def __init__(self, dsn, io_loop=None): self.dsn = dsn self.io_loop = io_lo...
#!/usr/bin/env python3 import wpilib import ctre class MyRobot(wpilib.IterativeRobot): """ This is a short sample program demonstrating how to use the basic throttle mode of the TalonSRX """ def robotInit(self): self.motor = ctre.WPI_TalonSRX(1) # Initialize the TalonSRX on device 1. ...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.13.7 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # %% [markdown] slideshow={"slide_type":...
# Copyright (c) 2006-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
"""For more tests on satisfiability, see test_dimacs""" from sympy import symbols, Q from sympy.logic.boolalg import And, Implies, Equivalent, true, false from sympy.logic.inference import ( literal_symbol, pl_true, satisfiable, valid, entails, PropKB, ) from sympy.logic.algorithms.dpll import ...
""" Loss Utils. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch from . import geom_utils import numpy as np def mask_dt_loss(proj_verts, dist_transf): """ proj_verts: B x N x 2 (In normalized coordinate [-1, 1]) dist_transf...
# **************************************************************************** # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of this distribution. If # you ...
from django.conf.urls import url, include urlpatterns = [ ]
###################################################### ### Averages early- and late-phase weight matrices ### ###################################################### ### Copyright 2019-2021 Jannik Luboeinski ### licensed under Apache-2.0 (http://www.apache.org/licenses/LICENSE-2.0) import numpy as np from pathlib impo...
__version__ = '1.3.1' from .exceptions import * from .anidb import * # flake8: noqa: F401 (unused imports)
"""References: Simonyan, Karen, and Andrew Zisserman. "Very deep convolutional networks for large-scale image recognition." arXiv preprint arXiv:1409.1556 (2014). """ import find_mxnet import mxnet as mx def get_symbol(num_classes = 1000): ## define alexnet data = mx.symbol.Variable(name="data") # group 1...
import bs4 import requests from typing import Union, List from .Infopage import info, InfoPage class SearchResult: def __init__(self, urls: dict): self.names = tuple(urls.keys()) self.urls = urls def __getitem__(self, item): if type(item) == str: return self.urls[item] ...