content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import sys central_line = [] #-----------------------# if len(sys.argv) < 3: error("Usage: python metro.py [read file] [write file]") f = open(sys.argv[2],'w') f.write("<html><head><style>@font-face { font-family: KeepCalm; src: url(http://ff.static.1001fonts.net/k/e/keep-calm.regular.ttf); } html { overflow-x...
[ 11748, 25064, 198, 198, 31463, 62, 1370, 796, 17635, 628, 198, 198, 2, 19351, 6329, 2, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 1279, 513, 25, 198, 220, 220, 220, 4049, 7203, 28350, 25, 21015, 24536, 13, 9078, 685, 961, 2393, 60...
2.539511
3,885
# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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...
[ 2, 15069, 357, 66, 8, 366, 8199, 78, 19, 73, 1, 198, 2, 21227, 19, 73, 10710, 9564, 685, 4023, 1378, 710, 78, 19, 73, 13, 785, 60, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 21227, 19, 73, 13, 198, 2, 198, 2, 49962, 739, 26...
3.269129
758
#!/usr/bin/env python # # NopSCADlib Copyright Chris Palmer 2018 # nop.head@gmail.com # hydraraptor.blogspot.com # # This file is part of NopSCADlib. # # NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the # GNU General Public License as published by the Free Software Foundatio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 198, 2, 399, 404, 6173, 2885, 8019, 15069, 5180, 18918, 2864, 198, 2, 299, 404, 13, 2256, 31, 14816, 13, 785, 198, 2, 2537, 7109, 283, 2373, 273, 13, 35217, 13, 785, 198, ...
3.171014
345
# -*- coding: utf-8 -*- # @Time : 2021/03/13 17:31:29 # @Author : DannyDong # @File : RunTest.py # @Describe: 用例执行逻辑 from app.Utils import DataReceive # 测试执行类 # 处理前置条件 # 用例执行逻辑
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 33448, 14, 3070, 14, 1485, 1596, 25, 3132, 25, 1959, 198, 2, 2488, 13838, 220, 1058, 15105, 35, 506, 198, 2, 2488, 8979, 220, 220...
1.427536
138
from collections import OrderedDict __author__ = 'Joe'
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 834, 9800, 834, 796, 705, 19585, 6, 628, 628, 198 ]
3.157895
19
with open('p081_matrix.txt') as f: content = f.readlines() print(content) clear_list = [] for i in range(0, len(content)): clear_list.append(content[i].strip().split(',')) for i in range(1,80): clear_list[0][i] = int(clear_list[0][i]) + int(clear_list[0][i-1]) for i in range(1,80): clear_list[i][0]...
[ 4480, 1280, 10786, 79, 2919, 16, 62, 6759, 8609, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 2695, 796, 277, 13, 961, 6615, 3419, 198, 198, 4798, 7, 11299, 8, 198, 198, 20063, 62, 4868, 796, 17635, 198, 198, 1640, 1312, 28...
2.041667
336
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os from HTTPerror import HTTP404Error, HTTP302Error from server import static_setting import logging
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 7154, 51, 5990, 1472, 1330, 14626, 26429, 12331, 11, 14626, 22709, 12331...
3.052632
57
from .label_smooth import LabelSmoothCrossEntropyLoss
[ 6738, 764, 18242, 62, 5796, 5226, 1330, 36052, 7556, 5226, 21544, 14539, 28338, 43, 793 ]
3.533333
15
from django.test import TestCase from views import translate_text # Create your tests here.
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 5009, 1330, 15772, 62, 5239, 198, 198, 2, 13610, 534, 5254, 994, 13, 628, 628 ]
3.84
25
#!/usr/bin/env python # Copyright (C) 2014 Craig Phillips. All rights reserved. import unittest from libgsync.sync.file import SyncFile
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 34, 8, 1946, 13854, 17630, 13, 220, 1439, 2489, 10395, 13, 198, 198, 11748, 555, 715, 395, 198, 6738, 9195, 70, 27261, 13, 27261, 13, 7753, 1330, 35908, 8979, 198...
3.232558
43
import json from datetime import timedelta from django.urls import reverse from django.utils import timezone from .. import test from ..models import Post, Thread from ..test import patch_category_acl from .test_threads_api import ThreadsApiTestCase
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 11485, 1330, 1332, 198, 6738, 11485, 27530, 1330, 2947,...
3.666667
69
import asyncio import json import logging import traceback from watchmen.collection.model.topic_event import TopicEvent from watchmen_boot.config.config import settings from watchmen.raw_data.service.import_raw_data import import_raw_topic_data log = logging.getLogger("app." + __name__) loop = asyncio.get_event_loop(...
[ 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 12854, 1891, 198, 198, 6738, 2342, 3653, 13, 43681, 13, 19849, 13, 26652, 62, 15596, 1330, 47373, 9237, 198, 6738, 2342, 3653, 62, 18769, 13, 11250, 13, 11250, 1330, 6...
3.045113
133
import random import sys """ This class represents a maze instance """ # Maze class itself # Represents single node in the maze
[ 11748, 4738, 198, 11748, 25064, 198, 198, 37811, 198, 1212, 1398, 6870, 257, 31237, 4554, 198, 37811, 628, 198, 2, 33412, 1398, 2346, 628, 198, 2, 1432, 6629, 2060, 10139, 287, 262, 31237, 198 ]
3.911765
34
from PyQt5.QtWidgets import QPushButton from hue import UnauthorizedUserError, GenericHueError
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 49222, 21864, 198, 198, 6738, 37409, 1330, 791, 19721, 12982, 12331, 11, 42044, 39, 518, 12331, 198 ]
3.2
30
### RPGOnline ### A Synergy Studios Project import random # - GAME CLASSES - # class Game: """A class for a single game that stores all the other classes. For now, this refers to local-game only classes.""" class Shop: """A class to represent the shop, in which players can buy from.""" pass #...
[ 21017, 12909, 14439, 198, 21017, 317, 1632, 5877, 13799, 4935, 198, 198, 11748, 4738, 198, 198, 2, 532, 30517, 42715, 1546, 532, 1303, 198, 198, 4871, 3776, 25, 628, 220, 220, 220, 37227, 32, 1398, 329, 257, 2060, 983, 326, 7000, 477,...
2.643223
1,365
# home.py from .alarm import Alarm from .light import Light from .lock import Lock
[ 2, 1363, 13, 9078, 198, 198, 6738, 764, 282, 1670, 1330, 978, 1670, 198, 6738, 764, 2971, 1330, 4401, 198, 6738, 764, 5354, 1330, 13656 ]
3.32
25
from io import StringIO from typing import NamedTuple, List, Set, Tuple, Optional from sites import SELECTORS from preferences import URLS from selenium.webdriver import FirefoxProfile, FirefoxOptions, Firefox from selenium.common.exceptions import NoSuchElementException from notification import notify_about_home, noti...
[ 6738, 33245, 1330, 10903, 9399, 198, 6738, 19720, 1330, 34441, 51, 29291, 11, 7343, 11, 5345, 11, 309, 29291, 11, 32233, 198, 6738, 5043, 1330, 33493, 20673, 198, 6738, 15387, 1330, 37902, 6561, 198, 6738, 384, 11925, 1505, 13, 12384, 2...
2.10095
3,368
import onnx import onnx.numpy_helper as numpy_helper import numpy as np # This function checks whether two onnx files (onnx_A and onnx_B) have the same underlying computational graph and operators.
[ 11748, 319, 77, 87, 198, 11748, 319, 77, 87, 13, 77, 32152, 62, 2978, 525, 355, 299, 32152, 62, 2978, 525, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 770, 2163, 8794, 1771, 734, 319, 77, 87, 3696, 357, 261, 77, 87, 62, 32,...
3.225806
62
from model.contact import Contact testdata = [ Contact(firstname="qqqqqqqq", middlename="wwwwwww", nickname="eeefdeeee", title="vvvvvvvvvv", lastname="eeeeeeeee", company="xccccccccc", adress="ffcvcxvcvcxvxcvx", home="23144124214", mobile="45565656678", work="56678678678", fax="...
[ 6738, 2746, 13, 32057, 1330, 14039, 198, 198, 9288, 7890, 796, 685, 198, 220, 220, 220, 14039, 7, 11085, 3672, 2625, 38227, 38227, 38227, 38227, 1600, 285, 1638, 11925, 480, 2625, 1383, 1383, 2503, 1600, 21814, 2625, 1453, 891, 67, 4159...
2.044574
516
#coding=utf-8 import sys import os from os.path import abspath, dirname sys.path.append(abspath(dirname(__file__))) import tkinter import tkinter.filedialog from tkinter import * import Fun ElementBGArray={} ElementBGArray_Resize={} ElementBGArray_IM={} from PyPDF2 import PdfFileReader, PdfFileWriter DirPath=""...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 220, 220, 28686, 13, 6978, 1330, 2352, 6978, 11, 26672, 3672, 198, 17597, 13, 6978, 13, 33295, 7, 397, 2777, 776, 7, 15908, 3672, 7, 834, 7753, 834, ...
2.728814
118
''' <실수 줄이기 메모> 소요 시간 30분(권장 20분 문제) 초기화 하는 과정(누산) 알고리즘을 잘 못 짜서 헤맸다. 쉬운 문제일수록, 집중해서 정확히 한번에 풀고 끝내자 ㅜㅜ! <답안 꿀팁> 1) python list.count(<<특정 값>>) 시간 복잡도 O(N) 근데 사실 내가 짠 코드가 한번 loop로 끝이니 더 빠르긴함. 다만 여유로우니 위 built-in 사용하면 코드가 깔끔함. 2) stages 1부터 차례로 실패율을 계산하면서, 전체 사람수를 줄여나감 fail = count / length length -= count 이렇게 하면 더 코드...
[ 7061, 6, 198, 27, 168, 233, 97, 168, 230, 246, 23821, 97, 226, 35975, 112, 166, 116, 108, 31619, 102, 242, 167, 103, 101, 29, 198, 168, 228, 234, 168, 248, 242, 23821, 233, 250, 166, 108, 226, 1542, 167, 114, 226, 7, 166, 114, ...
0.791377
1,438
# -*- coding: utf-8 -*- import atexit import json import os import shlex import shutil import tempfile import unittest from .exceptions import CommandError from .utils import run_cmd_wait, run_cmd_wait_nofail, which, vramsteg_binary_location, DEFAULT_EXTENSION_PATH from .compat import STRING_TYPE class Vramsteg(obje...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 379, 37023, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 427, 2588, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 6738, ...
2.334583
2,935
import unittest import cq_examples.Ex016_Using_Construction_Geometry as ex
[ 11748, 555, 715, 395, 198, 11748, 269, 80, 62, 1069, 12629, 13, 3109, 27037, 62, 12814, 62, 36687, 62, 10082, 15748, 355, 409, 198 ]
3.125
24
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import pytest from flexget.entry import Entry from flexget.plugins.list.imdb_list import ImdbEntrySet @pytest.mark.online
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 7297, 11, 4112, 62, 11748, 198, 6738, 3170, 1040, 1330, 1635, 220, 1303, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 11748, 11, 2266, 18156, 12, 18780, 259, 628, 198, ...
3.292683
82
from onnx import TensorProto from onnx import helper as oh from finn.custom_op.registry import getCustomOp from finn.transformation import Transformation from finn.util.fpgadataflow import is_fpgadataflow_node class InsertDWC(Transformation): """Ensure that the graph is terminated with a TLastMarker node, inse...
[ 6738, 319, 77, 87, 1330, 309, 22854, 2964, 1462, 198, 6738, 319, 77, 87, 1330, 31904, 355, 11752, 198, 198, 6738, 957, 77, 13, 23144, 62, 404, 13, 2301, 4592, 1330, 651, 15022, 18257, 198, 6738, 957, 77, 13, 7645, 1161, 1330, 49127,...
3.342857
105
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() from .models import User from .models import CoffeeShop
[ 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 198, 9945, 796, 16363, 2348, 26599, 3419, 198, 198, 6738, 764, 27530, 1330, 11787, 198, 6738, 764, 27530, 1330, 19443, 29917, 198 ]
3.515152
33
import pygame from GameObj import GameObj import random # draws the segment, go_through by default is false # checks the boundary for the segment # goes through the boundary and comes through the other end
[ 11748, 12972, 6057, 198, 6738, 3776, 49201, 1330, 3776, 49201, 198, 11748, 4738, 628, 198, 220, 220, 220, 1303, 14293, 262, 10618, 11, 467, 62, 9579, 416, 4277, 318, 3991, 628, 220, 220, 220, 1303, 8794, 262, 18645, 329, 262, 10618, 1...
3.877193
57
""" Copyright 2019 Software Reliability Lab, ETH Zurich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
[ 37811, 198, 15269, 13130, 10442, 4718, 12455, 3498, 11, 35920, 43412, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 1378...
4
174
# -*- coding: utf-8 -*- # Copyright 2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 1584, 44628, 3457, 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...
3.067434
608
import tushare as ts import pymongo import json stock_lists = ts.get_stock_basics() #获取所有股票列表 conn = pymongo.MongoClient('127.0.0.1', port=27017) conn.db.tickdata.insert_many(json.loads(stock_lists.to_json(orient='records'))) print(stock_lists)
[ 11748, 256, 1530, 533, 355, 40379, 198, 11748, 279, 4948, 25162, 198, 11748, 33918, 198, 13578, 62, 20713, 796, 40379, 13, 1136, 62, 13578, 62, 12093, 873, 3419, 1303, 164, 236, 115, 20998, 244, 33699, 222, 17312, 231, 164, 224, 94, 1...
2.216216
111
# Regression test based on the diffusion of a Gaussian # velocity field. Convergence of L1 norm of the error # in v is tested. Expected 1st order conv. for STS. # Modules # (needed for global variables modified in run_tests.py, even w/o athena.run(), etc.) import scripts.utils.athena as athena # noqa import scripts...
[ 2, 3310, 2234, 1332, 1912, 319, 262, 44258, 286, 257, 12822, 31562, 198, 2, 15432, 2214, 13, 220, 35602, 12745, 286, 406, 16, 2593, 286, 262, 4049, 198, 2, 287, 410, 318, 6789, 13, 220, 1475, 7254, 352, 301, 1502, 3063, 13, 329, 3...
2.928962
183
import unittest #import unittest module from credentials import User from credentials import Credentials class TestUser(unittest.TestCase): ''' Test class that defines test cases for the user class behaviours. Args: unittest.TestCase: TestCase class that helps in creating test cases ''' ...
[ 11748, 555, 715, 395, 1303, 11748, 555, 715, 395, 8265, 198, 6738, 18031, 1330, 11787, 198, 6738, 18031, 1330, 327, 445, 14817, 198, 198, 4871, 6208, 12982, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 705, 7061, 198,...
2.268894
1,826
#!/usr/bin/env python3 import sys, random assert sys.version_info >= (3,7), "This script requires at least Python 3.7" print('Greetings!')#prints 'Greetings' in window colors = ['red','orange','yellow','green','blue','violet','purple']#list of colors play_again = ''#establishing empty variable best_count = sys.maxsi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 11, 4738, 198, 198, 30493, 25064, 13, 9641, 62, 10951, 18189, 357, 18, 11, 22, 828, 366, 1212, 4226, 4433, 379, 1551, 11361, 513, 13, 22, 1, 628, 198, 4798, 10786, ...
3.014331
628
import time import pytest from nucleus import BoxAnnotation from tests.helpers import ( TEST_BOX_ANNOTATIONS, TEST_MODEL_NAME, TEST_SLICE_NAME, get_uuid, ) from tests.modelci.helpers import create_box_annotations, create_predictions from tests.test_dataset import make_dataset_items @pytest.fixture(s...
[ 11748, 640, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 29984, 1330, 8315, 2025, 38983, 198, 6738, 5254, 13, 16794, 364, 1330, 357, 198, 220, 220, 220, 43001, 62, 39758, 62, 1565, 11929, 18421, 11, 198, 220, 220, 220, 43001, 62, 333...
2.723214
336
from setuptools import setup, find_packages long_description = open('README.rst').read() setup( name='prophy', version='1.2.4', author='Krzysztof Laskowski', author_email='aurzenligl@gmail.com', maintainer='Krzysztof Laskowski', maintainer_email='aurzenligl@gmail.com', license='MIT license...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 6511, 62, 11213, 796, 1280, 10786, 15675, 11682, 13, 81, 301, 27691, 961, 3419, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 1676, 6883, 3256, 198, 220, 220, ...
2.723849
717
from pathlib import Path from typing import List, Optional, Tuple, Union import numpy as np import pandas as pd class PemsBayIo: """A class that encapsulates i/o operations related to the PeMS-Bay dataset. Args: n_readings: The number of readings in the dataset (not to be confunded with ...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 309, 29291, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4871, 350, 5232, 15262, 40, 78, 25, 198, 220, ...
2.193205
2,443
import os import sciluigi as sl
[ 11748, 28686, 198, 11748, 629, 346, 84, 25754, 355, 1017, 628 ]
3
11
# vim: set ts=8 sts=2 sw=2 tw=99 et: # # This file is part of AMBuild. # # AMBuild is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
[ 2, 43907, 25, 900, 40379, 28, 23, 39747, 28, 17, 1509, 28, 17, 665, 28, 2079, 2123, 25, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 3001, 15580, 13, 198, 2, 198, 2, 3001, 15580, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 2...
3.587065
201
import flask from flask import Flask, jsonify, render_template, url_for, request, redirect, jsonify, send_from_directory from werkzeug.utils import secure_filename import pixellib from pixellib.torchbackend.instance import instanceSegmentation import os app = Flask(__name__) upload_folder = "static" os.makedirs(uploa...
[ 11748, 42903, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 8543, 62, 28243, 11, 19016, 62, 1640, 11, 2581, 11, 18941, 11, 33918, 1958, 11, 3758, 62, 6738, 62, 34945, 198, 6738, 266, 9587, 2736, 1018, 13, 26791, 1330, 5713, 62, ...
2.751938
258
#!/usr/bin/env python # encoding: utf-8 __author__ = 'hasee' import socket import json if __name__ == '__main__': pass
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 834, 9800, 834, 796, 705, 71, 589, 68, 6, 198, 198, 11748, 17802, 198, 11748, 33918, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834,...
2.433962
53
import pvlib as pv from datetime import datetime import pandas.plotting from analytics.location.path import LinearPath from analytics.solar_qualities.position import get_solar_position_time_range_track from analytics.plots.plot_solar_position import plot_elevation_azimuth from analytics.plots.plot_path import plot_path...
[ 11748, 279, 85, 8019, 355, 279, 85, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 19798, 292, 13, 29487, 889, 198, 6738, 23696, 13, 24886, 13, 6978, 1330, 44800, 15235, 198, 6738, 23696, 13, 82, 6192, 62, 13255, 871, 13, 9150, ...
3.259843
127
import sys import os import torch import matplotlib.pylab as plt import numpy as np from TorchProteinLibrary.FullAtomModel import Angles2Coords from TorchProteinLibrary.FullAtomModel import Coords2TypedCoords from TorchProteinLibrary.FullAtomModel import Coords2CenteredCoords from TorchProteinLibrary.Volume import Typ...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 34868, 47, 35574, 23377, 13, 13295, 2953, 296, 17633, 1330, 2895, 82...
2.281802
1,132
""" Test various halo profile properties. """ from halomod.concentration import Bullock01Power from halomod import profiles as pf from halomod import TracerHaloModel import pytest import numpy as np bullock = Bullock01Power(ms=1e12) m = np.logspace(10, 15, 100) r = np.logspace(-2, 2, 20) class NFWnum(pf.Profile): ...
[ 37811, 198, 14402, 2972, 289, 7335, 7034, 6608, 13, 198, 37811, 198, 6738, 10284, 296, 375, 13, 1102, 1087, 1358, 1330, 8266, 735, 486, 13434, 198, 6738, 10284, 296, 375, 1330, 16545, 355, 279, 69, 198, 6738, 10284, 296, 375, 1330, 83...
1.886148
1,054
# EXECUTION TIME: 4s # Python 3 ImportError import sys sys.path.append('.') import numpy as np import matplotlib.pyplot as plt import seaborn as sns import src as ya from sklearn import tree import graphviz # prettify plots plt.rcParams['font.family'] = 'Times New Roman' sns.set_style({"xtick.direction": "in", "yti...
[ 2, 7788, 2943, 35354, 20460, 25, 604, 82, 198, 198, 2, 11361, 513, 17267, 12331, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 2637, 8, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 294...
2.444988
1,227
from kombu import Connection
[ 6738, 479, 2381, 84, 1330, 26923 ]
4.666667
6
# translate.py # Author: Elias Rubin import requests from config import * def parse_body(body_text): """ param: body_text :: string """ try: split_text = body_text.rsplit(" ") source_lang = split_text[0] target_lang = split_text[1] query_string = " ".join(split_text...
[ 2, 15772, 13, 9078, 198, 2, 6434, 25, 41462, 34599, 198, 11748, 7007, 198, 6738, 4566, 1330, 1635, 628, 198, 4299, 21136, 62, 2618, 7, 2618, 62, 5239, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 5772, ...
2.385214
771
from django.core.management.base import BaseCommand from django.db import transaction from hours.models import Resource
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 2250, 13, 27530, 1330, 20857, 628 ]
4.206897
29
from z3 import * from ModelParser import ModelParser import argparse from configparser import ConfigParser import time from DeplGenerator import DeplGenerator # A = ['A1','A2','A3'] # D = [2,2,2] # C = [['A1','A2']] # S = [[['A1','A2'], ['A3']]] # H = {} # num_nodes = 3 HOSTCONF = '/usr/local/riaps/etc/r...
[ 6738, 1976, 18, 1330, 1635, 198, 6738, 9104, 46677, 1330, 9104, 46677, 198, 11748, 1822, 29572, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 11748, 640, 198, 6738, 1024, 489, 8645, 1352, 1330, 1024, 489, 8645, 1352, 220, 220, 220, 1...
2.281746
252
from fastapi import APIRouter from app.api.endpoints import user_controller, course_controller api_router = APIRouter() api_router.include_router(user_controller.router, prefix="/users", tags=["users"]) api_router.include_router(course_controller.router, prefix="/courses", tags=["courses"])
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 198, 198, 6738, 598, 13, 15042, 13, 437, 13033, 1330, 2836, 62, 36500, 11, 1781, 62, 36500, 198, 198, 15042, 62, 472, 353, 796, 3486, 4663, 39605, 3419, 198, 15042, 62, 472, 353, 13, 17256, ...
3.12766
94
from backend import * print(search(year = "1918"))
[ 6738, 30203, 1330, 1635, 201, 198, 201, 198, 201, 198, 4798, 7, 12947, 7, 1941, 796, 366, 1129, 1507, 48774, 201, 198 ]
2.590909
22
# -*- coding: utf-8 -*- from django import views from spot_trend_grid.views import SpotTrendGridView, logger, BatchOrderDetailView, BatchOrderView
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 6738, 42625, 14208, 1330, 5009, 201, 198, 201, 198, 6738, 4136, 62, 83, 10920, 62, 25928, 13, 33571, 1330, 15899, 45461, 41339, 7680, 11, 49706, 11, 347, ...
2.606557
61
from __future__ import absolute_import from pyrevolve.sdfbuilder import Element from pyrevolve.sdfbuilder.util import number_format as nf class BasicBattery(Element): """ The rv:battery element, to be included in a robot's plugin """ TAG_NAME = 'rv:battery' def __init__(self, level): """...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 12972, 18218, 6442, 13, 82, 7568, 38272, 1330, 11703, 198, 6738, 12972, 18218, 6442, 13, 82, 7568, 38272, 13, 22602, 1330, 1271, 62, 18982, 355, 299, 69, 628, 198, 4871, ...
2.400685
292
from .cmd import main, version __version__ = version
[ 6738, 764, 28758, 1330, 1388, 11, 2196, 198, 834, 9641, 834, 796, 2196, 198, 220, 220, 220, 220 ]
3.166667
18
#!/usr/bin/env python3 import functools import inspect import typing as ty from .exceptions import InvalidArgumentValueException def validate_range(parameter: str, minimum: ty.Union[int, float], maximum: ty.Union[int, float]) -> ty.Callable: """ Validate a parameter range. Args: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1257, 310, 10141, 198, 11748, 10104, 198, 11748, 19720, 355, 1259, 198, 198, 6738, 764, 1069, 11755, 1330, 17665, 28100, 1713, 11395, 16922, 628, 198, 4299, 26571, 62, 9521, 7...
2.686486
185
"""This sub command uploads the resource type to CloudFormation. Projects can be created via the 'init' sub command. """ import logging from .project import Project LOG = logging.getLogger(__name__)
[ 37811, 1212, 850, 3141, 9516, 82, 262, 8271, 2099, 284, 10130, 8479, 341, 13, 198, 198, 16775, 82, 460, 307, 2727, 2884, 262, 705, 15003, 6, 850, 3141, 13, 198, 37811, 198, 11748, 18931, 198, 198, 6738, 764, 16302, 1330, 4935, 198, ...
3.578947
57
import sys try: from StringIO import StringIO except ImportError: from io import StringIO
[ 198, 11748, 25064, 198, 28311, 25, 198, 220, 422, 10903, 9399, 1330, 10903, 9399, 198, 16341, 17267, 12331, 25, 198, 220, 422, 33245, 1330, 10903, 9399, 628, 628, 628, 628, 198, 220, 220, 198 ]
3.117647
34
from .iode import *
[ 6738, 764, 72, 1098, 1330, 1635 ]
3.166667
6
message = "Hello python world" print(message) message = "Hello python crash course world" print(message)
[ 20500, 796, 366, 15496, 21015, 995, 1, 198, 4798, 7, 20500, 8, 198, 198, 20500, 796, 366, 15496, 21015, 7014, 1781, 995, 1, 198, 4798, 7, 20500, 8 ]
3.75
28
from __future__ import with_statement # this is to work with python2.5 from pyps import workspace from os import remove import pypips filename="pragma" pypips.delete_workspace(filename) with workspace(filename+".c", parents=[], driver="sse", name=filename) as w: m=w[filename] m.suppress_dead_code() m.display()
[ 6738, 11593, 37443, 834, 1330, 351, 62, 26090, 1303, 428, 318, 284, 670, 351, 21015, 17, 13, 20, 198, 6738, 12972, 862, 1330, 44573, 198, 6738, 28686, 1330, 4781, 198, 11748, 279, 4464, 2419, 198, 198, 34345, 2625, 1050, 363, 2611, 1,...
3.048077
104
#!/usr/bin/env python import argparse import sys import os import time # stackoverflow.com/questions/230751/how-to-flush-output-of-print-function # https://opensource.com/article/19/7/parse-arguments-python options = getOptions() print(options) img_small = options.local + "small.png" # if it is cached, l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 640, 628, 628, 198, 2, 8931, 2502, 11125, 13, 785, 14, 6138, 507, 14, 19214, 48365, 14, 4919, 12, 1462, 12, 25925,...
2.531596
3,339
# -*- coding: utf-8 -*- """ Created on Sat Dec 4 11:19:02 2021 @author: chris """ # part 1 with open('input.txt') as f: lines = f.read().splitlines() # doesn't read \n reportSum = [0] * len(lines[0]) gammaRateArray = [0] * len(lines[0]) epsilonRateArray = [0] * len(lines[0]) for line...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 4280, 220, 604, 1367, 25, 1129, 25, 2999, 33448, 198, 198, 31, 9800, 25, 442, 2442, 198, 37811, 628, 198, 2, 636, 352, 198, 198, 4480, ...
2.003752
533
"""Test call for testing web retrieve, don't call automatically, as it does a real http GET.""" import unittest from unittest import TestCase from src.utils import Rut from src import web class TestGetPage(TestCase): """Get a real page using dummy_rut.""" def test_client(self): """Simple get and pa...
[ 37811, 14402, 869, 329, 4856, 3992, 19818, 11, 836, 470, 869, 6338, 11, 355, 340, 857, 257, 198, 5305, 2638, 17151, 526, 15931, 198, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 12351, 13, ...
2.80226
177
from flask import Flask, render_template, request, make_response, redirect, url_for from blog import Config, User, Comment, Post app = Flask(__name__) @app.route("/", methods=["POST", "GET"]) @app.route("/admin", methods=["POST", "GET"]) if __name__ == "__main__": Config.setup() app.run(debug=True)
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 787, 62, 26209, 11, 18941, 11, 19016, 62, 1640, 198, 198, 6738, 4130, 1330, 17056, 11, 11787, 11, 18957, 11, 2947, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, ...
2.810811
111
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System # All trademark and other rights reserved by their respective owners # Copyright 2008-2021 Neongecko.com Inc. # BSD-3 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fo...
[ 2, 10635, 1340, 9552, 357, 15972, 8, 47466, 11, 10442, 7712, 10897, 1222, 15678, 7712, 4482, 198, 2, 1439, 16028, 290, 584, 2489, 10395, 416, 511, 11756, 4393, 198, 2, 15069, 3648, 12, 1238, 2481, 3169, 14220, 37549, 13, 785, 3457, 13...
3.345219
617
import FWCore.ParameterSet.Config as cms
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 220, 220, 220, 220, 198 ]
2.705882
17
from functools import reduce from operator import mul from typing import Tuple import torch import torch.nn as nn import torch.nn.functional as F
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 10088, 1330, 35971, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 628 ]
3.75
40
import setuptools from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.md")) as f: long_description = f.read() with open(path.join(here, 'requirements.txt')) as f: install_requirements = f.read().splitlines() with open(path.join(here, 'test-requirements.txt')) a...
[ 11748, 900, 37623, 10141, 198, 6738, 28686, 1330, 3108, 628, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 198, 4480, 1280, 7, 6978, 13, 22179, 7, 1456, 11, 366, 15675, 11682, 13, ...
2.744186
516
import charlieplex from machine import Pin, I2C from time import sleep i2c = I2C(scl=Pin(22), sda=Pin(21)) display = charlieplex.Matrix(i2c) display.fill(0) x = 0 y = 0 while True: display.pixel(y, x, 255) x += 1 print(x, y) if( x > 7): x = 0 y += 1 if(y>7): display.fill(...
[ 11748, 1149, 14485, 11141, 201, 198, 6738, 4572, 1330, 13727, 11, 314, 17, 34, 201, 198, 6738, 640, 1330, 3993, 201, 198, 72, 17, 66, 796, 314, 17, 34, 7, 38528, 28, 28348, 7, 1828, 828, 264, 6814, 28, 28348, 7, 2481, 4008, 201, ...
1.867347
196
import MeCab import mecabpy import mecabpy.ipa class TestNode: """mecabpy.ipa.Node のテスト """ INPUT_TEXT = '太郎はこの本を田中を見た女性に渡した。' def test_attr_surface(self): """NodeWrapper.surface のテスト """ surface = '見' node = mecabpy.ipa.Node(surface=surface, ...
[ 11748, 2185, 34, 397, 198, 198, 11748, 502, 66, 397, 9078, 198, 11748, 502, 66, 397, 9078, 13, 541, 64, 628, 198, 4871, 6208, 19667, 25, 198, 220, 220, 220, 37227, 76, 721, 397, 9078, 13, 541, 64, 13, 19667, 220, 5641, 24336, 4330...
1.352201
1,431
from bulls_n_cows import* TEST_GUESSES = [[1,2, 3, 4], [5, 2, 3, 4], [7, 6, 5, 4], [0, 9, 8, 5], [2, 4, 6, 8], [1, 3, 5, 7], [1, 2, 0, 9] ] TEST_SECRET = [[1,9,8, 7],[2,4,6, 7], [1,2,0, 9],[7,6,5, 4]] def test_count_bulls_and_cows(): ''' Function test_count_bulls_and_cows Input: None. ...
[ 6738, 40317, 62, 77, 62, 66, 1666, 1330, 9, 198, 51, 6465, 62, 38022, 7597, 1546, 796, 16410, 16, 11, 17, 11, 513, 11, 604, 4357, 685, 20, 11, 362, 11, 513, 11, 604, 4357, 685, 22, 11, 718, 11, 642, 11, 604, 4357, 685, 15, 1...
2.22515
1,670
#!/usr/bin/env python3 import math import os import random import re import sys # Complete the maxSubsetSum function below. if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') n = int(input()) arr = list(map(int, input().rstrip().split())) res = maxSubsetSum(arr) fptr.write(str...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 25064, 198, 198, 2, 13248, 262, 3509, 7004, 2617, 13065, 2163, 2174, 13, 198, 198, 361, 11593, ...
2.4375
144
from datetime import datetime from ems.models.ambulances.ambulance import Ambulance
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 795, 82, 13, 27530, 13, 4131, 377, 1817, 13, 4131, 377, 590, 1330, 12457, 377, 590, 628 ]
3.307692
26
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# -*- coding: utf-8 -*- translations = { # Days 'days': { 0: 'sunnudagur', 1: 'mánadagur', 2: 'týsdagur', 3: 'mikudagur', 4: 'hósdagur', 5: 'fríggjadagur', 6: 'leygardagur' }, 'days_abbrev': { 0: 'sun', 1: 'mán', 2: 'týs', ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7645, 49905, 796, 1391, 198, 220, 220, 220, 1303, 12579, 198, 220, 220, 220, 705, 12545, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 657, 25, 705, 19155,...
1.610536
1,063
#!/usr/bin/env python """Databench command line executable. Run to create a server that serves the analyses pages and runs the python backend.""" import os import sys import signal import random import logging import argparse import werkzeug.serving from . import __version__ as DATABENCH_VERSION def main(): ""...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 27354, 397, 24421, 3141, 1627, 28883, 13, 5660, 284, 2251, 257, 4382, 326, 9179, 198, 1169, 13523, 5468, 290, 4539, 262, 21015, 30203, 526, 15931, 628, 198, 11748, 28686, 198, 117...
2.308405
1,618
from distutils.core import setup setup( name = 'Hexy', packages = ['hexy'], version = '1.4.4', license='MIT', description = 'A library that makes working with a hexagonal lattice easier.', author = 'Norbu Tsering', author_email = 'norbu.tsering.cs@gmail.com'...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 40406, 7, 198, 220, 1438, 796, 705, 39, 1069, 88, 3256, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 10392, 796, 37250, 258, 5431, 6, 4357, 220, 220, 220, 198, 220, 2196, 796...
2.116364
550
# Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 220, 15069, 13130, 383, 376, 6158, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 28...
3.62963
216
import json import re
[ 11748, 33918, 201, 198, 11748, 302, 201, 198, 201, 198, 201 ]
2.454545
11
from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse from djoser.serializers import UserSerializer from rest_framework import viewsets, permissions, status from rest_framework.decorators import action from rest_framework.response import Response from djoser.views import SetPa...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 17594, 11, 2604, 448, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 13416, 13, 46911, 11341, 1330, 11787, 32634, 7509, 198, 6738, 1334, ...
4.126126
111
# This is your "setup.py" file. # See the following sites for general guide to Python packaging: # * `The Hitchhiker's Guide to Packaging <http://guide.python-distribute.org/>`_ # * `Python Project Howto <http://infinitemonkeycorps.net/docs/pph/>`_ from setuptools import setup, find_packages import sys, os #from C...
[ 2, 770, 318, 534, 366, 40406, 13, 9078, 1, 2393, 13, 198, 2, 4091, 262, 1708, 5043, 329, 2276, 5698, 284, 11361, 16846, 25, 198, 2, 220, 220, 1635, 4600, 464, 36456, 71, 18320, 338, 10005, 284, 6400, 3039, 1279, 4023, 1378, 41311, ...
2.525081
1,236
import cairo import math
[ 11748, 1275, 7058, 198, 11748, 10688, 198 ]
3.571429
7
#import math import os w1 = [0]*64 s0 = [0]*64 s1 = [0]*64 for i in range (64): w1[i] = [0]*32 s0[i] = [0]*32 s1[i] = [0]*32 w1hex= [0x0000c020, 0x8e195e82, 0x5806a5ac, 0x9467a653, 0x00fe9de6, 0xf0c34b81, 0x6f230600, 0x00000000, 0x00000000, 0x364c0811, 0x8ea34017, 0xb68edc07, 0x9dd9e834, 0xfbf4c...
[ 2, 11748, 10688, 198, 11748, 28686, 198, 198, 86, 16, 796, 685, 15, 60, 9, 2414, 198, 82, 15, 796, 685, 15, 60, 9, 2414, 198, 82, 16, 796, 685, 15, 60, 9, 2414, 198, 198, 1640, 1312, 287, 2837, 357, 2414, 2599, 198, 220, 220, ...
1.449011
1,314
import csp rgb = ['R', 'G', 'B','O']#,'White','Gray','Y','Purple','Brown','seafoam','T','Kale'] d2 = { 'A' : rgb, 'B' : rgb, 'C' : ['R'], 'D' : rgb,} domains = { 'SW': ['G'], 'SE': rgb, 'L': rgb, 'EE': rgb, 'W': rgb, 'WM': rgb, 'EM': rgb, 'NW': rgb, 'YH': rgb, 'NE': rgb, ...
[ 11748, 269, 2777, 198, 198, 81, 22296, 796, 37250, 49, 3256, 705, 38, 3256, 705, 33, 41707, 46, 20520, 2, 4032, 12256, 41707, 46130, 41707, 56, 41707, 30026, 1154, 41707, 20644, 41707, 325, 1878, 78, 321, 41707, 51, 41707, 42, 1000, 2...
1.814203
1,211
"""GUI for weather report api """ from tkinter import * import json import requests root = Tk() root.title("Temperature Finder") root.geometry('500x300') root.minsize(150, 150) root.maxsize(1200, 1200) city = Label(text = "Enter a city name to check Temperature: ") cityValue = StringVar() #type of data userEntry ...
[ 37811, 40156, 329, 6193, 989, 40391, 37227, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 11748, 33918, 198, 11748, 7007, 197, 198, 197, 628, 198, 15763, 796, 309, 74, 3419, 198, 15763, 13, 7839, 7203, 42492, 42500, 4943, 198, 15763, 13, ...
3.024691
162
#!/usr/bin/env python """ Solution to Day 1 - Puzzle 2 of the Advent Of Code 2015 series of challenges. --- Day 1: Not Quite Lisp --- An opening parenthesis represents an increase in floor and a closing parenthesis represents a decrease in floor. After taking a 7000 character long input string of assorted parenthesi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 46344, 284, 3596, 352, 532, 23966, 362, 286, 262, 33732, 3226, 6127, 1853, 2168, 286, 6459, 13, 198, 198, 6329, 3596, 352, 25, 1892, 29051, 38593, 11420, 198, 198, 202...
3.346429
280
from ... import gvars from .parser import aead_reader from ..base.server import ProxyBase from ..shadowsocks.parser import addr_reader
[ 6738, 2644, 1330, 308, 85, 945, 198, 6738, 764, 48610, 1330, 257, 1329, 62, 46862, 198, 6738, 11485, 8692, 13, 15388, 1330, 38027, 14881, 198, 6738, 11485, 1477, 9797, 3320, 13, 48610, 1330, 37817, 62, 46862, 628 ]
3.675676
37
#!/bin/python3 import math import os import random import re import sys # NOTE: This only passes the first three test cases. if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') freq_count = int(input().strip()) freq = [] for _ in range(freq_count): freq_item = int(inpu...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 25064, 628, 198, 2, 24550, 25, 770, 691, 8318, 262, 717, 1115, 1332, 2663, 13, 628, 198, 361, 11593, 3672, 834, ...
2.391534
189
""" Bayesian Optimization experiment runner. Relies heavily on BoTorch. """ import os import logging import matplotlib.pyplot as plt import numpy as np import torch import sys # sys.path.append("../") import pickle as pkl from tqdm import tqdm import shutil from distutils.spawn import find_executable from utils.fu...
[ 37811, 198, 15262, 35610, 30011, 1634, 6306, 17490, 13, 198, 198, 6892, 444, 7272, 319, 3248, 15884, 354, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 1174...
2.58365
1,052
import requests import json from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import render, redirect, get_object_or_404 from django.views import generic from django.views.generic.edit import DeleteView from django.core.urlresolvers impo...
[ 11748, 7007, 198, 11748, 33918, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 62, 12501, 273, 1352, 198, 6738, 4262...
3.56338
142
""" # data_getter The data getter manages the initialization of different torch DataLoaders. A dataloader is essentially an Iterable that can be called in a for-loop. A typical training step could for example look like this: data_loaders = data_getter.get_data_loaders(...) for sample in data_loader['train']: imag...
[ 37811, 198, 2, 1366, 62, 1136, 353, 198, 464, 1366, 651, 353, 15314, 262, 37588, 286, 1180, 28034, 6060, 8912, 364, 13, 198, 32, 4818, 282, 1170, 263, 318, 6986, 281, 40806, 540, 326, 460, 307, 1444, 287, 257, 329, 12, 26268, 13, ...
3.384817
764
import pytest from _voronoi import recompute_segment_segment_segment_circle_event as bound from hypothesis import given from tests.integration_tests.hints import (BoundPortedCircleEventsPair, BoundPortedSiteEventsPair) from tests.integration_tests.utils import are_bound_porte...
[ 11748, 12972, 9288, 198, 6738, 4808, 20867, 261, 23013, 1330, 48765, 1133, 62, 325, 5154, 62, 325, 5154, 62, 325, 5154, 62, 45597, 62, 15596, 355, 5421, 198, 6738, 14078, 1330, 1813, 198, 198, 6738, 5254, 13, 18908, 1358, 62, 41989, 1...
2.770492
244
#!/usr/bin/env python ''' This script reads in seismic noise data from March 2017 and earthquake data. It shifts the data by time for clustering It creates a list of earthquake times in March when the peak ground motion is greater than a certain amount. It clusters earthquake channels using kmeans and dbscan. It compa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 198, 1212, 4226, 9743, 287, 37463, 7838, 1366, 422, 2805, 2177, 290, 16295, 1366, 13, 198, 1026, 15381, 262, 1366, 416, 640, 329, 32966, 1586, 198, 1026, 8075, 257, 1351,...
2.238445
4,760
# Generated by Django 3.0 on 2019-12-13 16:34 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 319, 13130, 12, 1065, 12, 1485, 1467, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 628 ]
2.904762
42
import os import subprocess import time import easygui as g import re import requests from selenium import webdriver if __name__ == '__main__': filePath, packageName, lanuchableActivity = getPackagInfo() handle = uninstallApp(packageName) uninstallApp(handle) judgeRunning(handle) print('%s 卸载...
[ 628, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 640, 198, 11748, 2562, 48317, 355, 308, 198, 11748, 302, 198, 11748, 7007, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834,...
2.465812
234
import os import re import math import random import sys import json import itertools from random import randint from string import ascii_letters from os import path, listdir from configparser import ConfigParser pathname = os.path.dirname(sys.argv[0]) config = ConfigParser() config.read( pathname + '/config.in...
[ 11748, 28686, 220, 198, 11748, 302, 220, 198, 11748, 10688, 220, 198, 11748, 4738, 220, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 340, 861, 10141, 198, 6738, 4738, 1330, 43720, 600, 220, 198, 6738, 4731, 1330, 355, 979, 72, 62, ...
3.387187
359
import numpy as np from scipy.stats import gmean from collections import namedtuple import threading import multiprocessing import configparser import timestreamquery as tsquery import os from timeit import default_timer as timer from query_execution_utils import executeQueryInstance, Query import sys, traceback import...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 308, 32604, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 4704, 278, 198, 11748, 18540, 305, 919, 278, 198, 11748, 4566, 48610, 198, 11748, 4628, 395, 1476,...
3.85906
447
""" @file @brief Implements a way to get close examples based on the output of a machine learned model. """ from ..mlmodel import model_featurizer from ..helpers.parameters import format_function_call from .search_engine_vectors import SearchEngineVectors class SearchEnginePredictions(SearchEngineVectors): """ ...
[ 37811, 198, 31, 7753, 198, 31, 65, 3796, 1846, 1154, 902, 257, 835, 284, 651, 1969, 6096, 1912, 198, 261, 262, 5072, 286, 257, 4572, 4499, 2746, 13, 198, 37811, 198, 6738, 11485, 4029, 19849, 1330, 2746, 62, 5036, 2541, 7509, 198, 6...
2.10875
1,600
import os import numpy as np import pandas as pd from collections import Counter sub_path = 'sub/' teamates = os.listdir(sub_path) data = pd.read_csv('./single/robertawmmlarge_result_mean.csv', encoding='utf-8').rename(columns={'negative': 'negative_1', 'key_entity': 'key_entity_1'}) index = 2 for member in teamates...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 17268, 1330, 15034, 198, 198, 7266, 62, 6978, 796, 705, 7266, 14, 6, 198, 15097, 689, 796, 28686, 13, 4868, 15908, 7, 7266, 62, 6978, ...
2.182413
1,376
""" Module `chatette_qiu.adapters.factory`. Defines a factory method that allows to create an adapter from a string name. """ from chatette_qiu.adapters.jsonl import JsonListAdapter from chatette_qiu.adapters.rasa import RasaAdapter def create_adapter(adapter_name): """ Instantiate an adapter and returns it ...
[ 37811, 198, 26796, 4600, 17006, 5857, 62, 80, 16115, 13, 324, 12126, 13, 69, 9548, 44646, 198, 7469, 1127, 257, 8860, 2446, 326, 3578, 284, 2251, 281, 21302, 422, 257, 4731, 1438, 13, 198, 37811, 198, 198, 6738, 8537, 5857, 62, 80, ...
2.782946
258
# Since our cli produces unicode output, but we want tests in python2 as well from __future__ import unicode_literals from datetime import datetime from click.testing import CliRunner import great_expectations.version from great_expectations.cli import cli import tempfile import pytest import json import os import shu...
[ 2, 4619, 674, 537, 72, 11073, 28000, 1098, 5072, 11, 475, 356, 765, 5254, 287, 21015, 17, 355, 880, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3904, 13, ...
3.011583
259