code
stringlengths
10
805k
def_use_chains
listlengths
0
667
""" Open Nodes web server Copyright (c) 2018 Opennodes / Blake Bjorn Anderson 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, c...
[ [ [ 1114, 1118 ], [ 3171, 3175 ] ], [ [ 1126, 1130 ], [ 2046, 2050 ], [ 3808, 3812 ], [ 7039, 7043 ], [ 8412, 8416 ], [ 10291, 10295 ], [ 1321...
#!/usr/bin/python import hashlib, re, sys, os, base64, time, random, hmac # stripped down from https://github.com/vbuterin/pybitcointools/blob/master/bitcoin/main.py ### Elliptic curve parameters P = 2**256-2**32-2**9-2**8-2**7-2**6-2**4-1 N = 1157920892373161954235709850086879078528375642790749043826051631415181614...
[ [ [ 25, 32 ], [ 8700, 8707 ], [ 9716, 9723 ], [ 9764, 9771 ], [ 9832, 9839 ], [ 9880, 9887 ], [ 9938, 9945 ] ], [ [ 34, 36 ] ], [ [ 38, ...
# # ovirt-engine-setup -- ovirt engine setup # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # """ovirt-host-setup vmconsole_proxy plugin.""" from otopi import util from . import config from . import pki from . import system @util.export def createPlugins(context): config.Plugin(context=c...
[ [ [ 184, 188 ], [ 253, 257 ] ], [ [ 204, 210 ], [ 297, 303 ] ], [ [ 225, 228 ], [ 332, 335 ] ], [ [ 243, 249 ], [ 364, 370 ] ], [ [ ...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
[ [ [ 787, 794 ], [ 838, 845 ] ], [ [ 825, 829 ], [ 885, 889 ], [ 1104, 1108 ] ], [ [ 832, 835 ] ], [ [ 874, 884 ] ], [ [ 1097, 1103 ] ] ]
#!/usr/bin/python # -*- coding: utf-8 -*- ########################################################### # KivyCalendar (X11/MIT License) # Calendar & Date picker widgets for Kivy (http://kivy.org) # https://bitbucket.org/xxblx/kivycalendar # # Oleg Kozlov (xxblx), 2015 # https://xxblx.bitbucket.org/ ###################...
[ [ [ 383, 390 ], [ 1001, 1008 ] ], [ [ 426, 439 ], [ 8179, 8192 ] ], [ [ 441, 447 ], [ 4273, 4279 ] ], [ [ 475, 480 ], [ 2622, 2627 ] ], [ ...
""" Utilities for API Gateway response formatting """ import json def format_response(data, status=200): return { 'body': json.dumps(data), 'headers': { 'Content-Type': 'application/json' }, 'statusCode': int(status) } def format_error(msg, code='BadRequest', stat...
[ [ [ 61, 65 ], [ 136, 140 ] ], [ [ 72, 87 ], [ 468, 483 ] ], [ [ 279, 291 ] ] ]
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
[ [ [ 830, 841 ], [ 2509, 2520 ] ], [ [ 849, 853 ], [ 42682, 42686 ], [ 44304, 44308 ] ], [ [ 861, 863 ], [ 23011, 23013 ] ], [ [ 871, 875 ], ...
from pathlib import Path import json # Directory dir = Path().resolve() # Configuration with open(dir/'config.json') as config_file: CONFIG = json.load(config_file) def output_dir(config = CONFIG): """ Return string for default output directory path. """ return(config['output_dir']['path'])
[ [ [ 20, 24 ], [ 58, 62 ] ], [ [ 32, 36 ], [ 151, 155 ] ], [ [ 52, 55 ], [ 103, 106 ] ], [ [ 125, 136 ], [ 161, 172 ] ], [ [ 142, ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from scipy.ndimage import map_coordinates from scipy.ndimage.interpolation import shift from scipy.optimize import curve_fit, ...
[ [ [ 48, 63 ] ], [ [ 87, 95 ] ], [ [ 119, 133 ] ], [ [ 157, 173 ] ], [ [ 182, 193 ], [ 1831, 1833 ], [ 2170, 2172 ], [ 2177, 2179 ], [ ...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import A...
[ [ [ 226, 234 ], [ 581, 589 ] ], [ [ 242, 246 ], [ 17411, 17415 ] ], [ [ 276, 289 ], [ 5645, 5658 ], [ 7224, 7237 ], [ 23319, 23332 ], [ 25...
''' Description: Shuffle a set of numbers without duplicates. Example: // Init an array with set 1, 2, and 3. int[] nums = {1,2,3}; Solution solution = new Solution(nums); // Shuffle the array [1,2,3] and return its result. Any permutation of [1,2,3] must equally likely to be returned. solution.shuffle(); // Rese...
[ [ [ 636, 640 ], [ 715, 719 ], [ 861, 865 ], [ 1067, 1071 ] ], [ [ 660, 667 ], [ 1159, 1166 ] ], [ [ 675, 683 ], [ 1811, 1819 ] ], [ [ ...
# Copyright (c) 2019-2021, NVIDIA 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 agre...
[ [ [ 721, 732 ], [ 11875, 11877 ], [ 11992, 11994 ], [ 13500, 13502 ], [ 13662, 13664 ], [ 2624, 2626 ], [ 2665, 2667 ], [ 4347, 4349 ], [ 4785, ...
# Given a binary tree, find its maximum depth. # The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. # Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None cla...
[ [ [ 207, 215 ] ], [ [ 323, 331 ] ] ]
import os def shell(): inputuser = input("> ") if (inputuser == "exit"): exit() os.system(inputuser) return shell() print("Welcome to duckshell (python alpha)") print("System info: ") os.system("echo distro: $(uname -o)"); os.system("echo hostname: $(uname -n)"); os.system("echo architecture: ...
[ [ [ 7, 9 ], [ 210, 212 ], [ 249, 251 ], [ 290, 292 ], [ 335, 337 ], [ 380, 382 ], [ 101, 103 ] ], [ [ 15, 20 ], [ 434, 439 ], [ ...
import logging import subprocess import click try: from instance import settings APP_ROOT = settings.APP_ROOT except ImportError: logging.error('Ensure __init__.py and settings.py both exist in instance/') exit(1) except AttributeError: from config import settings APP_ROOT = settings.APP_ROO...
[ [ [ 7, 14 ], [ 145, 152 ] ], [ [ 22, 32 ], [ 625, 635 ] ], [ [ 41, 46 ], [ 381, 386 ], [ 398, 403 ] ], [ [ 78, 86 ], [ 103, 111 ...
import os import time from multiprocessing import Process from typing import Tuple import flwr as fl import numpy as np import tensorflow as tf from flwr.server.strategy import FedAvg import dataset # generate random integer values from random import seed from random import randint # Make TensorFlow log less verbos...
[ [ [ 7, 9 ], [ 322, 324 ], [ 415, 417 ] ], [ [ 17, 21 ], [ 3720, 3724 ] ], [ [ 50, 57 ], [ 3471, 3478 ], [ 3914, 3921 ] ], [ [ 77, ...
#!/usr/bin/env python3 elements = (1, 2, 4) bitset = 0 # 1. Initialize bitset # Add elements to bitset for i in elements: bitset = bitset | 1<<i # 2. Add element to bitset # Print contents of bitset print(bitset) # Test for elements in bitset for i in range(6): if bitset & ...
[ [ [ 24, 32 ], [ 139, 147 ], [ 431, 439 ] ], [ [ 45, 51 ], [ 162, 168 ], [ 246, 252 ], [ 311, 317 ], [ 454, 460 ], [ 543, 549 ] ], ...
''' The management of salt command line utilities are stored in here ''' # Import python libs import os import sys # Import salt components import salt.cli.caller import salt.cli.cp import salt.cli.key import salt.cli.batch import salt.client import salt.output import salt.runner import optparse from salt.utils impo...
[ [ [ 102, 104 ], [ 4940, 4942 ], [ 5009, 5011 ], [ 5082, 5084 ], [ 5160, 5162 ], [ 5869, 5871 ] ], [ [ 112, 115 ] ], [ [ 149, 164 ] ], [ [ ...
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
[ [ [ 802, 808 ], [ 2014, 2020 ], [ 2586, 2592 ], [ 2571, 2577 ], [ 3959, 3965 ], [ 4758, 4764 ], [ 4743, 4749 ], [ 5668, 5674 ], [ 5743, 5749...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 排序算法: O(n^2) 冒泡排序 插入排序 选择排序 Q(n log n) 分而治之 快速排序 归并排序 """
[]
from logging import getLogger from typing import ( List, Optional, Set, ) from pydantic import ( BaseModel, Extra, Field, ) from galaxy import exceptions from galaxy.datatypes.registry import Registry from galaxy.managers.collections import DatasetCollectionManager from galaxy.managers.collect...
[ [ [ 20, 29 ], [ 1062, 1071 ] ], [ [ 55, 59 ], [ 2303, 2307 ], [ 2478, 2482 ] ], [ [ 65, 73 ], [ 1724, 1732 ], [ 1759, 1767 ], [ 7931, ...
# Generated by Django 2.2.10 on 2020-03-04 23:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dcim', '0101_auto_20200304_1403'), ] operations = [ migrations.CreateModel( name='ApplicationType', fields=[ ...
[ [ [ 72, 82 ], [ 109, 119 ], [ 233, 243 ] ], [ [ 84, 90 ], [ 337, 343 ], [ 438, 444 ], [ 520, 526 ], [ 594, 600 ], [ 667, 673 ], ...
# -*- coding:utf-8 -*- """Test function for vega.run""" import unittest def lazy(func): """lazy function wrapper :param func: function name """ attr_name = "_lazy_" + func.__name__ def lazy_func(*args, **kwargs): """Wrapper of lazy func :param args: any object :param kwa...
[ [ [ 63, 71 ], [ 692, 700 ] ], [ [ 78, 82 ], [ 531, 535 ] ], [ [ 540, 548 ], [ 887, 895 ], [ 927, 935 ] ], [ [ 679, 691 ] ] ]
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. """ Almost every FBCodeBuilder string is ultimately passed to a shell. Escaping too little or too much tends to be the most common error. The utilities in this file give a systematic way of avoiding such bugs: - When you write literal strings ...
[ [ [ 702, 704 ], [ 2955, 2957 ] ], [ [ 729, 739 ], [ 807, 817 ] ], [ [ 795, 806 ], [ 1198, 1209 ], [ 1280, 1291 ], [ 1961, 1972 ], [ 2194, ...
"""Assortment of utilities. """ from datetime import datetime from hashlib import sha256, md5 import random import re import string import unicodedata epoch = datetime.utcfromtimestamp(0) def unix_time(dt=None): """Returns the UNIX time representation for a given date or current UTC.""" dt = dt or datetim...
[ [ [ 54, 62 ], [ 163, 171 ], [ 313, 321 ], [ 504, 512 ], [ 788, 796 ], [ 875, 883 ], [ 1118, 1126 ], [ 1267, 1275 ], [ 1383, 1391 ] ], ...
"""Copyright (c) 2021, Deep Net. 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 agreed to in...
[ [ [ 582, 589 ] ] ]
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
[ [ [ 53, 58 ], [ 166, 171 ] ], [ [ 60, 67 ], [ 175, 182 ], [ 207, 214 ], [ 233, 240 ], [ 267, 274 ], [ 294, 301 ], [ 328, 335 ], ...
from __future__ import annotations import typing as t from functools import singledispatch from inflection import underscore from sqlalchemy import Date from sqlalchemy import DateTime from sqlalchemy import Text from sqlalchemy import Time from sqlalchemy import Unicode from sqlalchemy import UnicodeText from sqlalc...
[ [ [ 23, 34 ] ], [ [ 43, 54 ], [ 3237, 3238 ], [ 3530, 3531 ], [ 3520, 3521 ], [ 3738, 3739 ], [ 3749, 3750 ], [ 4492, 4493 ], [ 4464, 44...
from .__main__ import create_app application = create_app()
[ [ [ 22, 32 ], [ 48, 58 ] ], [ [ 34, 45 ] ] ]
# Copyright 2020 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 agreed to...
[ [ [ 729, 745 ], [ 4374, 4390 ], [ 5946, 5962 ], [ 2963, 2979 ] ], [ [ 747, 761 ], [ 4396, 4410 ], [ 5968, 5982 ], [ 2985, 2999 ] ], [ [ 79...
from features.arduino_features import BlackrockSerialDIORowByte, SerialDIORowByte from riglib import experiment class par(object): def init(self): pass class F(BlackrockSerialDIORowByte, par): pass f = F() f.init()
[ [ [ 38, 63 ], [ 174, 199 ] ], [ [ 65, 81 ] ], [ [ 101, 111 ] ], [ [ 119, 122 ], [ 201, 204 ] ], [ [ 172, 173 ], [ 221, 222 ] ], [ [ ...
import logging import chevron import re from itertools import dropwhile import snex.util as util logger = logging.getLogger(__name__) DEFAULT = { # :snippet global-default-config lang: python "output_template": "```{{lang}}\n{{{snippet}}}\n```\n", "valid_param_keys": ["name", "lang", "lnum", "fname", "pat...
[ [ [ 7, 14 ], [ 107, 114 ] ], [ [ 22, 29 ], [ 1702, 1709 ] ], [ [ 37, 39 ], [ 2231, 2233 ], [ 2286, 2288 ], [ 2378, 2380 ], [ 2425, 2...
__all__ = ('modulize',) import sys from types import FunctionType, GetSetDescriptorType, MappingProxyType, ModuleType from .docs import has_docs NoneType = type(None) try: from _weakref import ref as WeakrefType except ImportError: from weakref import ref as WeakrefType # This 2 type can be function Wrapp...
[ [ [ 0, 7 ] ], [ [ 32, 35 ], [ 4172, 4175 ], [ 4276, 4279 ] ], [ [ 54, 66 ], [ 505, 517 ], [ 607, 619 ], [ 1529, 1541 ], [ 3044, 3056...
import shutil import tempfile from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.core.cache import cache from django.contrib.auth import get_user_model from django.test import Client, TestCase, override_settings from django.urls import reverse from django import...
[ [ [ 7, 13 ], [ 3404, 3410 ] ], [ [ 21, 29 ], [ 412, 420 ] ], [ [ 55, 63 ], [ 433, 441 ] ], [ [ 107, 125 ], [ 2856, 2874 ] ], [ [ 1...
from sqlalchemy import Column from sqlalchemy import Integer from alembic import command from alembic import op from alembic.testing import config from alembic.testing.env import _no_sql_testing_config from alembic.testing.env import clear_staging_env from alembic.testing.env import staging_env from alembic.testing.en...
[ [ [ 23, 29 ], [ 1662, 1668 ], [ 1892, 1898 ], [ 2199, 2205 ], [ 2592, 2598 ], [ 7804, 7810 ] ], [ [ 53, 60 ], [ 1675, 1682 ], [ 1905, 19...
# Copyright 2017 The Bazel 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 applicable la...
[ [ [ 724, 749 ], [ 1227, 1252 ] ], [ [ 1186, 1210 ], [ 3846, 3870 ] ], [ [ 1259, 1276 ], [ 2189, 2206 ] ], [ [ 2156, 2172 ], [ 3880, 3896 ] ], ...
import strax import straxen import wfsim def test_nt_context(register=None, context=None): """ Test a context if it is properly setup. To this end, we perform a simple scan of the field "time" since all plugins should have this field, if there is some option specified badly, we will quickly f...
[ [ [ 7, 12 ], [ 757, 762 ], [ 872, 877 ] ], [ [ 21, 28 ], [ 541, 548 ], [ 635, 642 ] ], [ [ 37, 42 ] ], [ [ 52, 67 ] ] ]
import glob import datetime import inference import numpy as np flist = [] def run_classifier(): flist = [] list1 = glob.glob("./images/*.jpg") list1.sort() print("Printing the time of Interesting Events.....\n\n") temp = str(inference.run_inference_on_image()) for i in r...
[ [ [ 7, 11 ], [ 132, 136 ] ], [ [ 19, 27 ], [ 647, 655 ], [ 1370, 1378 ], [ 1470, 1478 ] ], [ [ 35, 44 ], [ 266, 275 ], [ 358, 367 ...
import re import sys import inspect _py2 = sys.version_info[0] == 2 _py3 = sys.version_info[0] == 3 # noinspection PyPep8Naming class route(object): def __init__(self, rule, **options): """ Class Initializer - This will only execute if using BottleCBV's original route() style. """ ...
[ [ [ 7, 9 ], [ 8944, 8946 ], [ 8994, 8996 ] ], [ [ 17, 20 ], [ 44, 47 ], [ 76, 79 ] ], [ [ 28, 35 ], [ 5728, 5735 ], [ 6501, 6508 ...
#!/usr/bin/python # # Logic for computing missing and duplicate files using Postgresql DB. # import os import fnmatch # from shutil import copy2 # from shutil import copyfile from dbutils import required as db MISSING_FROM_COMP_FOLDER = "missing_from_comp" MISSING_FROM_SRC_FOLDER = "missing_from_source" FILE_NAME_C...
[ [ [ 102, 104 ], [ 3743, 3745 ], [ 3758, 3760 ], [ 3793, 3795 ], [ 3805, 3807 ], [ 4094, 4096 ] ], [ [ 112, 119 ] ], [ [ 198, 212 ], [ 751,...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ [ [ 588, 593 ], [ 618, 623 ] ], [ [ 602, 617 ], [ 1274, 1289 ] ] ]
"""Decoder portion of the model.""" import torch import torch.nn.functional as F from torch import nn def _build_base_decoder(): """Builds the base decoder shared by all three decoder types.""" return nn.Sequential(nn.Conv2d(in_channels=1280, out_channels=256, kernel_size=(3, 3), stride=1, padding=1), ...
[ [ [ 44, 49 ], [ 2240, 2245 ] ], [ [ 57, 81 ], [ 1477, 1478 ], [ 1714, 1715 ], [ 1946, 1947 ] ], [ [ 100, 102 ], [ 401, 403 ], [ 212, ...
class Queue: """ A class used to represent an Queue for for storing processes ... Attributes ---------- processList : list The list which would store the process currently in line for execution priority : str The type of process (Foreground,Background etc) Sch...
[ [ [ 6, 11 ] ] ]
import numpy as np import editdistance class Decoder(): def __init__(self, vocab): self.vocab_list = [char for char in vocab] def predict(self, batch_size, logits, y, lengths, y_lengths, n_show=5): decoded = self.decode(logits, lengths) cursor = 0 gt = [] n = min(n_sh...
[ [ [ 7, 18 ], [ 1674, 1676 ] ], [ [ 26, 38 ], [ 840, 852 ], [ 1044, 1056 ] ], [ [ 47, 54 ] ] ]
# MIT License # # Copyright (c) 2018-2019 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, m...
[ [ [ 1159, 1165 ], [ 3289, 3295 ] ], [ [ 1173, 1183 ], [ 2083, 2093 ], [ 2191, 2201 ], [ 2475, 2485 ], [ 2537, 2547 ], [ 3331, 3341 ], [ 3509, ...
from django.db import models from accounts.models import Account from store.models import Product, Variation # Create your models here. class Payment(models.Model): user = models.ForeignKey(Account, on_delete=models.CASCADE) payment_id = models.CharField(max_length=100) payment_method = models.CharField(m...
[ [ [ 22, 28 ], [ 152, 158 ], [ 178, 184 ], [ 215, 221 ], [ 248, 254 ], [ 302, 308 ], [ 353, 359 ], [ 399, 405 ], [ 449, 455 ], [ ...
from __future__ import absolute_import import os from celery import Celery from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Clout9.settings.production") app = Celery('Clout9') # Using a string here means the worker wil...
[ [ [ 23, 38 ] ], [ [ 46, 48 ], [ 176, 178 ] ], [ [ 68, 74 ], [ 260, 266 ] ], [ [ 99, 107 ] ], [ [ 254, 257 ], [ 374, 377 ], [ 482, ...
# blog/asgi.py import os import django os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blog.settings") from django.conf import settings django.setup() from django.core.asgi import get_asgi_application from channels.security.websocket import OriginValidator from channels.auth import AuthMiddlewareStack from channels.r...
[ [ [ 22, 24 ], [ 40, 42 ] ], [ [ 32, 38 ], [ 138, 144 ] ], [ [ 129, 137 ], [ 844, 852 ] ], [ [ 182, 202 ], [ 576, 596 ] ], [ [ 243,...
valor = 0 num = [[],[]] for c in range (0,7): valor = int(input(f'Digite o {c+1}° valor:')) if valor % 2 == 0: num[0].append(valor) else: num[1].append(valor) print('-='*30) print(f'Os numeros pares foram {num[0]}\nOs numeros ímpares foram {num[1]}.')
[ [ [ 0, 5 ] ], [ [ 10, 13 ], [ 128, 131 ], [ 167, 170 ], [ 235, 238 ], [ 271, 274 ] ], [ [ 29, 30 ], [ 81, 82 ] ], [ [ 51, 56 ...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
[ [ [ 714, 721 ], [ 5031, 5038 ] ], [ [ 737, 746 ] ], [ [ 770, 776 ], [ 4481, 4487 ], [ 4819, 4825 ] ], [ [ 819, 826 ] ], [ [ 881, 888 ] ], ...
import os import time from membound_cases import memory_bound_cases_list from utils import (arch_name, datatime_with_format, dtype2str, dump2json, geometric_mean, md_table_header, scaled_repeat_times, size2str) import taichi as ti class MemoryBound: suite_name = 'memoryboun...
[ [ [ 7, 9 ], [ 1158, 1160 ], [ 1206, 1208 ], [ 1563, 1565 ], [ 2415, 2417 ], [ 3010, 3012 ] ], [ [ 17, 21 ], [ 4620, 4624 ] ], [ [ 50, ...
from flask_security.utils import hash_password from flask_smorest import Blueprint, abort from ..models.user import User from ..schemas.paging import PageInSchema, paginate from ..schemas.user import UserPageOutSchema, UserSchema from .methodviews import ProtectedMethodView blueprint = Blueprint('users', 'user') @b...
[ [ [ 33, 46 ], [ 785, 798 ], [ 1585, 1598 ] ], [ [ 73, 82 ], [ 289, 298 ] ], [ [ 84, 89 ], [ 1136, 1141 ], [ 1416, 1421 ], [ 1821, 18...
# -*- coding: utf-8 -*- """ Created on Fri Dec 22 18:44:02 2017 @author: Tirthajyoti Sarkar Simple selection sort with counter for total number of operations (finding minimum and swapping) Accepts user input on minimum and maximum bound of the array and the size of the array. """ import random def find_min(array): ...
[ [ [ 288, 294 ], [ 1733, 1739 ] ], [ [ 300, 308 ], [ 747, 755 ] ], [ [ 476, 490 ], [ 1892, 1906 ] ], [ [ 1472, 1476 ], [ 1748, 1752 ] ], [ ...
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompar...
[ [ [ 249, 268 ], [ 331, 350 ] ], [ [ 293, 301 ], [ 638, 646 ] ], [ [ 310, 330 ] ] ]
import boto3 import pickle import logging from datetime import date from pyspark.sql.functions import udf from pyspark.sql.types import ArrayType, StringType from generate_common_words import dump_pickle import config as conf ''' Assign Top 500 Stackoverflow tags to job postings ''' # ===== Logger Configs ===== TS = da...
[ [ [ 7, 12 ], [ 575, 580 ] ], [ [ 20, 26 ], [ 610, 616 ] ], [ [ 34, 41 ], [ 359, 366 ], [ 406, 413 ], [ 425, 432 ], [ 499, 506 ] ...
""" WSGI config for simplerest 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/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
[ [ [ 234, 236 ], [ 289, 291 ] ], [ [ 267, 287 ], [ 375, 395 ] ], [ [ 361, 372 ] ] ]
import json import os from mako.template import Template from models.pomodoro_model import PomodoroModel from datetime import datetime class ExportPomsResource: def on_get(self, req, resp): """Handles GET requests""" resp.content_type = 'text/html' dir_path = os.path.dirname(os.path.real...
[ [ [ 7, 11 ], [ 1730, 1734 ] ], [ [ 19, 21 ], [ 292, 294 ], [ 308, 310 ] ], [ [ 48, 56 ], [ 366, 374 ] ], [ [ 91, 104 ], [ 755, 7...
import csv import json def read_data_file(filename): all_records = [] with open(filename, mode='r') as csv_file: csv_reader = csv.reader(csv_file) row_count = 0 for row in csv_reader: all_records.append(row) return all_records def parse_play_fields(play_fields): pla...
[ [ [ 7, 10 ], [ 143, 146 ] ], [ [ 18, 22 ], [ 3454, 3458 ] ], [ [ 28, 42 ] ], [ [ 281, 298 ], [ 2900, 2917 ] ], [ [ 696, 712 ], [ 3...
from rubicon.java.android_events import Handler, PythonRunnable from rubicon.java.jni import java from travertino.size import at_least from ..libs.android import R__color from ..libs.android.graphics import BitmapFactory, Rect from ..libs.android.view import Gravity, OnClickListener, View__MeasureSpec from ..libs.andr...
[ [ [ 40, 47 ], [ 8059, 8066 ] ], [ [ 49, 63 ], [ 8074, 8088 ] ], [ [ 93, 97 ], [ 2120, 2124 ], [ 2632, 2636 ], [ 2943, 2947 ] ], [ [ 12...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # # Copyright (C) 2021 Graz University of Technology. # # Invenio-Records-Marc21 is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Permissions for Invenio Marc21 Records.""" ...
[ [ [ 372, 379 ], [ 1079, 1086 ], [ 1114, 1121 ], [ 1144, 1151 ], [ 1171, 1178 ], [ 1200, 1207 ], [ 1234, 1241 ], [ 1261, 1268 ], [ 1296, 1303...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "animalRescue.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that...
[ [ [ 29, 31 ], [ 75, 77 ] ], [ [ 39, 42 ], [ 800, 803 ] ], [ [ 200, 225 ], [ 774, 799 ] ], [ [ 463, 469 ] ] ]
import http.server import threading import testPackage class MyHTTPRequestHandler(http.server.BaseHTTPRequestHandler): def _set_headers(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() def do_GET(self): self._set_headers() ...
[ [ [ 7, 18 ], [ 83, 87 ], [ 1047, 1051 ] ], [ [ 26, 35 ], [ 824, 833 ], [ 886, 895 ] ], [ [ 43, 54 ], [ 1300, 1311 ], [ 525, 536 ...
import sys from datetime import datetime from app import filters from app.misc.execute import run def main(args: list[str]): from app.handlers import dp # Сохраняем нынешнее время для подсчёта времени безотказной работы dp.bot['start_time'] = datetime.now() dp['args'] = args run(dp) if __name_...
[ [ [ 7, 10 ], [ 366, 369 ] ], [ [ 32, 40 ], [ 259, 267 ] ], [ [ 58, 65 ], [ 341, 348 ] ], [ [ 95, 98 ], [ 300, 303 ] ], [ [ 105, ...
import cv2 import threading class RecordingThread (threading.Thread): def __init__(self, name, camera): threading.Thread.__init__(self) self.name = name self.isRunning = True self.cap = camera fourcc = cv2.VideoWriter_fourcc(*'MJPG') self.out = cv2.VideoWriter('./st...
[ [ [ 7, 10 ], [ 248, 251 ], [ 299, 302 ], [ 736, 739 ], [ 1098, 1101 ] ], [ [ 18, 27 ], [ 52, 61 ], [ 117, 126 ] ], [ [ 35, 50 ],...
from __future__ import absolute_import import datetime import os from socket import error as SocketError, timeout as SocketTimeout import socket import sys import warnings from .exceptions import ( NewConnectionError, ConnectTimeoutError, SubjectAltNameWarning, SystemTimeWarning, ) from .packages impo...
[ [ [ 23, 38 ] ], [ [ 47, 55 ], [ 1337, 1345 ], [ 7767, 7775 ] ], [ [ 63, 65 ], [ 6863, 6865 ], [ 6935, 6937 ] ], [ [ 85, 105 ], [ 4592,...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import shutil import subprocess from pre_wigs_validation.enums import ValidationEnforcement, ValidationResult from pre_wigs_validation.instance import ValidationInstance from pre_wigs_validation.dataclasses impo...
[ [ [ 115, 121 ], [ 1397, 1403 ], [ 1604, 1610 ] ], [ [ 129, 139 ], [ 2260, 2270 ], [ 2366, 2376 ], [ 2405, 2415 ] ], [ [ 179, 200 ], [ 560,...
from numpy.random import RandomState from typing import Any, Optional, List from numpy import arange from copy import deepcopy from pydeeprecsys.rl.neural_networks.dueling import DuelingDDQN from pydeeprecsys.rl.experience_replay.priority_replay_buffer import ( PrioritizedExperienceReplayBuffer, ) from pydeeprecsys...
[ [ [ 25, 36 ], [ 1476, 1487 ], [ 1462, 1473 ] ], [ [ 56, 59 ], [ 3331, 3334 ], [ 3311, 3314 ], [ 3689, 3692 ], [ 3681, 3684 ], [ 3801, 38...
#grad_cam #[keras-grad-cam/grad-cam.py](https://github.com/jacobgil/keras-grad-cam/blob/master/grad-cam.py) from keras.applications.vgg16 import (VGG16, preprocess_input, decode_predictions) from keras.models import Model from keras.preprocessing import image from keras.layers.core import Lambda from keras.models impo...
[ [ [ 147, 152 ], [ 4881, 4886 ], [ 2626, 2631 ] ], [ [ 154, 170 ], [ 1286, 1302 ] ], [ [ 172, 190 ], [ 5288, 5306 ] ], [ [ 217, 222 ], [ ...
import os import hashlib from constants import TEX_DIR from constants import TEX_TEXT_TO_REPLACE from constants import TEX_USE_CTEX from constants import TEX_FIX_SVG def tex_hash(expression, template_tex_file_body): id_str = str(expression + template_tex_file_body) hasher = hashlib.sha256() hasher.updat...
[ [ [ 8, 10 ], [ 689, 691 ], [ 799, 801 ], [ 1142, 1144 ], [ 1320, 1322 ], [ 1847, 1849 ], [ 2595, 2597 ], [ 2834, 2836 ], [ 3082, 3084 ] ...
from django.forms.models import model_to_dict from django.test import TestCase from ..forms import EmailChangePasswordForm, ProfileForm from .factories import StaffFactory, UserFactory class BaseTestProfileForm(TestCase): def form_data(self, user, **values): fields = ProfileForm.Meta.fields data ...
[ [ [ 32, 45 ], [ 322, 335 ] ], [ [ 70, 78 ], [ 214, 222 ], [ 2972, 2980 ] ], [ [ 100, 123 ], [ 3107, 3130 ], [ 3257, 3280 ] ], [ [ 125,...
from daoRefactor2 import DAO from rssTickerInfo import rssTickerInfo import json import boto3 table = 'CompanyRSSFeed' dao = DAO(table) def main(): tickerValues = dao.getRssTickerValues('UNP') print(tickerValues) if __name__ == "__main__": # calling main function main()
[ [ [ 25, 28 ], [ 132, 135 ] ], [ [ 56, 69 ] ], [ [ 78, 82 ] ], [ [ 91, 96 ] ], [ [ 100, 105 ], [ 136, 141 ] ], [ [ 126, 129 ], [ ...
############################################################################## # Copyright (c) 2015 Orange # guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompani...
[ [ [ 528, 535 ], [ 539, 546 ], [ 830, 837 ], [ 1124, 1131 ], [ 2115, 2122 ] ], [ [ 561, 581 ] ], [ [ 852, 872 ] ], [ [ 1146, 1153 ], [ ...
"""Random walk routines """ from .._ffi.function import _init_api from .. import backend as F from ..base import DGLError from .. import ndarray as nd from .. import utils __all__ = [ 'random_walk', 'pack_traces'] def random_walk(g, nodes, *, metapath=None, length=None, prob=None, restart_prob=None): """...
[ [ [ 57, 66 ], [ 10331, 10340 ] ], [ [ 82, 94 ], [ 5265, 5266 ], [ 5781, 5782 ], [ 5849, 5850 ], [ 6197, 6198 ], [ 6700, 6701 ], [ 6750, ...
import vdomr as vd import spikeforest as sf from cairio import client as ca import pandas as pd import numpy as np from matplotlib import pyplot as plt class AccuracyPlot(vd.components.Pyplot): def __init__(self, snrs, accuracies): vd.components.Pyplot.__init__(self) self._snrs = snrs self...
[ [ [ 7, 18 ], [ 173, 175 ], [ 443, 445 ], [ 1398, 1400 ], [ 246, 248 ], [ 498, 500 ], [ 1248, 1250 ], [ 1281, 1283 ], [ 1301, 1303 ], ...
import sys import unittest from unittest import mock from warnings import catch_warnings from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.item import ABCMeta, DictItem, Field, Item, ItemMeta PY36_PLUS = (sys.version_info.major >= 3) and (sys.version_info.minor >= 6) class ItemTest(unittest.TestCa...
[ [ [ 7, 10 ], [ 225, 228 ], [ 259, 262 ] ], [ [ 18, 26 ], [ 305, 313 ], [ 8099, 8107 ], [ 9431, 9439 ], [ 9968, 9976 ], [ 10578, 10586 ...
""" A CapitalT class and methods that use the Cross class. Authors: David Mutchler, Vibha Alangar, Dave Fisher, Amanda Stouder, their colleagues and Xiaolong Chen (Harry). """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. import rosegraphics as rg import math def main(): """ Calls the test funct...
[ [ [ 243, 261 ], [ 1173, 1175 ], [ 1237, 1239 ], [ 1624, 1626 ], [ 1701, 1703 ], [ 2008, 2010 ], [ 2074, 2076 ], [ 2186, 2188 ], [ 2300, 2302...
import time from collections import deque from datetime import datetime import backtrader as bt from backtrader.feed import DataBase from backtrader.utils.py3 import with_metaclass from .cryptostore import CryptoStore class MetaCryptoFeed(DataBase.__class__): def __init__(cls, name, bases, dct): '''Clas...
[ [ [ 7, 11 ], [ 6635, 6639 ] ], [ [ 36, 41 ], [ 2086, 2091 ] ], [ [ 63, 71 ], [ 3620, 3628 ], [ 4937, 4945 ], [ 5076, 5084 ], [ 5614, ...
"""This script creates some informative graphs on subgroups of income quartile, gender, and race.""" # %% import os import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path # %% # Set up folder path code_folder = Path(os.path.abspath('')) print(code_folder) project_dir = os.path.dirname(code_fol...
[ [ [ 113, 115 ], [ 242, 244 ], [ 296, 298 ], [ 325, 327 ], [ 422, 424 ] ], [ [ 123, 147 ], [ 641, 644 ], [ 1170, 1173 ], [ 1261, 1264 ...
import pytest import logging from traitlets.config.loader import PyFileConfigLoader from traitlets import TraitError from jupyter_telemetry.eventlog import EventLog GOOD_CONFIG = """ import logging c.EventLog.handlers = [ logging.StreamHandler() ] """ BAD_CONFIG = """ import logging c.EventLog.handlers = [ ...
[ [ [ 7, 13 ], [ 981, 987 ] ], [ [ 21, 28 ], [ 863, 870 ] ], [ [ 65, 83 ], [ 532, 550 ] ], [ [ 106, 116 ], [ 995, 1005 ] ], [ [ 157,...
""" Definition of the :class:`NativeRegistration` class. """ from pathlib import Path from typing import Tuple from typing import Union import nibabel as nib from brain_parts.parcellation.parcellations import ( Parcellation as parcellation_manager, ) from nilearn.image.resampling import resample_to_img from nipype...
[ [ [ 81, 85 ], [ 1124, 1128 ], [ 1397, 1401 ], [ 1403, 1407 ], [ 2084, 2088 ], [ 5042, 5046 ], [ 5079, 5083 ] ], [ [ 105, 110 ], [ 1385, ...
""" Copyright (C) Microsoft Corporation. All rights reserved.​ ​ Microsoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual, royalty-free right to use, copy, and modify the software code provided by us ("Software Code"). You may not sublicense the Software Code or any use of it (except to your affiliates...
[ [ [ 1491, 1500 ], [ 1501, 1510 ] ], [ [ 1570, 1582 ], [ 1796, 1803 ] ], [ [ 1623, 1645 ], [ 1896, 1918 ] ], [ [ 1663, 1674 ], [ 1823, 1834 ] ]...
''' This file defines the testing module. This needs the following: 1. The system under test 2. The specification or the function which we are trying to minimize 3. Domains of the uncertainities ''' from .optimizers import * from .func_tree import * from .utils import * from sklearn.decomposition import KernelPCA imp...
[ [ [ 224, 225 ] ], [ [ 249, 250 ] ], [ [ 270, 271 ], [ 1082, 1092 ], [ 1100, 1108 ], [ 1190, 1200 ], [ 3181, 3190 ], [ 3244, 3254 ], [ 3412...
import argparse from suzieq.cli.sqcmds import * from suzieq.cli.sqcmds import context_commands from suzieq.cli.sqcmds import sqcmds_all from suzieq.cli.sq_nubia_context import NubiaSuzieqContext from suzieq.cli.sq_nubia_statusbar import NubiaSuzieqStatusBar from nubia import PluginInterface, CompletionDataSource from n...
[ [ [ 7, 15 ], [ 1867, 1875 ], [ 1958, 1966 ] ], [ [ 46, 47 ] ], [ [ 78, 94 ], [ 1526, 1542 ], [ 1586, 1602 ] ], [ [ 125, 135 ], [ 1457,...
from django.db import models from django.contrib.auth.models import User from django.template.defaultfilters import slugify import os from django.urls import reverse class standard(models.Model): name = models.CharField(max_length=100, unique=True) slug = models.SlugField(null=True,blank=True) descriptio...
[ [ [ 22, 28 ], [ 184, 190 ], [ 210, 216 ], [ 267, 273 ], [ 324, 330 ], [ 819, 825 ], [ 850, 856 ], [ 906, 912 ], [ 950, 956 ], [ ...
from django.shortcuts import render from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIVie...
[ [ [ 29, 35 ] ], [ [ 63, 71 ], [ 299, 307 ], [ 616, 624 ] ], [ [ 73, 87 ], [ 757, 771 ] ], [ [ 89, 100 ], [ 820, 831 ] ], [ [ 144, ...
import requests import numpy as np import collections import matplotlib.pyplot as plt from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from PIL import Image from io import BytesIO class Image_Data: image = None @property def Array(self) -> np.ndarray: """ Return ...
[ [ [ 7, 15 ], [ 903, 911 ] ], [ [ 23, 34 ], [ 281, 283 ], [ 1015, 1017 ], [ 1130, 1132 ], [ 3043, 3045 ] ], [ [ 42, 53 ], [ 1466, 147...
from pymongo import MongoClient client = MongoClient() # carPricingDB = client["carPricing"] # firstOffersCollection = carPricingDB.create_collection("firstOffers") # firstOffersCollection.insert_one({"item":"initialone"}) carPricingDB = client.carPricing firstOffersCollection = carPricingDB.firstOffers firstOffer...
[ [ [ 20, 31 ], [ 43, 54 ] ], [ [ 34, 40 ], [ 243, 249 ] ], [ [ 228, 240 ], [ 285, 297 ] ], [ [ 261, 282 ], [ 310, 331 ], [ 466, 4...
# coding: utf-8 # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- from __future__ import print_function import xml.dom.mi...
[ [ [ 287, 301 ] ], [ [ 310, 336 ] ], [ [ 345, 347 ], [ 1201, 1203 ], [ 2207, 2209 ], [ 2334, 2336 ], [ 2917, 2919 ], [ 3035, 3037 ], [ 3421...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for lots of functionality provided by L{twisted.internet}. """ from __future__ import division, absolute_import import os import sys import time from twisted.python.compat import _PY3 from twisted.trial import unittest from twisted.in...
[ [ [ 170, 178 ] ], [ [ 180, 195 ] ], [ [ 204, 206 ], [ 33945, 33947 ], [ 34184, 34186 ], [ 34230, 34232 ] ], [ [ 214, 217 ], [ 34246, 34249 ], ...
import setuptools with open('README.md') as file: readme = file.read() name = 'aio4chan' module = __import__(name) version = module.__version__ author = 'Exahilosys' url = f'https://github.com/{author}/{name}' download_url = f'{url}/archive/v{version}.tar.gz' setuptools.setup( name = name, version ...
[ [ [ 7, 17 ], [ 273, 283 ], [ 415, 425 ] ], [ [ 45, 49 ], [ 65, 69 ] ], [ [ 56, 62 ], [ 531, 537 ] ], [ [ 78, 82 ], [ 117, 121 ...
# coding: utf-8 """ Signing Today Web *Signing Today* is the perfect Digital Signature Gateway. Whenever in Your workflow You need to add one or more Digital Signatures to Your document, *Signing Today* is the right choice. You prepare Your documents, *Signing Today* takes care of all the rest: send invitatio...
[ [ [ 728, 743 ] ], [ [ 752, 760 ], [ 1050, 1058 ], [ 3569, 3577 ] ], [ [ 769, 789 ], [ 1184, 1204 ] ], [ [ 879, 925 ] ], [ [ 978, 990 ] ], ...
import os import sys import traceback from _pydev_bundle.pydev_imports import xmlrpclib, _queue, Exec from _pydev_bundle._pydev_calltip_util import get_description from _pydev_imps._pydev_saved_modules import thread from _pydevd_bundle import pydevd_vars from _pydevd_bundle import pydevd_xml from _pydevd_bundle.pydevd...
[ [ [ 7, 9 ], [ 14707, 14709 ], [ 14970, 14972 ], [ 14978, 14980 ], [ 15070, 15072 ], [ 15965, 15967 ], [ 21147, 21149 ], [ 21284, 21286 ], [ 21233,...
from .writer import saveMeshTracks from .reader import loadMeshTracks from .meshdata import Track, Mesh
[ [ [ 20, 34 ] ], [ [ 55, 69 ] ], [ [ 93, 98 ] ], [ [ 100, 104 ] ] ]
"""Utilities for setting up a project's settings. The default way to use this is to import and call :func:`init_settings` in a project's settings module: # project/top_level_package/settings.py from arcutils.settings import init_settings init_settings() This adds a few default settings for bootstrapping ...
[ [ [ 527, 533 ], [ 6902, 6908 ] ], [ [ 541, 548 ], [ 13472, 13479 ], [ 13673, 13680 ] ], [ [ 556, 565 ], [ 1278, 1287 ] ], [ [ 573, 575 ], [ ...
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
[ [ [ 613, 626 ], [ 1980, 1981 ] ], [ [ 646, 653 ], [ 1321, 1328 ] ], [ [ 687, 711 ], [ 2300, 2324 ] ], [ [ 753, 777 ], [ 2397, 2421 ] ], [ ...
# -*- coding: utf-8 -*- """ Created on Thu Apr 9 21:03:57 2020 @author: Mehul """ #importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd import random import warnings from matplotlib import style from collections import Counter from math import sqrt style.use(...
[ [ [ 125, 136 ], [ 926, 928 ], [ 941, 943 ], [ 960, 962 ] ], [ [ 145, 169 ] ], [ [ 178, 190 ], [ 2627, 2629 ] ], [ [ 199, 205 ], [ 3008...
# -*- coding:utf-8 -*- from mongoengine import (IntField, DateTimeField, StringField, ReferenceField, DictField) from model import BaseModel # from ext import db class Account(BaseModel): name = StringField(max_length=5000, null=False) tel = IntField(null=False) password = StringField(max_length=5000, nu...
[ [ [ 48, 56 ], [ 253, 261 ] ], [ [ 58, 71 ] ], [ [ 73, 84 ], [ 202, 213 ], [ 289, 300 ], [ 349, 360 ] ], [ [ 86, 100 ] ], [ [ 102, ...
import autofit as af import autolens as al from test_autolens.integration.tests.interferometer import runner test_type = "lens_only" test_name = "lens_x2_light__hyper" data_type = "lens_x2_light" data_resolution = "sma" def make_pipeline( name, phase_folders, real_space_shape_2d=(100, 100), real_spac...
[ [ [ 7, 20 ], [ 368, 370 ] ], [ [ 28, 42 ], [ 418, 420 ], [ 855, 857 ], [ 890, 892 ], [ 934, 936 ], [ 969, 971 ], [ 1386, 1388 ], ...
from django.test import TestCase, override_settings from model_bakery import baker from rest_framework.test import APIClient from accounts.models import User from core.models import CoreSettings from rest_framework.authtoken.models import Token class TacticalTestCase(TestCase): def authenticate(self): s...
[ [ [ 24, 32 ], [ 272, 280 ] ], [ [ 34, 51 ], [ 973, 990 ] ], [ [ 77, 82 ], [ 2296, 2301 ], [ 2420, 2425 ] ], [ [ 116, 125 ], [ 894, ...
# # Copyright (c) 2017 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...
[ [ [ 610, 615 ], [ 3198, 3203 ] ], [ [ 624, 635 ], [ 3975, 3977 ], [ 4464, 4466 ], [ 4549, 4551 ], [ 4564, 4566 ], [ 5317, 5319 ], [ 5419, ...