text
stringlengths
2
999k
# -*- coding: utf-8 -*- import scrapy class ExampleSpider(scrapy.Spider): name = "example" allowed_domains = ["http://www.yelp.com/"] start_urls = ( 'http://www.yelp.com/search?find_desc=&find_loc=nyc&ns=1#find_desc=chanel', ) def parse(self, response): pass
import glob import open3d as o3d import numpy as np import os from utils.pc_error_wrapper import pc_error from pytorch3d.loss import chamfer_distance import torch import pandas as pd orig_pc = '/home/anique/Upsampling_3/Data/8i_test/orig/' input_pc = '../Data/8i_test/8x/' output_pc = 'results/8x_0x_ks5/' csv_name = 't...
import numpy as np from typing import Dict, Tuple, Optional, List import pandas as pd from torch import Tensor from typing import Union def create_neurons(neuron_list): prinz_neurons = { "LP": { "LP_0": [100, 0, 8, 40, 5, 75, 0.05, 0.02], # this3 g_CaS g_A g_Kd "LP_1": [100, 0, 6,...
import pandas as pd import numpy as np import os, sys from scipy import stats import matplotlib.pyplot as plt import statsmodels.api as sm from parse import * sys.path.append("../utils/") from utils import * data_dir = '../../out/' games = [] games += get_games(data_dir, 'experiment') #games += ['data'] data = get_d...
"""dialog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
from datetime import timedelta from intent_parser.intent_parser_exceptions import IntentParserException from intent_parser.protocols.labs.opil_lab_accessor import OpilLabAccessors from intent_parser.protocols.templates.experimental_request_template import OpilDocumentTemplate from transcriptic import Connection import ...
from sqlalchemy_1_3 import ForeignKey from sqlalchemy_1_3 import Integer from sqlalchemy_1_3 import String from sqlalchemy_1_3 import testing from sqlalchemy_1_3.ext.hybrid import hybrid_property from sqlalchemy_1_3.orm import attributes from sqlalchemy_1_3.orm import class_mapper from sqlalchemy_1_3.orm import clear_m...
#! /usr/bin/env python """ Main function. """ import json import locale import signal import sys from argparse import ArgumentParser, FileType, Namespace from collections import defaultdict from enum import IntEnum from io import TextIOBase from pathlib import Path from typing import ( Any, DefaultDict, D...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os from setuptools import setup, find_packages, Command class RunTestsCommand(Command): description = "Test command to run testr in virtualenv" user_options = [] def initialize_options(self): self.cwd = None def fina...
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init import random import numpy as np import dgl.multiprocessing as mp from dgl.multiprocessing import Queue def init_emb2pos_index(walk_length, window_size, batch_size): ''' select embedding of positive nodes from a batch of ...
for _ in range(int(input())): n, k = map(int, input().split()) print(k-1 if ((k-1)|k) <= n else k-2)
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/client/export.py # # 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, th...
""" Copyright 2018 EPAM Systems, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
""" Metrics ------- Some metrics to compare time series. """ import numpy as np from ..timeseries import TimeSeries from ..utils import _parallel_apply, _build_tqdm_iterator from ..utils.statistics import check_seasonality from ..logging import raise_if_not, get_logger, raise_log from warnings import warn from typing...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
# Copyright 2016 gRPC 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 applicable law or agreed to in writing...
from django.urls import path from . import views from django.views.decorators.csrf import csrf_exempt from django.conf.urls.static import static # from django.contrib.auth import views urlpatterns = [ path('', csrf_exempt(views.Login1.as_view()), name = 'login1'), path('index/', views.Index.as_view(), name = 'in...
import sys def inputli(): return list(map(int,input().split())) def inputls(): return input().split() def inputlf(): return list(map(float,input().split())) N = 500003 tree = [0] * (2 * N) def make_tree(arr) : for i in range(n) : tree[n + i] = arr[i] for i in range(n - 1, 0, -1) : ...
import mock import yaml import time from st2tests.base import BaseSensorTestCase from taskinfo_sensor import TaskInfoSensor from pyVim import connect from pyVmomi import vim from datetime import datetime, timedelta class TaskInfoSensorTestCase(BaseSensorTestCase): sensor_cls = TaskInfoSensor def setUp(self...
# -*- coding: utf-8 -*- __title__ = 'Create Formwork' __author__ = 'htl' from itertools import chain import sys import clr clr.AddReference('RevitAPI') import Autodesk import rpw from rpw.ui.forms import Button, CheckBox, FlexForm, Label, TextBox from Autodesk.Revit.DB import * from System.Collections.Generic import ...
import os env = os.environ FTP_URL = env.get('FTP_URL') FTP_USER = env.get('FTP_USER') FTP_PW = env.get('FTP_PW') FORECAST_INTERVAL = 3 DATABASE_URL = env.get('DATABASE_URL') TEST_DATABASE_URL = env.get('TEST_DATABASE_URL') EOSM_LOGIN = env.get('EOSM_LOGIN') ELEVATION_SERVICE_URL = env.get('ELEVATION_SERVICE_URL')
#!/usr/bin/python """ The main script of gess, the generator for synthetic streams of financial transactions. @author: Michael Hausenblas, http://mhausenblas.info/#i @since: 2013-11-07 @status: init """ import logging import os from fintrans import FinTransSource DEBUG = False CONFIG_FILE = 'gess.conf' if DE...
import numpy as np import matplotlib.pyplot as pl import pickle from epipack.plottools import plot import qsuite_config as cf import matplotlib.ticker as mtick with open('_qsuite/results_deleting_edges_30_N_meas_100/results_mean_std.p','rb') as f: data = pickle.load(f) means = data['means'] stds = data['stds'] d...
"""Representing suggested subjects.""" import abc import collections import itertools import numpy as np SubjectSuggestion = collections.namedtuple( 'SubjectSuggestion', 'uri label notation score') WeightedSuggestion = collections.namedtuple( 'WeightedSuggestion', 'hits weight subjects') class SuggestionFi...
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
# 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...
# Copyright 2017 Google 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 required by applicable law or ag...
""" Given an integer array arr. You have to sort the integers in the array in ascending order by the number of 1's in their binary representation and in case of two or more integers have the same number of 1's you have to sort them in ascending order. Return the sorted array. Constraints: * 1 <= arr.length <= 500 ...
# -*- coding: utf-8 -*- # Resource object code # # Created: Tue Jul 23 11:31:33 2013 # by: The Resource Compiler for PyQt (Qt v5.1.0) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x08\x67\ \x2f\ \x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\...
''' A linear regression learning algorithm example using TensorFlow library. This example constructs a simple linear model of Y = W * X + b, using a gradient descent optimizer to minize model error. Author: Aymeric Damien Project: https://github.com/aymericdamien/TensorFlow-Examples/ ''' from __future__ import print...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Test a Fast R-CNN network on an imdb (image database).""" from fast...
import secrets def generate_random_key(bytelen=32) -> str: assert bytelen % 2 == 0 return secrets.token_hex(int(bytelen / 2)) def generate_random_bytes(n=32) -> bytes: return secrets.SystemRandom().randbytes(n)
import json import sys from django.test import SimpleTestCase, ignore_warnings from django.utils import text from django.utils.deprecation import RemovedInDjango40Warning from django.utils.functional import lazystr from django.utils.text import format_lazy from django.utils.translation import gettext_lazy, override I...
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scatterternary.marker.colorbar", **kwargs, ): super(ShowticksuffixValidator, self).__init_...
# 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 # ...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myawesomeapp.settings") try: from django.core.management import execute_from_command_line except...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from flask import Flask, render_template app = Flask(__name__) # defining a route @app.route("/", methods=['GET', 'POST', 'PUT']) # decorator def home(): # route handler function # returning a response return render_template('index.html') app.run(debug=True)
""" Package containing modules which transform the internal representation of the sourcecode. """
"""empty message Revision ID: fe4457be0ef9 Revises: Create Date: 2021-03-18 16:23:27.279134 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'fe4457be0ef9' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
import sys import py from _pytest.assertion.util import BuiltinAssertionError class AssertionError(BuiltinAssertionError): def __init__(self, *args): BuiltinAssertionError.__init__(self, *args) if args: try: self.msg = str(args[0]) except py.builtin._sysex: ...
# -*- coding: utf-8 -*- from .wrap import * from .testPoint import *
import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from yt_dlp.extractor import gen_extractor_classes from yt_dlp.extractor.common import InfoExtractor NO_LOGIN = InfoExtractor._perform_login class TestNetRc(unittest.TestCase): def test_netrc_p...
import os import platform import importlib import numpy as np def test_system(): '''Print simple system info and some other junk, just to see if system has been set up and homeworks are from different machines.''' try: import mne except ImportError: raise ImportError('Nie masz biblio...
# -*- coding: utf-8 -*- """ @Time : 2018/2/9 16:18 @Author : Elvis """ """ focalLoss.py """ import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class FocalLoss(nn.Module): """ This criterion is a implemenation of Focal Loss, which is proposed in ...
# Tkinter import tkinter # the windows windows = tkinter.Tk() windows.title("My First GUI Programs") windows.minsize(width=480, height=480) # adding padding windows.config(padx=20, pady=20) # labels-> first create component(widget) my_label = tkinter.Label(text="my_label", font=("Arial", 24, "bold")) my_label["text"]...
import torch.nn as nn import math import torch.utils.model_zoo as model_zoo import torch def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv1d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) def conv5x5(in...
import requests import math import random import pytest @pytest.mark.parametrize('x_param', [random.uniform(15, 20) for i in range(13)]) def test_prolog(x_param): resp = requests.get("http://prolog:8000/prolog?x={}".format(x_param)) assert resp.status_code == 200 assert float(resp.json()["answer"]) - math.log...
import json from helper.kmfs import is_chapter def load_chapter(chapters, chapterfile): if is_chapter(chapterfile): with open(chapterfile, mode='r') as f: chapters[chapterfile] = json.load(f)
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Create models for *sick* """ from __future__ import division, print_function __all__ = ("create", ) __author__ = "Andy Casey <arc@ast.cam.ac.uk>" import cPickle as pickle import logging import os import yaml from time import strftime import numpy as np from astropy...
import re from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from instance.models import Instance from vrtManager.instance import wvmInstance WS_PORT = 6080 def console(request): """ VNC instance block """ if not ...
'''OpenGL extension NV.explicit_attrib_location This module customises the behaviour of the OpenGL.raw.GLES2.NV.explicit_attrib_location to provide a more Python-friendly API Overview (from the spec) This extension provides a method to pre-assign attribute locations to named vertex shader inputs. This allows a...
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2015, IBM Corp. # All rights reserved. # # Distributed under the terms of the BSD Simplified License. # # The full license is in the LICENSE file, distributed with this software. ...
import csv, os from datetime import datetime from pydriller import RepositoryMining, GitRepository from pydriller.domain.commit import ModificationType from extractor import Miner working_path = "projects/" repo_name = "bugzilla" repo_git = "https://github.com/bugzilla/bugzilla.git" extensions = [".pm", ".pl", ".js"]...
import setuptools import sys import os import subprocess _include_package_data = False _package_data={'apomock':['data/2mass-spitzer-wise-0.0001-z-0.0060-1e10-age-1.4e10.dat']} _PARSEC_ISO_GRID_NAME = '2mass-spitzer-wise-0.0001-z-0.0060-1e10-age-1.4e10.dat' _PARSEC_ISO_GRID_URL = 'https://www.astro.utoronto.ca/~lane/s...
''' (C) Gregory Way 2016 NF1 Inactivation Classifier for Glioblastoma cancer_cv.py Description: Classes to perform cross validation on pancan datasets Usage: Import only ''' class cancer_cv(object): """ A class to determine cross validation intervals for pancancer tissues with careful consideration to s...
from django.urls import re_path from .consumers import ChatConsumer websocket_urlpatterns = [ re_path(r'ws/chat/(?P<room_name>[^/]+)/$', ChatConsumer), ]
# -*- coding: utf-8 -*- # Copyright 2020 Quentin Gliech # # 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 -*- from qcloudsdkcore.request import Request class QueryBmTaskResultRequest(Request): def __init__(self): super(QueryBmTaskResultRequest, self).__init__( 'bmvpc', 'qcloudcliV1', 'QueryBmTaskResult', 'bmvpc.api.qcloud.com') def get_taskId(self): return self.ge...
""" weasyprint.css.computed_values ------------------------------ Convert *specified* property values (the result of the cascade and inhertance) into *computed* values (that are inherited). """ from collections import OrderedDict from urllib.parse import unquote from tinycss2.color3 import parse_col...
# Generated by Django 2.1.7 on 2019-03-09 19:42 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
#!/usr/bin/env python from setuptools import setup with open('requirements/base.in') as fp: install_requires = list(fp) setup( name='kibitzr_email', version='1.0.0', description="Email fetcher for Kibitzr", long_description="TBD", author="Peter Demin", author_email='kibitzrrr@email.com',...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Factories for ggrc models. These are factories for generating regular ggrc models. The factories create a model and log a post event with the model revision. These do not however trigger signals. For tes...
map_template = ( ( (0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), (0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), (0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), (0,0...
from .base import ApibpTest custom_schema_attribute = ( "&quot;description&quot;: &quot;This is a custom schema!&quot;," ) class AdvancedSchemaTest(ApibpTest): def test(self): response = self.get_response( "apiblueprint_view/tests/fixtures/15. Advanced JSON Schema.md" ) se...
# MIT License # # Copyright (c) 2019 Vasileios Sioros # # 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, m...
# Generated by Django 2.0.1 on 2018-01-26 21:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('card', '0007_auto_20180126_2114'), ] operations = [ migrations.AlterField( model_name='card', name='card_text', ...
# 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 # distributed under the...
from insights.core.context import HostContext from insights.core.dr import SkipComponent from insights.specs import Specs from insights.core.plugins import datasource from insights.core.spec_factory import DatasourceProvider from insights.client.apps.malware_detection import MalwareDetectionClient from insights.client....
import numpy as np from numba import jit, jit_module import pydantic from datetime import datetime from scipy import integrate import xarray as xr @jit(nopython=True) def gen_energy_grid(nbins, min_e=30., max_e=1000.): """Generate a grid of energies for the flux spectrum This function generates an energy ...
from django.apps import apps from django.utils.translation import ugettext_lazy as _ from mayan.apps.navigation.classes import Link from .icons import ( icon_message_create, icon_message_delete, icon_message_list, icon_message_mark_read, icon_message_mark_read_all, icon_message_mark_unread ) fro...
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django import forms class CreateUserForm(UserCreationForm): class Meta: model = User fields = ['username', 'email', 'password1', 'password2']
# Copyright 2009-2017 Ram Rachum. # This program is distributed under the MIT license. '''Testing package for `WeakKeyDefaultDict`.'''
from nose.tools import assert_equal from ....ut.bunch import bunchr from ....core.mod import mod from .. import name from .const import USERNAME_QUERY_RESULT, QUERY_RESULT BASE = { 'area': '日本', 'areaid': 2, 'attention': 372, 'bgmcount': '1', 'click': 20280, 'cover': 'http://i1.hdslb.com/sp/ef...
import warnings import os.path as osp from typing import Optional import torch from torch_sparse.storage import SparseStorage from torch_sparse.tensor import SparseTensor try: torch.ops.load_library( osp.join(osp.dirname(osp.abspath(__file__)), '_diag.so')) except OSError: warnings.warn('Failed to loa...
"""empty message Revision ID: f30cc5d13b95 Revises: 6df98408ed48 Create Date: 2021-08-01 00:26:06.428653 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f30cc5d13b95' down_revision = '6df98408ed48' branch_labels = None depends_on = None def upgrade(): op...
from numbers import Number from typing import * import nuke from . import * class ParticleChannels_Knob(Knob): """ ParticleChannels_Knob """ def __hash__(self, ): """ Return hash(self). """ return None def __init__(self, *args, **kwargs): """ Initi...
# coding: utf-8 """Align two images. Try to automatically calculate the warp matrix between two images and align those images accordingly. """ import cv2 import numpy as np def alignimages(im1, im2): """Automatically align two images.""" # Find size of image1 sz = im1.shape # Define the motion model # warp_mod...
import re import sys INT = "(0|[1-9][0-9]*)\\n" INTS = "((0|[1-9][0-9]*) )*(0|[1-9][0-9]*)\\n" line = sys.stdin.readline() assert re.match(INT, line) K = int(line) assert 1 <= K <= 10**6 line = sys.stdin.readline() assert re.match(INTS, line) xs = list(map(int, line.split())) assert len(xs) == K for x in xs: assert ...
#!/usr/bin/env python # Copyright 2016 by MPI-SWS and Data-Ken Research. # Licensed under the Apache 2.0 License. """Setup script for antevents distribution. Note that we only package up the python code. The tests, docs, and examples are all kept only in the full source repository. """ import sys sys.path.insert(0, 'a...
import logging from django.conf import settings from base.utils import send_email logger = logging.getLogger(__name__) def construct_and_send_worker_start_mail(challenge): if settings.DEBUG: return challenge_url = "https://{}/web/challenges/challenge-page/{}".format( settings.HOSTNAME, cha...
def connect(self, root): if not root: return root stack = [[root]] while True: children = [child for node in stack[-1] for child in (node.left, node.right) if child] if not children: break stack.append(children) for i in range(len(children) - 1): children[i].next ...
"""day03 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
import numpy as np # We will add the vector v to each row of the matrix x, # storing the result in the matrix y x = np.array([[1,2,3], [4,5,6], [7,8,9], [10, 11, 12]]) v = np.array([1, 0, 1]) y = np.empty_like(x) # Create an empty matrix with the same shape as x # Add the vector v to each row of the matrix x with a...
from onegov.event.collections.events import EventCollection from onegov.event.collections.occurrences import OccurrenceCollection __all__ = ( 'EventCollection', 'OccurrenceCollection', )
### Same architecture as an autoencoder, but without using tf.keras.sequential, so that we can look at sequences
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('councilmatic_core', '0001_initial'), ] operations = [ migrations.RenameField( model_name='bill', old...
#!/usr/bin/env python # Copyright 2020-2021 Cyberbotics 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 applica...
# Copyright 2013-2018 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 import * class RSnprelate(RPackage): """Genome-wide association studies (GWAS) are widely used to investi...
#!/usr/bin/env python3 """ Licensed under MIT License, (c) B. Kerler 2018-2019 """ default_vid_pid = [ [0x2c7c, 0x0125, -1], # Quectel EC25 [0x1199, 0x9071, -1], # Sierra Wireless [0x1199, 0x9091, -1], # Sierra Wireless [0x0846, 0x68e2, 2], # Netgear [0x05C6, 0x9008, -1], # QC EDL [0x05C6,...
#!python3 import json import requests from pprint import pprint r = requests.get( "https://us.api.battle.net/wow/character/Cenarion%20Circle/Ardy?fields=mounts&locale=en_US&apikey=" ) data = json.loads(r.text) for item in data["mounts"]: pprint(item) # Only the first level is printed. for item in data["mo...
""" Django settings for instagram project. Generated by 'django-admin startproject' using Django 3.1.2. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathl...
import tvm import tvm.contrib.sparse as tvmsp import tvm.ndarray as _nd import numpy as np from collections import namedtuple def test_static_tensor(): dtype = 'float32' stype = 'csr' target = 'llvm' ctx = tvm.context(target, 0) m = tvm.var('m') n = tvm.var('n') A = tvmsp.placeholder(shape=...
from setuptools import find_packages from setuptools import setup setup( name='launch_ros', version='0.7.1', packages=find_packages(exclude=['test']), install_requires=[ 'setuptools', 'ament_index_python', 'launch', 'osrf_pycommon', 'pyyaml', ], zip_safe=...
import sys if sys.version_info < (3, 7): from ._domain import Domain from ._hoverlabel import Hoverlabel from ._insidetextfont import Insidetextfont from ._legendgrouptitle import Legendgrouptitle from ._marker import Marker from ._stream import Stream from ._textfont import Textfont fr...
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License as published by ...
# Copyright 2021 Huawei Technologies Co., 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 law or a...
from skyfield.api import load from skyfield.magnitudelib import planetary_magnitude def test_magnitudes(): ts = load.timescale() #t = ts.utc(1995, 5, 22) # Rings edge-on from Earth. t = ts.utc(2021, 10, 4) eph = load('de421.bsp') names = [ 'mercury', 'venus', 'mars', 'jupiter barycenter', ...
from django.db import models CHOICES = ( ('Gray', 'Серый'), ('Black', 'Чёрный'), ('White', 'Белый'), ('Ginger', 'Рыжий'), ('Mixed', 'Смешанный'), ) class Owner(models.Model): first_name = models.CharField(max_length=128) last_name = models.CharField(max_length=128) def __str__(self)...
"""Test cases for the console module.""" from unittest.mock import Mock from click.testing import CliRunner import pytest from anu.cli import main @pytest.fixture def runner() -> CliRunner: """Fixture for invoking command-line interfaces.""" return CliRunner() def test_main_succeeds(runner: CliRunner, moc...