content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
def escape_assertion(s): """escapes the dots in the assertion, because the expression evaluation doesn't support such variable names.""" s = s.replace("r.", "r_") s = s.replace("p.", "p_") return s def remove_comments(s): """removes the comments starting with # in the text.""" pos = s.find(...
[ 4299, 6654, 62, 30493, 295, 7, 82, 2599, 198, 220, 220, 220, 37227, 3798, 7916, 262, 22969, 287, 262, 19190, 11, 780, 262, 5408, 12660, 1595, 470, 1104, 884, 7885, 3891, 526, 15931, 628, 220, 220, 220, 264, 796, 264, 13, 33491, 7203...
2.490085
353
from multiobj_rationale.fuseprop.mol_graph import MolGraph from multiobj_rationale.fuseprop.vocab import common_atom_vocab from multiobj_rationale.fuseprop.gnn import AtomVGNN from multiobj_rationale.fuseprop.dataset import * from multiobj_rationale.fuseprop.chemutils import find_clusters, random_subgraph, extract_subg...
[ 6738, 5021, 26801, 62, 20310, 68, 13, 69, 1904, 22930, 13, 43132, 62, 34960, 1330, 17958, 37065, 198, 6738, 5021, 26801, 62, 20310, 68, 13, 69, 1904, 22930, 13, 18893, 397, 1330, 2219, 62, 37696, 62, 18893, 397, 198, 6738, 5021, 26801...
3.192
125
import time import datetime from thespian.test import * from thespian.actors import * from thespian.troupe import troupe max_listen_wait = datetime.timedelta(seconds=4) max_ask_wait = datetime.timedelta(seconds=2.5) # Ensure there are more test data elements than workers so that # some workers get multiple mes...
[ 11748, 640, 198, 11748, 4818, 8079, 198, 6738, 262, 2777, 666, 13, 9288, 1330, 1635, 198, 6738, 262, 2777, 666, 13, 529, 669, 1330, 1635, 198, 6738, 262, 2777, 666, 13, 83, 472, 431, 1330, 4057, 431, 628, 198, 9806, 62, 4868, 268, ...
2.321212
330
from AMPS import Client import random import time import json import sys if __name__ == '__main__': # detect command line arguments if len(sys.argv) > 1: main(*sys.argv[1:]) else: main()
[ 6738, 3001, 3705, 1330, 20985, 198, 11748, 4738, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 4886, 3141, 1627, 7159, 198, 220,...
2.449438
89
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi import pulumi.runtime
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.622951
61
# coding : utf-8 # created by wyj import numpy as np import pandas as pd import math from utils.feature_utils import df_empty # TERMINALNO,TIME,TRIP_ID,LONGITUDE,LATITUDE,DIRECTION,HEIGHT,SPEED,CALLSTATE,Y # trip_id, # def max_sub(arr): # sum = 0 # height = -999 # tempheight = arr.iloc[0] # for h in ...
[ 2, 19617, 1058, 3384, 69, 12, 23, 198, 2, 2727, 416, 266, 88, 73, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 10688, 198, 6738, 3384, 4487, 13, 30053, 62, 26791, 1330, 47764, 62, 28920, 628,...
1.974138
348
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os import json import windows_utilman import pyAesCrypt import requests from secureCrypt import cryptResult os.system('loadkeys fr') os.system('lsblk > result.txt') if os.path.exists('/mnt/targetDrive'): pass else: os.system('mkdir /mnt/targetDrive') ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 9168, 62, 22602, 805, 198, 11748, 12972, 32, 274, 23919, 198, ...
2.767372
331
from app import app import os from flask import abort, \ redirect, \ render_template, \ request, \ send_from_directory, \ url_for from .helpers import generate_code, \ is_valid_url, \ is_aut...
[ 6738, 598, 1330, 598, 198, 11748, 28686, 198, 6738, 42903, 1330, 15614, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18941, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 2...
1.800781
256
# -*- coding: utf-8 -*- from __future__ import unicode_literals import xadmin from django.contrib import admin # from typeidea.custom_site import custom_site from typeidea.custom_admin import BaseOwnerAdmin from .models import Comment # Register your models here. xadmin.site.register(Comment, CommentAdmin)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 2124, 28482, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 422, 2099, 48...
3.319149
94
from .devices import data_parallel, empty_cache, find, move_to_device, CPU, GPU
[ 6738, 764, 42034, 1330, 1366, 62, 1845, 29363, 11, 6565, 62, 23870, 11, 1064, 11, 1445, 62, 1462, 62, 25202, 11, 9135, 11, 11362 ]
3.291667
24
from tqdm import tqdm import shutil import os from PIL import Image import warnings src_folder = '../../modified_datasets/cars_flat' dest_folder = '../../modified_datasets/cars_flat_ratio_warnings' if not os.path.exists(dest_folder): os.makedirs(dest_folder) num_kept = 0 num_removed = 0 num_corrupt_EXIF = 0 for...
[ 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 14601, 198, 198, 10677, 62, 43551, 796, 705, 40720, 40720, 41771, 62, 19608, 292, 1039, 14, 37993, 62, ...
2.052632
703
from mongoengine.queryset.visitor import Q from backend.apps.posts.models import Post from backend.apps.user.signals import check_comment_signal from backend.apps.user.utils import are_friends def save_comment_by_path(path, comment): """ Saving comment inserting it in root comment or post, given that we ...
[ 6738, 285, 25162, 18392, 13, 10819, 893, 316, 13, 4703, 2072, 1330, 1195, 198, 198, 6738, 30203, 13, 18211, 13, 24875, 13, 27530, 1330, 2947, 198, 6738, 30203, 13, 18211, 13, 7220, 13, 12683, 874, 1330, 2198, 62, 23893, 62, 12683, 282...
2.818182
253
from globus_cli.parsing import group from .list import list_command from .show import show_command timer_command.add_command(list_command) timer_command.add_command(show_command)
[ 6738, 15095, 385, 62, 44506, 13, 79, 945, 278, 1330, 1448, 198, 198, 6738, 764, 4868, 1330, 1351, 62, 21812, 198, 6738, 764, 12860, 1330, 905, 62, 21812, 628, 198, 198, 45016, 62, 21812, 13, 2860, 62, 21812, 7, 4868, 62, 21812, 8, ...
3.210526
57
from typing import Any, Dict, List from ....models.models import Projection, Projector from ....permissions.permissions import Permissions from ....shared.filters import And, FilterOperator from ....shared.patterns import Collection, FullQualifiedId, string_to_fqid from ....shared.schema import required_id_schema from...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 198, 198, 6738, 19424, 27530, 13, 27530, 1330, 4935, 295, 11, 4935, 273, 198, 6738, 19424, 525, 8481, 13, 525, 8481, 1330, 2448, 8481, 198, 6738, 19424, 28710, 13, 10379, 1010, 1330, 84...
3.89071
183
""" sfftk-migrate ============== This is a simple tool to allow users to easily migrate older versions of EMDB-SFF files to the latest (supported version). It has only one dependency: `lxml` which effects part of the migrations. Presently it only works with XML (.sff) EMDB-SFF files. How does it work? --------------...
[ 37811, 198, 82, 487, 30488, 12, 76, 42175, 198, 25609, 855, 198, 198, 1212, 318, 257, 2829, 2891, 284, 1249, 2985, 284, 3538, 32492, 4697, 6300, 286, 17228, 11012, 12, 50, 5777, 3696, 284, 262, 3452, 357, 15999, 2196, 737, 198, 1026, ...
2.810599
1,151
from sys import stdin as s n, k = map(int, s.readline().split()) tree = [0] * 400005 init(1, 1, n) x = k print("<", end="") for idx in range(0, n - 1): print("%d, " % query(1, 1, n, x), end="") x += k - 1 if x % tree[1] == 0: x = tree[1] else: x %= tree[1] print("%d" % query(1, 1,...
[ 6738, 25064, 1330, 14367, 259, 355, 264, 198, 198, 77, 11, 479, 796, 3975, 7, 600, 11, 264, 13, 961, 1370, 22446, 35312, 28955, 198, 198, 21048, 796, 685, 15, 60, 1635, 604, 2388, 20, 628, 628, 198, 15003, 7, 16, 11, 352, 11, 29...
1.927778
180
from os import listdir, path files_by_ext = {} traverse_dir(".", files_by_ext) for ext, files in sorted(files_by_ext.items()): print(f".{ext}") for file in sorted(files): print(f'---{file}')
[ 6738, 28686, 1330, 1351, 15908, 11, 3108, 628, 198, 198, 16624, 62, 1525, 62, 2302, 796, 23884, 198, 9535, 4399, 62, 15908, 7203, 33283, 3696, 62, 1525, 62, 2302, 8, 198, 198, 1640, 1070, 11, 3696, 287, 23243, 7, 16624, 62, 1525, 62...
2.370787
89
from rest_framework import serializers from api.models import Letter
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 40391, 13, 27530, 1330, 18121, 628 ]
4.4375
16
from django.contrib import admin from .models import Application, ApplicationGroup, ApplicationPeriod admin.site.register(Application, ApplicationAdmin) admin.site.register(ApplicationGroup, ApplicationAdmin) admin.site.register(ApplicationPeriod, ApplicationAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 15678, 11, 15678, 13247, 11, 15678, 5990, 2101, 198, 198, 28482, 13, 15654, 13, 30238, 7, 23416, 11, 15678, 46787, 8, 198, 28482, 13, 15654, 13, 30238, 7, 23...
4.306452
62
import ntpath import os from flink_rest_client.common import _execute_rest_request, RestException
[ 11748, 299, 83, 6978, 198, 11748, 28686, 198, 198, 6738, 781, 676, 62, 2118, 62, 16366, 13, 11321, 1330, 4808, 41049, 62, 2118, 62, 25927, 11, 8324, 16922, 628 ]
3.448276
29
# -*- coding: utf-8 -*- import string from charguana import get_charset punctuations = set(list(string.punctuation) + list(get_charset('Currency_Symbol')) + list(get_charset('Close_Punctuation')) + list(get_charset('Open_Punctuation')) + list(get_cha...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4731, 198, 6738, 2609, 5020, 1330, 651, 62, 354, 945, 316, 198, 198, 79, 16260, 6055, 796, 900, 7, 4868, 7, 8841, 13, 79, 16260, 2288, 8, 1343, 198, 220,...
1.653812
59,797
from turtle import * from random import * # from random import * '''def writeline(line, color): pencolor(color) left(90) penup() forward(55) left(90) forward(30) write(line)''' bgcolor("gray") speed(0) moon(200, "white", -925, 300, 900, 400) frame(-950, -490, ...
[ 6738, 28699, 1330, 1635, 201, 198, 6738, 4738, 1330, 1635, 201, 198, 201, 198, 2, 422, 4738, 1330, 1635, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 7061, 6, 4299, 1991, 4470, 7, 1370, 11, 3124,...
2.109966
291
from iec_lookup.services.iec_lookup_service import IECLookupService from iec_lookup.tests.fixtures import mongo_test_db_setup, importer_exporter_code_details_as_json, importer_exporter_code_details_as_object, dgft_succes_response_html_string, dgft_error_response_html_string, iec_table_section_list, basic_iec_details_as...
[ 6738, 37941, 66, 62, 5460, 929, 13, 30416, 13, 494, 66, 62, 5460, 929, 62, 15271, 1330, 314, 2943, 8567, 929, 16177, 198, 6738, 37941, 66, 62, 5460, 929, 13, 41989, 13, 69, 25506, 1330, 285, 25162, 62, 9288, 62, 9945, 62, 40406, 1...
3.31117
376
"""HTTP Router tests.""" import inspect import typing as t from re import compile as re import pytest def test_router(): """Base tests.""" from http_router import Router router = Router(trim_last_slash=True) with pytest.raises(router.RouterError): router.route(lambda: 12) with ...
[ 37811, 40717, 48538, 5254, 526, 15931, 198, 198, 11748, 10104, 198, 11748, 19720, 355, 256, 198, 6738, 302, 1330, 17632, 355, 302, 198, 198, 11748, 12972, 9288, 628, 628, 628, 628, 198, 198, 4299, 1332, 62, 472, 353, 33529, 198, 220, ...
2.562914
604
from pathlib import Path import pytest import scrapli from scrapli.channel import Channel from scrapli.transport import Transport from ...test_data.unit_test_cases import TEST_CASES TEST_DATA_DIR = f"{Path(scrapli.__file__).parents[1]}/tests/test_data" def test_init(sync_generic_driver_conn): """Test that all...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 19320, 489, 72, 198, 6738, 19320, 489, 72, 13, 17620, 1330, 11102, 198, 6738, 19320, 489, 72, 13, 7645, 634, 1330, 19940, 198, 198, 6738, 2644, 9288, 62, 78...
3.169591
171
import datetime from . import create_timesheet
[ 11748, 4818, 8079, 198, 198, 6738, 764, 1330, 2251, 62, 22355, 25473, 628, 628, 628, 628, 198 ]
3.294118
17
#!/usr/bin/env python3 # _*_ coding: utf-8 _*_ import asyncio import logging import struct log = logging.getLogger(__name__) if __name__ == '__main__': log = logging.getLogger("") formatter = logging.Formatter("%(asctime)s %(levelname)s " + "[%(module)s:%(lineno)d] %(mes...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 2878, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7...
2.193833
454
# -*- coding: utf-8 -*- import mysql.connector import pandas as pd import sys #tablename = str(sys.argv[1]) csvname = "result1232.csv" # target = str(sys.argv[1]) # conn = mysql.connector.connect( host="localhost", database="toto", user="root", password="root" ) print("connection: "+str(conn.is_c...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 48761, 13, 8443, 273, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 198, 2, 8658, 11925, 480, 796, 965, 7, 17597, 13, 853, 85, 58, 16, 12...
2.459364
283
import unittest from leanai.core.annotations import RunOnlyOnce if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 10904, 1872, 13, 7295, 13, 34574, 602, 1330, 5660, 10049, 7454, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.825
40
import sys pyversion = sys.version_info if sys.version_info[0] < 2 or (sys.version_info[0] == 2 and sys.version_info[1] < 7): raise Exception("Professor2 requires Python 2.7 or greater") ## Import Cython wrappings on the C++ core library from professor2.core import * __version__ = version() from professor2.errors...
[ 11748, 25064, 198, 9078, 9641, 796, 25064, 13, 9641, 62, 10951, 198, 361, 25064, 13, 9641, 62, 10951, 58, 15, 60, 1279, 362, 393, 357, 17597, 13, 9641, 62, 10951, 58, 15, 60, 6624, 362, 290, 25064, 13, 9641, 62, 10951, 58, 16, 60,...
2.354839
837
import boto3 reko = boto3.client('rekognition') s3 = boto3.client('s3')
[ 11748, 275, 2069, 18, 198, 198, 260, 7204, 796, 275, 2069, 18, 13, 16366, 10786, 37818, 2360, 653, 11537, 198, 82, 18, 796, 275, 2069, 18, 13, 16366, 10786, 82, 18, 11537, 198 ]
2.212121
33
#!/usr/bin/env python import time from pylegos.core import Thread t = Thread() t.runAndWait(threadName='test', runFunc=worker(10)) print('finished')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 640, 198, 198, 6738, 12972, 1455, 418, 13, 7295, 1330, 14122, 628, 198, 198, 83, 796, 14122, 3419, 198, 83, 13, 5143, 1870, 21321, 7, 16663, 5376, 11639, 9288, 3256, 1057, 37, ...
2.833333
54
from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.codec.custom.raft_group_id_codec import RaftGroupIdCodec from hazel...
[ 6738, 11595, 417, 2701, 13, 46911, 1634, 13, 9895, 1330, 1635, 198, 6738, 11595, 417, 2701, 13, 11235, 4668, 13, 18780, 259, 1330, 13268, 50, 1143, 31431, 43806, 721, 198, 6738, 11595, 417, 2701, 13, 11235, 4668, 13, 16366, 62, 20500, ...
2.538732
284
# Array; Two Pointers # Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. # # Note: # # The number of elements initialized in nums1 and nums2 are m and n respectively. # You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional ele...
[ 2, 15690, 26, 4930, 7695, 20193, 198, 198, 2, 11259, 734, 23243, 18253, 26515, 997, 82, 16, 290, 997, 82, 17, 11, 20121, 997, 82, 17, 656, 997, 82, 16, 355, 530, 23243, 7177, 13, 198, 2, 198, 2, 5740, 25, 198, 2, 198, 2, 383, ...
2.619883
171
from unittest import TestCase from .. import capture_buffer as capt_buff from tempfile import mkdtemp import os
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 11485, 1330, 8006, 62, 22252, 355, 3144, 62, 36873, 198, 6738, 20218, 7753, 1330, 33480, 67, 29510, 198, 11748, 28686, 628 ]
3.766667
30
# coding=utf-8 import mysql.connector import xlsxwriter from query import q, table,columns from letters import letters import string import json import os dir_path = os.path.dirname(os.path.realpath(__file__)) with open(dir_path + '/config.json', "r") as json_data_file: conf = json.load(json_data_file) conn = my...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 48761, 13, 8443, 273, 198, 11748, 2124, 7278, 87, 16002, 198, 6738, 12405, 1330, 10662, 11, 3084, 11, 28665, 82, 198, 6738, 7475, 1330, 7475, 198, 11748, 4731, 198, 11748, 33918, 198, 11748, 28...
2.398458
389
from setuptools import setup import os import sys import json sys.path.append("radio_sim") data_files = package_files("hera_cal", "data") + package_files( "hera_cal", "calibrations" ) setup_args = { "name": "radio_sim", "version": "0.0.2", "author": "Tyler Cox", "url": "https://github.com/tyle...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 198, 17597, 13, 6978, 13, 33295, 7203, 37004, 62, 14323, 4943, 628, 198, 198, 7890, 62, 16624, 796, 5301, 62, 16624, 7203, 372, 64, ...
2.206897
406
import asyncio import logging import sys import coloredlogs import signal from oremda.typing import ContainerType from oremda.clients.singularity import SingularityClient from oremda.pipeline.engine.rpc.client import RpcClient from oremda.pipeline.engine.context import pipeline_context from oremda.pipeline.engine.conf...
[ 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 16396, 6404, 82, 198, 11748, 6737, 198, 198, 6738, 267, 2787, 6814, 13, 774, 13886, 1330, 43101, 6030, 198, 6738, 267, 2787, 6814, 13, 565, 2334, 13, 12215, 33737, 133...
2.70235
383
from pynput import keyboard from pynput.keyboard import Key, Controller from os.path import exists import win32clipboard import os from PIL import Image from pystray import Icon as icon, Menu, MenuItem as item import pystray RECORDING = False WORD = "" keyboard_press = Controller() # Collect events unt...
[ 6738, 279, 2047, 1996, 1330, 10586, 201, 198, 6738, 279, 2047, 1996, 13, 2539, 3526, 1330, 7383, 11, 22741, 201, 198, 6738, 28686, 13, 6978, 1330, 7160, 201, 198, 11748, 1592, 2624, 15036, 3526, 201, 198, 11748, 28686, 201, 198, 6738, ...
2.806306
222
# File: moloch_connector.py # # Copyright (c) 2019-2022 Splunk 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 a...
[ 2, 9220, 25, 18605, 5374, 62, 8443, 273, 13, 9078, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 12, 1238, 1828, 13341, 2954, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15...
2.641946
1,254
from flask import * from flask_csp.csp import csp_header, csp_default import imghdr import os import hashlib import subprocess app = Flask(__name__) app.config["UPLOAD_DIRECTORY"] = 'uploads' app.config["ALLOWED_EXTENSIONS"] = ["jpg", "jpeg", "png", "gif"] # Remove report-uri from default CSP header h = csp_default(...
[ 6738, 42903, 1330, 1635, 198, 6738, 42903, 62, 66, 2777, 13, 66, 2777, 1330, 269, 2777, 62, 25677, 11, 269, 2777, 62, 12286, 198, 11748, 545, 456, 7109, 198, 11748, 28686, 198, 11748, 12234, 8019, 198, 11748, 850, 14681, 198, 198, 132...
3.283784
222
import os import cv2 import json import time import shutil import argparse import numpy as np import PIL.Image from copy import deepcopy import mmcv from mmdet.apis import init_detector, inference_detector, show_result # install mmdet v1 in https://github.com/open-mmlab/mmdetection # download correspongdi...
[ 11748, 28686, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 33918, 201, 198, 11748, 640, 201, 198, 11748, 4423, 346, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 350, 4146, 13, 5159, 201, 19...
2.243056
1,008
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-11-29 23:11 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1314, 319, 2864, 12, 1157, 12, 1959, 2242, 25, 1157, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.709091
55
import numpy as np import scipy.linalg as la from auxiliary import * a = np.matrix([ [+0.35, +0.45, -0.14, -0.17], [+0.09, +0.07, -0.54, +0.35], [-0.44, -0.33, -0.03, +0.17], [+0.25, -0.32, -0.13, +0.11], ], dtype=float) w, vl, vr = la.eig(a, left=True, right=True) vprintC('w', w) print for i in ran...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 75, 1292, 70, 355, 8591, 198, 6738, 37419, 1330, 1635, 198, 198, 64, 796, 45941, 13, 6759, 8609, 26933, 198, 220, 220, 220, 26076, 15, 13, 2327, 11, 1343, 15, 13, 2231, ...
1.781116
233
import pygame from pygame.locals import * from util import * from constants import FPS, VERSION, SCREEN_WIDTH, SCREEN_HEIGHT from ui.button import * from ui.font import * from media.paths import bg, logo, body_font, title_font class MainMenu(Main): def __init__(self, game_cls): """ Class for Main menu "...
[ 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, 6738, 7736, 1330, 1635, 198, 6738, 38491, 1330, 22082, 11, 44156, 2849, 11, 6374, 2200, 1677, 62, 54, 2389, 4221, 11, 6374, 2200, 1677, 62, 13909, 9947, ...
1.835981
2,707
import requests import json import os from bs4 import BeautifulSoup as bs import random import time import base64 import m3u8 treinaweb_sessions = requests.Session() #Downloader().index()
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 275, 82, 198, 11748, 4738, 198, 11748, 640, 198, 11748, 2779, 2414, 198, 11748, 285, 18, 84, 23, 198, 198, 33945, 259, 707, 1765, ...
3.196721
61
import gmpy2 import itertools import subprocess import math import time from collections import defaultdict from factordb.factordb import FactorDB START = 2 STOP = 5000 # Also see A056938 # For use with kernprof -v --line-by-line simple.py #@profile run()
[ 11748, 308, 3149, 88, 17, 198, 11748, 340, 861, 10141, 198, 11748, 850, 14681, 198, 11748, 10688, 198, 11748, 640, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 1109, 585, 65, 13, 22584, 585, 65, 1330, 27929, 11012, 628, 1...
2.904255
94
#Samuel Jero <sjero@purdue.edu> #vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 import os import sys import time from datetime import datetime import re import pprint from types import NoneType import ast import manipulations import fields system_home = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0...
[ 2, 16305, 2731, 449, 3529, 1279, 82, 73, 3529, 31, 79, 30345, 13, 15532, 29, 198, 2, 31124, 25, 7400, 11338, 28, 23, 4292, 8658, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, ...
3.063636
110
#!coding:utf-8 import os import sys import pymysql if __name__ == "__main__": main()
[ 2, 0, 66, 7656, 25, 40477, 12, 23, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 279, 4948, 893, 13976, 628, 628, 628, 197, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 12417, 3419, 628 ]
2.285714
42
#!/usr/bin/env python # # Copyright 2019 Rickard Armiento # # This file is part of a Python candidate reference implementation of # the optimade API [https://www.optimade.org/] # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 13130, 8759, 446, 7057, 1153, 78, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 257, 11361, 4540, 4941, 7822, 286, 198, 2, 262, 6436, 671, 7824, 685, 5450, 1378, 2503...
3.181001
779
import os import argparse import cv2 import numpy as np import tensorflow as tf from nart import opr, aopr from nart.model import VGG16 from nart.logconf import logger LEARNING_RATE = 1.5 JITTER = 32 as_netin = lambda x: x[np.newaxis, :] def make_step(sess, net, end): ''' iter only one step, providing end ''' ...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 299, 433, 1330, 1034, 81, 11, 257, 404, 81, 198, 6738, 299, 433, 13, ...
2.600587
681
import re text = '' with open('5input1.txt', 'r') as ifile: text = ifile.read().strip() current_min = len(text) for a in list('abcdefghijklmnopqrstuvwxyz'): to_remove = a + a.upper() new_text = re.sub('[' + to_remove + ']', '', text) # print("removing:", to_remove, "result:", new_text) new_min_to_...
[ 11748, 302, 198, 198, 5239, 796, 10148, 198, 4480, 1280, 10786, 20, 15414, 16, 13, 14116, 3256, 705, 81, 11537, 355, 611, 576, 25, 198, 220, 220, 220, 2420, 796, 611, 576, 13, 961, 22446, 36311, 3419, 198, 198, 14421, 62, 1084, 796,...
2.282828
198
from board import Node from metrics import * parent = Node(None, np.zeros((5,5)), 1) parent.nb_free_three = 0
[ 6738, 3096, 1330, 19081, 198, 6738, 20731, 1330, 220, 1635, 198, 198, 8000, 796, 19081, 7, 14202, 11, 45941, 13, 9107, 418, 19510, 20, 11, 20, 36911, 352, 8, 198, 8000, 13, 46803, 62, 5787, 62, 15542, 796, 657, 628 ]
2.825
40
""" 08-function-calls.py - Using custom algorithms with python function calls. **EventCall** :: EventCall(function, *args, occurrences=inf, stopEventsWhenDone=True) EventCall calls a function, with any number of arguments (\*args) and uses its return value for the given parameter. The example below use a functio...
[ 37811, 198, 2919, 12, 8818, 12, 66, 5691, 13, 9078, 532, 8554, 2183, 16113, 351, 21015, 2163, 3848, 13, 198, 198, 1174, 9237, 14134, 1174, 7904, 628, 220, 220, 220, 8558, 14134, 7, 8818, 11, 1635, 22046, 11, 40279, 28, 10745, 11, 22...
2.899225
387
import requests import json import pandas as pd from datetime import datetime def GetEpidemicWeek(curr_date): ''' Parameters ---------- curr_date: (str) Date in yyyy-mm-dd Return ------ (int) Week number of year ''' _aux = datetime.strptime(curr_date, '%Y-%m-%d') return _aux.is...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 4299, 3497, 13807, 312, 5314, 20916, 7, 22019, 81, 62, 4475, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, ...
2.079818
877
''' 1 , . ''' print ('Task1') for i in range(5): i+=1 print(i,'00000') ''' 2 10 . 5. ''' print ('Task2') count=0 for i in range(10): number = int(input(' 1 10 ')) if number==5: count+=1 print (' 5 ', count) ''' 3 1 100. . ''' print ('Task3') countnum=0 for i i...
[ 7061, 6, 198, 352, 198, 220, 220, 220, 220, 220, 220, 837, 220, 220, 220, 220, 220, 764, 198, 7061, 6, 198, 4798, 19203, 25714, 16, 11537, 198, 1640, 1312, 287, 2837, 7, 20, 2599, 198, 220, 220, 220, 1312, 47932, 16, 198, 220, 2...
1.934754
751
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'aboutdialog.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 10755, 38969, 519, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, 642, ...
3.045045
111
import requests import datetime from db import convert_code from pycountry_convert import country_name_to_country_alpha2 from pprint import pprint import json url = r'https://pomber.github.io/covid19/timeseries.json' response = requests.get(url) if response.status_code != 200: print("Failed to connect to pomber") ...
[ 11748, 7007, 198, 11748, 4818, 8079, 198, 6738, 20613, 1330, 10385, 62, 8189, 198, 6738, 12972, 19315, 62, 1102, 1851, 1330, 1499, 62, 3672, 62, 1462, 62, 19315, 62, 26591, 17, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 33918, ...
2.693009
329
import datetime from functools import total_ordering from typing import Tuple, Any, Dict, Optional from . import change_index
[ 11748, 4818, 8079, 198, 6738, 1257, 310, 10141, 1330, 2472, 62, 34555, 198, 6738, 19720, 1330, 309, 29291, 11, 4377, 11, 360, 713, 11, 32233, 198, 198, 6738, 764, 1330, 1487, 62, 9630, 628 ]
3.764706
34
import pandas as pd pd.DataFrame.to_xyz = dataframe_to_xyz
[ 11748, 19798, 292, 355, 279, 67, 628, 628, 198, 30094, 13, 6601, 19778, 13, 1462, 62, 5431, 89, 796, 1366, 14535, 62, 1462, 62, 5431, 89, 198 ]
2.333333
27
import pytest
[ 11748, 12972, 9288, 628, 198 ]
3.2
5
from robomaster import robot import time ep_robot = robot.Robot() xy_speed = 1/2 # m/s z_speed = 90/2 # m/s if __name__ == '__main__': #ep_robot.initialize(conn_type="sta", sn="3JKDH6U0011J02") ep_robot.initialize(conn_type="ap") ep_chassis = ep_robot.chassis for i in range(4): # 1 Meter...
[ 6738, 3857, 296, 1603, 1330, 9379, 198, 11748, 640, 198, 198, 538, 62, 305, 13645, 796, 9379, 13, 14350, 313, 3419, 198, 5431, 62, 12287, 796, 352, 14, 17, 1303, 285, 14, 82, 198, 89, 62, 12287, 796, 4101, 14, 17, 1303, 285, 14, ...
2.018939
264
flug = bool(True) i=0 j=0
[ 2704, 1018, 796, 20512, 7, 17821, 8, 198, 72, 28, 15, 198, 73, 28, 15, 198 ]
1.625
16
#!/usr/bin/env python ########## import web from handlers.front import FrontPage from handlers.home import HomePage ########## urls = ('/home', 'HomePage', '/', 'FrontPage') app = web.application(urls, globals()) ########## if __name__ == "__main__": app.run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7804, 2235, 198, 198, 11748, 3992, 198, 6738, 32847, 13, 8534, 1330, 8880, 9876, 198, 6738, 32847, 13, 11195, 1330, 5995, 9876, 198, 198, 7804, 2235, 198, 198, 6371, 82, 796, 19203, 14...
2.772277
101
import ass import subdigest import subprocess import os def dump_subs(subsfile: str, subsdata: subdigest.Subtitles): """ Exports subsdata to subsfile manually over using dump_file() to avoid the utf-8 encode warning. """ with open(subsfile, "w", encoding="utf_8_sig") as f: for section in subsd...
[ 11748, 840, 198, 11748, 850, 12894, 395, 198, 11748, 850, 14681, 198, 11748, 28686, 628, 198, 4299, 10285, 62, 7266, 82, 7, 7266, 82, 7753, 25, 965, 11, 6352, 7890, 25, 850, 12894, 395, 13, 7004, 83, 30540, 2599, 198, 220, 220, 220,...
2.071114
1,814
import logging from tbot.twitch_bot.var_filler import fills_vars, Send_error from tbot import config
[ 11748, 18931, 198, 6738, 256, 13645, 13, 31844, 62, 13645, 13, 7785, 62, 69, 4665, 1330, 23816, 62, 85, 945, 11, 16290, 62, 18224, 198, 6738, 256, 13645, 1330, 4566 ]
3.333333
30
import setuptools with open('README.md', 'r', encoding='utf-8') as fh: long_description = fh.read() setuptools.setup( name='BaiduSpider', version='0.0.6', author='Sam Zhang', author_email='samzhang951@outlook.com', description='BaiduSpider', long_description=long_description, long_desc...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 9132, 3256, 705, 81, 3256, 21004, 11639, 40477, 12, 23, 11537, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 261...
2.401316
304
#!/usr/bin/env python # -*- coding: utf-8 -*- # @File : reward.py # @Author: zixiao # @Date : 2019-03-28 # @Desc :
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 8979, 220, 1058, 6721, 13, 9078, 198, 2, 2488, 13838, 25, 1976, 844, 13481, 198, 2, 2488, 10430, 220, 1058, ...
2.087719
57
# Given two strings a and b, return true if you can swap two letters in a so the result is equal to b, otherwise, return false. # Swapping letters is defined as taking two indices i and j (0-indexed) such that i != j and swapping the characters at a[i] and b[j]. For example, swapping at indices 0 and 2 in "abcd" resul...
[ 2, 11259, 734, 13042, 257, 290, 275, 11, 1441, 2081, 611, 345, 460, 16075, 734, 7475, 287, 257, 523, 262, 1255, 318, 4961, 284, 275, 11, 4306, 11, 1441, 3991, 13, 198, 198, 2, 2451, 5912, 7475, 318, 5447, 355, 2263, 734, 36525, 13...
3.068571
175
print("NOOP")
[ 4798, 7203, 15285, 3185, 4943, 198 ]
2.333333
6
import cloudmesh print cloudmesh.shell("cloud list")
[ 11748, 6279, 76, 5069, 198, 4798, 6279, 76, 5069, 13, 29149, 7203, 17721, 1351, 4943, 628 ]
3.375
16
from .constants import ( ROBOTHOR_ORIGINAL_CLASS_LIST ) import re import os import json import networkx import h5py import numpy as np scene_types = ['FloorPlan_Train1', 'FloorPlan_Train2', 'FloorPlan_Train3', 'FloorPlan_Train4', 'FloorPlan_Train5', 'FloorPlan_Train6', 'FloorPlan_Trai...
[ 6738, 764, 9979, 1187, 1330, 357, 198, 220, 220, 220, 36449, 26946, 1581, 62, 1581, 3528, 17961, 62, 31631, 62, 45849, 198, 8, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 3127, 87, 198, 11748, 289, 20, 9078, 198...
2.393574
249
import pyqrcode from pyqrcode import QRCode # String which represent the QR code s = "https://www.youtube.com/channel/UCeO9hPCfRzqb2yTuAn713Mg" # Generate QR code url = pyqrcode.create(s) # Create and save the png file naming "myqr.png" url.svg("myyoutube.svg", scale = 8)
[ 11748, 12972, 80, 6015, 1098, 220, 198, 6738, 12972, 80, 6015, 1098, 1330, 1195, 7397, 1098, 220, 198, 220, 220, 198, 2, 10903, 543, 2380, 262, 42137, 2438, 220, 198, 82, 796, 366, 5450, 1378, 2503, 13, 11604, 13, 785, 14, 17620, 14...
2.341463
123
import pytest import packerlicious.post_processor as post_processor
[ 11748, 12972, 9288, 198, 198, 11748, 2353, 263, 677, 699, 13, 7353, 62, 41341, 355, 1281, 62, 41341, 628, 628, 198 ]
3.47619
21
'''Module main''' import json import os from rabbitmq import RabbitMQ from pika import exceptions from parameter import Parameter from send_grid import SendGrid from traceability import Traceability from transform import Transform import uuid if __name__ == '__main__': App().main()
[ 7061, 6, 26796, 1388, 7061, 6, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 22746, 76, 80, 1330, 25498, 49215, 198, 6738, 279, 9232, 1330, 13269, 198, 6738, 11507, 1330, 25139, 2357, 198, 6738, 3758, 62, 25928, 1330, 16290, 41339, 1...
3.221053
95
class_name = 'organizations_tab' from qtpy import QtCore, QtGui, QtWidgets, uic import os from logzero import logger import pathlib import json from modules.sumologic_orgs import SumoLogic_Orgs
[ 4871, 62, 3672, 796, 705, 9971, 4582, 62, 8658, 6, 198, 198, 6738, 10662, 83, 9078, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 11, 334, 291, 198, 11748, 28686, 198, 6738, 2604, 22570, 1330, 49706, 198, 11748, ...
2.984848
66
#Code # python code # script_name: hello # # author: Siddharth # description: composition # # set up from earsketch import * # Initialized init() setTempo(120) # varible chord = RD_UK_HOUSE__5THCHORD_2 secondarybeat = HIPHOP_BASSSUB_001 mainbeat = HOUSE_MAIN_BEAT_003 # Music fitMedia(chord, 1, 1, 16) se...
[ 2, 10669, 628, 198, 2, 197, 197, 29412, 2438, 198, 2, 197, 197, 12048, 62, 3672, 25, 23748, 198, 2, 198, 2, 197, 197, 9800, 25, 44487, 9869, 400, 198, 2, 197, 197, 11213, 25, 11742, 198, 2, 198, 2, 220, 220, 900, 510, 198, 673...
2.248
250
import codecs import os codecs.register_error('none', lambda e: ('?', e.end)) if __name__=='__main__': files = [ 'test_file.csv' ] in_dir = 'in_utf8' out_dir = 'sjis' utf8_to_sjis(files, in_dir, out_dir)
[ 11748, 40481, 82, 198, 11748, 28686, 198, 198, 19815, 721, 82, 13, 30238, 62, 18224, 10786, 23108, 3256, 37456, 304, 25, 19203, 30, 3256, 304, 13, 437, 4008, 628, 628, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, ...
2.07619
105
from django.apps import AppConfig from mavweb.mavlink_arbiter.main import Main
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 285, 615, 12384, 13, 76, 615, 8726, 62, 283, 2545, 263, 13, 12417, 1330, 8774, 628, 198 ]
3
27
#generate_target.py #Generates a list of target genes from a flybase output import os import sys if __name__ == "__main__": main()
[ 2, 8612, 378, 62, 16793, 13, 9078, 198, 2, 8645, 689, 257, 1351, 286, 2496, 10812, 422, 257, 6129, 8692, 5072, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 2...
3
45
import config from flask import current_app from flask_login import current_user from pgadmin.model import db, User, Server from pgadmin.utils.crypto import encrypt, decrypt MASTERPASS_CHECK_TEXT = 'ideas are bulletproof' def set_crypt_key(_key, _new_login=True): """ Set the crypt key :param _key: The k...
[ 11748, 4566, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 198, 6738, 23241, 28482, 13, 19849, 1330, 20613, 11, 11787, 11, 9652, 198, 6738, 23241, 28482, 13, 26791, 13, 29609, 78, 1330, 34117...
2.75451
1,275
from django.urls import path from .views import DashboardTemplateView, DashboardView app_name = 'dashboard' urlpatterns = [ path('test/', DashboardView.as_view(), name='test'), path('', DashboardView.as_view(), name='index'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 16189, 3526, 30800, 7680, 11, 16189, 3526, 7680, 198, 198, 1324, 62, 3672, 796, 705, 42460, 3526, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, ...
2.938272
81
import random from model.group import Group
[ 11748, 4738, 198, 6738, 2746, 13, 8094, 1330, 4912, 628 ]
4.5
10
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.scripts.train_model import setup_args, TrainLoop if __name__ == '__main__': parser = setup_args() p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287,...
2.289412
850
import os import collections import numpy as np from ipywidgets import widgets from IPython.core.display import display, HTML import logging from NeuNorm.normalization import Normalization from __code import file_handler from __code.ipywe import myfileselector from __code.normalization.get import Get from __code.norm...
[ 11748, 28686, 198, 11748, 17268, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 20966, 88, 28029, 11407, 1330, 40803, 198, 6738, 6101, 7535, 13, 7295, 13, 13812, 1330, 3359, 11, 11532, 198, 11748, 18931, 198, 198, 6738, 3169, 84, 35393, ...
3.28877
187
import contextlib import io import os import re import subprocess from . import backups_manager_lib from . import backups_main from . import lib from .test_util import AssertEquals from .test_util import AssertLinesEqual from .test_util import CreateDir from .test_util import CreateFile from .test_util import DoBacku...
[ 11748, 4732, 8019, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 198, 6738, 764, 1330, 35872, 62, 37153, 62, 8019, 198, 6738, 764, 1330, 35872, 62, 12417, 198, 6738, 764, 1330, 9195, 198, 198, 6738,...
3.392157
102
from django import template from backend.models import Back register = template.Library()
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 30203, 13, 27530, 1330, 5157, 198, 198, 30238, 796, 11055, 13, 23377, 3419 ]
4.5
20
"""Views for ecommerce""" from decimal import Decimal import logging from django.conf import settings from django.contrib.auth import get_user_model from django.http.response import Http404 from django.shortcuts import get_object_or_404 from django.urls import reverse from ipware import get_client_ip from rest_framewo...
[ 37811, 7680, 82, 329, 304, 27061, 37811, 198, 6738, 32465, 1330, 4280, 4402, 198, 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198,...
3.475379
528
import json import logging import os import torch from rnn import RNNModel import data JSON_CONTENT_TYPE = 'application/json' logger = logging.getLogger(__name__)
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 28034, 198, 6738, 374, 20471, 1330, 371, 6144, 17633, 198, 198, 11748, 1366, 198, 198, 40386, 62, 37815, 3525, 62, 25216, 796, 705, 31438, 14, 17752, 6, 198, 198, 6404...
3.053571
56
import pandas as pd import numpy as np import json import requests #Retrieving my api keys information to access the Google API. keys = get_keys("/Users/jjherranzsarrion/.secret/google_blog2_api.json") api_key = keys['api_key'] url = 'https://maps.googleapis.com/maps/api/directions/json?' origin = 'Sheepfold+Do...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 11748, 7007, 198, 198, 2, 9781, 37418, 616, 40391, 8251, 1321, 284, 1895, 262, 3012, 7824, 13, 198, 220, 220, 220, 220, 198, 13083, 796, 651,...
2.800687
291
from django.apps import AppConfig from openslides.utils.collection import Collection from . import ( __description__, __license__, __url__, __verbose_name__, __version__, )
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 9808, 75, 1460, 13, 26791, 13, 43681, 1330, 12251, 198, 198, 6738, 764, 1330, 357, 198, 220, 220, 220, 11593, 11213, 834, 11, 198, 220, 220, 220, 11593, 43085, 834, 11, 198,...
2.746479
71
# Generated by Django 3.0.3 on 2020-04-28 13:14 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 18, 319, 12131, 12, 3023, 12, 2078, 1511, 25, 1415, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python import json from typing import List, Optional, Tuple import datetime import re import io import base64 import os import sys import argparse from plotly.missing_ipywidgets import FigureWidget from tqdm import tqdm import minify_html ROOT=os.path.realpath(os.path.join(os.path.dirname(__file__), '....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 33918, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 309, 29291, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 11748, 33245, 198, 11748, 2779, 2414, 198, 11748, 28686, 198, 11748, ...
2.433763
2,174
from lib import rpclib from slickrpc import Proxy from lib import transaction, bitcoin, util from lib.util import bfh, bh2u from lib.transaction import Transaction import requests import pytest import subprocess import json import sys import os from dotenv import load_dotenv load_dotenv(verbose=True) IMPORT_API_HOST...
[ 6738, 9195, 1330, 374, 79, 565, 571, 198, 6738, 1017, 18994, 14751, 1330, 38027, 198, 6738, 9195, 1330, 8611, 11, 8550, 11, 7736, 198, 6738, 9195, 13, 22602, 1330, 275, 69, 71, 11, 275, 71, 17, 84, 198, 6738, 9195, 13, 7645, 2673, ...
2.370937
523
from pynito.cognitodecryptor import CognitoDecryptor
[ 6738, 279, 2047, 10094, 13, 66, 2360, 270, 375, 721, 6012, 273, 1330, 26543, 10094, 10707, 6012, 273 ]
2.888889
18
import sys from PySide2.QtGui import QPixmap, QImage from PySide2.QtWidgets import QApplication, QLabel, QPushButton, QVBoxLayout, QWidget, QFileDialog, QTextEdit, QSizePolicy, QMessageBox, QHBoxLayout from PySide2.QtCore import Slot, Qt, QStringListModel, QSize, QTimer from dbr import DynamsoftBarcodeReader dbr = Dy...
[ 11748, 25064, 198, 6738, 9485, 24819, 17, 13, 48, 83, 8205, 72, 1330, 1195, 47, 844, 8899, 11, 1195, 5159, 198, 198, 6738, 9485, 24819, 17, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 33986, 11, 1195, 49222, 21864, 11, ...
2.77931
145
import sys import logging import numpy as np logger = logging.getLogger(__name__) def log_pars(pars, fmt='%8.3g',front=None): """ print the parameters with a uniform width """ s = [] if front is not None: s.append(front) if pars is not None: fmt = ' '.join( [fmt+' ']*len(pars)...
[ 11748, 25064, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 4299, 2604, 62, 79, 945, 7, 79, 945, 11, 46996, 11639, 4, 23, 13, 18, 70...
1.822481
2,749
import pandas as pd from PIL import Image import requests from io import BytesIO import os import math df = pd.read_csv('C:\\Users\\v-ngdian\\Documents\\utilities\\thumbnail creator\\MetArtworksAugmented.csv') size = 512, 512 ids = [] run("vase", "vases") print(ids)
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 7007, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 28686, 198, 11748, 10688, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 34, 25, 6852...
2.851064
94
import ssl import certifi from promisedio import loop, ns, promise, timer promise.exec_async(example1()) loop.run_forever()
[ 11748, 264, 6649, 198, 11748, 5051, 22238, 198, 6738, 8072, 952, 1330, 9052, 11, 36545, 11, 6991, 11, 19781, 628, 628, 198, 16963, 786, 13, 18558, 62, 292, 13361, 7, 20688, 16, 28955, 198, 26268, 13, 5143, 62, 754, 332, 3419, 198 ]
3.047619
42
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 2, 15069, 357, 66, 8, 2211, 7381, 20836, 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, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
3.606965
201