content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright 2019 The FastEstimator 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 appl...
[ 2, 15069, 13130, 383, 12549, 22362, 320, 1352, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
3.252073
603
from locintel.traces.loaders import DruidLoader import pytest from unittest.mock import Mock, patch, call @pytest.fixture @pytest.fixture
[ 6738, 1179, 48779, 13, 2213, 2114, 13, 2220, 364, 1330, 32685, 17401, 198, 198, 11748, 12972, 9288, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 8529, 11, 869, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, ...
3
48
#if length of string is even,all characters should occure even times. If its odd,only one should occur odd times to occupy space in middle bcz rest even characters will be in pairs ,making string as palindrome from collections import Counter print(gameOfThrones(input()))
[ 2, 361, 4129, 286, 4731, 318, 772, 11, 439, 3435, 815, 1609, 495, 772, 1661, 13, 1002, 663, 5629, 11, 8807, 530, 815, 3051, 5629, 1661, 284, 22265, 2272, 287, 3504, 275, 26691, 1334, 772, 3435, 481, 307, 287, 14729, 837, 8601, 4731,...
4.2
65
"""Search implementation using a database of Bluetooth networks.""" from collections import defaultdict from ichnaea.api.locate.constants import ( MAX_BLUE_CLUSTER_METERS, MAX_BLUES_IN_CLUSTER, BLUE_MAX_ACCURACY, BLUE_MIN_ACCURACY, ) from ichnaea.api.locate.mac import ( aggregate_cluster_position,...
[ 37811, 18243, 7822, 1262, 257, 6831, 286, 19263, 7686, 526, 15931, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 220, 488, 2616, 18213, 13, 15042, 13, 75, 13369, 13, 9979, 1187, 1330, 357, 198, 220, 220, 220, 25882, 62, 91...
2.860697
402
from data.database import db, db_transaction config = Config() # There MUST NOT be any circular dependencies between these subsections. If there are fix it by # moving the minimal number of things to _basequery from data.model import ( appspecifictoken, blob, build, gc, ...
[ 6738, 1366, 13, 48806, 1330, 20613, 11, 20613, 62, 7645, 2673, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198, 11250, 796, 17056, 3419, 628, 198, 2, 1318, 17191, 5626, 307, 597, 18620, 20086, 1022, 777, 46...
2.612335
227
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import omaha.fields
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 11748, 39030, 12236, 13, 25747, 628 ]
2.953488
43
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Simple IRC bot to query for the last entries in the CVE database # # current command supported is: # # last <max> # cvetweet <max> # browse # search <vendor>\<product> # get <cve> # # You need to connect the IRC bot to the IRC Server you want to access it from. # # Sof...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 17427, 30039, 10214, 284, 12405, 329, 262, 938, 12784, 287, 262, 24640, 6831, 198, 2, 198, 2, 1459, ...
2.920923
607
''' Few basic examples of the tools in TpTnOsc.utils. See also osc_exp_examples.ipynb notebook for examples of tools in TpTnOsc.osc_exp. Execute: python basic_examples.py ''' import numpy as np import TpTnOsc.utils as ut # computing the p'th order multiplicative compound matrix A = np.array([[1,6,0,0], [2,13,4,20], ...
[ 7061, 6, 198, 32351, 4096, 6096, 286, 262, 4899, 287, 309, 79, 51, 77, 46, 1416, 13, 26791, 13, 198, 198, 6214, 635, 267, 1416, 62, 11201, 62, 1069, 12629, 13, 541, 2047, 65, 20922, 329, 6096, 286, 4899, 287, 309, 79, 51, 77, 46...
2.141391
877
import json import tornado.web
[ 11748, 33918, 198, 11748, 33718, 13, 12384, 198 ]
3.875
8
import pandas as pd import pprint as pp r=[1000,25000,100000,500000] df=pd.read_csv("f.csv"); # df=df.sort(["金额"],ascending=False) print(df) # df.to_csv("f.csv",index=False,encoding="utf-8") df_sum={"0~1000":{},"1000~25000":{},"25000~50000":{},"50000~500000":{},">500000":{}} for index,rows in df.iterrows(): i...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 279, 4798, 355, 9788, 628, 198, 81, 41888, 12825, 11, 1495, 830, 11, 3064, 830, 11, 4059, 830, 60, 198, 198, 7568, 28, 30094, 13, 961, 62, 40664, 7203, 69, 13, 40664, 15341, 628, 198, 2...
1.671723
923
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.75
8
import numpy as np import PropensityFunctions as Propensity import CoreClasses as Core import random import math import OutputFunctions as Out import InitializeFunctions as Init #################################################### ### Load C library #################################################### from...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 8772, 6377, 24629, 2733, 355, 8772, 6377, 201, 198, 11748, 7231, 9487, 274, 355, 7231, 220, 201, 198, 11748, 4738, 201, 198, 11748, 10688, 201, 198, 11748, 25235, 24629, 2733, 355, 3806, 2...
2.517577
6,571
# Copyright (c) SenseTime. All Rights Reserved. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import torch import torch.nn as nn from siamreppoints.core.config import cfg from siamreppoints.models.backbone import g...
[ 2, 15069, 357, 66, 8, 24956, 7575, 13, 1439, 6923, 33876, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37...
3.198529
136
import argparse import sys import time from pathlib import Path from sqlite3 import DatabaseError from misc import update_check from misc.version import VERSION from pymatgen.core.lattice import Lattice from searcher.database_handler import DatabaseRequest, StructureTable from searcher.filecrawler import put_files_in_...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 44161, 578, 18, 1330, 24047, 12331, 198, 198, 6738, 12747, 1330, 4296, 62, 9122, 198, 6738, 12747, 13, 9641, 1330, 44156, 2849, 198, ...
1.981025
2,477
#! /usr/bin/python3 # coding=utf-8 """ 把今天最好的表现当作明天最新的起点..~ いま 最高の表現 として 明日最新の始発..~ Today the best performance as tomorrow newest starter! author: xiaomo github: https://github.com/syoubaku email: xiaomo@xiamoo.info QQ_NO: 83387856 Date: 17/5/31 14:55 Description: 更新服务器 Copyright(©) 2017 by xiaomo. """ imp...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 198, 10545, 232, 232, 20015, 232, 25465, 17312, 222, 25001, 121, 21410, 26193, 101, 163, 236, 108, 37605, 241, 43291, 23626, 236, 25465, ...
1.705376
465
# coding=utf-8 # Copyright (C) 2019 ATHENA AUTHORS; Xiangang Li; Dongwei Jiang; Xiaoning Lei # 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.o...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 357, 34, 8, 13130, 317, 4221, 45510, 37195, 20673, 26, 45641, 648, 7455, 26, 28831, 42990, 32294, 26, 22450, 12484, 48579, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, ...
2.303571
3,416
""" Test of bcforms.rest :Author: Mike Zheng <xzheng20@colby.edu> :Author: Jonathan Karr <karr@mssm.edu> :Date: 2019-7-4 :Copyright: 2019, Karr Lab :License: MIT """ import bcforms from bcforms import core from bcforms import rest import unittest
[ 37811, 6208, 286, 47125, 23914, 13, 2118, 198, 198, 25, 13838, 25, 4995, 44583, 1279, 87, 89, 31753, 1238, 31, 4033, 1525, 13, 15532, 29, 198, 25, 13838, 25, 11232, 509, 3258, 1279, 74, 3258, 31, 76, 824, 76, 13, 15532, 29, 198, 2...
2.777778
90
from django.conf import settings from django.db.models.signals import post_save from guardian.shortcuts import assign_perm from timezone_field import TimeZoneField from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.core.mail import send_mai...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 21688, 13, 19509, 23779, 1330, 8333, 62, 16321, 198, 6738, 640, 11340, 62, 3245, 1330, 3862, 2696...
3.109319
558
"""Utilities to support iteration.""" # Copyright 2019 CSIRO (Data61) # # 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...
[ 37811, 18274, 2410, 284, 1104, 24415, 526, 15931, 198, 198, 2, 15069, 13130, 9429, 43708, 357, 6601, 5333, 8, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407...
2.816225
604
""" HAVE NOT TESTED FOR SPEED (but second one seems better) Decent link here about ip spoofing - http://esd.io/blog/flask-apps-heroku-real-ip-spoofing.html I think it has already been incorporated and my code works on his committed change. """ __author__ = 'donal' __project__ = 'ribcage' from json import loads from u...
[ 37811, 198, 7801, 6089, 5626, 43001, 1961, 7473, 6226, 41841, 357, 4360, 1218, 530, 2331, 1365, 8, 198, 198, 10707, 298, 2792, 994, 546, 20966, 42078, 278, 532, 198, 4023, 1378, 274, 67, 13, 952, 14, 14036, 14, 2704, 2093, 12, 18211, ...
3.331169
154
import os print(os.listdir('.')) print(os.listdir('avo')) print(os.listdir('avo/pai')) print(os.listdir('avo/mae'))
[ 11748, 28686, 198, 4798, 7, 418, 13, 4868, 15908, 10786, 2637, 4008, 198, 4798, 7, 418, 13, 4868, 15908, 10786, 615, 78, 6, 4008, 198, 4798, 7, 418, 13, 4868, 15908, 10786, 615, 78, 14, 49712, 6, 4008, 198, 4798, 7, 418, 13, 4868,...
2.169811
53
def test_two_runs_no_clean(): """ >>> report_fixture = getfixture('allure_report_with_params') >>> allure_report_first_run = report_fixture(cache=False) >>> allure_report_second_run = report_fixture(cache=False) >>> assert_that(allure_report_second_run, ... has_only_n_test_cases('tes...
[ 4299, 1332, 62, 11545, 62, 48381, 62, 3919, 62, 27773, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13163, 989, 62, 69, 9602, 796, 651, 69, 9602, 10786, 439, 495, 62, 13116, 62, 4480, 62, 37266, 11537, 198, 220, 220, 220, ...
2.36875
160
import re import pandas as pd m = re.search('(?<=abc)def', 'abcdef') print(m.group(0)) print("###### Example 1 ###########") example_1 = """ 1916-1918 subscales for a subject 1998-1914 subscales for a subject subscales for a subject 1998-1920 """ r = re.sub('(\d{2})(\d{2})', '20\\2', example_1) print...
[ 11748, 302, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 76, 796, 302, 13, 12947, 10786, 7, 30, 27, 28, 39305, 8, 4299, 3256, 705, 39305, 4299, 11537, 198, 4798, 7, 76, 13, 8094, 7, 15, 4008, 198, 198, 4798, 7203, 4242, 2235, ...
1.756437
1,437
import cv2 target_imgPath = input("Introduce Path for Target Image: ") #ex_img/img1.png input_img = cv2.imread(target_imgPath, cv2.IMREAD_COLOR) winName = 'Input Image' cv2.namedWindow(winName, cv2.WINDOW_NORMAL) cv2.imshow(winName, input_img) cv2.waitKey(0) cv2.destroyAllWindows()
[ 11748, 269, 85, 17, 198, 198, 16793, 62, 9600, 15235, 796, 5128, 7203, 15005, 344, 10644, 329, 12744, 7412, 25, 366, 8, 1303, 1069, 62, 9600, 14, 9600, 16, 13, 11134, 198, 15414, 62, 9600, 796, 269, 85, 17, 13, 320, 961, 7, 16793,...
2.42735
117
# Generated by Django 3.2.2 on 2021-09-17 07:04 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 17, 319, 33448, 12, 2931, 12, 1558, 8753, 25, 3023, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
########################################## ############ Utility Commands ############ ########################################## import discord import random from discord.ext import commands from .musicutils.paginator import Pages from config import *
[ 29113, 7804, 2235, 198, 7804, 4242, 34030, 49505, 1303, 7804, 21017, 198, 29113, 7804, 2235, 198, 198, 11748, 36446, 198, 11748, 4738, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 764, 14664, 13554, 4487, 13, 79, 363, 20900, 1330, ...
5.382979
47
import argparse import tarfile from pathlib import Path import tqdm import pandas as pd route_path = Path('..') """ # Compress necessary files of the dataset Source * pdb / dataset_name / target / sampling * fasta / dataset_name * native_pdb / dataset_name * score Output * README.md write about dataset detai...
[ 11748, 1822, 29572, 198, 11748, 13422, 7753, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 256, 80, 36020, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 38629, 62, 6978, 796, 10644, 10786, 492, 11537, 198, 198, 37811, 198, 2, ...
2.297976
1,235
"""Test pre running stuff""" import warnings from datetime import datetime from datetime import timedelta from typing import Any from typing import AsyncGenerator from typing import Dict from typing import Optional from uuid import UUID from uuid import uuid4 import pytest from asyncpg import ObjectInUseError from f...
[ 37811, 14402, 662, 2491, 3404, 37811, 198, 11748, 14601, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 19720, 1330, 4377, 198, 6738, 19720, 1330, 1081, 13361, 8645, 1352, 198, 6738, 19...
2.653553
3,406
# QRFactors.py # # Daniel R. Reynolds # SMU Mathematics # Math 4315 # imports import numpy def QRFactors(A): """ usage: Q, R = QRFactors(A) Function to compute the QR factorization of a (possibly rank-deficient) 'thin' matrix A (m x n, with m >=n) using Householder reflection matrices. Input: ...
[ 2, 42137, 29054, 669, 13, 9078, 198, 2, 198, 2, 7806, 371, 13, 21995, 198, 2, 9447, 52, 39448, 198, 2, 16320, 5946, 1314, 198, 198, 2, 17944, 198, 11748, 299, 32152, 198, 198, 4299, 42137, 29054, 669, 7, 32, 2599, 198, 220, 220, ...
1.989651
773
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2013-2014, NeXpy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING, distributed with this software. #---...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 10097, 32501, 198, 2, 15069, 357, 66, 8, 2211, 12, 4967, 11, 3169, 55, 9078, 7712, 4816, 13, 198, 2, ...
3.276688
459
from flask import Flask from flask import request from flask_restful import Resource, Api, reqparse from Calculator import Calculator app = Flask(__name__) api = Api(app) api.add_resource(Add, '/add') if __name__ == '__main__': app.run(port='5002')
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 5949, 72, 11, 43089, 29572, 198, 6738, 43597, 1330, 43597, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 15042, 796, 59...
3.023529
85
"""syphon.tests.test_context.py Copyright (c) 2017-2018 Keithley Instruments, LLC. Licensed under MIT (https://github.com/ehall/syphon/blob/master/LICENSE) """ from syphon import Context
[ 37811, 1837, 746, 261, 13, 41989, 13, 9288, 62, 22866, 13, 9078, 628, 220, 220, 15069, 357, 66, 8, 2177, 12, 7908, 14926, 1636, 43953, 11, 11419, 13, 198, 220, 220, 49962, 739, 17168, 357, 5450, 1378, 12567, 13, 785, 14, 17231, 439,...
2.819444
72
__source__ = 'https://leetcode.com/problems/redundant-connection-ii/' # Time: O(V) numbert of vertices # Space: O(V) # # Description: Leetcode # 685. Redundant Connection II # # In this problem, a rooted tree is a directed graph such that, # there is exactly one node (the root) for which all other nodes are descendant...
[ 834, 10459, 834, 796, 705, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 445, 917, 415, 12, 38659, 12, 4178, 14, 6, 198, 2, 3862, 25, 220, 440, 7, 53, 8, 1271, 83, 286, 9421, 1063, 198, 2, 4687, 25, 440, 7, 53, 8...
2.27543
4,473
#!/usr/bin/env python3 # ---------------------------------------------------------------------------- # # Copyright 2018 EMVA # # 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://ww...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 16529, 10541, 198, 2, 198, 2, 15069, 2864, 17228, 11731, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 74...
2.077543
24,206
import os, sys import time import configparser import argparse sys.path.append('../src/') from python import helper as hp from python import fixed_parameters as FP parser = argparse.ArgumentParser(description='Process generated data for proba extraction') parser.add_argument('-c','--configfile', type=str, help='path ...
[ 11748, 28686, 11, 25064, 198, 11748, 640, 198, 11748, 4566, 48610, 198, 11748, 1822, 29572, 198, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 10677, 14, 11537, 198, 6738, 21015, 1330, 31904, 355, 27673, 198, 6738, 21015, 1330, 5969, 62,...
2.324154
1,271
from yacs.config import CfgNode as CN _C = CN() # directories _C.ADDRESS = CN() _C.ADDRESS.DATA = 'data/' _C.ADDRESS.CHECK = 'checkpoints/' # data _C.DATA = CN() _C.DATA.NUM_CONT_FEATURES = 7 # model _C.MODEL = CN() _C.MODEL.NAME = 'base_tab' _C.MODEL.HIDDEN_SIZE = 32 _C.MODEL.NUM_LAYERS = 6 _C.MODEL.NUM_HEADS = 8...
[ 6738, 331, 16436, 13, 11250, 1330, 327, 40616, 19667, 355, 31171, 628, 198, 62, 34, 796, 31171, 3419, 198, 198, 2, 29196, 198, 62, 34, 13, 2885, 7707, 7597, 796, 31171, 3419, 198, 62, 34, 13, 2885, 7707, 7597, 13, 26947, 796, 705, ...
1.852459
427
"""Exceptions for release script""" from subprocess import CalledProcessError class InputException(Exception): """Exception raised for invalid input.""" class ReleaseException(Exception): """Exception raised for a command error due to some release status""" class DependencyException(Exception): """Err...
[ 37811, 3109, 11755, 329, 2650, 4226, 37811, 198, 6738, 850, 14681, 1330, 34099, 18709, 12331, 628, 198, 4871, 23412, 16922, 7, 16922, 2599, 198, 220, 220, 220, 37227, 16922, 4376, 329, 12515, 5128, 526, 15931, 628, 198, 4871, 13868, 16922...
4.160622
193
from flask import current_app from flask import render_template from app.custom_error import * from app.template_filter import display_size from app.models import Error # error map error_map = { 403: forbidden, 404: page_not_found, 413: file_is_too_big, # custom error FileIsEmpty: file_is_e...
[ 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 198, 6738, 598, 13, 23144, 62, 18224, 1330, 1635, 198, 6738, 598, 13, 28243, 62, 24455, 1330, 3359, 62, 7857, 198, 6738, 598, 13, 27530, 1330, 13047...
2.806202
129
#!/usr/bin/env python3 # Copyright (c) 2021 Graphcore Ltd. All rights reserved. import torch import pytest import poptorch import helpers # Not need for mean or logsumexp reduce_ops = [torch.sum, torch.prod] test_tensors = [ torch.tensor([1.0, 2.0, 3.1]), torch.tensor([1.1, 2.0, 3.0]), torch.tensor([0.0, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 33448, 29681, 7295, 12052, 13, 1439, 2489, 10395, 13, 198, 198, 11748, 28034, 198, 11748, 12972, 9288, 198, 11748, 1461, 13165, 354, 198, 11748, 49385, 198, 1...
2.297561
205
_base_ = [ '../_base_/datasets/minicoco500_detection_augm.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] # model settings model = dict( type='FOVEA', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, ...
[ 62, 8692, 62, 796, 685, 198, 220, 220, 220, 705, 40720, 62, 8692, 62, 14, 19608, 292, 1039, 14, 1084, 291, 25634, 4059, 62, 15255, 3213, 62, 7493, 76, 13, 9078, 3256, 198, 220, 220, 220, 705, 40720, 62, 8692, 62, 14, 1416, 704, ...
1.893029
832
# -*- coding: utf-8 -*- r""" Frequency-dependent foreground components. This module implements the frequency-dependent component of common foreground contaminants. This package draws inspiration from FGBuster (Davide Poletti and Josquin Errard) and BeFoRe (David Alonso and Ben Thorne). """ import inspect import type...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 81, 37811, 198, 37, 28707, 12, 21186, 36282, 6805, 13, 198, 198, 1212, 8265, 23986, 262, 8373, 12, 21186, 7515, 286, 2219, 36282, 198, 3642, 5669, 1187, 13, 198, 198, ...
2.385781
4,290
import json import logging from testfixtures import LogCapture from twisted.internet import defer from twisted.trial.unittest import TestCase from scrapy.http import Request from scrapy.crawler import CrawlerRunner from scrapy.utils.python import to_unicode from tests.spiders import FollowAllSpider, DelaySpider, Simp...
[ 11748, 33918, 198, 11748, 18931, 198, 198, 6738, 1332, 69, 25506, 1330, 5972, 49630, 198, 6738, 19074, 13, 37675, 1330, 29135, 198, 6738, 19074, 13, 45994, 13, 403, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 15881, 88, 13, 4023, 1330,...
3.947826
115
"""Setup module for Robot Framework Docker Library package.""" import os from setuptools import setup # get absolute source directory path here = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the README file with open(os.path.join(here, 'README.rst'), encoding='utf-8') as readme_file: ...
[ 37811, 40786, 8265, 329, 16071, 25161, 25716, 10074, 5301, 526, 15931, 198, 198, 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 651, 4112, 2723, 8619, 3108, 198, 1456, 796, 28686, 13, 6978, 13, 397, 2777, 776,...
2.811715
478
import codecs
[ 11748, 40481, 82 ]
4.333333
3
import os import random import torch from torch.utils.data import Dataset from tqdm.auto import tqdm from facade_project import NUM_IMAGES, NUM_ROTATIONS, FACADE_ROT_IMAGES_TENSORS_DIR, FACADE_ROT_HEATMAPS_TENSORS_DIR from facade_project.data.facade_heatmap_dataset import HEATMAP_INFOS_PER_ROT from facade_project.geo...
[ 11748, 28686, 198, 11748, 4738, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 256, 80, 36020, 13, 23736, 1330, 256, 80, 36020, 198, 198, 6738, 43562, 62, 16302, 1330, 36871, 62, 3955, ...
3.19398
299
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 24 15:01:56 2018 @author: rick """ from sqlalchemy import create_engine # eof
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2556, 1987, 1315, 25, 486, 25, 3980, 2864, 198, 198, 31, 9800, 25, 374, 624, 198, ...
2.47541
61
import pandas as pd classes = ['A', 'B', 'C', 'D', 'E'] sorted(classes) df = pd.read_csv('topk_ids.csv', header=None) top1_ans = dict(df[1].value_counts()) new_dict = {classes[key]:val for key,val in top1_ans.items()} print (new_dict)
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 37724, 796, 37250, 32, 3256, 705, 33, 3256, 705, 34, 3256, 705, 35, 3256, 705, 36, 20520, 198, 82, 9741, 7, 37724, 8, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 4852, 74, ...
2.298077
104
import os from flask import Blueprint from jmapp.lib.auth import jwt_required from model import job_mod, apply_mod, offer_mod fname = os.path.basename(__file__).split(".")[0] job = Blueprint(fname, __name__) job_m = job_mod() apply_m = apply_mod() offer_m = offer_mod() @job.route("/", methods=["GET"]) @jwt_require...
[ 11748, 28686, 198, 6738, 42903, 1330, 39932, 198, 6738, 474, 76, 1324, 13, 8019, 13, 18439, 1330, 474, 46569, 62, 35827, 198, 198, 6738, 2746, 1330, 1693, 62, 4666, 11, 4174, 62, 4666, 11, 2897, 62, 4666, 198, 198, 69, 3672, 796, 28...
2.581281
203
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2019 Hiroshi Murayama <opiopan@gmail.com> import os METADATA = { 'name': 'pcb-tools-extension', 'version': "0.9.3", 'author': 'Hiroshi Murayama <opiopan@gmail.com>', 'author_email': "opiopan@gmail.com", 'description': ("Extension for pcb-t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 13130, 35763, 72, 5921, 323, 1689, 1279, 404, 14922, 272, 31, 14816, 13, 785, 29, 198, 198, 11748, 286...
2.484761
689
""" Module to plot outages data. """ from .animated_availability import * from .evolution_mean_availability import * from .expected_program import * from .incremental_programs import * from .regression_delays import *
[ 198, 37811, 198, 220, 220, 220, 19937, 284, 7110, 503, 1095, 1366, 13, 198, 198, 37811, 628, 198, 6738, 764, 11227, 515, 62, 47274, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 1635, 198, 6738, 764, 1990, 2122, 62, 32604, 62, 47274...
2.46789
109
import IPAM.CLASS # NOTE: Blocks with a masklen set are supernets of various subnets # within the originating parent supernet. Most class B and C # addresing has been rulled up int supernets as /8s. This # means in most cases, you use/allocate a NET-BLOCK allocation # first with the correct sub...
[ 11748, 6101, 2390, 13, 31631, 198, 198, 2, 24550, 25, 35111, 351, 257, 9335, 11925, 900, 389, 2208, 45938, 286, 2972, 850, 45938, 198, 2, 220, 220, 220, 220, 220, 220, 1626, 262, 37962, 2560, 2208, 3262, 13, 4042, 1398, 347, 290, 32...
2.990244
205
#!/usr/bin/env python3 # encoding: utf-8 # @Time : 2017/12/16 下午8:41 # @Author : yuchangqian # @Contact : changqian_yu@163.com # @File : BaseDataset.py import os import time import cv2 import torch import numpy as np import torch.utils.data as data if __name__ == "__main__": data_setting = {'img_root': ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 2488, 7575, 220, 220, 220, 1058, 2177, 14, 1065, 14, 1433, 220, 10310, 233, 39355, 230, 23, 25, 3901, 198, 2, 2488, 13838, 220, 1058, ...
2.343023
172
''' Url shortener model ''' from django.db import models from django.urls import reverse_lazy from .utils import create_shortened_url # Create your models here. class Shortener(models.Model): ''' Creates a short url based on the long one created -> Hour and date a shortener was created ti...
[ 7061, 6, 198, 28165, 1790, 877, 2746, 198, 7061, 6, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 198, 6738, 764, 26791, 1330, 2251, 62, 19509, 2945, ...
2.913934
244
from .linear_fused import LinearBn1d from .deconv_fused import ConvTransposeBnReLU2d, ConvTransposeBn2d, ConvTransposeReLU2d from .conv_fused import ConvBnReLU2d, ConvBn2d, ConvReLU2d from .freezebn import ConvFreezebn2d, ConvFreezebnReLU2d, ConvTransposeFreezebn2d, ConvTransposeFreezebnReLU2d
[ 6738, 764, 29127, 62, 69, 1484, 1330, 44800, 33, 77, 16, 67, 198, 6738, 764, 12501, 261, 85, 62, 69, 1484, 1330, 34872, 8291, 3455, 33, 77, 3041, 41596, 17, 67, 11, 34872, 8291, 3455, 33, 77, 17, 67, 11, 34872, 8291, 3455, 3041, ...
2.521368
117
# print(bin(10)) # print(bin(10)[::-1].index('1')) from collections import Counter a = [1, 1, 1, 2, 3, 4, 5] t = Counter(a) print(t)
[ 2, 3601, 7, 8800, 7, 940, 4008, 198, 2, 3601, 7, 8800, 7, 940, 38381, 3712, 12, 16, 4083, 9630, 10786, 16, 6, 4008, 198, 6738, 17268, 1330, 15034, 198, 198, 64, 796, 685, 16, 11, 352, 11, 352, 11, 362, 11, 513, 11, 604, 11, ...
2.216667
60
from abc import ABCMeta, abstractmethod class FitPredictOutput(object): 'content of output file for program fit_predict.py' __metaclass__ = ABCMeta @abstractmethod def as_dict(self): 'return a dict with all the fields' pass
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 628, 198, 4871, 25048, 47, 17407, 26410, 7, 15252, 2599, 198, 220, 220, 220, 705, 11299, 286, 5072, 2393, 329, 1430, 4197, 62, 79, 17407, 13, 9078, 6, 198, 220, 220, 220, 11593, 41...
2.726316
95
import iotbx.mtz from cctbx.array_family import flex if __name__ == "__main__": import sys data = {} for f in sys.argv[1:]: data[f] = get_I(f) for ix in xrange(len(data)-1): for iy in xrange(ix+1, len(data)): x, y = data.keys()[ix], data.keys()[iy] xd, yd = da...
[ 11748, 1312, 313, 65, 87, 13, 16762, 89, 198, 6738, 269, 310, 65, 87, 13, 18747, 62, 17989, 1330, 7059, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1330, 25064, 628, 220, 220, 220, 1366, ...
1.978261
276
#visualize the data that go produced import os import sys import plotly import plotly.offline as offline import plotly.graph_objs as go import helper as help plotly.tools.set_credentials_file(username="<>", api_key="<>") gprotocol = sys.argv[2] if len(sys.argv) > 2 and sys.argv[1] == "quic" else "quic" latency = sys....
[ 2, 41464, 1096, 262, 1366, 326, 467, 4635, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 7110, 306, 198, 11748, 7110, 306, 13, 2364, 1370, 355, 18043, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198, 11748, 319...
2.549117
1,415
# ------------------------------------------------------------------------ # MIT License # # Copyright (c) [2021] [Avinash Ranganath] # # This code is part of the library PyDL <https://github.com/nash911/PyDL> # This code is licensed under MIT license (see LICENSE.txt for details) # ------------------------------------...
[ 2, 16529, 982, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 685, 1238, 2481, 60, 685, 32, 7114, 1077, 371, 37089, 776, 60, 198, 2, 198, 2, 770, 2438, 318, 636, 286, 262, 5888, 9485, 19260, 1279, 5450, 1378, 12567, 13...
3.435233
193
import pytest from pytest import raises import numpy as np import numpy.testing as npt import matplotlib.pyplot as plt import pyfar as pf from pyfar.dsp import InterpolateSpectrum # TODO: Finish `test_interpolation()` for 'magnitude_minimum' def test_init(): """Test return objects""" fd = pf.FrequencyData([1...
[ 11748, 12972, 9288, 198, 6738, 12972, 9288, 1330, 12073, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 33407, 355, 299, 457, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 12972, 16370, 355, ...
2.444362
2,705
"""Tests for execution of various command lines.""" import pytest from almanac import ( MissingArgumentsError, NoSuchArgumentError, TooManyPositionalArgumentsError ) from .utils import get_test_app @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark....
[ 37811, 51, 3558, 329, 9706, 286, 2972, 3141, 3951, 526, 15931, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 435, 46870, 1330, 357, 198, 220, 220, 220, 25639, 28100, 2886, 12331, 11, 198, 220, 220, 220, 1400, 16678, 28100, 1713, 12331, ...
2.639098
133
from rest_framework.viewsets import ModelViewSet from meiduo_admin.utils import PageNum from meiduo_admin.serializers.option import OptionSerialzier from goods.models import SpecificationOption class OptionsView(ModelViewSet): """ 规格选项表的增删改查 """ serializer_class = OptionSerialzier queryset =...
[ 6738, 1334, 62, 30604, 13, 1177, 28709, 1330, 9104, 7680, 7248, 198, 6738, 502, 312, 20895, 62, 28482, 13, 26791, 1330, 7873, 33111, 198, 6738, 502, 312, 20895, 62, 28482, 13, 46911, 11341, 13, 18076, 1330, 16018, 32634, 89, 959, 198, ...
2.772201
259
""" 79. Word Search https://leetcode.com/problems/word-search/ """ from typing import List if __name__ == '__main__': raise(SystemExit(main()))
[ 37811, 198, 3720, 13, 9678, 11140, 198, 198, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 4775, 12, 12947, 14, 198, 37811, 198, 6738, 19720, 1330, 7343, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
2.732143
56
# Copyright (c) 2009 Advanced Micro Devices, Inc. # 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 list of conditions...
[ 2, 15069, 357, 66, 8, 3717, 13435, 4527, 29362, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 2...
3.700441
454
import unittest import json import os
[ 11748, 555, 715, 395, 628, 198, 11748, 33918, 198, 11748, 28686, 628, 628 ]
3.307692
13
with open('input') as input: lines = input.readlines() number_sequence = lines[0].split(',') board_numbers = [] called_indexes = [] # Flatten data structure for boards for i, line in enumerate(lines): if i == 0: continue if line == '\n': continue stripped_line = line.strip('\n') nu...
[ 4480, 1280, 10786, 15414, 11537, 355, 5128, 25, 198, 220, 220, 220, 3951, 796, 5128, 13, 961, 6615, 3419, 198, 198, 17618, 62, 43167, 796, 3951, 58, 15, 4083, 35312, 7, 3256, 11537, 198, 3526, 62, 77, 17024, 796, 17635, 198, 7174, 6...
2.374317
366
from nidm.experiment import Project, Session, AssessmentAcquisition, AssessmentObject, Acquisition, AcquisitionObject, Query from nidm.core import Constants import json import re from urllib import parse import pprint
[ 6738, 299, 312, 76, 13, 23100, 3681, 1330, 4935, 11, 23575, 11, 25809, 12832, 421, 10027, 11, 25809, 10267, 11, 44564, 11, 44564, 10267, 11, 43301, 198, 6738, 299, 312, 76, 13, 7295, 1330, 4757, 1187, 198, 11748, 33918, 198, 11748, 30...
4.055556
54
from os import path, mkdir from pathlib import Path import shutil import tempfile import types import unittest from submitty_utils import glob if __name__ == '__main__': unittest.main()
[ 6738, 28686, 1330, 3108, 11, 33480, 15908, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 3858, 198, 11748, 555, 715, 395, 198, 198, 6738, 850, 76, 9760, 62, 26791, 1330, 15095, 628, 198,...
3.079365
63
from __future__ import unicode_literals, print_function, division import math import os import time import argparse import tensorflow as tf import torch from model import Model from torch.nn.utils import clip_grad_norm_ from torch.optim import Adagrad from torch.autograd import Variable from data_util import config...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 3601, 62, 8818, 11, 7297, 198, 11748, 10688, 198, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 2...
2.641944
391
"""Remove SiWay, add GoLab Revision ID: 49b367d3d25f Revises: 13f9fd64f85b Create Date: 2017-04-07 01:07:29.653200 """ # revision identifiers, used by Alembic. revision = '49b367d3d25f' down_revision = '13f9fd64f85b' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql
[ 37811, 27914, 15638, 25309, 11, 751, 1514, 17822, 198, 198, 18009, 1166, 4522, 25, 5125, 65, 27824, 67, 18, 67, 1495, 69, 198, 18009, 2696, 25, 1511, 69, 24, 16344, 2414, 69, 5332, 65, 198, 16447, 7536, 25, 2177, 12, 3023, 12, 2998,...
2.495935
123
from sd2wiki.config import * from sd2wiki.core import * from sd2wiki.loc import getLoc from sd2wiki.buildings import buildings import csv, re, os techs = {} techFile = open(os.path.join(basedir, 'Techs', 'TechTree.txt')) for building in buildings.values(): building.tech = None for line in csv.reader(techFile, c...
[ 6738, 45647, 17, 15466, 13, 11250, 1330, 1635, 198, 6738, 45647, 17, 15466, 13, 7295, 1330, 1635, 198, 6738, 45647, 17, 15466, 13, 17946, 1330, 651, 33711, 198, 6738, 45647, 17, 15466, 13, 11249, 654, 1330, 6832, 198, 11748, 269, 21370,...
2.634731
167
''' A game- player dodge the falling blocks ''' import random import math import pyglet from pyglet.window import key from assets.entities import player, timer, block class Window(pyglet.window.Window): ''' The window class with custom draw function ''' def __init__(self, width, height, **kawgs): ...
[ 7061, 6, 198, 32, 983, 12, 2137, 24885, 262, 7463, 7021, 198, 7061, 6, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 12972, 70, 1616, 198, 6738, 12972, 70, 1616, 13, 17497, 1330, 1994, 198, 6738, 6798, 13, 298, 871, 1330, 2137, 1...
2.323276
696
#!/usr/bin/python3 #Usage: lambda.py #Author: David Caballero <d@dcaballero.net> #Version: 1.0 import copy my_dictionary = {'Key':'Value', ('K','E','Y'):5} my_dictionary1 = copy.deepcopy(my_dictionary) my_dictionary[1] = 1 print(my_dictionary) print(my_dictionary1) import math as m print( m.cos(m.pi)) print( m....
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 28350, 25, 37456, 13, 9078, 198, 2, 13838, 25, 3271, 15976, 439, 3529, 1279, 67, 31, 17896, 397, 439, 3529, 13, 3262, 29, 198, 2, 14815, 25, 352, 13, 15, 628, 198, 11748, 4866, 1...
2.238971
272
""" ============================================================== Controlling the position and size of colorbars with Inset Axes ============================================================== This example shows how to control the position, height, and width of colorbars using `~mpl_toolkits.axes_grid1.inset_locator.i...
[ 37811, 198, 10052, 4770, 25609, 855, 198, 4264, 18886, 262, 2292, 290, 2546, 286, 3124, 34046, 351, 554, 2617, 12176, 274, 198, 10052, 4770, 25609, 855, 198, 198, 1212, 1672, 2523, 703, 284, 1630, 262, 2292, 11, 6001, 11, 290, 9647, 2...
2.373178
686
import re from dataclasses import InitVar, asdict, dataclass, field from datetime import datetime from typing import Dict, Optional REGEX = r'(?P<month>[A-Z][a-z]{2}) (?P<day>[0-9]{,2}) ' \ + r'(?P<time>[0-9]{2}:[0-9]{2}:[0-9]{2}) mail postfix/[a-z]+\[[0-9]+\]: ' \ + r'(?P<mail_id>[A-Z0-9]+): to=<(?P<to_addre...
[ 11748, 302, 198, 6738, 4818, 330, 28958, 1330, 44707, 19852, 11, 355, 11600, 11, 4818, 330, 31172, 11, 2214, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 628, 198, 31553, 6369, 796, 374, 6, 7, ...
1.946648
731
from datetime import timedelta from django.core.mail import EmailMessage from django.shortcuts import redirect from django.urls import path from .base import BaseLoginView, BaseGetCodeView, DomainEmailValidator urlpatterns = [ path('jlu/login/', LoginView.as_view()), path('jlu/get_code/', GetCodeView.as_v...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 9570, 12837, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 8...
3.027523
109
# Copyright 2019 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. """Change Exploration Module In this module we expose the Speculate function which generates a list of potential Change instances for exploration in the effo...
[ 2, 15069, 13130, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 37811, 19...
3.16819
1,094
# This program is by: Nidhi Patel # It uses: Python & Tkinter # It answers user's question using an api system. from tkinter import * import wolframalpha # This program is for the main background of the function root = Tk() root.title("Chatbot") root.geometry('400x400') # tells the user to enter the question t...
[ 2, 770, 1430, 318, 416, 25, 46798, 5303, 33110, 198, 2, 632, 3544, 25, 11361, 1222, 309, 74, 3849, 220, 198, 2, 632, 7429, 2836, 338, 1808, 1262, 281, 40391, 1080, 13, 628, 198, 6738, 256, 74, 3849, 1330, 1635, 220, 198, 11748, 17...
2.957143
280
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 20497, 8792, 364, 532, 3012, 338, 1366, 26478, 5794, 198, 2, 15069, 3648, 3012, 3457, 13, 220, 1439, 2489, 10395, 13, 198, 2, 3740, 1378, 16244, 364, 13, 13297, 13, 785, 14, ...
3.503584
558
from django import template from ..models import Area register = template.Library() @register.assignment_tag(takes_context=True) @register.inclusion_tag("home/navbar/navbar.html", takes_context=True) @register.inclusion_tag('home/navbar/navbar_dropdown.html', takes_context=True) @register.inclusion_tag('home/i...
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 11485, 27530, 1330, 9498, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 31, 30238, 13, 562, 16747, 62, 12985, 7, 83, 1124, 62, 22866, 28, 17821, 8, 628, 198, 31, 30238, 13, 259, ...
2.791045
268
#!/home/apollo/anaconda3/bin/python3 #-*- coding: utf-8 -*- #****************************************************************************** # Author : jtx # Last modified: 2020-04-13 15:34 # Filename : patent_crawber.py # Description : res_kb_patent专利信息生成,目前是转移企业相关的专利信息,实际这一步是用爬虫替换 #*************************...
[ 2, 48443, 11195, 14, 499, 15578, 14, 272, 330, 13533, 18, 14, 8800, 14, 29412, 18, 198, 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 17174, 17174, 46068, 1174, 198, 2, 6434, 220, 220, 220, 220, 220, 220, 1058...
2.457711
402
# URI Online Judge 1142 X = int(input()) count = 1 for x in range(1,X+1): String = '' for i in range(4): if i == 0: String += "{}".format(count) elif i == 3: String += " PUM" else: String += " {}".format(count) count += 1 print(String)
[ 2, 43975, 7467, 8974, 1367, 3682, 198, 198, 55, 796, 493, 7, 15414, 28955, 198, 9127, 796, 352, 198, 198, 1640, 2124, 287, 2837, 7, 16, 11, 55, 10, 16, 2599, 198, 220, 220, 220, 10903, 796, 10148, 628, 220, 220, 220, 329, 1312, ...
1.921687
166
from application import app from application import decorators from flask import request, session, redirect, url_for, Blueprint, render_template from run import gt import gorbin_tools2 page = Blueprint('user', __name__, template_folder='templates') @page.route('/user', methods = ['GET', 'POST'...
[ 6738, 3586, 1330, 598, 198, 6738, 3586, 1330, 11705, 2024, 198, 6738, 42903, 1330, 2581, 11, 6246, 11, 18941, 11, 19016, 62, 1640, 11, 39932, 11, 8543, 62, 28243, 198, 6738, 1057, 1330, 308, 83, 198, 11748, 30344, 8800, 62, 31391, 17,...
2.965753
146
#!/usr/bin/env python3 # Adoptd from https://github.com/google/python-laurel/blob/master/laurel/__init__.py # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 1215, 404, 8671, 422, 3740, 1378, 12567, 13, 785, 14, 13297, 14, 29412, 12, 5031, 495, 75, 14, 2436, 672, 14, 9866, 14, 5031, 495, 75, 14, 834, 15003, 834, 13, 9078, 198, ...
2.543785
1,416
from os import getenv from flask import Flask, render_template, request from dotenv import load_dotenv from .models import to_list
[ 6738, 28686, 1330, 651, 24330, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 764, 27530, 1330, 284, 62, 4868, 198 ]
3.852941
34
import numpy as np A=np.array([[10,2,1],[0,4,2],[1,2,2]]) b=np.array([3,2,1]) x=my_back_solve(A,b) print('x=',x) print('A x=', np.dot(A,x))
[ 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 201, 198, 32, 28, 37659, 13, 18747, 26933, 58, 940, 11, 17, 11, 16, 38430, 15, 11, 19, 11, 17, 38430, 16, 11, 17, 11, 17, 11907, 8, 201, 198, 65, 28, 37659, 13, 18747, 26933, ...
1.527778
108
"""Extract features and save as .mat files for ED-TCN. Only used for spatial-temporal or appearance stream (in the case of 2 stream). Do NOT use for motion stream. """ from __future__ import absolute_import from __future__ import print_function from __future__ import division import os import sys sys.path.insert( ...
[ 37811, 11627, 974, 3033, 290, 3613, 355, 764, 6759, 3696, 329, 8392, 12, 4825, 45, 13, 5514, 973, 329, 198, 2777, 34961, 12, 11498, 35738, 393, 5585, 4269, 357, 259, 262, 1339, 286, 362, 4269, 737, 2141, 5626, 779, 198, 1640, 6268, ...
2.02342
4,953
from flask import Flask,jsonify,request,make_response #from flask_httpauth import HTTPBasicAuth import sqlite3 as sql import requests #auth = HTTPBasicAuth() import datetime import base64 import binascii from flask_cors import CORS,cross_origin app = Flask(__name__) CORS(app) #3 @app.route('/api/v1/categories',method...
[ 6738, 42903, 1330, 46947, 11, 17752, 1958, 11, 25927, 11, 15883, 62, 26209, 198, 2, 6738, 42903, 62, 4023, 18439, 1330, 14626, 26416, 30515, 198, 11748, 44161, 578, 18, 355, 44161, 198, 11748, 7007, 198, 2, 18439, 796, 14626, 26416, 305...
2.351293
464
import csv import collections import os.path import re import operator import sys import datetime import shutil import ntpath import EsoLuaFile #from skipdict import SkipDict OUTPUT_PATH = "d:\\temp\\esoglobals\\" INPUT_FILENAME = "d:\\esoexport\\goodimages10\\globals_6b.txt" LUA_ROOT_PATH = "d:\\esoexpo...
[ 11748, 269, 21370, 201, 198, 11748, 17268, 201, 198, 11748, 28686, 13, 6978, 201, 198, 11748, 302, 201, 198, 11748, 10088, 201, 198, 11748, 25064, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 4423, 346, 201, 198, 11748, 299, 83, 6978, ...
2.190476
1,134
import logging import urllib.request from urllib.error import (HTTPError, URLError) LOG = logging.getLogger(__name__) HPO_URL = ("http://compbio.charite.de/jenkins/job/hpo.annotations.monthly/" "lastStableBuild/artifact/annotation/{0}") def fetch_resource(url, file_name=None): """Fetch a resource and ...
[ 11748, 18931, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 2956, 297, 571, 13, 18224, 1330, 357, 40717, 12331, 11, 37902, 2538, 81, 1472, 8, 198, 198, 25294, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 14...
2.274536
1,508
class Solution: """ @param s: a string @param words: a list of words @return: all starting indices of substring(s) """
[ 4871, 28186, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2488, 17143, 264, 25, 257, 4731, 198, 220, 220, 220, 2488, 17143, 2456, 25, 257, 1351, 286, 2456, 198, 220, 220, 220, 2488, 7783, 25, 477, 3599, 36525, 286, 3293, 1806,...
2.673077
52
''' script to train conditional normalizing flow to estimate p( theta | compressed p0k ). ''' import torch import os, sys import numpy as np import pt_sbi as PTsbi Nsims = int(sys.argv[1]) ############################################################################# # setup training and validation set #########...
[ 7061, 6, 198, 198, 12048, 284, 4512, 26340, 3487, 2890, 5202, 284, 8636, 279, 7, 262, 8326, 930, 25388, 198, 79, 15, 74, 6739, 628, 198, 7061, 6, 198, 11748, 28034, 198, 11748, 28686, 11, 25064, 198, 11748, 299, 32152, 355, 45941, 1...
2.702922
616
""" السلاسل النصية / النصوص في لغة البايثون """ print("السلاسل النصية / النصوص في لغة البايثون") print('Hello World') # ' ' print("Hello World") # " " print("--------------------------") # تعريف متغير يخزّن فيه نص print("تعريف متغير يخزّن فيه نص ") text = "Welcom To Python Lessons" print(text) print("----...
[ 37811, 198, 23525, 45692, 13862, 34247, 111, 13862, 28981, 23338, 148, 113, 22654, 45632, 1220, 28981, 23338, 148, 113, 30335, 148, 113, 18923, 223, 22654, 220, 13862, 148, 118, 45632, 28981, 39848, 12919, 22654, 148, 104, 30335, 23338, 198...
1.877729
458
from scraper import * s = Scraper(start=254826, end=256607, max_iter=30, scraper_instance=143) s.scrape_letterboxd()
[ 6738, 19320, 525, 1330, 1635, 220, 198, 82, 796, 1446, 38545, 7, 9688, 28, 1495, 2780, 2075, 11, 886, 28, 11645, 31980, 11, 3509, 62, 2676, 28, 1270, 11, 19320, 525, 62, 39098, 28, 21139, 8, 220, 198, 82, 13, 1416, 13484, 62, 9291...
2.510638
47
import keras import logging
[ 11748, 41927, 292, 198, 11748, 18931, 628, 628, 198 ]
3.555556
9
cipher_txt = open("ciphertext.txt").read() cipher_num = [] for i in range(72): cipher_num.append(ord(cipher_txt[i]) - 97) p_num = ord("p") - 97 c_num = ord("c") - 97 t_num = ord("t") - 97 f_num = ord("f") - 97 # try all key for a in range(26): for b in range(26): for c in range(26): for d...
[ 66, 10803, 62, 14116, 796, 1280, 7203, 66, 10803, 5239, 13, 14116, 11074, 961, 3419, 198, 66, 10803, 62, 22510, 796, 17635, 198, 198, 1640, 1312, 287, 2837, 7, 4761, 2599, 198, 220, 220, 220, 38012, 62, 22510, 13, 33295, 7, 585, 7, ...
1.518
1,000
from ktd_q import * import brl import models import matplotlib.pyplot as plt import seeding import numpy as np import gym import argparse parser = argparse.ArgumentParser() parser.add_argument('--kappa', type=int, default=10, help='kappa') parser.add_argument('--epsilon', type=float, default=0.0, help= 'epsilon for c...
[ 198, 6738, 479, 8671, 62, 80, 1330, 1635, 198, 11748, 865, 75, 220, 198, 11748, 4981, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 8228, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11550, 198, 117...
2.93
200
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2020-08-04 01:45 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 22, 319, 12131, 12, 2919, 12, 3023, 5534, 25, 2231, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.883117
77
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="anjie", # Replace with your own username version="1.0.0", author="Babatunde Adewole", author_email="adewole63@gmail.com", description="This python library provides corpus in English and va...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, ...
2.77592
299
import rospy, cv2, cv_bridge, numpy, math from sensor_msgs.msg import Image from std_msgs.msg import Float64 rospy.init_node('follower') follower = Follower() rospy.spin()
[ 11748, 686, 2777, 88, 11, 269, 85, 17, 11, 269, 85, 62, 9458, 11, 299, 32152, 11, 10688, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, 7412, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 48436, 2414, 628, 628, 198, 305, ...
2.588235
68