content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# 2020 Tommaso Ciussani and Giacomo Giuliari """ This file contains the type definitions and conversions between coordinate schemes. All length values in m """ import numpy as np from typing import Tuple from typing_extensions import TypedDict from icarus_simulator.sat_core.planetary_const import EARTH_RADIUS C...
[ 2, 220, 12131, 309, 2002, 292, 78, 37685, 1046, 3216, 290, 8118, 330, 17902, 8118, 32176, 2743, 628, 198, 37811, 198, 1212, 2393, 4909, 262, 2099, 17336, 290, 32626, 1022, 20435, 16546, 13, 198, 3237, 4129, 3815, 287, 285, 198, 37811, ...
2.568293
410
# help
[ 2, 1037 ]
3
2
# -*- coding: utf-8 -*- import entity.cards.LETLT_060.LETLT_060 import entity.cards.LETLT_060.LETLT_060
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 9312, 13, 27761, 13, 2538, 14990, 51, 62, 41322, 13, 2538, 14990, 51, 62, 41322, 198, 11748, 9312, 13, 27761, 13, 2538, 14990, 51, 62, 41322, 13, 2538, 14990, 5...
2.166667
48
# Generated by Django 2.1.5 on 2019-02-16 03:24 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 13130, 12, 2999, 12, 1433, 7643, 25, 1731, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# Copyright (c) 2018 Ansible, Inc. # All Rights Reserved. from ansiblelint import AnsibleLintRule
[ 2, 15069, 357, 66, 8, 2864, 28038, 856, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 198, 6738, 9093, 856, 75, 600, 1330, 28038, 856, 43, 600, 31929, 628 ]
3.225806
31
import PyPDF2 import textract #from nltk.tokenize import word_tokenize #from nltk.corpus import stopwords
[ 11748, 9485, 20456, 17, 220, 198, 11748, 2420, 974, 198, 2, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1573, 62, 30001, 1096, 198, 2, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879 ]
2.944444
36
import torch from torch import nn from .utils import conv3x3, DepthwiseSeparableConv from .base import BackboneBaseModule
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 764, 26791, 1330, 3063, 18, 87, 18, 11, 36350, 3083, 19117, 283, 540, 3103, 85, 198, 6738, 764, 8692, 1330, 5157, 15992, 14881, 26796, 628, 628 ]
3.472222
36
from django.contrib import admin from django.urls import path from coreRelback import views app_name = 'coreRelback' urlpatterns = [ path('', views.index, name='index'), path('admin/', admin.site.urls), path('creators/', views.creators, name='creators'), # Routes - Clients path('client/', views....
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 4755, 6892, 1891, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 7295, 6892, 1891, 6, 198, 198, 6371, 33279, 82, 796, ...
2.965894
733
from typing import Set, Optional, TYPE_CHECKING from ...knowledge_plugins.key_definitions import LiveDefinitions from .. import register_analysis from .reaching_definitions import ReachingDefinitionsAnalysis if TYPE_CHECKING: from angr.knowledge_plugins.key_definitions.definition import Definition from angr....
[ 6738, 19720, 1330, 5345, 11, 32233, 11, 41876, 62, 50084, 2751, 198, 198, 6738, 2644, 45066, 62, 37390, 13, 2539, 62, 4299, 50101, 1330, 7547, 7469, 50101, 198, 6738, 11485, 1330, 7881, 62, 20930, 198, 6738, 764, 30771, 62, 4299, 50101,...
3.666667
156
import numpy as np import matplotlib.pyplot as plt
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83 ]
3.125
16
import logging import time from .profile import Profile from .question import Questions log = logging.getLogger(__name__) class Copy(object): """Copy photos, essays and other attributes from one profile to another.""" copy_methods = ['photos', 'essays', 'looking_for', 'details', 'questions'] def __in...
[ 11748, 18931, 198, 11748, 640, 198, 198, 6738, 764, 13317, 1330, 13118, 198, 6738, 764, 25652, 1330, 20396, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4871, 17393, 7, 15252, 2599, 198, 220, 220,...
2.190446
1,570
print(convert(10,2)) print(convert_inv(10,2))
[ 198, 198, 4798, 7, 1102, 1851, 7, 940, 11, 17, 4008, 628, 198, 4798, 7, 1102, 1851, 62, 16340, 7, 940, 11, 17, 4008, 198 ]
2
25
"""Configuration for tests.""" import {{ cookiecutter.project_slug }} def pytest_report_header(): """Additional report header.""" return f"version: { {{- cookiecutter.project_slug -}}.__version__}"
[ 37811, 38149, 329, 5254, 526, 15931, 198, 11748, 22935, 19751, 8968, 353, 13, 16302, 62, 6649, 1018, 34949, 628, 198, 4299, 12972, 9288, 62, 13116, 62, 25677, 33529, 198, 220, 220, 220, 37227, 17699, 989, 13639, 526, 15931, 198, 220, 22...
3.151515
66
GUEST_URL_PREFIX = '/guest'
[ 38022, 6465, 62, 21886, 62, 47, 31688, 10426, 796, 31051, 5162, 395, 6, 628, 198 ]
2
15
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2021 Peter Lau <superpeterlau@outlook.com> # # Distributed under terms of the MIT license. import time import asyncio # method 1 # asyncio.run(main()) # print(main()) # asyncio.run(main2()) asyncio.run(main3())
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 198, 2, 198, 2, 15069, 10673, 33448, 5613, 40014, 1279, 16668, 79...
2.487395
119
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Jānis Zuters from __future__ import unicode_literals, division import sys import argparse from io import open argparse.open = open from prpe_ne import collect_ne_pairs if __name__ == '__main__': parser = create_parser() args = parser.parse_args() co...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 449, 10235, 21361, 1168, 5843, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 7297, ...
2.653595
153
def gn_place_uri(geonamesid,fcode,country,admin1,admin2,admin3,admin4): "Return URI of place from a geonames id" if fcode=="PCLI": return "geonames/place/Country/"+country elif fcode=="ADM1": return "geonames/place/State1stDiv/"+country+"_"+admin1 elif fcode=="ADM2": return "geo...
[ 198, 4299, 19967, 62, 5372, 62, 9900, 7, 6281, 1047, 312, 11, 69, 8189, 11, 19315, 11, 28482, 16, 11, 28482, 17, 11, 28482, 18, 11, 28482, 19, 2599, 198, 220, 220, 220, 366, 13615, 43975, 286, 1295, 422, 257, 4903, 261, 1047, 4686...
2.516827
1,664
import os import pytest from random import randint import socket import uuid from volttrontesting.utils.platformwrapper import PlatformWrapper from volttrontesting.utils.utils import get_hostname_and_random_port, get_rand_vip, get_rand_ip_and_port from volttron.platform import is_rabbitmq_available PRINT_LOG_ON_SHUTD...
[ 11748, 28686, 198, 11748, 12972, 9288, 198, 6738, 4738, 1330, 43720, 600, 198, 11748, 17802, 198, 11748, 334, 27112, 198, 198, 6738, 2322, 926, 4298, 37761, 13, 26791, 13, 24254, 48553, 1330, 19193, 36918, 2848, 198, 6738, 2322, 926, 4298...
2.292555
3,049
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-12 21:01 from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 17, 319, 2177, 12, 2998, 12, 1065, 2310, 25, 486, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.811594
69
import unittest from lisa.core import genome_tools import numpy as np if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 300, 9160, 13, 7295, 1330, 19270, 62, 31391, 198, 11748, 299, 32152, 355, 45941, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, ...
2.767442
43
# MIT License # # Copyright (c) 2019 Tuomas Halvari, Juha Harviainen, Juha Mylläri, Antti Röyskö, Juuso Silvennoinen # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inc...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 16749, 16911, 11023, 25641, 11, 12585, 3099, 2113, 8903, 391, 268, 11, 12585, 3099, 2011, 297, 11033, 380, 11, 3738, 20259, 371, 9101, 893, 74, 9101, 11, 12585, 385, 78, 424...
3.016743
657
import json
[ 11748, 33918, 628 ]
4.333333
3
import datetime import json import logging import logging.config import os import sys import traceback from os.path import join as pjoin from subprocess import Popen, PIPE import unittest2 as unittest
[ 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 6738, 28686, 13, 6978, 1330, 4654, 355, 279, 22179, 198, 6738, 850, 14681, 1330, 80...
3.561404
57
import os import unittest from maggma.stores import MemoryStore from maggma.runner import Runner from maggma.builders import Builder from emmet.workflows.property_workflows import PropertyWorkflowBuilder,\ get_elastic_wf_builder from pymatgen.util.testing import PymatgenTest from atomate.vasp.workflows.presets.cor...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 2153, 70, 2611, 13, 43409, 1330, 14059, 22658, 198, 6738, 2153, 70, 2611, 13, 16737, 1330, 21529, 198, 6738, 2153, 70, 2611, 13, 50034, 1330, 35869, 198, 6738, 795, 4164, 13, 18...
2.955157
223
n = 28433 * pow(2,7830457,10**10) + 1 print str(n)[-10:]
[ 77, 796, 40654, 2091, 1635, 7182, 7, 17, 11, 3695, 1270, 33032, 11, 940, 1174, 940, 8, 1343, 352, 198, 4798, 965, 7, 77, 38381, 12, 940, 47715, 198 ]
1.965517
29
from fastapi import HTTPException from sqlalchemy.orm import Session from core.models.table import TagDB, TagInRepoDB, RepoDB from core.models.schema import TagCreate from core.models.schema import TagInRepoCreate def _create_tag(db: Session, tag_name: str, user_id: int): """ Creates a new tag in the database ...
[ 6738, 3049, 15042, 1330, 14626, 16922, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 198, 6738, 4755, 13, 27530, 13, 11487, 1330, 17467, 11012, 11, 17467, 818, 6207, 78, 11012, 11, 1432, 78, 11012, 198, 6738, 4755, 13, 27530, 13, ...
2.221815
2,182
from overtime.algorithms.centrality.betweenness import * from overtime.algorithms.centrality.closeness import * from overtime.algorithms.centrality.pagerank import * from overtime.algorithms.centrality.degree import *
[ 6738, 17820, 13, 282, 7727, 907, 13, 31463, 414, 13, 23395, 1108, 1330, 1635, 198, 6738, 17820, 13, 282, 7727, 907, 13, 31463, 414, 13, 565, 5233, 408, 1330, 1635, 198, 6738, 17820, 13, 282, 7727, 907, 13, 31463, 414, 13, 79, 3536, ...
3.57377
61
#!/usr/bin/python # This sample code is for use with Dropbox desktop client # versions 1.2 and below. It is likely to be deprecated in all # other future releases. Use it at your own risk. # Read more at http://www.dropbox.com/developers/desktop_apps import base64 import os.path import platform if platform.syste...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 220, 198, 2, 770, 6291, 2438, 318, 329, 779, 351, 38930, 11364, 5456, 198, 2, 6300, 352, 13, 17, 290, 2174, 13, 632, 318, 1884, 284, 307, 39224, 287, 477, 198, 2, 584, 2003, 10050, 13, ...
2.791667
192
import io import os import posixpath import re from urllib import urlencode from seafileapi.utils import querystr, utf8lize,raise_does_not_exist ZERO_OBJ_ID = '0000000000000000000000000000000000000000' class _SeafDirentBase(object): """Base class for :class:`SeafFile` and :class:`SeafDir`. It provides implem...
[ 11748, 33245, 198, 11748, 28686, 198, 11748, 1426, 844, 6978, 198, 11748, 302, 198, 6738, 2956, 297, 571, 1330, 2956, 11925, 8189, 198, 6738, 25127, 576, 15042, 13, 26791, 1330, 12405, 2536, 11, 3384, 69, 23, 75, 1096, 11, 40225, 62, ...
2.113395
1,411
import pandas as p#导入目前所需要的库并给与简称 data_train = '../homework/train.csv' #查看基本数据 data_train = p.read_csv(data_train)#导入训练模型 print(data_train.info())#查看数据类型 print(data_train.describe())#粗略查看基本数据 ###导入并且查看原始数据 import matplotlib.pyplot as pt import numpy as n pt.rcParams['font.sans-serif']=['Simhei'] #解决...
[ 201, 198, 11748, 19798, 292, 355, 279, 2, 43380, 120, 17739, 98, 33566, 106, 30298, 235, 33699, 222, 165, 250, 222, 17358, 223, 21410, 41753, 241, 33176, 114, 163, 119, 247, 10310, 236, 163, 106, 222, 163, 100, 108, 201, 198, 7890, ...
1.609608
3,289
from django.urls import include, path from chemreg.jsonapi.routers import SimpleRouter from chemreg.substance import views # Create a router and register our viewsets with it. router = SimpleRouter() router.register(views.QCLevelsTypeViewSet, "qcLevels") router.register(views.RelationshipTypeViewSet) router.register(...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 11, 3108, 198, 198, 6738, 4607, 2301, 13, 17752, 15042, 13, 472, 1010, 1330, 17427, 49, 39605, 198, 6738, 4607, 2301, 13, 7266, 301, 590, 1330, 5009, 198, 198, 2, 13610, 257, 20264, 290, ...
3.071749
223
import pytest_cases as pytest @pytest.fixture @pytest.parametrize_with_cases("x,y", cases=CaseY, debug=True)
[ 11748, 12972, 9288, 62, 33964, 355, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 628, 198, 31, 9078, 9288, 13, 17143, 316, 380, 2736, 62, 4480, 62, 33964, 7203, 87, 11, 88, 1600, 2663, 28, 20448, 56, 11, 14257, 28, 17...
2.521739
46
import os import random import datetime import aiofiles from enum import Enum from dateutil.parser import parse import aiohttp try: import ujson as json except: import json
[ 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 4818, 8079, 198, 11748, 257, 952, 16624, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 198, 198, 11748, 257, 952, 4023, 198, 198, 28311, 25, 198,...
3.098361
61
import unittest from app.utils import KMP
[ 11748, 555, 715, 395, 198, 6738, 598, 13, 26791, 1330, 509, 7378, 628 ]
3.307692
13
import cv2 import numpy as np from matplotlib import pyplot as plt import argparse from itertools import permutations from lxml import etree as ET ap=argparse.ArgumentParser() ap.add_argument('-i', '--image', type=str) args=vars(ap.parse_args()) image = cv2.imread(args['image']) source = image.copy() target = image.c...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 1822, 29572, 198, 6738, 340, 861, 10141, 1330, 9943, 32855, 198, 6738, 300, 19875, 1330, 2123, 631, 355,...
2.247706
763
import re import glob import os import sys import skimage import numpy as np import theano.tensor as T from sklearn.cross_validation import StratifiedShuffleSplit import string import lasagne as nn # TODO clean this mess up # TODO: very ugly stuff here, can probably be done a lot better ...
[ 11748, 302, 201, 198, 11748, 15095, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 201, 198, 11748, 1341, 9060, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 262, 5733, 13, 83, 22854, 355, 309, 201, 198, 6738, 1...
2.710744
121
# Dash app initialization import dash # User management initialization import os from flask_login import LoginManager, UserMixin from users_mgt import db, User as base from config import config app = dash.Dash( __name__, meta_tags=[ { 'charset': 'utf-8', }, { 'n...
[ 2, 16189, 598, 37588, 198, 11748, 14470, 198, 2, 11787, 4542, 37588, 198, 11748, 28686, 198, 6738, 42903, 62, 38235, 1330, 23093, 13511, 11, 11787, 35608, 259, 198, 6738, 2985, 62, 11296, 83, 1330, 20613, 11, 11787, 355, 2779, 198, 6738...
2.588689
389
from functools import wraps from typing import Callable from heuristic.classes import Solution def remove_empty_routes(operator: Callable[..., Solution]): """ Wrapper function that removes empty routes from the returned solution instance. These routes may come into existence because all customers have ...
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 19720, 1330, 4889, 540, 198, 198, 6738, 339, 27915, 13, 37724, 1330, 28186, 628, 198, 4299, 4781, 62, 28920, 62, 81, 448, 274, 7, 46616, 25, 4889, 540, 58, 986, 11, 28186, 60, 2599, 19...
3.568966
116
''' Compare File Contents and remove duplicate files get sha256 hash for each file found use dictionary to check for duplicates delete duplicates Dave Cuthbert (C) 2021-02-12 MIT License ''' import os from collections import defaultdict import hashlib import sys if "__main__" ...
[ 7061, 6, 198, 41488, 9220, 26714, 290, 4781, 23418, 3696, 628, 220, 220, 220, 651, 427, 64, 11645, 12234, 329, 1123, 2393, 1043, 198, 220, 220, 220, 779, 22155, 284, 2198, 329, 14184, 16856, 198, 220, 220, 220, 12233, 14184, 16856, 19...
2.625899
139
import sys import os import numpy as np import torch import subprocess from pathlib import Path import requests import zipfile import shutil if __name__ == "__main__": url = "https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/distiluse-base-multilingual-cased.zip" path = dow...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 850, 14681, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 7007, 198, 11748, 19974, 7753, 198, 11748, 4423, 346, 198, 198, 361, 1159...
2.619792
192
# coding: utf-8 from __future__ import unicode_literals import datetime from django.contrib.auth.models import Group, User from django.test import TestCase from .models import Album, AlbumAccessPolicy, Photo, PhotoAccessPolicy
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 4912, 11, 11787, 198, 6738, ...
3.462687
67
#!/usr/bin/python import socket from termcolor import colored print(colored("Select Option"),"blue") print(colored("1. Single Port\n2. Multi Port"),"blue") option = int(input()) if option == 1: print(colored("Enter Host IP Address:","green")) host = input() print(colored("Enter port number to scan:","gr...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 17802, 198, 6738, 3381, 8043, 1330, 16396, 628, 198, 4798, 7, 25717, 7203, 17563, 16018, 4943, 553, 17585, 4943, 198, 4798, 7, 25717, 7203, 16, 13, 14206, 4347, 59, 77, 17, 13, ...
2.845455
220
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from .WBits import WBits from .event import Event
[ 6738, 764, 45607, 896, 1330, 36245, 896, 201, 198, 6738, 764, 15596, 1330, 8558, 201, 198, 201, 198, 201, 198, 220, 220, 220, 220 ]
2.5
24
from __future__ import print_function from .field_parser import parse_internal_field, parse_boundary_field, parse_field_all from .mesh_parser import FoamMesh from .utils import *
[ 6738, 11593, 37443, 834, 220, 1330, 3601, 62, 8818, 201, 198, 201, 198, 6738, 764, 3245, 62, 48610, 1330, 21136, 62, 32538, 62, 3245, 11, 21136, 62, 7784, 560, 62, 3245, 11, 21136, 62, 3245, 62, 439, 201, 198, 6738, 764, 76, 5069, ...
3.133333
60
import threading import time import psutil import rostopic import rospy from glog import logging from node_evaluator.msg import Bandwidth as BandwidthMsg @EvaluatorFactory.register('cpu') @EvaluatorFactory.register('mem') @EvaluatorFactory.register('net') @EvaluatorFactory.register('topic_bw') @EvaluatorF...
[ 11748, 4704, 278, 198, 11748, 640, 198, 11748, 26692, 22602, 198, 11748, 686, 11338, 291, 198, 11748, 686, 2777, 88, 198, 6738, 1278, 519, 1330, 18931, 198, 6738, 10139, 62, 18206, 84, 1352, 13, 19662, 1330, 10243, 10394, 355, 10243, 10...
2.888889
135
#/usr/bin/env python import io from setuptools import setup with io.open('README.rst', encoding='utf8') as readme: long_description = readme.read() setup( name='rubicon', version='0.0.0', description='A collection of tools to bridge between Python and other language environments.', long_descripti...
[ 2, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 33245, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 4480, 33245, 13, 9654, 10786, 15675, 11682, 13, 81, 301, 3256, 21004, 11639, 40477, 23, 11537, 355, 1100, 1326, 25, 198, ...
2.791096
292
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-05-24 18:30 from __future__ import unicode_literals 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, 1157, 13, 1959, 319, 33448, 12, 2713, 12, 1731, 1248, 25, 1270, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.753623
69
""" Capitalize! :author: Dela Anthonio :hackerrank: https://hackerrank.com/delaanthonio :problem: https://www.hackerrank.com/contests/pythonist3/challenges/capitalize """ print(solve('hi jake hj '))
[ 37811, 198, 39315, 1096, 0, 198, 198, 25, 9800, 25, 4216, 64, 8451, 261, 952, 198, 25, 31153, 8056, 962, 25, 3740, 1378, 31153, 8056, 962, 13, 785, 14, 67, 10304, 29313, 261, 952, 198, 25, 45573, 25, 3740, 1378, 2503, 13, 31153, 8...
2.589744
78
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Initialization for Solstice Tools """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" print('=' * 100) print('| Solstice Pipeline | > L...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 24243, 1634, 329, 4294, 43788, 20003, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8...
2.861751
217
from project_restaurant.beverage.beverage import Beverage
[ 6738, 1628, 62, 2118, 2899, 415, 13, 65, 964, 496, 13, 65, 964, 496, 1330, 22185, 496, 628 ]
3.277778
18
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import re import threading import lldbagilityutils from PyFDP.FDP import FDP from VMSN import VMSN logger = lldbagilityutils.create_indented_logger(__name__, "/tmp/stubvm.log") NULL = 0x0 # https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/eflags.h EF...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 11748, 4704, 278, 198, 198, 11748, 32660, 9945, 363, 879, 26791, 198, 6738, 9485, 37, 6322, 13, ...
2.026989
704
import spotipy from spotipy.oauth2 import SpotifyClientCredentials spotify = spotipy.Spotify(auth_manager=SpotifyClientCredentials()) url = "http://httpbin.org/post" payload = dict(key1='value1', key2='value2') res = requests.post(url, data=payload) print(res.text)
[ 11748, 4136, 541, 88, 198, 6738, 4136, 541, 88, 13, 12162, 1071, 17, 1330, 26778, 11792, 34, 445, 14817, 198, 198, 20485, 1958, 796, 4136, 541, 88, 13, 32565, 1958, 7, 18439, 62, 37153, 28, 32565, 1958, 11792, 34, 445, 14817, 28955, ...
2.810526
95
import json import requests from elasticsearch.connection import create_ssl_context from elasticsearch import Elasticsearch from getpass import getpass class ElasticSearch: """Wrapper of Elasticsearch module. This module is designed for using elastic search more friendly. """ def _set_condition_func...
[ 11748, 33918, 198, 11748, 7007, 198, 198, 6738, 27468, 12947, 13, 38659, 1330, 2251, 62, 45163, 62, 22866, 198, 6738, 27468, 12947, 1330, 48567, 12947, 198, 6738, 651, 6603, 1330, 651, 6603, 628, 198, 4871, 48567, 18243, 25, 198, 220, 2...
2.370913
887
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "refugeedata.app.settings") try: from refugeedata.app import local_settings except ImportError: pass else: os.environ.update(local_settings.SETTINGS_DICT) ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 28686, 13, 268, 2268, 13, 2617, 12286, 7203, 35028, 1565, 11230, ...
2.497041
169
""" aiodec ====== Decorators for coroutines """ import time import logging from functools import wraps from string import Template import inspect from inspect import Signature from typing import Callable, Optional, Mapping, Any __version__ = '2018.10.1' logger = logging.getLogger(__name__) Callback = Callable[[Sig...
[ 37811, 198, 1872, 375, 721, 198, 50155, 198, 198, 10707, 273, 2024, 329, 1162, 448, 1127, 198, 198, 37811, 198, 198, 11748, 640, 198, 11748, 18931, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 4731, 1330, 37350, 198, 11748, 1010...
3.296296
108
# Copyright 2020-2022 Robert Bosch Car Multimedia GmbH # # 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 applicab...
[ 2, 220, 15069, 12131, 12, 1238, 1828, 5199, 14548, 354, 1879, 7854, 20626, 402, 2022, 39, 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, 4...
3.930939
724
"""Test the Request class""" # Copyright (c) 2017 # Authors: Guillaume Lemaitre <guillaume.lemaitre@inria.fr> # License: BSD 3 clause import shutil import os from os.path import dirname, join, sep, expanduser import pytest from pytest import raises from specio import core from specio.core import Request DATA_PATH ...
[ 37811, 14402, 262, 19390, 1398, 37811, 198, 198, 2, 15069, 357, 66, 8, 2177, 198, 2, 46665, 25, 1962, 5049, 2454, 20607, 4548, 260, 1279, 5162, 5049, 2454, 13, 293, 2611, 270, 260, 31, 259, 7496, 13, 8310, 29, 198, 2, 13789, 25, 3...
2.778723
235
# -*- coding: utf-8 -*- import os, shutil from pelican.generators import ArticlesGenerator from pelican.tests.support import get_settings, unittest from pelican.writers import Writer from ctags_generator import generate_ctags CUR_DIR = os.path.dirname(__file__) TEST_CONTENT_DIR = os.path.join(CUR_DIR, 'test_content...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 11, 4423, 346, 198, 198, 6738, 16176, 7490, 13, 8612, 2024, 1330, 22698, 8645, 1352, 198, 6738, 16176, 7490, 13, 41989, 13, 11284, 1330, 651, 62, 33692, 11...
2.892857
112
"""Module containing convenient functions for plotting""" __author__ = 'wittawat' import fsic.ex.exglobal as exglo import fsic.glo as glo import matplotlib.pyplot as plt import numpy as np def plot_2d_data(pdata): """ pdata: an instance of PairedData Return a figure handle """ X, Y = pdata.xy() ...
[ 37811, 26796, 7268, 11282, 5499, 329, 29353, 37811, 198, 198, 834, 9800, 834, 796, 705, 86, 715, 707, 265, 6, 198, 198, 11748, 277, 21383, 13, 1069, 13, 1069, 20541, 355, 409, 4743, 78, 198, 11748, 277, 21383, 13, 4743, 78, 355, 127...
2.26749
1,458
from PythonHackathon.PythonHackathon_Mos.GroupStatistics import *
[ 6738, 11361, 32833, 12938, 13, 37906, 32833, 12938, 62, 32668, 13, 13247, 48346, 1330, 1635, 198 ]
4.125
16
import json import logging import boto import boto.s3.connection import datetime import dateutil from nose.tools import eq_ as eq from six.moves import range from .multisite import * from .tests import * from .zone_es import * log = logging.getLogger(__name__)
[ 11748, 33918, 198, 11748, 18931, 198, 198, 11748, 275, 2069, 198, 11748, 275, 2069, 13, 82, 18, 13, 38659, 198, 198, 11748, 4818, 8079, 198, 11748, 3128, 22602, 198, 198, 6738, 9686, 13, 31391, 1330, 37430, 62, 355, 37430, 198, 6738, ...
3.178571
84
# SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- """ Render related functions """ import bpy import threading import xrs.collection import xrs.material def add_render_camera(): """ Adds one render camera that can have base settings in one place """ bpy.ops.object.camera_add() renderCam = bpy.data.ca...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 46722, 3519, 5499, 198, 37811, 198, 11748, 275, 9078, 198, 11748, 4704, 278, 198, 1174...
2.775937
1,388
#!/usr/bin/python2.7 import datetime
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 22, 198, 198, 11748, 4818, 8079, 628, 198 ]
2.352941
17
from datetime import datetime import discord from discord.ext import commands import psutil import pytz from cogs.utils.message_manager import MessageManager from cogs.utils import constants
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 26692, 22602, 198, 11748, 12972, 22877, 198, 198, 6738, 269, 18463, 13, 26791, 13, 20500, 62, 37153, 1330, 16000, 13511, 198, ...
4.041667
48
#!/usr/bin/env python from networks.cifar.cifar_model import CifarModel class LeNet(CifarModel): """ TODO: Write Comment """ def __init__(self, args): """ TODO: Write Comment """ self.name = 'LeNet' CifarModel.__init__(self, args) def network(se...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 7686, 13, 66, 361, 283, 13, 66, 361, 283, 62, 19849, 1330, 327, 361, 283, 17633, 628, 198, 4871, 1004, 7934, 7, 34, 361, 283, 17633, 2599, 198, 220, 220, 220, 37227, 198...
2.172043
930
#!/usr/bin/python # -*- coding: utf-8 -*- from optparse import OptionParser import locale from gsmmodem.modem import GsmModem import logging parser = OptionParser() parser.add_option("-a", "--address", action="store", dest="ip", type="string", help="Cureent ip address") PORT = '/dev/modem0' BAUDRATE = 115200 PIN = "...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 11748, 36693, 198, 6738, 308, 82, 3020, 375, 368, 13, 4666, 368, 1330, 402, ...
2.627451
357
# Some examples are given below. import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
[ 2, 2773, 6096, 389, 1813, 2174, 13, 198, 198, 11748, 28686, 198, 198, 11748, 1332, 10745, 430, 13, 26791, 13, 504, 856, 62, 16737, 198, 198, 9288, 10745, 430, 62, 4774, 82, 796, 1332, 10745, 430, 13, 26791, 13, 504, 856, 62, 16737, ...
2.609756
82
import psycopg2 from .config import Config config = Config()
[ 11748, 17331, 22163, 70, 17, 198, 6738, 764, 11250, 1330, 17056, 198, 198, 11250, 796, 17056, 3419, 628, 198 ]
3.368421
19
# -*- coding: utf-8 -*- from pygments.style import Style from pygments.token import Token from pygments.styles.default import DefaultStyle
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 12972, 11726, 13, 7635, 1330, 17738, 198, 6738, 12972, 11726, 13, 30001, 1330, 29130, 198, 6738, 12972, 11726, 13, 47720, 13, 12286, 1330, 15161, 21466, 628, 19...
3.302326
43
# Copyright (C) 2018 Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of yambopy # import unittest import os from qepy.pw import PwIn from yambopy.data.structures import Si if __name__ == '__main__': unittest.main()
[ 2, 15069, 357, 34, 8, 2864, 6752, 33865, 17229, 8704, 40253, 4763, 29575, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 331, 4131, 11081, 198, 2, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 6738, ...
2.840909
88
from itertools import groupby import attr import typing @attr.s @attr.s @attr.s class ExpositionClient: """ Very simple implementation of client that will get all available metrics from a namespace and expose a string formatted accoring to Prometheus expositions format. """ def _get_data(se...
[ 6738, 340, 861, 10141, 1330, 1448, 1525, 198, 11748, 708, 81, 198, 11748, 19720, 628, 198, 31, 35226, 13, 82, 628, 198, 31, 35226, 13, 82, 628, 198, 31, 35226, 13, 82, 628, 198, 4871, 1475, 9150, 11792, 25, 198, 220, 220, 220, 372...
1.988706
974
# # Author: Nikhil Taneja (taneja.nikhil03@gmail.com) # fb_post.py (c) 2021 # Desc: description # Created: Fri Jan 08 2021 04:19:09 GMT+0530 (India Standard Time) # Modified: Fri Jan 08 2021 18:19:22 GMT+0530 (India Standard Time) # import logging import re from urllib.parse import parse_qs, unquote, urlparse import...
[ 2, 198, 2, 6434, 25, 11271, 71, 346, 309, 1531, 6592, 357, 83, 1531, 6592, 13, 77, 13848, 346, 3070, 31, 14816, 13, 785, 8, 198, 2, 277, 65, 62, 7353, 13, 9078, 357, 66, 8, 33448, 198, 2, 39373, 25, 6764, 198, 2, 15622, 25, ...
2.951515
165
import glob import json import math import multiprocessing import os import re import time import h5py import imageio import numpy as np import pandas as pd from numpyencoder import NumpyEncoder from skimage.measure import label, regionprops from skimage.transform import resize from sklearn.cluster import KMeans from ...
[ 11748, 15095, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 18540, 305, 919, 278, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 640, 198, 198, 11748, 289, 20, 9078, 198, 11748, 2939, 952, 198, 11748, 299, 32152, 355, 45941, 198, 1...
2.04398
8,845
import argparse import yaml import datetime import os import torch import torch.nn.functional as F import wandb import random import numpy as np import utils import graph import dgl import models from dgl import DGLError from utils import pbar import torchmetrics import pickle as pkl if __name__ == "__mai...
[ 11748, 1822, 29572, 198, 11748, 331, 43695, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 11569, 65, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198,...
2.017335
923
# tests.test_text.test_base # Tests for the text visualization base classes # # Author: Benjamin Bengfort # Created: Mon Feb 20 06:34:50 2017 -0500 # # Copyright (C) 2016 The scikit-yb developers # For license information, see LICENSE.txt # # ID: test_base.py [6aa9198] benjamin@bengfort.com $ """ Tests for the text...
[ 2, 5254, 13, 9288, 62, 5239, 13, 9288, 62, 8692, 198, 2, 30307, 329, 262, 2420, 32704, 2779, 6097, 198, 2, 198, 2, 6434, 25, 220, 220, 14533, 14964, 3319, 198, 2, 15622, 25, 220, 2892, 3158, 1160, 9130, 25, 2682, 25, 1120, 2177, ...
4.413978
186
# -*- coding: utf-8 -*- """ Created on Thu Oct 7 09:42:38 2021 @author: VISHAKHA V """ arr=list(map(int,input().split())) result=max_subarray_product(arr) print("The maximum sub_array product =",result) #Take the input as [6,-3,-10,0,2] if you want, then the output will be 180
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 2556, 220, 767, 7769, 25, 3682, 25, 2548, 33448, 198, 198, 31, 9800, 25, 50035, 7801, 42, 7801, 569, 198, 37811, 198, 198, 3258, 28, 486...
2.544643
112
# Copyright (c) 2022 Dai HBG """ 该脚本用于将1分钟数据中不在市的部分删除 """ import os import pandas as pd if __name__ == '__main__': main()
[ 2, 15069, 357, 66, 8, 33160, 39604, 25997, 38, 628, 198, 37811, 198, 46237, 98, 164, 226, 248, 17312, 105, 18796, 101, 12859, 236, 49546, 16, 26344, 228, 165, 240, 253, 46763, 108, 162, 235, 106, 40792, 38834, 28839, 101, 30585, 224, ...
1.564706
85
import math import torch.nn as nn import torch.nn.functional as F # class InvertedResidual(nn.Module): # def __init__(self, inp, oup, kernel_size, stride, expand_ratio): # super(InvertedResidual, self).__init__() # assert stride in [1, 2] # self.stride = stride # padding = ker...
[ 11748, 10688, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 628, 628, 198, 2, 1398, 554, 13658, 4965, 312, 723, 7, 20471, 13, 26796, 2599, 198, 2, 220, 220, 220, 220, 825, ...
1.871988
664
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 220, 15069, 1584, 383, 309, 22854, 37535, 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, 2...
2.819346
703
import unittest import time import asyncio import random import math import collections from .siridb import SiriDB from .server import Server from .client import Client
[ 11748, 555, 715, 395, 198, 11748, 640, 198, 11748, 30351, 952, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 17268, 198, 6738, 764, 82, 343, 312, 65, 1330, 34461, 11012, 198, 6738, 764, 15388, 1330, 9652, 198, 6738, 764, 16366, 1330,...
3.886364
44
from .types import StaticShape, RBF, Adjacency from .math import tf_hgrid_coords, hgrid_normalize, bezier_multi, tri_ones_lower, tf_repeat_1d from .math import piecewise_linear_curve_closest_pts from .math import random_uniform_hypersphere, mutual_sq_distances, gauss_rbf, rbf_factory, crbf_wendland_d3c2 from .config im...
[ 6738, 764, 19199, 1330, 36125, 33383, 11, 17986, 37, 11, 1215, 30482, 1387, 198, 6738, 764, 11018, 1330, 48700, 62, 71, 25928, 62, 1073, 3669, 11, 289, 25928, 62, 11265, 1096, 11, 307, 89, 959, 62, 41684, 11, 1333, 62, 1952, 62, 210...
2.53379
6,422
# import unittest # from unittest.mock import patch # from selenium.common.exceptions import WebDriverException # from draytekwebadmin.driver import load_driver, unload_driver # class TestDriver(unittest.TestCase): # def setUp(self): # pass # def tearDown(self): # pass # @patch("seleniu...
[ 2, 1330, 555, 715, 395, 198, 2, 422, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 2, 422, 384, 11925, 1505, 13, 11321, 13, 1069, 11755, 1330, 5313, 32103, 16922, 198, 198, 2, 422, 1553, 323, 35424, 12384, 28482, 13, 26230, 1330, 3...
2.370551
1,433
import sys import toml import pytest from teststack import cli from teststack import import_commands from teststack.errors import IncompatibleVersionError
[ 11748, 25064, 198, 198, 11748, 284, 4029, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1332, 25558, 1330, 537, 72, 198, 6738, 1332, 25558, 1330, 1330, 62, 9503, 1746, 198, 6738, 1332, 25558, 13, 48277, 1330, 554, 38532, 14815, 12331, 6...
3.809524
42
#! /usr/bin/python # -*- coding: utf8 -*- from __future__ import print_function # Description: """ plot or save MRI images / masks in a screenshot ------- Types of sequences in the data = ['Sag_T2' 'Sag_T1' 'Sag_Stir'] """ # Imports import os, time import glob import random import pandas as pd import numpy as np im...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 2, 12489, 25, 220, 198, 37811, 198, 7110, 393, 3613, 30278, 4263, 1220, 20...
2.20793
1,135
#!/usr/bin/env python # Copyright (c) 2014 CNRS # Author: Florent Lamiraux # from .robot import Robot
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 1946, 31171, 6998, 198, 2, 6434, 25, 23347, 429, 10923, 343, 14644, 198, 2, 198, 198, 6738, 764, 305, 13645, 1330, 16071, 198 ]
2.783784
37
""" Gary Simmons March 2018 Kata Prompt Description: A Narcissistic Number is a number which is the sum of its own digits, each raised to the power of the number of digits in a given base. In this Kata, we will restrict ourselves to decimal (base 10). For example, take 153 (3 digits): 1^3 + 5^3 + 3^3 = 1 + 125 +...
[ 37811, 198, 33820, 22553, 198, 16192, 2864, 198, 198, 42, 1045, 45965, 12489, 25, 317, 31987, 747, 2569, 7913, 318, 257, 1271, 543, 318, 262, 2160, 286, 663, 898, 19561, 11, 1123, 4376, 284, 262, 1176, 286, 262, 1271, 286, 19561, 287,...
3.484375
192
#!/usr/bin/env python import logging from daemonize import Daemonize from rq import Connection, Worker from core.utils.Executor import check_output __workers__ = [ 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'eta', 'theta', 'iota', 'kappa', 'lambda', 'mu', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 18931, 198, 198, 6738, 33386, 1096, 1330, 9637, 7966, 1096, 198, 6738, 374, 80, 1330, 26923, 11, 35412, 198, 198, 6738, 4755, 13, 26791, 13, 23002, 38409, 1330, 2198, 62, 22915, ...
2.126016
492
import re import numpy as np from solution.utils.constant import ( QUESTION_COLUMN_NAME, CONTEXT_COLUMN_NAME, ANSWER_COLUMN_NAME, ) def get_extractive_features(tokenizer, mode, data_args): """ Get extractive features for train, eval and test. Args: tokenizer (BERT Tokenizer): tokenizer fo...
[ 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4610, 13, 26791, 13, 9979, 415, 1330, 357, 198, 220, 220, 220, 43658, 2849, 62, 25154, 5883, 45, 62, 20608, 11, 198, 220, 220, 220, 22904, 13918, 62, 25154, 5883, 45, 62, 20...
1.711012
4,277
#!/usr/bin/python3 import sys import gi gi.require_version('Gst', '1.0') from gi.repository import Gst from gi.repository import GLib from gi.repository import Gtk if __name__ == "__main__": main(sys.argv) #self.pipe = Gst.parse_launch ("videotestsrc is-live=true ! capsfilter name=caps ! x264enc speed-preset...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 198, 11748, 308, 72, 198, 198, 12397, 13, 46115, 62, 9641, 10786, 38, 301, 3256, 705, 16, 13, 15, 11537, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 402, 301, 1...
2.590278
144
from os import listdir from random import choice from django.conf import settings from django.contrib.auth import login, authenticate from django.contrib.auth.views import LoginView from django.shortcuts import get_object_or_404, redirect from django.views.generic import TemplateView, DetailView from django.views.gener...
[ 6738, 28686, 1330, 1351, 15908, 198, 6738, 4738, 1330, 3572, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 17594, 11, 8323, 5344, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 184...
3.798246
114
"""A module with the class `AbstractAlgorithm` defined""" # from abc import ABC, abstractmethod from abc import abstractmethod from steinerpy.library.misc.abc_utils import abstract_attribute, ABC as newABC from steinerpy.library.graphs.graph import IGraph from typing import List class AbstractAlgorithm(newABC): "...
[ 37811, 32, 8265, 351, 262, 1398, 4600, 23839, 2348, 42289, 63, 5447, 37811, 198, 198, 2, 422, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 2876, 7274, 9078, 13, 32016, 13, 44374, 13, 39305,...
2.851282
585
from socket import * from time import ctime HOST = '' PORT = 8888 BUFSIZ = 1024 ADDRESS = (HOST, PORT) udpServerSocket = socket(AF_INET, SOCK_DGRAM) udpServerSocket.bind(ADDRESS) # 绑定客户端口和地址 while True: print("udp waiting for message...") data, addr = udpServerSocket.recvfrom(BUFSIZ) print("接收到数据:", dat...
[ 6738, 17802, 1330, 1635, 198, 6738, 640, 1330, 269, 2435, 198, 198, 39, 10892, 796, 10148, 198, 15490, 796, 807, 28011, 198, 19499, 10652, 14887, 796, 28119, 198, 2885, 7707, 7597, 796, 357, 39, 10892, 11, 350, 9863, 8, 198, 198, 463,...
2.191235
251
#!/usr/bin/python # -*- coding: utf-8 -*- from abc import abstractproperty, ABCMeta from cloudshell.devices.networking_utils import command_logging from cloudshell.devices.runners.interfaces.autoload_runner_interface import AutoloadOperationsInterface
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 450, 66, 1330, 12531, 26745, 11, 9738, 48526, 198, 198, 6738, 6279, 29149, 13, 42034, 13, 3262, 16090, 62, 26791, ...
3.355263
76
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created Nov 2020 @author: hassi """ from qiskit import QuantumCircuit, Aer, execute from IPython.core.display import display from qiskit.tools.visualization import plot_histogram print("Ch 9: Grover with ancilla qubits") print("--------------------------------") # ...
[ 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, 5267, 12131, 198, 198, 31, 9800, 25, 468, 13396, 198, 37811, 198, 198, 6738, 10662, 1984, 270, ...
2.200864
463
__author__ = 'saeedamen' from pythalesians.util.loggermanager import LoggerManager from pythalesians.market.requests.timeseriesrequest import TimeSeriesRequest from pythalesians.timeseries.techind.techparams import TechParams
[ 834, 9800, 834, 796, 705, 11400, 2308, 41763, 6, 198, 198, 6738, 279, 5272, 2040, 1547, 13, 22602, 13, 6404, 1362, 37153, 1330, 5972, 1362, 13511, 198, 6738, 279, 5272, 2040, 1547, 13, 10728, 13, 8897, 3558, 13, 22355, 10640, 25927, 1...
3.507692
65
#!/usr/bin/env python # coding: utf-8 # In[43]: import cv2 import csv from scipy import ndimage import numpy as np # In[44]: lines = [] with open("./data/driving_log.csv") as dl: reader = csv.reader(dl) for line in reader: lines.append(line) # In[45]: lines = lines[1:] corr = 0.2 source_p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 3559, 5974, 628, 198, 11748, 269, 85, 17, 198, 11748, 269, 21370, 198, 6738, 629, 541, 88, 1330, 299, 67, 9060, 198, 11748, ...
2.210305
951
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """ API interface. """ import os import shutil from .constants import EXTENSIONS_FOLDER from .constants import JUPYTERLAB from .constants import LANG_PACKS_FOLDER from .constants import LC_MESSAGES from .constants impo...
[ 2, 15069, 357, 66, 8, 449, 929, 88, 353, 7712, 4816, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 37811, 198, 17614, 7071, 13, 198, 37811, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, ...
2.399709
2,064
#!/usr/bin/env python # -*- coding: utf-8 -*- # # advent3_triangles.py # import itertools import sys _KNOWN_TRUE = ((5, 12, 13), (3, 3, 3), (200, 300, 450), (2, 1, 2)) _KNOWN_FALSE = ((1, 2, 3), (5, 10, 25)) if __name__ == '__main__': assert sum(evaluate(_KNOWN_TRUE)) == len(_KNOWN_TRUE) assert sum(evalua...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 19980, 18, 62, 28461, 27787, 13, 9078, 198, 2, 220, 220, 198, 198, 11748, 340, 861, 10141, 198, 117...
2.548571
350
from __future__ import annotations from datetime import datetime from pathlib import Path from typing import List, Optional, Tuple
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 309, 29291, 628 ]
4.290323
31