content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
#!/usr/bin/env python3
import boto3
from pprint import pprint
from . import TABLENAME, TESTUSER
if __name__ == '__main__':
scan()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
275,
2069,
18,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
6738,
764,
1330,
309,
6242,
43,
1677,
10067,
11,
43001,
29904,
628,
628,
628,
198,
198,
361,
11593,
3672,
8... | 2.535714 | 56 |
"""Unit tests for django_evolution.evolve.Evolver and related classes."""
from __future__ import unicode_literals
from collections import OrderedDict
from django.db import DEFAULT_DB_ALIAS, models
try:
# Django >= 1.7
from django.db import migrations
except ImportError:
# Django < 1.7
migrations = N... | [
37811,
26453,
5254,
329,
42625,
14208,
62,
1990,
2122,
13,
1990,
6442,
13,
36,
10396,
332,
290,
3519,
6097,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
17268,
1330,
14230,
1068,
35,
... | 1.911193 | 38,150 |
# Copyright 2017 Mycroft AI 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 writin... | [
2,
15069,
2177,
2011,
36714,
9552,
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,
198,
2... | 3.525822 | 213 |
"""Tests for API entrypoint."""
from django.test import TestCase, RequestFactory
from api import views
from util import json
class ApiEntryPointTest(TestCase):
"""Test api entry point"""
def setUp(self):
"""Setup ApiEntryPointTest tests."""
self.factory = RequestFactory()
self.requ... | [
37811,
51,
3558,
329,
7824,
5726,
4122,
526,
15931,
198,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
11,
19390,
22810,
198,
198,
6738,
40391,
1330,
5009,
198,
198,
6738,
7736,
1330,
33918,
628,
198,
4871,
5949,
72,
30150,
1272... | 2.811502 | 313 |
from smbus2 import SMBus
PCA_AUTOINCREMENT_OFF = 0x00
PCA_AUTOINCREMENT_ALL = 0x80
PCA_AUTOINCREMENT_INDIVIDUAL = 0xA0
PCA_AUTOINCREMENT_CONTROL = 0xC0
PCA_AUTOINCREMENT_CONTROL_GLOBAL = 0xE0
REG_MODE1 = 0x00
REG_MODE2 = 0x01
REG_PWM0 = 0x02
REG_PWM1 = 0x03
REG_PWM2 = 0x04
REG_PWM3 = 0x05
REG_GRPPWM = 0x06
REG_GRPFRE... | [
6738,
895,
10885,
17,
1330,
9447,
16286,
198,
198,
5662,
32,
62,
39371,
46,
30158,
2200,
10979,
62,
27977,
796,
657,
87,
405,
198,
5662,
32,
62,
39371,
46,
30158,
2200,
10979,
62,
7036,
796,
657,
87,
1795,
198,
5662,
32,
62,
39371,
... | 1.749333 | 375 |
# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import argparse
import os
import jinja2
if __name__=="__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-t', action='store', dest='tmpl',
help='Specify the template file path')
results = parser.... | [
2,
21004,
28,
40477,
23,
198,
11748,
25064,
198,
260,
2220,
7,
17597,
8,
198,
17597,
13,
2617,
12286,
12685,
7656,
10786,
40477,
23,
11537,
198,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
474,
259,
6592,
17,
628,
198,
361... | 2.478022 | 182 |
'''
Version Checker module entry point
'''
__version__ = '0.2.2-alpha.2'
| [
7061,
6,
198,
14815,
6822,
263,
8265,
5726,
966,
198,
7061,
6,
198,
834,
9641,
834,
796,
705,
15,
13,
17,
13,
17,
12,
26591,
13,
17,
6,
198
] | 2.517241 | 29 |
#!/s/std/bin/python
import sys, string, os, glob, re, mfgraph
## configuration
modules_list = ["MOSI_bcast_opt_1", "MOSI_mcast_aggr_1", "MOSI_GS_1"]
norm_module = "BASH"
#modules_list = ["MOSI_bcast_opt_4", "MOSI_mcast_aggr_4", "MOSI_GS_4"]
#norm_module = "MOSI_mcast_aggr_4"
protocol_name = {
"MOSI_bcast_opt_1" ... | [
2,
48443,
82,
14,
19282,
14,
8800,
14,
29412,
198,
11748,
25064,
11,
4731,
11,
28686,
11,
15095,
11,
302,
11,
285,
69,
34960,
198,
198,
2235,
8398,
198,
18170,
62,
4868,
796,
14631,
44,
2640,
40,
62,
65,
2701,
62,
8738,
62,
16,
... | 2.228346 | 1,143 |
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Dict, List, Optional, Tuple, Union
__all__ = []
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
41876,
62,
50084,
2751,
198,
198,
361,
41876,
62,
50084,
2751,
25,
198,
220,
220,
220,
422,
19720,
1330,
360,
713,
11,
7343,
11,
32233,
11,
309,
29291,
11,
4479,
198,
... | 3.265306 | 49 |
from blocks.Block import Block
from blocks.BlockInput import BlockInput
from blocks.BlockParameter import BlockParameter
from blocks.BlockOutput import BlockOutput
from blocks.ParameterType import ParameterType
import numpy as np
import matplotlib.pyplot as plt
| [
6738,
7021,
13,
12235,
1330,
9726,
220,
198,
6738,
7021,
13,
12235,
20560,
1330,
9726,
20560,
198,
6738,
7021,
13,
12235,
36301,
1330,
9726,
36301,
198,
6738,
7021,
13,
12235,
26410,
1330,
9726,
26410,
198,
6738,
7021,
13,
36301,
6030,
... | 3.830986 | 71 |
from flask import Flask, render_template, request, jsonify
import json
import torch
from torch import Tensor
import fastai
import os
from pathlib import Path
import os,sys,inspect
import multiprocessing
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(c... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
11,
33918,
1958,
198,
11748,
33918,
198,
11748,
28034,
198,
6738,
28034,
1330,
309,
22854,
198,
11748,
3049,
1872,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,... | 2.785847 | 1,074 |
import matplotlib.pyplot as plt
import numpy as np
import pickle
import json
from pylab import plot, show, savefig, xlim, figure, ylim, legend, boxplot, setp, axes
from i3Deep import utils
import pandas as pd
import os
import seaborn as sns
import matplotlib
if __name__ == '__main__':
base_path = "/gris/gris-f/h... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2298,
293,
198,
11748,
33918,
198,
6738,
279,
2645,
397,
1330,
7110,
11,
905,
11,
3613,
5647,
11,
2124,
2475,
11,
3785,
11,
331,
... | 2.321561 | 538 |
import rospy, sys
import thread, copy
import moveit_commander
from moveit_commander import RobotCommander, MoveGroupCommander, PlanningSceneInterface
from geometry_msgs.msg import PoseStamped, Pose
from moveit_msgs.msg import CollisionObject, AttachedCollisionObject, PlanningScene
from math import radians
from copy imp... | [
11748,
686,
2777,
88,
11,
25064,
198,
11748,
4704,
11,
4866,
198,
11748,
1445,
270,
62,
9503,
4066,
198,
6738,
1445,
270,
62,
9503,
4066,
1330,
16071,
6935,
4066,
11,
10028,
13247,
6935,
4066,
11,
21913,
36542,
39317,
198,
6738,
22939,
... | 3.568807 | 109 |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Date: 2021-06-06 20:16:49
LastEditTime: 2021-06-06 22:13:56
"""
import random
import requests
UA = [
'Mozilla/5.0 (Android 2.2; Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4',
'Mozilla/5.0 (Macintosh... | [
2,
5145,
14,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
10430,
25,
33448,
12,
3312,
12,
3312,
1160,
25,
1433,
25,
2920,
198,
5956,
18378,
7575,
25,
33448,
12,... | 1.927954 | 9,480 |
import torch
import torch.nn as nn
from collections import OrderedDict
from PIL import Image
import numpy as np
def conv_block(in_nc, out_nc, kernel_size, stride=1, dilation=1, groups=1, bias=True, \
pad_type='zero', norm_type=None, act_type='relu', mode='CNA'):
'''
Conv layer with padding... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
299,
32152,
355,
45941,
628,
628,
628,
198,
198,
4299,
3063,
62,
9967,
7,
259,
62,
... | 2.27109 | 2,110 |
import ssdb
from django.conf import settings
SSDB_HOST = getattr(settings, 'SSDB_HOST', 'localhost')
SSDB_PORT = getattr(settings, 'SSDB_PORT', 8888)
SSDB_AUTH = getattr(settings, 'SSDB_AUTH', '')
ssdb_client = get_ssdb_client()
| [
11748,
37786,
9945,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
5432,
11012,
62,
39,
10892,
796,
651,
35226,
7,
33692,
11,
705,
5432,
11012,
62,
39,
10892,
3256,
705,
36750,
11537,
198,
5432,
11012,
62,
15490,
796,
651,
... | 2.56044 | 91 |
# -*- coding: utf-8 -*-
###################################################################################
# Copyright (C) 2019 SuXueFeng GUN
###################################################################################
from . import config
from . import books
from . import borrowing_records
from . import borro... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
29113,
29113,
14468,
21017,
198,
2,
15069,
357,
34,
8,
13130,
1778,
55,
518,
37,
1516,
43794,
198,
29113,
29113,
14468,
21017,
198,
198,
6738,
764,
1330,
4566,
198,
6738... | 4.770115 | 87 |
from marshmallow import Schema, fields
| [
6738,
22397,
42725,
1330,
10011,
2611,
11,
7032,
198
] | 4.333333 | 9 |
#!/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
__doc__='checks callbacks work'
__version__=''' $Id: test_pdfgen_callback.py 3959 2012-09-27 14:39:39Z robin $ '''
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation
setOutDir(__na... | [
2,
48443,
8800,
14,
24330,
21015,
198,
2,
15269,
6358,
17822,
2031,
12052,
13,
4751,
12,
6999,
198,
2,
3826,
5964,
13,
14116,
329,
5964,
3307,
198,
834,
15390,
834,
11639,
42116,
869,
10146,
670,
6,
198,
834,
9641,
834,
28,
7061,
6,... | 2.810976 | 328 |
# -*- coding: utf-8 -*-
"""
Модели
"""
from django.db import models
from django.contrib.auth.models import User
from decimal import Decimal
# Create your models here.
class Booking(models.Model):
"""Модель заказа"""
class Meta:
"""
Права по-умолчанию обнулены.
Добавлено право на ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
140,
250,
25443,
112,
16843,
30143,
18849,
198,
37811,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
1... | 1.628654 | 2,771 |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | [
2,
15069,
12131,
3012,
11419,
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,
198,
2,
921,
743,
733... | 3.616327 | 245 |
# Generated by Django 4.0.3 on 2022-03-22 10:40
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
604,
13,
15,
13,
18,
319,
33160,
12,
3070,
12,
1828,
838,
25,
1821,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
"""
IO sub-package
"""
from .pdb import open_pdb
from .xyz import open_xyz, write_xyz
| [
37811,
198,
9399,
850,
12,
26495,
198,
37811,
198,
198,
6738,
764,
79,
9945,
1330,
1280,
62,
79,
9945,
198,
6738,
764,
5431,
89,
1330,
1280,
62,
5431,
89,
11,
3551,
62,
5431,
89,
198
] | 2.485714 | 35 |
# flake8: noqa
from .core import *
SCHEMA_VERSION = 'v3.3.1'
SCHEMA_URL = 'https://vega.github.io/schema/vega/v3.3.1.json'
| [
2,
781,
539,
23,
25,
645,
20402,
198,
6738,
764,
7295,
1330,
1635,
198,
198,
50,
3398,
27630,
62,
43717,
796,
705,
85,
18,
13,
18,
13,
16,
6,
198,
50,
3398,
27630,
62,
21886,
796,
705,
5450,
1378,
303,
4908,
13,
12567,
13,
952,
... | 2 | 62 |
#!/usr/bin/env python
#
# Copyright 2013 cloudysunny14.
#
# 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... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
15069,
2211,
6279,
893,
16948,
1415,
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,... | 3.196262 | 321 |
from App.Proxys import *
data = SimBiController(
name = 'Jumping',
controlParamsList = [
ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ),
ControlParams( joint = 'pelvis_torso', kp = 1000.0, kd = 100.0, tauMax = 10000.0, scale = ( 1.0, 0.... | [
6738,
2034,
13,
2964,
87,
893,
1330,
1635,
198,
198,
7890,
796,
3184,
23286,
22130,
7,
220,
628,
220,
220,
220,
1438,
796,
705,
41,
25218,
3256,
628,
220,
220,
220,
1630,
10044,
4105,
8053,
796,
685,
220,
198,
220,
220,
220,
220,
... | 1.52863 | 13,762 |
import najha.functional as f
import os
import sys
from importlib import import_module
checkers = [
checkDebug,
]
if __name__ == '__main__':
projectFolderPath = sys.argv[1]
run(projectFolderPath)
| [
11748,
299,
1228,
3099,
13,
45124,
355,
277,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
6738,
1330,
8019,
1330,
1330,
62,
21412,
628,
198,
198,
9122,
364,
796,
685,
198,
220,
220,
220,
2198,
27509,
11,
198,
60,
628,
198,
198,
3... | 2.74359 | 78 |
import uuid
from django.core.cache import cache
from django.shortcuts import render
# Create your views here.
from rest_framework.exceptions import APIException
from rest_framework.generics import ListCreateAPIView
from rest_framework.response import Response
from rest_framework.status import HTTP_200_OK
... | [
11748,
334,
27112,
201,
198,
201,
198,
6738,
42625,
14208,
13,
7295,
13,
23870,
1330,
12940,
201,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
201,
198,
201,
198,
2,
13610,
534,
5009,
994,
13,
201,
198,
6738,
1334,
62,
30604... | 3.548387 | 217 |
from flask_restplus import reqparse
pagination_arguments = reqparse.RequestParser()
pagination_arguments.add_argument("page", type=int, required=False, default=1, help="Page number")
pagination_arguments.add_argument("per_page", type=int, required=False, choices=[10, 25, 50, 100, 200], default=50, help="Results per p... | [
6738,
42903,
62,
2118,
9541,
1330,
43089,
29572,
628,
198,
79,
363,
1883,
62,
853,
2886,
796,
43089,
29572,
13,
18453,
46677,
3419,
198,
79,
363,
1883,
62,
853,
2886,
13,
2860,
62,
49140,
7203,
7700,
1600,
2099,
28,
600,
11,
2672,
2... | 3.227723 | 101 |
from django.shortcuts import render, get_object_or_404, redirect
from django.core.paginator import Paginator
from django.contrib.auth.decorators import login_required
import datetime
from .models import Task
from .forms import TaskModelForm
@login_required
@login_required
@login_required
@login_required
@log... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
11,
18941,
198,
6738,
42625,
14208,
13,
7295,
13,
79,
363,
20900,
1330,
31525,
20900,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
125... | 3.365385 | 104 |
#!/usr/bin/env python2
from __future__ import print_function
import roslib
import sys
import rospy
import numpy as np
import datetime
import time
from geometry_msgs.msg import Twist
from dse_msgs.msg import PoseMarkers
from std_msgs.msg import Float64MultiArray
from std_msgs.msg import MultiArrayLayout
from std_msgs.ms... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
686,
6649,
571,
198,
11748,
25064,
198,
11748,
686,
2777,
88,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4818,
8079,
... | 3.33101 | 287 |
from pathlib import Path
from dataclasses import dataclass
from typing import Literal
@dataclass
@dataclass
if __name__ == "__main__":
curdir: Path = Path(__file__).resolve().parent
data = process_input(input=curdir.joinpath(Path("input")))
result = solve(data)
print(result)
print(result.x... | [
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
25659,
1691,
628,
198,
31,
19608,
330,
31172,
628,
198,
31,
19608,
330,
31172,
628,
628,
198,
361,
11593,
3672,
834,
6624,
... | 2.723577 | 123 |
# Definition for a binary tree node.
| [
2,
30396,
329,
257,
13934,
5509,
10139,
13,
628,
198
] | 3.9 | 10 |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 11 23:43:40 2019
@author: yanxi
"""
import pandas
import numpy as np
import struct
# -------- score --------
__HEADER4__=['time(s)', 'loss', 'difference', 'delta']
__HEADER5__=['time(s)', 'loss', 'accuracy', 'difference', 'delta']
__HEADER6__=['iteration', 'time(s)', ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
30030,
7653,
1367,
2242,
25,
3559,
25,
1821,
13130,
198,
198,
31,
9800,
25,
331,
272,
29992,
198,
37811,
198,
198,
11748,
19798,
292,
198,
11748,... | 2.773279 | 247 |
#!/usr/bin/env python3
from setuptools import setup
from setuptools.command.test import test
setup(
name='nmcli',
version='0.2.2',
packages=['nmcli', 'nmcli.data', 'nmcli.dummy'],
package_data={
'nmcli': ['py.typed'],
},
test_suite='tests',
python_requires='>=3.7',
install_requi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
6738,
900,
37623,
10141,
13,
21812,
13,
9288,
1330,
1332,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
21533,
44506,
3256,
198,
22... | 2.187166 | 187 |
import os
import unittest
from pathlib import Path
from tests.helpers import delete_files_in_folder
| [
11748,
28686,
198,
11748,
555,
715,
395,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
5254,
13,
16794,
364,
1330,
12233,
62,
16624,
62,
259,
62,
43551,
628
] | 3.607143 | 28 |
import collections
import copy
import itertools
from cumulus_vxconfig.utils.checkvars import CheckVars
from cumulus_vxconfig.utils.filters import Filters
from cumulus_vxconfig.utils import (
File, Inventory, Host, MACAddr, Network, Link
)
from ansible.errors import AnsibleError
filter = Filters()
inventory = Inv... | [
11748,
17268,
198,
11748,
4866,
198,
11748,
340,
861,
10141,
198,
198,
6738,
10973,
23515,
62,
85,
87,
11250,
13,
26791,
13,
9122,
85,
945,
1330,
6822,
53,
945,
198,
6738,
10973,
23515,
62,
85,
87,
11250,
13,
26791,
13,
10379,
1010,
... | 1.733047 | 17,460 |
# Copyright (c) 2019 UAVCAN Consortium
# This software is distributed under the terms of the MIT License.
# Author: Pavel Kirienko <pavel@uavcan.org>
"""
UAVCAN/CAN transport overview
+++++++++++++++++++++++++++++
This module implements UAVCAN/CAN -- the CAN transport for UAVCAN, both Classic CAN and CAN FD,
as defin... | [
2,
15069,
357,
66,
8,
13130,
471,
10116,
44565,
42727,
198,
2,
770,
3788,
318,
9387,
739,
262,
2846,
286,
262,
17168,
13789,
13,
198,
2,
6434,
25,
49612,
7385,
2013,
7204,
1279,
8957,
626,
31,
84,
615,
5171,
13,
2398,
29,
198,
198... | 3.458209 | 670 |
import os
import math
import sys
import torch
import numpy as np
from gym_collision_avoidance.envs.policies.InternalPolicy import InternalPolicy
from gym_collision_avoidance.envs import Config
from gym_collision_avoidance.envs.util import *
from gym_collision_avoidance.envs.policies import socialforce
import copy
i... | [
11748,
28686,
198,
11748,
10688,
198,
11748,
25064,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
628,
198,
6738,
11550,
62,
26000,
1166,
62,
27080,
590,
13,
268,
14259,
13,
79,
4160,
444,
13,
37693,
36727,
1330,
18628,
36727,
... | 2.722054 | 662 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
383,
7054,... | 2.57697 | 825 |
from thonny.plugins.micropython.connection import MicroPythonConnection
from queue import Queue
import threading
import time
import sys
DEBUG = False
class alt_WebReplConnection(MicroPythonConnection):
"""
pip install websocket_client
Kind of works, but drops the connection when Thonny starts quer... | [
6738,
294,
261,
3281,
13,
37390,
13,
9383,
1773,
7535,
13,
38659,
1330,
4527,
37906,
32048,
198,
6738,
16834,
1330,
4670,
518,
198,
11748,
4704,
278,
198,
11748,
640,
198,
11748,
25064,
628,
198,
30531,
796,
10352,
628,
198,
198,
4871,
... | 2.209239 | 368 |
import pytest
from tests.util import races
from tests.PUMS.local_loader import LocalLoader
local_loader = LocalLoader()
@pytest.mark.test_aggregation
def test_local_loader(all_data):
"""This code to take all_data arg from command line and get the corresponding data has to be put in test because of how pytest wo... | [
11748,
12972,
9288,
198,
6738,
5254,
13,
22602,
1330,
9558,
198,
6738,
5254,
13,
5105,
5653,
13,
12001,
62,
29356,
1330,
10714,
17401,
628,
198,
12001,
62,
29356,
796,
10714,
17401,
3419,
628,
198,
31,
9078,
9288,
13,
4102,
13,
9288,
... | 3.17623 | 244 |
import sys
from bisect import bisect_right as bi_r
inf = float('inf')
n, *A = map(int, sys.stdin.read().split())
if __name__ == '__main__':
ans = main()
print(ans)
| [
11748,
25064,
201,
198,
6738,
47457,
478,
1330,
47457,
478,
62,
3506,
355,
3182,
62,
81,
201,
198,
201,
198,
10745,
796,
12178,
10786,
10745,
11537,
201,
198,
201,
198,
77,
11,
1635,
32,
796,
3975,
7,
600,
11,
25064,
13,
19282,
259,... | 2.271605 | 81 |
from urllib.parse import unquote
from .models import URLPattern
def split_url_for_query(url):
"""
Given a URL pattern, split it into two components:
url_optimised: URL and domain name in the el_index format
(https://www.mediawiki.org/wiki/Manual:Externallinks_table#el_index)
url_pattern_end: Anyt... | [
6738,
2956,
297,
571,
13,
29572,
1330,
555,
22708,
198,
198,
6738,
764,
27530,
1330,
10289,
47546,
628,
198,
4299,
6626,
62,
6371,
62,
1640,
62,
22766,
7,
6371,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
11259,
257,
10289,
... | 2.495268 | 317 |
from collections import defaultdict
import csv
user_lessons = defaultdict(list)
with open("./data/user-lessons.csv", mode='r') as infile:
reader = csv.reader(infile)
header = next(reader)
for row in reader:
user_lessons[row[0]].append(row[1])
print(user_lessons)
| [
6738,
17268,
1330,
4277,
11600,
198,
11748,
269,
21370,
628,
198,
7220,
62,
1203,
684,
796,
4277,
11600,
7,
4868,
8,
198,
4480,
1280,
7,
1911,
14,
7890,
14,
7220,
12,
1203,
684,
13,
40664,
1600,
4235,
11639,
81,
11537,
355,
1167,
57... | 2.576577 | 111 |
from .strava import *
| [
6738,
764,
301,
4108,
64,
1330,
1635,
198
] | 2.75 | 8 |
# Copyright (c) 2021, NVIDIA CORPORATION. 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 applic... | [
2,
15069,
357,
66,
8,
33448,
11,
15127,
23929,
44680,
6234,
13,
1439,
2489,
10395,
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,
284... | 3.631373 | 255 |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | [
2,
15069,
1853,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.056656 | 3,230 |
name = 'maestro-ng'
version = '0.4.2'
| [
3672,
796,
705,
2611,
47692,
12,
782,
6,
198,
9641,
796,
705,
15,
13,
19,
13,
17,
6,
198
] | 2 | 19 |
import copy
from decimal import Decimal
import json
from unittest import mock
import uuid
import pytest
from hedwig.conf import settings
from hedwig.models import Message, MessageType
from hedwig.exceptions import ValidationError, CallbackNotFound
from hedwig.publisher import publish, _get_sns_topic, _convert_to_json... | [
11748,
4866,
198,
6738,
32465,
1330,
4280,
4402,
198,
11748,
33918,
198,
6738,
555,
715,
395,
1330,
15290,
198,
11748,
334,
27112,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
16418,
28033,
13,
10414,
1330,
6460,
198,
6738,
16418,
28033,... | 2.883191 | 351 |
# -*- coding: utf-8 -*-
import numpy as np
from tempfile import NamedTemporaryFile
import torch
import torch.nn as nn
import warnings
from textwiser.options import _ArgBase
from textwiser import TextWiser, Embedding, PoolOptions, Transformation, WordOptions, device
from tests.test_base import BaseTest, docs
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
20218,
7753,
1330,
34441,
12966,
5551,
8979,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
14601,
19... | 3.428571 | 91 |
# Loops in Python
# 1 For Loop
# 2 While loop
# Python doesnt have do while
# for [ variable name ] in [iterable datatype]:
# statements
# iterable datatype-str list tuple dict set
# for i in range(5):
# start from 0 to 4
# till n-1 value
# lly range(10,100)
# start from 10 and ends at 99
# lly range(10,100,5... | [
2,
6706,
2840,
287,
11361,
220,
198,
2,
352,
1114,
26304,
220,
198,
2,
362,
2893,
9052,
198,
198,
2,
11361,
46701,
423,
466,
981,
198,
198,
2,
329,
685,
7885,
1438,
2361,
287,
685,
2676,
540,
4818,
265,
2981,
5974,
198,
2,
220,
... | 2.552239 | 134 |
a=[8,4,6,2,6,4,7,9,5,8]
a1=[]
for i in range(len(a)):
for j in range(i+1,len(a)):
if a[i]==a[j]:
a1.append(j)
print(a1)
| [
64,
41888,
23,
11,
19,
11,
21,
11,
17,
11,
21,
11,
19,
11,
22,
11,
24,
11,
20,
11,
23,
60,
201,
198,
64,
16,
28,
21737,
201,
198,
1640,
1312,
287,
2837,
7,
11925,
7,
64,
8,
2599,
201,
198,
220,
220,
220,
329,
474,
287,
2... | 1.382609 | 115 |
import abc
import logging
import inspect
from dataclasses import dataclass
from poediscordcontroller import model
from poediscordcontroller.model import Job
@dataclass
class register_dispatcher:
"""Register this queue and associate a dispatcher with it""" | [
11748,
450,
66,
198,
11748,
18931,
198,
11748,
10104,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
745,
276,
2304,
585,
36500,
1330,
2746,
198,
6738,
745,
276,
2304,
585,
36500,
13,
19849,
1330,
15768,
628,
198,
31,
... | 3.852941 | 68 |
from Token import Token
from Chario import Chario
from Scanner import Scanner
from SymbolTable import SymbolTable
from SymbolEntry import SymbolEntry
class Parser:
"""
The Parser class uses a recursive descent strategy
to recognize phrases in a stream of tokens. Unlike the scanner,
which continues to generate tok... | [
6738,
29130,
1330,
29130,
198,
6738,
3178,
952,
1330,
3178,
952,
198,
6738,
20937,
1008,
1330,
20937,
1008,
198,
6738,
38357,
10962,
1330,
38357,
10962,
198,
6738,
38357,
30150,
1330,
38357,
30150,
628,
198,
4871,
23042,
263,
25,
198,
197... | 2.716746 | 9,059 |
from discord.ext import commands
from assets.getcorona import getcorona
from assets.embed import *
| [
6738,
36446,
13,
2302,
1330,
9729,
198,
198,
6738,
6798,
13,
1136,
10215,
4450,
1330,
651,
10215,
4450,
198,
6738,
6798,
13,
20521,
1330,
1635,
198
] | 3.846154 | 26 |
"""Generate a glossary of acronyms"""
from openpyxl import load_workbook
if __name__ == '__main__':
wb = load_workbook('excel_2016.xlsx')
ws = wb.get_active_sheet()
acronym_candidates = set()
for row in ws.values:
key, value = row
acronym_candidates = acronym_candidates.union(
... | [
37811,
8645,
378,
257,
21194,
560,
286,
33898,
88,
907,
37811,
198,
198,
6738,
1280,
9078,
87,
75,
1330,
3440,
62,
1818,
2070,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
266,
65,
796,
344... | 2.427778 | 180 |
# Class to handle the queue and music playing
import asyncio
from async_timeout import timeout
| [
2,
5016,
284,
5412,
262,
16834,
290,
2647,
2712,
198,
11748,
30351,
952,
198,
6738,
30351,
62,
48678,
1330,
26827,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198
] | 3.176471 | 34 |
import math
A = int(input())
B = int(input())
resto = math.sqrt(A) % math.sqrt(B)
c = int(resto)
print(c+1) | [
11748,
10688,
198,
198,
32,
796,
493,
7,
15414,
28955,
198,
33,
796,
493,
7,
15414,
28955,
198,
198,
2118,
78,
796,
10688,
13,
31166,
17034,
7,
32,
8,
4064,
10688,
13,
31166,
17034,
7,
33,
8,
198,
198,
66,
796,
493,
7,
2118,
78,... | 2.055556 | 54 |
#!/usr/bin/env python
""" Test queries with DrugBank data indexed with MongoDB """
import os
import unittest
import networkx as nx
from nosqlbiosets.graphutils import neighbors_graph
from nosqlbiosets.graphutils import remove_highly_connected_nodes
from nosqlbiosets.graphutils import remove_small_subgraphs
from nosql... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
6208,
20743,
351,
11095,
28650,
1366,
41497,
351,
42591,
11012,
37227,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
198,
11748,
3127,
87,
355,
299,
87,
198,
198,
6738,
43630... | 2.604167 | 384 |
import os
import pandas as pd
from .data import FILE_1, FILE_2
| [
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
764,
7890,
1330,
45811,
62,
16,
11,
45811,
62,
17,
628
] | 2.909091 | 22 |
from django.shortcuts import render, redirect
from django.views import generic
from django.utils import timezone
from django.urls import reverse
from django.contrib import messages
from .forms import CommentForm
from .models import Post, About, Comment
# Uma página representando uma lista de objetos
# https://docs.dj... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
198,
6738,
42625,
14208,
13,
33571,
1330,
14276,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
42625,
14208... | 2.915612 | 237 |
from django.urls import path , include
from . import views
from login.image import Captcha_Simple
urlpatterns = [
path('login/', views.login,name='login'),
path('login_check1/' , Captcha_Simple.login_check, name="login_check1"),
path('login/refresh/' , views.refresh , name="refresh"),
path('img_captcha/... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
837,
2291,
198,
6738,
764,
1330,
5009,
198,
6738,
17594,
13,
9060,
1330,
6790,
11693,
62,
26437,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
38235,
14,
3256,
5009,
13,... | 2.833333 | 132 |
"""
Copyright 2010 IO Rodeo 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 writing, software... | [
37811,
198,
15269,
3050,
220,
24418,
371,
1098,
78,
3457,
13,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789... | 3.322097 | 267 |
from django.db import models
from django.contrib.auth.models import User | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787
] | 3.6 | 20 |
import pandas as pd
import numpy as np
from functools import wraps
import datetime
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
11748,
4818,
8079,
628,
198
] | 3.4 | 25 |
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2007-2014 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
220,
27156,
27156,
27156,
27156,
15116,
8728,
4907,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.777778 | 207 |
from login_new import login_new
from clock_in import clock_in
students = {}
with open('/mnt/stu_id.txt', mode='r') as f:
for line in f:
stu = line.split(' ')
stu = [x.strip() for x in stu]
students[stu[0]] = stu[1]
for id in students:
print ('Student loaded: {}'.format(id))
print()
p... | [
6738,
17594,
62,
3605,
1330,
17594,
62,
3605,
198,
6738,
8801,
62,
259,
1330,
8801,
62,
259,
198,
198,
19149,
658,
796,
23884,
198,
198,
4480,
1280,
10786,
14,
76,
429,
14,
301,
84,
62,
312,
13,
14116,
3256,
4235,
11639,
81,
11537,
... | 2.145 | 200 |
#FLM: TT Hints Duplicator_coords
# coding: utf-8
import os
import sys
__copyright__ = __license__ = """
Copyright (c) 2015 Adobe Systems Incorporated. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software")... | [
2,
3697,
44,
25,
26653,
367,
29503,
49821,
26407,
62,
1073,
3669,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
834,
22163,
4766,
834,
796,
11593,
43085,
834,
796,
37227,
198,
15269,
357,
... | 3.424536 | 1,239 |
from typing import Dict, List, Any, Tuple
import pandas as pd
from sklearn.model_selection import ParameterGrid
from sklearn.preprocessing import LabelEncoder
from src.data.objects.stack import Stack
from src.evaluation.metrics import acc_top_k
from src.models.encoders.base import UnsupFeatures
from src.utils import ... | [
6738,
19720,
1330,
360,
713,
11,
7343,
11,
4377,
11,
309,
29291,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
25139,
2357,
41339,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
36052,
... | 3.458333 | 96 |
# django imports
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.core.cache import cache
from django.db.models.signals import post_save
from django.db.models.signals import pre_save
from django.db.models.signals import pre_delete
# lfs imports
from lfs.caching.ut... | [
2,
42625,
14208,
17944,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
11299,
19199,
13,
27530,
1330,
14041,
6030,
198,
6738,
42625,
14208,
13,
7295,
13,
23870,
1330,
12940,
198,
6738,
42625,
... | 2.794693 | 1,432 |
import torch.nn as nn
import torch.nn.functional as F
| [
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
628,
628,
198
] | 3.052632 | 19 |
from .FigParams import params
__all__ = ['params']
| [
6738,
764,
14989,
10044,
4105,
1330,
42287,
628,
198,
834,
439,
834,
796,
37250,
37266,
20520,
198
] | 3.117647 | 17 |
from tic_tac_toe import Board, Bot
from random import choice, randint
import sys
from utils import Draw, InvalidCoordinate, PreoccupiedCell, Victory
class Menu:
'''Display a menu and respond to answers.
Initiate a game when needed.'''
def run(self):
'''Display a menu and respond to choices.'''
... | [
6738,
256,
291,
62,
83,
330,
62,
44579,
1330,
5926,
11,
18579,
198,
6738,
4738,
1330,
3572,
11,
43720,
600,
198,
11748,
25064,
198,
6738,
3384,
4487,
1330,
15315,
11,
17665,
7222,
45480,
11,
3771,
28756,
28780,
11,
21203,
198,
198,
48... | 2.055851 | 1,504 |
from typing import Optional, Union
import numpy as np
import scipy as sp
from .circuits import rhf_params_to_matrix
from .objective import RestrictedHartreeFockObjective
def rhf_func_generator(rhf_objective: RestrictedHartreeFockObjective,
initial_occ_vec: Optional[Union[None, np.ndarray]] = N... | [
6738,
19720,
1330,
32233,
11,
4479,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
355,
599,
198,
198,
6738,
764,
21170,
15379,
1330,
9529,
69,
62,
37266,
62,
1462,
62,
6759,
8609,
198,
6738,
764,
15252,
425,
1330,
8324... | 2.487382 | 634 |
# ******************************************************************************
"""
Detects objects inside a video or an image.
Private Functions:
. _parse parses the script arguments,
. _create_net creates the SSD neural network,
Public Functions:
. detect ... | [
2,
41906,
17174,
46068,
1174,
198,
37811,
198,
47504,
82,
5563,
2641,
257,
2008,
393,
281,
2939,
13,
628,
198,
29067,
40480,
25,
198,
220,
220,
220,
764,
4808,
29572,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.346518 | 2,427 |
"""
@author: Exile
@date: 05-07-2016
@place: Cartagena - Colombia
@licence: Creative Common
""" | [
37811,
198,
220,
220,
220,
2488,
9800,
25,
37273,
198,
220,
220,
220,
2488,
4475,
25,
8870,
12,
2998,
12,
5304,
198,
220,
220,
220,
2488,
5372,
25,
13690,
363,
8107,
532,
21291,
198,
220,
220,
220,
2488,
677,
594,
25,
17404,
8070,
... | 2.466667 | 45 |
# Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
# Only one valid answer exists in the array.
# Toplamları target olan iki dizi elemanının indexlerini bulma
nums = [2,7,11,15]
target = 9
# brute force : nested loop : time complexity : O(n**2)... | [
2,
11259,
281,
7177,
286,
37014,
997,
82,
290,
281,
18253,
2496,
11,
1441,
36525,
286,
262,
734,
3146,
884,
326,
484,
751,
510,
284,
2496,
13,
220,
198,
2,
5514,
530,
4938,
3280,
7160,
287,
262,
7177,
13,
198,
2,
5849,
2543,
21681... | 3.062802 | 207 |
from PyQt5.QtWidgets import QWidget, QDialog
from .uis import main_menu, difficult_menu, game, records, pause_menu, game_over_menu
from .elements import RecordsTable
from .. import model
from PyQt5.QtCore import pyqtSlot, pyqtSignal
from PyQt5.QtGui import QKeySequence, QMoveEvent, QResizeEvent, QShowEvent
| [
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
38300,
11,
1195,
44204,
198,
6738,
764,
84,
271,
1330,
1388,
62,
26272,
11,
2408,
62,
26272,
11,
983,
11,
4406,
11,
14985,
62,
26272,
11,
983,
62,
2502,
62,
26272,
... | 2.880734 | 109 |
__author__ = 'Robert Di Paolo'
__email__ = 'robertmdipaolo@gmail.com'
__copyright__ = '2018 Robert Di Paolo'
__license__ = 'MIT'
__version__ = '0.1' | [
834,
9800,
834,
796,
705,
19156,
6031,
11243,
14057,
6,
198,
834,
12888,
834,
796,
705,
305,
4835,
9132,
541,
64,
14057,
31,
14816,
13,
785,
6,
198,
834,
22163,
4766,
834,
796,
705,
7908,
5199,
6031,
11243,
14057,
6,
198,
834,
43085... | 2.551724 | 58 |
import hashlib, itertools, sys
key='iwrupvqb'
for target in ['0'*5, '0'*6]:
for count in itertools.count():
md = hashlib.md5()
md.update(key + str(count))
hd = md.hexdigest()
if hd.startswith(target):
print('Target {0} Count {1}, hash {2}'.format(target, count, hd))
... | [
11748,
12234,
8019,
11,
340,
861,
10141,
11,
25064,
198,
2539,
11639,
14246,
12618,
85,
80,
65,
6,
198,
1640,
2496,
287,
37250,
15,
6,
9,
20,
11,
705,
15,
6,
9,
21,
5974,
198,
220,
220,
220,
329,
954,
287,
340,
861,
10141,
13,
... | 2.006024 | 166 |
from datetime import time
from os import error
import sys
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Application Class
#Método constructor de la clase
if __name__ == "__main__":
app = Data_analisys(None) | [
6738,
4818,
8079,
1330,
640,
198,
6738,
28686,
1330,
4049,
198,
11748,
25064,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
2,
15678,
... | 2.987805 | 82 |
from cProfile import label
import os
import json
import cv2
import tqdm
import logging
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tensorflow as tf
import seaborn as sns
from imblearn.over_sampling import SMOTE
from argparse import ArgumentParser
from sklearn.model_selection import tr... | [
6738,
269,
37046,
1330,
6167,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
269,
85,
17,
198,
11748,
256,
80,
36020,
198,
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
2948... | 2.449586 | 1,448 |
from baseballforecaster import Forecaster, Drafter
| [
6738,
9283,
754,
17970,
1330,
4558,
17970,
11,
12458,
637,
198
] | 4.636364 | 11 |
# This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""NASNet-A models for Keras.
NASNet refers to Neural Architecture Search Network, a family of models
that were designed automatically by learning the model architectures
directly on the da... | [
2,
770,
2393,
318,
337,
16219,
8881,
24700,
1137,
11617,
0,
2141,
407,
4370,
13,
198,
2,
2980,
515,
416,
25,
11192,
273,
11125,
14,
29412,
14,
31391,
14,
15042,
14,
8612,
1352,
14,
17953,
62,
29412,
62,
15042,
13,
9078,
4226,
13,
... | 3.435644 | 505 |
import os
import json
import numpy as np
from typing import Any, Dict, List, Optional, Tuple
| [
11748,
28686,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
7343,
11,
32233,
11,
309,
29291,
628,
628,
628
] | 3.37931 | 29 |
#!/bin/python3
import time
from math import sqrt
count3 = 0
count5 = 0
count7 = 0
start = time.time()
primes = [2, 3, 5, 7, 11]
t = int(input().strip())
for a0 in range(t):
n = int(input().strip())
print(get_prime(primes, n))
assert(get_prime(primes, 168) == 997)
assert(get_prime(primes, 10000) == 104729)
pri... | [
2,
48443,
8800,
14,
29412,
18,
198,
11748,
640,
198,
6738,
10688,
1330,
19862,
17034,
198,
198,
9127,
18,
796,
657,
198,
9127,
20,
796,
657,
198,
9127,
22,
796,
657,
198,
198,
9688,
796,
640,
13,
2435,
3419,
198,
1050,
999,
796,
6... | 2.447205 | 161 |
# -*- coding: utf-8 -*-
# @Time : 2018/6/16 下午3:24
# @Author : yidxue
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
220,
220,
220,
1058,
2864,
14,
21,
14,
1433,
220,
10310,
233,
39355,
230,
18,
25,
1731,
198,
2,
2488,
13838,
220,
1058,
331,
312,
87,
518,
198
] | 1.644444 | 45 |
import sys
inf = float("inf")
n, m = map(int, sys.stdin.readline().split())
a = []
b = []
c = []
for _ in range(m):
ai, bi, ci = map(int, sys.stdin.readline().split())
a.append(ai - 1)
b.append(bi - 1)
c.append(-ci)
abc = list(zip(a, b, c))
if __name__ == "__main__":
ans = mai... | [
11748,
25064,
201,
198,
201,
198,
10745,
796,
12178,
7203,
10745,
4943,
201,
198,
201,
198,
77,
11,
285,
796,
3975,
7,
600,
11,
25064,
13,
19282,
259,
13,
961,
1370,
22446,
35312,
28955,
201,
198,
64,
796,
17635,
201,
198,
65,
796,
... | 1.95977 | 174 |
from typing import List
from pydantic import BaseModel
| [
6738,
19720,
1330,
7343,
201,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
201,
198,
201,
198
] | 3.470588 | 17 |
import math
from hippy.builtin import wrap
from hippy.builtin import StringArg
from hippy.builtin import BoolArg
from hippy.builtin import LongArg
from hippy.builtin import Optional
from rpython.rlib import rsocket
def checkdnsrr():
"""Check DNS records corresponding to a given
Internet host name or IP addres... | [
11748,
10688,
198,
6738,
18568,
88,
13,
18780,
259,
1330,
14441,
198,
6738,
18568,
88,
13,
18780,
259,
1330,
10903,
28100,
198,
6738,
18568,
88,
13,
18780,
259,
1330,
347,
970,
28100,
198,
6738,
18568,
88,
13,
18780,
259,
1330,
5882,
... | 2.822917 | 2,112 |
import sqlite3
import tvm
from tvm.auto_scheduler.measure_record import RecordReader
import pickle
import os
import glob
import pathlib
import torch
from torch.utils.data import Dataset
import numpy as np
if __name__ == "__main__":
read_record = tvm.get_global_func("auto_scheduler.ReadMeasureRecord")
all_t... | [
11748,
44161,
578,
18,
198,
11748,
256,
14761,
198,
6738,
256,
14761,
13,
23736,
62,
1416,
704,
18173,
13,
1326,
5015,
62,
22105,
1330,
13266,
33634,
198,
11748,
2298,
293,
198,
11748,
28686,
198,
11748,
15095,
198,
11748,
3108,
8019,
1... | 2.271357 | 796 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------
# Copyright (c) 2010-2021 Denis Machard
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
16529,
6329,
198,
2,
15069,
357,
66,
8,
3050,
12,
1238,
2481,
33089,
7080,
446,
198,
2,
198,
2,
2448,
3411,... | 2.373185 | 2,342 |
import base64
import os
import app.views
import random
from app.views import encrypt_image, decrypt_image
from io import BytesIO
from app.models import PaintingRequest
from datetime import timedelta,datetime
from Crypto.PublicKey import RSA
from Crypto.Signature import pkcs1_15
from Crypto.Hash import SHA256
fro... | [
11748,
2779,
2414,
198,
11748,
28686,
198,
11748,
598,
13,
33571,
198,
11748,
4738,
198,
220,
198,
6738,
598,
13,
33571,
1330,
34117,
62,
9060,
11,
42797,
62,
9060,
198,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
198,
6738,
598,
1... | 2.755149 | 874 |
from django import forms
from .validators import validate_tags
| [
6738,
42625,
14208,
1330,
5107,
198,
198,
6738,
764,
12102,
2024,
1330,
26571,
62,
31499,
198
] | 4 | 16 |
# Copyright (c) 2017 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the ... | [
171,
119,
123,
2,
15069,
357,
66,
8,
2177,
34198,
10442,
3457,
13,
198,
2,
198,
2,
7102,
37,
25256,
12576,
5357,
4810,
3185,
7112,
2767,
13153,
198,
2,
198,
2,
770,
670,
318,
2810,
366,
1921,
3180,
1,
290,
2426,
284,
262,
34198,
... | 2.353956 | 4,752 |
# --------------------------------------------------------
# Regrid altimetry into annual data on 0.5x0.5 degree grid
# Read NASA MEASURES gridded altimetry and average
# in space and time
# --------------------------------------------------------
import numpy as np
from netCDF4 import Dataset
import os
| [
2,
20368,
22369,
198,
2,
797,
25928,
5988,
320,
11973,
656,
5079,
1366,
319,
657,
13,
20,
87,
15,
13,
20,
4922,
10706,
198,
2,
4149,
8884,
11948,
1921,
29514,
1036,
1638,
276,
5988,
320,
11973,
290,
2811,
198,
2,
287,
2272,
290,
6... | 4.5 | 68 |
from parsons.etl.table import Table
from parsons.databases.redshift.rs_copy_table import RedshiftCopyTable
from parsons.databases.redshift.rs_create_table import RedshiftCreateTable
from parsons.databases.redshift.rs_table_utilities import RedshiftTableUtilities
from parsons.databases.redshift.rs_schema import Redshift... | [
6738,
13544,
684,
13,
316,
75,
13,
11487,
1330,
8655,
198,
6738,
13544,
684,
13,
19608,
18826,
13,
445,
30846,
13,
3808,
62,
30073,
62,
11487,
1330,
2297,
30846,
29881,
10962,
198,
6738,
13544,
684,
13,
19608,
18826,
13,
445,
30846,
1... | 2.165711 | 20,584 |
import re
| [
11748,
302,
628,
628,
198
] | 2.8 | 5 |
from keras import backend as K
from keras.layers import Layer
from keras import regularizers
| [
6738,
41927,
292,
1330,
30203,
355,
509,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
34398,
198,
6738,
41927,
292,
1330,
3218,
11341,
628
] | 3.916667 | 24 |