content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" Press run above to start """ from exercises.question_runner import run from question_directory import ( boolean_operators, boolean_review, changing_lists, dictionaries, equality_and_booleans, for_loops, functions, functions_quick_review, greater_than_less_than_and_booleans, ...
[ 37811, 198, 13800, 1057, 2029, 284, 923, 198, 37811, 198, 198, 6738, 13565, 13, 25652, 62, 16737, 1330, 1057, 198, 6738, 1808, 62, 34945, 1330, 357, 198, 220, 220, 220, 25131, 62, 3575, 2024, 11, 198, 220, 220, 220, 25131, 62, 19023, ...
2.320334
718
import os
[ 11748, 28686, 198 ]
3.333333
3
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
3.621469
177
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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.or...
[ 37811, 198, 492, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 1321, 198, 220, 220, 5115, 6634, 9238, 13, 198, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 3...
2.36642
2,972
# Copyright (C) 2014 Alex Wilson # Copyright (C) 2012-14 Abram Hindle # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later v...
[ 2, 220, 15069, 357, 34, 8, 1946, 4422, 8127, 198, 2, 220, 15069, 357, 34, 8, 2321, 12, 1415, 39631, 17099, 293, 198, 2, 220, 220, 198, 2, 220, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 2...
3.177903
534
from flask_mail import Message from mailer import mailer from middleware.error_handling import write_log
[ 6738, 42903, 62, 4529, 1330, 16000, 198, 6738, 6920, 263, 1330, 6920, 263, 198, 6738, 3504, 1574, 13, 18224, 62, 4993, 1359, 1330, 3551, 62, 6404, 628 ]
3.925926
27
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 2864, 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, 7330...
3.820809
173
INPUT_FILE_NAME = 'input.txt' puzzle_input = None with open(INPUT_FILE_NAME) as input_file: puzzle_input = list(map(lambda val: int(val), input_file.readline().rstrip('\n').split(','))) memory_solution_part1 = puzzle_input.copy() memory_solution_part1[1] = 12 memory_solution_part1[2] = 2 solution_part_1 = run_...
[ 1268, 30076, 62, 25664, 62, 20608, 796, 705, 15414, 13, 14116, 6, 198, 198, 79, 9625, 62, 15414, 796, 6045, 198, 4480, 1280, 7, 1268, 30076, 62, 25664, 62, 20608, 8, 355, 5128, 62, 7753, 25, 198, 220, 220, 220, 15027, 62, 15414, 7...
2.536697
218
from pymongo import MongoClient import pymongo import datetime import sqlite3 as sql import os import signal from signal import SIGABRT, SIGILL, SIGINT, SIGSEGV, SIGTERM, SIGHUP import traceback from anonymizer.utils import logger_manager import sys ROOT_DIR = os.path.abspath(os.path.dirname(__file__)) ATEXIT_SINGLET...
[ 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 11748, 279, 4948, 25162, 198, 11748, 4818, 8079, 198, 11748, 44161, 578, 18, 355, 44161, 198, 11748, 28686, 198, 11748, 6737, 198, 6738, 6737, 1330, 33993, 6242, 14181, 11, 33993, 8267, 11,...
2.796296
162
from django.db import models from django.contrib.auth.models import User from django.conf import settings # from polls import models as pmod # questions = pmod.Question.objects.all() # pmod.Question.objects.filter(question_text='This is the third question') # q1 = pmod.Question.objects.get(id=2) # .exclude(...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 220, 220, 220, 220, 198, 220, 220, 198, 220, 220, 198, 2, 422, ...
3.106195
113
import cyanodbc import dbapi20 from distro import linux_distribution import pytest
[ 11748, 36818, 375, 15630, 198, 11748, 20613, 15042, 1238, 198, 6738, 1233, 305, 1330, 32639, 62, 17080, 3890, 198, 11748, 12972, 9288, 198 ]
3.608696
23
from problem import Problem from utils.primes import sieve_of_eratosthenes, simple_is_prime
[ 6738, 1917, 1330, 20647, 198, 6738, 3384, 4487, 13, 1050, 999, 1330, 264, 12311, 62, 1659, 62, 263, 265, 455, 831, 274, 11, 2829, 62, 271, 62, 35505, 628 ]
3.206897
29
from typing import Any, Dict, List, Type, TypeVar, Union import attr from ..types import UNSET, Unset T = TypeVar("T", bound="IndyPresAttrSpec")
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 5994, 11, 5994, 19852, 11, 4479, 198, 198, 11748, 708, 81, 198, 198, 6738, 11485, 19199, 1330, 4725, 28480, 11, 791, 2617, 198, 198, 51, 796, 5994, 19852, 7203, 51, 1600, 5421, 26...
2.921569
51
from helpers import cd_to_datetime, datetime_to_str
[ 6738, 49385, 1330, 22927, 62, 1462, 62, 19608, 8079, 11, 4818, 8079, 62, 1462, 62, 2536, 628 ]
3.117647
17
#!/usr/bin/env python # -*- coding: utf-8 -*- import asyncio import logging import json import ssl import uuid from terncy.version import __version__ import terncy.event as event import ipaddress from datetime import datetime from enum import Enum from zeroconf import ServiceBrowser, Zeroconf import aiohttp import webs...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 33918, 198, 11748, 264, 6649, 198, 11748, 334, 27112, 198, 6738, 1059, ...
2.493573
389
if sm.getSlotsLeftToAddByInvType(2) < 8: sm.dispose() sm.addInventorySlotsByInvType(8, 2) sm.consumeItem()
[ 361, 895, 13, 1136, 11122, 1747, 18819, 2514, 4550, 3886, 19904, 6030, 7, 17, 8, 1279, 807, 25, 198, 220, 220, 220, 895, 13, 6381, 3455, 3419, 198, 5796, 13, 2860, 818, 17158, 11122, 1747, 3886, 19904, 6030, 7, 23, 11, 362, 8, 198...
2.2
50
import vispy vispy.use(app='egl') from moviepy.editor import VideoClip import numpy as np from vispy import scene, io, visuals from vispy.color import * import cv2 # Check the application correctly picked up egl assert vispy.app.use_app().backend_name == 'egl', 'Not using EGL' if __name__ == '__main__': import ...
[ 11748, 1490, 9078, 198, 4703, 9078, 13, 1904, 7, 1324, 11639, 1533, 75, 11537, 198, 198, 6738, 3807, 9078, 13, 35352, 1330, 7623, 2601, 541, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1490, 9078, 1330, 3715, 11, 33245, 11, 27329, ...
2.701538
325
bl_info = { 'name': 'BlendNet - distributed cloud render', 'author': 'www.state-of-the-art.io', 'version': (0, 4, 0), 'warning': 'development version', 'blender': (2, 80, 0), 'location': 'Properties --> Render --> BlendNet Render', 'description': 'Allows to easy allocate resources in cloud a...
[ 2436, 62, 10951, 796, 1391, 198, 220, 220, 220, 705, 3672, 10354, 705, 3629, 437, 7934, 532, 9387, 6279, 8543, 3256, 198, 220, 220, 220, 705, 9800, 10354, 705, 2503, 13, 5219, 12, 1659, 12, 1169, 12, 433, 13, 952, 3256, 198, 220, ...
2.470867
1,476
"""Main module.""" from collections import defaultdict from functools import cache from itertools import product from operator import itemgetter from typing import List import numpy as np from Bio.Data.CodonTable import unambiguous_dna_by_id
[ 37811, 13383, 8265, 526, 15931, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 1257, 310, 10141, 1330, 12940, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 6738, 19720, 1330, 7343, 198, 198, 11748,...
3.769231
65
# -*- coding: utf-8 -*- """ Created on Sun Dec 15 01:37:59 2019 @author: kfmah """ stuff = list() stuff.append('python') stuff.append('chuck') stuff.sort() print (stuff[0]) print (stuff.__getitem__(0)) print (list.__getitem__(stuff,0))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 4280, 1315, 5534, 25, 2718, 25, 3270, 13130, 198, 198, 31, 9800, 25, 479, 38353, 993, 198, 37811, 198, 198, 41094, 796, 1351, 3419, 198, ...
2.382353
102
import tarfile with tarfile.open('archive.zip') as tar: #BAD : This could write any file on the filesystem. for entry in tar: tar.extract(entry, "/tmp/unpack/")
[ 198, 11748, 13422, 7753, 198, 198, 4480, 13422, 7753, 13, 9654, 10786, 17474, 13, 13344, 11537, 355, 13422, 25, 198, 220, 220, 220, 1303, 33, 2885, 1058, 770, 714, 3551, 597, 2393, 319, 262, 29905, 13, 198, 220, 220, 220, 329, 5726, ...
2.632353
68
# Author: Richard Correro from sklearn.base import ClusterMixin from .transformer_socket import TransformerSocket
[ 2, 6434, 25, 6219, 2744, 34785, 198, 198, 6738, 1341, 35720, 13, 8692, 1330, 38279, 35608, 259, 198, 198, 6738, 764, 7645, 16354, 62, 44971, 1330, 3602, 16354, 39105, 198 ]
3.866667
30
# coding: utf-8 """ Telstra Messaging API # Introduction <table><tbody><tr><td class = 'into_api' style='border:none;padding:0 0 0 0'><p>Send and receive SMS and MMS messages globally using Telstra's enterprise grade Messaging API. It also allows your application to track the delivery status of both sent an...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 12088, 12044, 10626, 3039, 7824, 628, 220, 220, 220, 220, 1303, 22395, 220, 1279, 11487, 6927, 83, 2618, 6927, 2213, 6927, 8671, 1398, 796, 705, 20424, 62, 15042, ...
3.200219
3,646
from gym_minigrid.minigrid import * from gym_minigrid.register import register
[ 6738, 11550, 62, 1084, 3692, 312, 13, 1084, 3692, 312, 1330, 1635, 198, 6738, 11550, 62, 1084, 3692, 312, 13, 30238, 1330, 7881, 628, 198, 220, 220, 220, 220, 628 ]
2.9
30
# n=7 # G=[[] for _ in range(n)] G[0]=[1,2] G[1]=[0,3] G[2]=[0,4,5] #etc.
[ 2, 198, 77, 28, 22, 198, 2, 198, 38, 41888, 21737, 329, 4808, 287, 2837, 7, 77, 15437, 198, 198, 38, 58, 15, 22241, 58, 16, 11, 17, 60, 198, 38, 58, 16, 22241, 58, 15, 11, 18, 60, 198, 38, 58, 17, 22241, 58, 15, 11, 19, ...
1.357143
56
#!/usr/bin/env python # coding=utf-8 # @Time : 2019-06-04 # @Author : hongshu import sys import asyncio from tawsocks import common
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 12, 3312, 12, 3023, 198, 2, 2488, 13838, 220, 1058, 289, 506, 1477, 84, 198, 198, 11748, 25064, 19...
2.5
56
# -*- coding: utf-8 -*- import requests import json import logging
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 18931, 628 ]
2.956522
23
""" Vertical: Adds movement functions along the vertical (Y) axis to a game object """
[ 37811, 198, 42369, 605, 25, 198, 46245, 3356, 5499, 1863, 262, 11723, 357, 56, 8, 16488, 284, 257, 983, 2134, 198, 37811, 628 ]
3.826087
23
# -*- coding: utf-8 -*- import datetime from typing import Optional, List, Any from pip_services3_commons.config import ConfigParams from pip_services3_commons.convert import StringConverter from pip_services3_commons.errors import ConfigException from pip_services3_commons.refer import IReferences from pip_services3_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4818, 8079, 198, 6738, 19720, 1330, 32233, 11, 7343, 11, 4377, 198, 198, 6738, 7347, 62, 30416, 18, 62, 9503, 684, 13, 11250, 1330, 17056, 10044, 4105, 198, 6738,...
3.386207
145
import logging import os from functools import partial from PIL.Image import Image from PyQt5.QtCore import QObject, pyqtSignal, QThread from PyQt5.QtWidgets import QProgressDialog from .threading import QThreadedWorkerDebug as QThreadedWorker from analyze.composition import Composition, Spectrogram from analyze.medi...
[ 11748, 18931, 198, 11748, 28686, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 350, 4146, 13, 5159, 1330, 7412, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 10267, 11, 12972, 39568, 11712, 282, 11, 1195, 168...
3.330882
136
""" Node module =========== The ``node`` module contains the ``MetalNode`` class, which is the foundation for MetalPipe. """ import time import datetime import uuid import importlib import logging import os import threading import pprint import sys import copy import random import functools import csv import MySQLdb ...
[ 37811, 198, 19667, 8265, 198, 2559, 18604, 198, 198, 464, 7559, 17440, 15506, 8265, 4909, 262, 7559, 36790, 19667, 15506, 1398, 11, 543, 318, 262, 8489, 198, 1640, 12136, 47, 3757, 13, 198, 37811, 198, 198, 11748, 640, 198, 11748, 4818,...
2.169517
8,772
import random numeroPc = random.randint(1, 5) numeroUsuario = int(input('Digite um nmero: ')) print('Parabns vc acertou!' if numeroPc == numeroUsuario else 'O Computador venceu')
[ 11748, 4738, 198, 198, 22510, 3529, 47, 66, 796, 4738, 13, 25192, 600, 7, 16, 11, 642, 8, 198, 22510, 3529, 52, 2385, 4982, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 299, 647, 78, 25, 705, 4008, 628, 198, 4798, 10786, 10044, 3...
2.527778
72
import pyipmi import pyipmi.interfaces import os import re import datetime import os.path import time import math import numpy import mmap import array import getopt import sys #Inmport path sys.path.append('../src') from aardvark_initial import * #Inmport path sys.path.append('../') from os_parameters_define import...
[ 11748, 12972, 541, 11632, 198, 11748, 12972, 541, 11632, 13, 3849, 32186, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4818, 8079, 198, 11748, 28686, 13, 6978, 198, 11748, 640, 198, 11748, 10688, 198, 11748, 299, 32152, 198, 11748, 808...
2.472779
698
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) from collections import Counter n, *a = map(int, read().split()) counter = Counter(a).values() ans = len(counter) if (sum(counter) - ans) % 2 == 1: ans -= 1 print(ans)...
[ 11748, 25064, 198, 961, 796, 25064, 13, 19282, 259, 13, 22252, 13, 961, 198, 961, 1370, 796, 25064, 13, 19282, 259, 13, 22252, 13, 961, 1370, 198, 961, 6615, 796, 25064, 13, 19282, 259, 13, 22252, 13, 961, 6615, 198, 17597, 13, 2617...
2.767241
116
import json from plato import db from plato.model.user import User from plato.test.base import BaseTestCase from plato.test.utils import add_user, add_domain
[ 11748, 33918, 198, 198, 6738, 458, 5549, 1330, 20613, 198, 6738, 458, 5549, 13, 19849, 13, 7220, 1330, 11787, 198, 6738, 458, 5549, 13, 9288, 13, 8692, 1330, 7308, 14402, 20448, 198, 6738, 458, 5549, 13, 9288, 13, 26791, 1330, 751, 62...
3.333333
48
import sqlite3 import datetime conn = sqlite3.connect('database.db') print("Opened database successfully") # NOTE: ID is DEPRECATED conn.execute('CREATE TABLE simulated (id TEXT, lat NUMERIC, lon NUMERIC, alt NUMERIC, time TIMESTAMP DEFAULT CURRENT_TIMESTAMP)') conn.execute('CREATE TABLE locations (id TEXT, lat NUMER...
[ 11748, 44161, 578, 18, 198, 11748, 4818, 8079, 198, 198, 37043, 796, 44161, 578, 18, 13, 8443, 10786, 48806, 13, 9945, 11537, 198, 4798, 7203, 18257, 2945, 6831, 7675, 4943, 198, 198, 2, 24550, 25, 4522, 318, 5550, 47, 38827, 11617, 1...
3.134752
141
# A bit of duplication of the component system tests to ensure # typescript components are transpiled properly to Python. # Types are tested in test_mypy. import json import re import pytest from . import ts_components as tsc def test_tsc_enum_docstring(): assert ":param enumeration: (Possible values: 'foo'...
[ 2, 317, 1643, 286, 50124, 286, 262, 7515, 1080, 5254, 284, 4155, 198, 2, 2170, 3798, 1968, 6805, 389, 1007, 79, 3902, 6105, 284, 11361, 13, 198, 2, 24897, 389, 6789, 287, 1332, 62, 1820, 9078, 13, 198, 11748, 33918, 198, 11748, 302,...
2.830508
177
# -*- coding: utf-8 -*- import random import numpy as np import colorama from colorama import Fore, Back import copy colorama.init() LEFT = 'lft' RIGHT = 'rgt' UP = 'up' DOWN = 'dwn' HORIZONTAL = 'horizontal' VERTICAL = 'vertical' print("beginning...") level = [] for x in range(50): level.append([]) for y ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3124, 1689, 198, 6738, 3124, 1689, 1330, 4558, 11, 5157, 198, 11748, 4866, 198, 198, 8043, 1689, 13, 15...
2.037511
1,093
#!/usr/bin/env python3 import wx import vmwizard as vmw if __name__ == '__main__': app = wx.App(False) frame = wx.Frame(None, wx.ID_ANY, "Variant Matrix") wiz = vmw.Wizard(frame) frame.Show(True) frame.Centre() app.MainLoop()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 266, 87, 198, 198, 11748, 45887, 86, 8669, 355, 45887, 86, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 598, 796, 266, 87, ...
2.179487
117
import os import string import textwrap import unittest import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging # # DMRIInstall #
[ 11748, 28686, 198, 11748, 4731, 198, 11748, 2420, 37150, 198, 11748, 555, 715, 395, 198, 11748, 410, 30488, 11, 10662, 83, 11, 269, 30488, 11, 14369, 263, 198, 6738, 14369, 263, 13, 7391, 276, 8912, 540, 26796, 1330, 1635, 198, 11748, ...
3.056604
53
import requests import json from typing import Tuple from datetime import timedelta, datetime from django.db import models from django.urls import reverse from django.contrib.auth.models import User from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.utils.html import...
[ 11748, 7007, 198, 11748, 33918, 198, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 4818, 8079, 1330, 28805, 12514, 11, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 1...
2.3212
2,500
import sacred from sacred import Experiment import os.path as osp import pandas as pd import scipy.io as sio import numpy as np from sacred import SETTINGS SETTINGS.CONFIG.READ_ONLY_CONFIG=False
[ 11748, 13626, 198, 6738, 13626, 1330, 29544, 198, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 629, 541, 88, 13, 952, 355, 264, 952, 198, 11748, 299, 32152, 355, 45941, 198, 198, ...
3
66
import numpy as np arrs = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) print(arrs[[0,2]])
[ 198, 11748, 299, 32152, 355, 45941, 198, 198, 3258, 82, 796, 45941, 13, 18747, 26933, 58, 16, 11, 362, 11, 513, 4357, 685, 19, 11, 642, 11, 718, 4357, 685, 22, 11, 807, 11, 860, 11907, 8, 198, 4798, 7, 3258, 82, 30109, 15, 11, ...
1.875
48
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from .......
[ 2, 16529, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 16529, 35937, 198, 1...
5.206522
92
# one identifier for one types of dict # for instance, DK_SOME_KEY means this is a key for a data_dict DK_BATCH_SIZE = "batch_size" DK_PAD = "pad" # DK: general purpose data_dict DK_SRC_WID = "src_wid" # src = msg + ctx DK_SRC_WID_MASK = "src_wid_mask" DK_SRC_SEQ_MASK = "src_seq_mask" DK_MSG_WID = "msg_wid" # msg is us...
[ 2, 530, 27421, 329, 530, 3858, 286, 8633, 198, 2, 329, 4554, 11, 32975, 62, 50, 13649, 62, 20373, 1724, 428, 318, 257, 1994, 329, 257, 1366, 62, 11600, 198, 48510, 62, 33, 11417, 62, 33489, 796, 366, 43501, 62, 7857, 1, 198, 48510...
1.943478
1,380
# -*- coding: utf-8 -*- """ .. module:: register.views.list :synopsis: View to list all registered users .. moduleauthor:: Chris Bartlett """ from django.urls import reverse from django.views.generic import TemplateView from register.api.utils.make_request import make_request
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 492, 8265, 3712, 7881, 13, 33571, 13, 4868, 198, 220, 220, 1058, 28869, 24608, 25, 3582, 284, 1351, 477, 6823, 2985, 198, 198, 492, 8265, 9800, 3712, 5180, ...
3.329412
85
import unittest from prymate import evaluator, objects from prymate.lexer import Lexer from prymate.parser import Parser if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 279, 563, 9830, 1330, 5418, 84, 1352, 11, 5563, 198, 6738, 279, 563, 9830, 13, 2588, 263, 1330, 17210, 263, 198, 6738, 279, 563, 9830, 13, 48610, 1330, 23042, 263, 628, 198, 198, 361, 11593, 367...
2.819672
61
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # A simple native client in python. # All this client does is echo the text it receives back at the extension. import sys import s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 2321, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, ...
3.524272
103
from django.db import models from django.contrib.auth.models import AbstractUser from django.db.models.signals import post_save from django.dispatch import receiver # Create your models here. from django.dispatch import receiver # ( , ) # @receiver(post_save, sender=AppUser) # def create_profile(sender, ins...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13...
2.924528
159
# -*- coding: utf-8 -*- # Copyright 2017 Edoardo Pasca # # 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 ap...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 220, 15069, 2177, 1717, 11953, 78, 350, 42688, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
2.842276
615
""" Defines the dataclass for holding training related arguments. """ import json import math import sys from dataclasses import asdict, dataclass, field from enum import Enum from typing import Any, Dict, List, Optional, Union from das.models.model_args import ModelArguments from das.utils.basic_utils import create_...
[ 37811, 198, 7469, 1127, 262, 4818, 330, 31172, 329, 4769, 3047, 3519, 7159, 13, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 25064, 198, 6738, 4818, 330, 28958, 1330, 355, 11600, 11, 4818, 330, 31172, 11, 2214, 198...
3.116197
284
""" Perform sanitization check prior of releasing the app as ready. """ def main(): "Perform sanitization checks" pass
[ 37811, 198, 5990, 687, 5336, 270, 1634, 2198, 3161, 286, 13011, 262, 598, 355, 3492, 13, 198, 37811, 198, 198, 4299, 1388, 33529, 198, 220, 220, 220, 366, 5990, 687, 5336, 270, 1634, 8794, 1, 198, 220, 220, 220, 1208, 198 ]
3.121951
41
import asyncio import traceback from asyncio import StreamWriter, StreamReader, Task from .BaseClientHandler import BaseClientHandler from data import Message
[ 11748, 30351, 952, 198, 11748, 12854, 1891, 198, 6738, 30351, 952, 1330, 13860, 34379, 11, 13860, 33634, 11, 15941, 198, 198, 6738, 764, 14881, 11792, 25060, 1330, 7308, 11792, 25060, 198, 6738, 1366, 1330, 16000, 628 ]
4.472222
36
# chat/consumers.py import json from channels.generic.websocket import AsyncWebsocketConsumer from .models import RoomControl from channels.db import database_sync_to_async
[ 2, 8537, 14, 5936, 31260, 13, 9078, 198, 11748, 33918, 198, 6738, 9619, 13, 41357, 13, 732, 1443, 5459, 1330, 1081, 13361, 1135, 1443, 5459, 49106, 198, 6738, 764, 27530, 1330, 10096, 15988, 198, 6738, 9619, 13, 9945, 1330, 6831, 62, ...
3.659574
47
import numpy as np from cnnclustering._primitive_types import P_AINDEX, P_AVALUE from cnnclustering import _types, _fit COMPONENT_ALT_KW_MAP = { "input": "input_data", "data": "input_data", "n": "neighbours", "na": "neighbours", "nb": "neighbour_neighbours", "getter": "neighbours_getter", ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 269, 20471, 565, 436, 1586, 13557, 19795, 1800, 62, 19199, 1330, 350, 62, 32, 12115, 6369, 11, 350, 62, 10116, 1847, 8924, 198, 6738, 269, 20471, 565, 436, 1586, 1330, 4808, 19199, 11, 48...
2.105714
2,800
#!/usr/bin/env python from __future__ import print_function from ipywidgets import * from IPython.display import display from getpass import getpass import glob import os import stat import paramiko from string import Template from os.path import expanduser from pkg_resources import resource_string from IPython.core.ma...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 20966, 88, 28029, 11407, 1330, 1635, 198, 6738, 6101, 7535, 13, 13812, 1330, 3359, 198, 6738, 651, 6603, 1330, 651, 6603, 198, ...
2.814035
285
import subprocess import os import shutil import time import yaml import sys import logging logger = logging.getLogger(__name__) if __name__ == '__main__': compile()
[ 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 640, 198, 11748, 331, 43695, 198, 11748, 25064, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 361, 11593, ...
3.092593
54
# Generated by Django 2.1.11 on 2019-08-14 03:10 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 1157, 319, 13130, 12, 2919, 12, 1415, 7643, 25, 940, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.8
30
"""A CSV annotation writer that reads the bbox in x, y, w, h format.""" from discolight.annotations import BoundingBox from .types import CSVRow, CSVAnnotationLoader
[ 37811, 32, 44189, 23025, 6260, 326, 9743, 262, 275, 3524, 287, 2124, 11, 331, 11, 266, 11, 289, 5794, 526, 15931, 198, 6738, 1221, 349, 432, 13, 34574, 602, 1330, 347, 9969, 14253, 198, 6738, 764, 19199, 1330, 9429, 13024, 322, 11, ...
3.553191
47
from days import day09 from ddt import ddt, data, unpack import unittest import util
[ 6738, 1528, 1330, 1110, 2931, 201, 198, 6738, 288, 28664, 1330, 288, 28664, 11, 1366, 11, 555, 8002, 201, 198, 11748, 555, 715, 395, 201, 198, 11748, 7736, 201, 198, 201, 198 ]
2.84375
32
"""A utility module which has FD-related functions. This module mostly exists for L{clean_fds}, so it can be imported without accidentally getting a reactor or something else that might create a critical file descriptor. """ import os import resource def clean_fds(): """Close all non-stdio file descriptors. ...
[ 37811, 32, 10361, 8265, 543, 468, 30002, 12, 5363, 5499, 13, 198, 198, 1212, 8265, 4632, 7160, 329, 406, 90, 27773, 62, 69, 9310, 5512, 523, 340, 460, 307, 17392, 1231, 198, 4134, 23961, 1972, 257, 21905, 393, 1223, 2073, 326, 1244, ...
2.922179
257
""" This script creates users in a JAMF Pro Server instance from an LDAP query. """ # Copyright 2020 Dalton Durst # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, inclu...
[ 37811, 198, 1212, 4226, 8075, 2985, 287, 257, 449, 2390, 37, 1041, 9652, 4554, 422, 281, 27178, 2969, 12405, 13, 198, 37811, 198, 198, 2, 15069, 12131, 33261, 11164, 301, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, ...
2.410304
2,174
# coding:utf-8 ''' from http://www.pythonchallenge.com/pc/def/integrity.html ''' un = 'BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07<]\xc9\x14\xe1BA\x06\xbe\x084' pw = 'BZh91AY&SY\x94$|\x0e\x00\x00\x00\x81\x00\x03$ \x00!\x9ah3M\x13<]\xc9\x14\xe1BBP\x91\xf08' if __name__ == '__main__': ...
[ 2, 19617, 25, 40477, 12, 23, 198, 198, 7061, 6, 198, 6738, 2638, 1378, 2503, 13, 29412, 36747, 3540, 13, 785, 14, 14751, 14, 4299, 14, 18908, 10138, 13, 6494, 198, 7061, 6, 198, 198, 403, 796, 705, 33, 57, 71, 6420, 4792, 5, 230...
1.575221
226
from flask import Flask, jsonify, request from flask_cors import CORS from twilio.twiml.messaging_response import MessagingResponse, Message from twilio.rest import Client import sqlconnector as sql from datetime import datetime import os # configuration DEBUG = True twilio_sid = os.environ.get('TWILIO_SID') twilio_se...
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 665, 346, 952, 13, 4246, 320, 75, 13, 37348, 3039, 62, 26209, 1330, 10626, 3039, 31077, 11, 16000, 198, 6738, 665, 346, ...
2.761468
218
#!/usr/bin/env python from scapy.all import * import dpkt import argparse import sys if __name__ == '__main__': sys.exit(main())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 629, 12826, 13, 439, 1330, 1635, 198, 11748, 288, 79, 21841, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, ...
2.627451
51
#!/usr/bin/env python3 # coding=utf-8 from __future__ import print_function from jsonrpcclient.http_client import HTTPClient from url_util import endpoint import argparse import simplejson if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 33918, 81, 79, 535, 75, 1153, 13, 4023, 62, 16366, 1330, 14626, 11792, 198, 6738,...
3.038961
77
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
[ 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 198, 9945, 796, 16363, 2348, 26599, 3419, 628 ]
3.157895
19
__version__ = "0.0.1" from .revx_output_siip import SIIPTimeSeriesMetadata, concat, max_fiber_size, match_points
[ 834, 9641, 834, 796, 366, 15, 13, 15, 13, 16, 1, 198, 198, 6738, 764, 18218, 87, 62, 22915, 62, 13396, 541, 1330, 311, 3978, 47, 7575, 27996, 9171, 14706, 11, 1673, 265, 11, 3509, 62, 69, 1856, 62, 7857, 11, 2872, 62, 13033, 198...
2.533333
45
# -*- coding: utf-8 -*- """ Created on Sun Jan 07 07:52:52 2018 @author: MVGrigoriev @task: kNN method """ import pandas import numpy as np from sklearn.neighbors import KNeighborsClassifier # Import class from scikit-learn from sklearn.model_selection import KFold # Import KFold function from sklearn.model_se...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 2365, 8753, 8753, 25, 4309, 25, 4309, 2864, 198, 198, 31, 9800, 25, 32947, 38, 4359, 273, 11203, 198, 198, 31, 35943, 25, 479, 6144, 2446...
2.742147
764
# ipython utils import os import sys import time import yaml import datetime from pathlib import Path from IPython import get_ipython from IPython.core.magic import (register_line_magic, register_cell_magic, register_line_cell_magic) import warnings; warnings.simplefilter('ignore') s...
[ 2, 20966, 7535, 3384, 4487, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 331, 43695, 198, 11748, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 6101, 7535, 1330, 651, 62, 541, 7535, 220, 198, 6738,...
2.199468
376
#!/usr/bin/python3 # Run the camera with a 180 degree rotation. from qt_gl_preview import * from picamera2 import * import time picam2 = Picamera2() preview = QtGlPreview(picam2) preview_config = picam2.preview_configuration() preview_config["transform"] = libcamera.Transform(hflip=1, vflip=1) picam2.configure(prev...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 5660, 262, 4676, 351, 257, 11546, 4922, 13179, 13, 198, 198, 6738, 10662, 83, 62, 4743, 62, 3866, 1177, 1330, 1635, 198, 6738, 8301, 18144, 17, 1330, 1635, 198, 11748, 640, 198,...
2.661765
136
#!/usr/bin/env python from __future__ import unicode_literals from prompt_toolkit import prompt if __name__ == '__main__': print('If you press meta-! or esc-! at the following prompt, you can enter system commands.') answer = prompt('Give me some input: ', enable_system_bindings=True) print('You said: %s'...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 6152, 62, 25981, 15813, 1330, 6152, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, ...
3.122642
106
import unittest import searcheval.metrics as sm if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 11748, 9622, 2395, 2100, 13, 4164, 10466, 355, 895, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.538462
39
# # 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 # distributed under ...
[ 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, 7330, 257, 4866, 286, 262, 13789, 379,...
3.109145
339
from collections import OrderedDict from dataclasses import dataclass from datetime import datetime from enum import Enum from typing import Optional, Set import discord import functools from .gameflags import GameFlagsManager from .playerdict import PlayerDict from .repoman import GameRepoManager from constants impor...
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 32233, 11, 5345, 198, 11748, 36446, 198, 1...
2.691176
340
# -*- coding: utf-8 -*- from ..stanzas import Stanza from ..errors import makeStanzaError from ..protocols.stream_mgmt import NS_URI
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11485, 14192, 89, 292, 1330, 7299, 4496, 198, 6738, 11485, 48277, 1330, 787, 32140, 4496, 12331, 198, 6738, 11485, 11235, 4668, 82, 13, 5532, 62, 11296, 16762, 1330,...
2.851064
47
from dataclasses import dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628 ]
3.888889
9
from unittest import TestCase import pandas as pd from feature_extraction.pattern.pattern import Pattern from preprocessing.corpus import build_corpus
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3895, 62, 2302, 7861, 13, 33279, 13, 33279, 1330, 23939, 198, 6738, 662, 36948, 13, 10215, 79, 385, 1330, 1382, 62, 10215, 79, 385, 628 ]
3.642857
42
from starlette.responses import Response from passlib.hash import pbkdf2_sha256 from starlette.websockets import WebSocketDisconnect from blockchain import Blockchain # from wallet import Wallet from fastapi import FastAPI, WebSocket import uvicorn import socket import requests as r from pydantic import BaseModel from ...
[ 6738, 3491, 21348, 13, 16733, 274, 1330, 18261, 198, 6738, 1208, 8019, 13, 17831, 1330, 279, 65, 74, 7568, 17, 62, 26270, 11645, 198, 6738, 3491, 21348, 13, 732, 1443, 11603, 1330, 5313, 39105, 7279, 8443, 198, 6738, 11779, 1330, 29724,...
3.056933
1,089
import json from bunch import Bunch import os def get_config_from_json(json_file): """ Get the config from a json file :param json_file: :return: config(namespace) or config(dictionary) """ # parse the configurations from the config json file provided with open(json_file, 'r') as config_fi...
[ 11748, 33918, 198, 6738, 7684, 1330, 347, 3316, 198, 11748, 28686, 628, 198, 4299, 651, 62, 11250, 62, 6738, 62, 17752, 7, 17752, 62, 7753, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3497, 262, 4566, 422, 257, 33918, 2393, ...
2.983146
178
import json from django.views import View from django.shortcuts import redirect, render from django.core.exceptions import ObjectDoesNotExist from django.contrib import messages from django.http.response import HttpResponseRedirect from rest_framework.renderers import TemplateHTMLRenderer from rest_framework import st...
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 11, 8543, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625,...
3.991379
232
from apps.vadmin.system.models.celery_log import CeleryLog from apps.vadmin.system.models.config_settings import ConfigSettings from apps.vadmin.system.models.dict_data import DictData from apps.vadmin.system.models.dict_details import DictDetails from apps.vadmin.system.models.logininfor import LoginInfor from apps.va...
[ 6738, 6725, 13, 85, 28482, 13, 10057, 13, 27530, 13, 7015, 88, 62, 6404, 1330, 15248, 1924, 11187, 198, 6738, 6725, 13, 85, 28482, 13, 10057, 13, 27530, 13, 11250, 62, 33692, 1330, 17056, 26232, 198, 6738, 6725, 13, 85, 28482, 13, 1...
3.522013
159
from django.conf.urls import url from .views import profile, hunterList, changePass urlpatterns = [ url(r'^$', profile, name='hunter_profile'), url(r'^password', changePass, name='hunter_password'), url(r'^list', hunterList, name='hunter_list') ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 33571, 1330, 7034, 11, 19177, 8053, 11, 1487, 14478, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 7034, 11, 1438, ...
2.857143
91
from scipy.sparse import dok_matrix import pandas as pd from cytoolz import itemmap
[ 6738, 629, 541, 88, 13, 82, 29572, 1330, 466, 74, 62, 6759, 8609, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3075, 25981, 89, 1330, 2378, 8899, 628, 198 ]
2.866667
30
from django.db import migrations from backent.api import enums
[ 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 198, 6738, 736, 298, 13, 15042, 1330, 551, 5700, 628, 628 ]
3.35
20
from .test_uk_base import TestUkBase ################################
[ 6738, 764, 9288, 62, 2724, 62, 8692, 1330, 6208, 28425, 14881, 628, 198, 29113, 198 ]
4.8
15
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019-2020 European Commission (JRC); # Licensed under the EUPL (the 'Licence'); # You may not use this work except in compliance with the Licence. # You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl """ Harvest functions & annotate their ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 13130, 12, 42334, 3427, 4513, 357, 41, 7397, 1776, 198, 2, 49962, 739, 262, 4576, 6489, 357, 1169, ...
2.405517
2,175
import pandas as pd import os import torch import numpy as np import argparse from trojai_utils import * # Get args parser = argparse.ArgumentParser(description="Generate embeddings") parser.add_argument('--embedding-type', type=str, help='Model architecture (one of "BERT", "DistilBERT", "GPT-2")')...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 6738, 4161, 73, 1872, 62, 26791, 1330, 1635, 198, 198, 2, 3497, 26498, 198, 48610, 796, 1822, 29572...
2.70632
807
""" test pretrained models """ from __future__ import print_function import mxnet as mx from common import find_mxnet, modelzoo from common.util import download_file, get_gpus from score import score if __name__ == '__main__': gpus = get_gpus() assert len(gpus) > 0 batch_size = 16 * len(gpus) gpus = ',...
[ 37811, 198, 9288, 2181, 13363, 4981, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 6738, 2219, 1330, 1064, 62, 36802, 3262, 11, 2746, 89, 2238, 198, 6738, 2219, 13, 22602...
2.525253
198
""" Provides Siren rendering support. """ from __future__ import unicode_literals from rest_framework.renderers import JSONRenderer
[ 37811, 198, 15946, 1460, 43904, 14837, 1104, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 1334, 62, 30604, 13, 10920, 19288, 1330, 19449, 49, 437, 11882, 628 ]
3.722222
36
import numpy as np __all__ = ( "standard_bipolar_sine", "double_bipolar_sine", "standard_bipolar", "double_bipolar", "semicircle", "double_semicircle", "gaussian", "double_gaussian", ) def semicircle(a, T): """Return semicircle bipolar wave with amplitude a (units of V) and period...
[ 11748, 299, 32152, 355, 45941, 198, 198, 834, 439, 834, 796, 357, 198, 220, 220, 220, 366, 20307, 62, 65, 49133, 62, 82, 500, 1600, 198, 220, 220, 220, 366, 23352, 62, 65, 49133, 62, 82, 500, 1600, 198, 220, 220, 220, 366, 20307, ...
2.192804
1,473
from keras import layers import tensorflow as tf from Resnet import ResNet50 import keras from keras.models import Input,Model
[ 6738, 41927, 292, 1330, 11685, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 1874, 3262, 1330, 1874, 7934, 1120, 198, 11748, 41927, 292, 198, 6738, 41927, 292, 13, 27530, 1330, 23412, 11, 17633, 198 ]
3.628571
35
"""Visualizations for NLP analysis""" import pandas as pd import numpy as np from sklearn.metrics import classification_report from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt import seaborn as sns
[ 37811, 36259, 4582, 329, 399, 19930, 3781, 37811, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 17923, 62, 13116, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, ...
3.53125
64
from sqlpuzzle._common import Object from sqlpuzzle._queries.options import Options __all__ = ()
[ 6738, 44161, 79, 9625, 13557, 11321, 1330, 9515, 198, 6738, 44161, 79, 9625, 13557, 421, 10640, 13, 25811, 1330, 18634, 198, 198, 834, 439, 834, 796, 7499, 628, 198 ]
3.448276
29
from Code.utility_functions import get_excel_row_index
[ 6738, 6127, 13, 315, 879, 62, 12543, 2733, 1330, 651, 62, 1069, 5276, 62, 808, 62, 9630, 628 ]
3.111111
18
import logging from datetime import datetime from datetime import timedelta from cvprac.cvp_client_errors import CvpApiError
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 269, 85, 1050, 330, 13, 33967, 79, 62, 16366, 62, 48277, 1330, 327, 36133, 32, 14415, 12331, 628 ]
3.5
36
from flask import current_app, request from http import HTTPStatus from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import Session from app.models.stores.store_model import StoreModel from app.decorators import verify_payload, validator
[ 6738, 42903, 1330, 1459, 62, 1324, 11, 2581, 198, 6738, 2638, 1330, 14626, 19580, 198, 198, 6738, 44161, 282, 26599, 13, 579, 13, 41194, 1330, 1400, 23004, 21077, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 198, 198, 6738, 598, ...
3.764706
68
#!/usr/bin/env python import argparse import boto from boto.s3 import connection as s3_connection from cinderclient.v1 import client as cinder_v1 import code from novaclient.v1_1 import client as nova_v1 from novaclient.shell import OpenStackComputeShell as open_shell from glanceclient import Client as glance_client fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 11748, 275, 2069, 198, 6738, 275, 2069, 13, 82, 18, 1330, 4637, 355, 264, 18, 62, 38659, 198, 6738, 269, 5540, 16366, 13, 85, 16, 1330, 5456, 355, 269, 5540,...
3.2
165
import inspect from .descriptors import Descriptor from .arguments import ArgsDescriptor
[ 11748, 10104, 198, 198, 6738, 764, 20147, 1968, 669, 1330, 2935, 6519, 273, 198, 6738, 764, 853, 2886, 1330, 943, 14542, 24564, 1968, 273 ]
3.708333
24
# -*- coding:utf-8 -*- """ Created on 2017/10/01 @author: Jimmy Liu @group : waditu @contact: jimmysoa@sina.cn """ if __name__ == '__main__': pass
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 220, 198, 37811, 198, 220, 198, 41972, 319, 2177, 14, 940, 14, 486, 198, 31, 9800, 25, 12963, 18258, 198, 31, 8094, 1058, 266, 324, 34272, 198, 31, 32057, 25, 474, 320, 1820, ...
2.180556
72