content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from Operation import * # 1. 新建实体类 obj = Operation() # 2. 设置txt文件路径与分割符 obj.setFilePath("data.txt", " ") # 3.设置多少行文本开启一个线程, 默认10000行开启一个新线程 obj.setLineLimt(10000) # 4. 读取text第一行获得列名,同时按照line_limt限制将余下内容创建成多个list obj.setListName() print(obj.list_name) #5. 设置唯一标识行 obj.setSgin("测试1") #6. 设置条件,要求传入一个字典。 obj.setCondition({...
[ 6738, 14680, 1330, 1635, 198, 198, 2, 352, 13, 10545, 244, 108, 161, 119, 118, 22522, 252, 19526, 241, 163, 109, 119, 198, 26801, 796, 14680, 3419, 198, 2, 362, 13, 5525, 106, 122, 163, 121, 106, 14116, 23877, 229, 20015, 114, 164, ...
1.144124
451
# %% from useful_scit.imps import * from oas_erf.util.imports import get_averaged_fields from oas_erf.util.imports.get_fld_fixed import get_field_fixed log.ger.setLevel(log.log.DEBUG) # load and autoreload from IPython import get_ipython # noinspection PyBroadException try: _ipython = get_ipython() _magic ...
[ 2, 43313, 198, 198, 6738, 4465, 62, 1416, 270, 13, 320, 862, 1330, 1635, 198, 198, 6738, 267, 292, 62, 263, 69, 13, 22602, 13, 320, 3742, 1330, 651, 62, 8770, 1886, 62, 25747, 198, 6738, 267, 292, 62, 263, 69, 13, 22602, 13, 320...
1.666403
3,792
import os import time import logging import argparse import datetime from io import BytesIO from upload import GooglePhotos from camera import take_picture, TIME_FORMAT logger = logging.getLogger(__name__) FILENAME_FORMAT = '%Y-%b-%dT%I:%M%p.jpg' START_WORK = 7 # 7am END_WORK = 20 # 8pm HERE = os.path.dirname(__fil...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 6738, 9516, 1330, 3012, 21197, 198, 6738, 4676, 1330, 1011, 62, 34053, 11, 20460, 62, ...
2.618705
139
"""Mixin classes for IR swaps.""" from quantfinpy.instrument.ir.swap.fixed_leg import IRFixedLeg class ReceiverIRFixedLegMixin: """Mixin class for IR swaps with a receiving IR fixed leg.""" __slots__ = () @property def receiver_fixed_leg(self) -> IRFixedLeg: """Get underlying receiver fixe...
[ 37811, 35608, 259, 6097, 329, 14826, 43997, 526, 15931, 628, 198, 6738, 5554, 15643, 9078, 13, 259, 43872, 13, 343, 13, 2032, 499, 13, 34021, 62, 1455, 1330, 14826, 13715, 11484, 628, 198, 4871, 39106, 4663, 13715, 11484, 35608, 259, 25...
2.72449
196
import re regex = r"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(...
[ 11748, 302, 201, 198, 260, 25636, 796, 374, 18109, 27514, 58, 64, 12, 89, 15, 12, 24, 0, 29953, 4, 5, 6, 9, 10, 14, 28, 30, 61, 62, 63, 90, 91, 92, 93, 12, 60, 33747, 30, 7479, 3693, 64, 12, 89, 15, 12, 24, 0, 29953, 4, ...
1.511236
534
import json
[ 11748, 33918, 198 ]
4
3
from datetime import date, datetime, timedelta import io import json import os.path from unittest.mock import Mock import pytest import calendar from dataactcore.aws.s3Handler import S3Handler from dataactbroker.handlers import fileHandler from dataactbroker.helpers import filters_helper from dataactcore.config impo...
[ 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 11, 28805, 12514, 198, 11748, 33245, 198, 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 11845,...
2.441257
9,550
from __future__ import absolute_import from .core import * __version__ = '0.10.0.dev2'
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 764, 7295, 1330, 1635, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 940, 13, 15, 13, 7959, 17, 6, 198 ]
2.83871
31
from .data_loader import *
[ 6738, 764, 7890, 62, 29356, 1330, 1635, 198 ]
3.375
8
import numpy as np import matplotlib.pylab as plt main() #base_lr = 0.20000, score = 0.94800, loss = 0.09340, epochs = 50 #base_lr = 0.10000, score = 0.97630, loss = 0.00207, epochs = 50 #base_lr = 0.05000, score = 0.97540, loss = 0.00162, epochs = 50 #base_lr = 0.01000, score = 0.97260, loss = 0.00229, epochs = 50 ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 355, 458, 83, 198, 198, 12417, 3419, 628, 198, 2, 8692, 62, 14050, 796, 657, 13, 2167, 405, 11, 4776, 796, 657, 13, 24, 2780, 405, 11, 2994, 796, 657...
2.269091
550
from django.urls import path from app import views urlpatterns = [ path('',views.index2,name='index2') ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 220, 201, 198, 6738, 598, 1330, 5009, 201, 198, 201, 198, 6371, 33279, 82, 796, 685, 201, 198, 220, 220, 220, 3108, 10786, 3256, 33571, 13, 9630, 17, 11, 3672, 11639, 9630, 17, 11537, 20...
2.489362
47
import unittest from thai_tokenizer import Tokenizer
[ 11748, 555, 715, 395, 198, 6738, 294, 1872, 62, 30001, 7509, 1330, 29130, 7509, 628, 198 ]
3.4375
16
#!/usr/bin/env python # -*- coding: utf-8 -*- # @author: yewennuan # @Mail: ywnjohu@gmail.com # @date: 2020/7/24 16:53 from flask_restx import fields from admin.fields import Timestamp from admin.rest import card_api next_obj = card_api.model('NextObj', { "offset": fields.Integer(required=True), "limit": fie...
[ 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, 2488, 9800, 25, 331, 413, 1697, 7258, 198, 2, 2488, 25804, 25, 331, 675, 73, 1219, 84, 31, 14816, 13, 785, ...
2.615686
510
# run the script in mainnet-fork only # brownie run scripts/stake.py --network mainnet-fork from brownie import Contract, accounts, interface from brownie_tokens import MintableForkToken
[ 2, 1057, 262, 4226, 287, 1388, 3262, 12, 32523, 691, 198, 2, 7586, 494, 1057, 14750, 14, 301, 539, 13, 9078, 1377, 27349, 1388, 3262, 12, 32523, 198, 198, 6738, 7586, 494, 1330, 17453, 11, 5504, 11, 7071, 198, 6738, 7586, 494, 62, ...
3.596154
52
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file was automatically generated by census_etl/spec_scanner.py on Thu Sep 24 09:39:22 2020 # Command line: census_etl/spec_scanner.py mdf/2020 Public Law 94 171 Microdata Detail File Specification v2_delivered 09222020.docx --output_parser mdf_validator_classes.py -...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 770, 2393, 373, 6338, 7560, 416, 21649, 62, 316, 75, 14, 16684, 62, 35836, 1008, 13, 9078, 319, 26223, 8621, ...
2.323781
2,687
##################################################### # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2020.06 # ##################################################### # In this python file, it contains the meter classes# # , which may need to use PyTorch or Numpy. # ##################################################...
[ 29113, 14468, 4242, 2, 198, 2, 15069, 357, 66, 8, 33591, 1092, 72, 28831, 685, 38, 270, 16066, 360, 12, 55, 12, 56, 4357, 12131, 13, 3312, 1303, 198, 29113, 14468, 4242, 2, 198, 2, 554, 428, 21015, 2393, 11, 340, 4909, 262, 16430,...
3.597156
211
from api.gcp.interface_gcp_execute import interfaceGCPExecute import logging # Get the logger specified in the file logger = logging.getLogger("main." + __name__) if __name__ == '__main__': tasks_executor()
[ 6738, 40391, 13, 70, 13155, 13, 39994, 62, 70, 13155, 62, 41049, 1330, 7071, 38, 8697, 23002, 1133, 198, 11748, 18931, 198, 198, 2, 3497, 262, 49706, 7368, 287, 262, 2393, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7203, 1241...
2.932432
74
# Script to test different pass-by-reference strategies for Eigen, SGP4.cpp, pybind, and CircuitPython # Paul DeTrempe (detrempe@stanford.edu) # 11/7/2019 import pointer_t_cpp as ptrcpp print('imported')
[ 2, 12327, 284, 1332, 1180, 1208, 12, 1525, 12, 35790, 10064, 329, 412, 9324, 11, 311, 16960, 19, 13, 20322, 11, 12972, 21653, 11, 290, 13588, 37906, 198, 2, 3362, 1024, 51, 2787, 431, 357, 15255, 2787, 431, 31, 14192, 3841, 13, 1553...
2.985507
69
# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-28 15:51 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 2481, 319, 13130, 12, 3312, 12, 2078, 1315, 25, 4349, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.896104
77
""" The MIT License (MIT) Copyright (c) 2020 NVIDIA 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, including without limitation the rights to use, copy, modify, merge, publi...
[ 37811, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 12131, 15127, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 198, 5661, 3788, 290, 3917, 10314, 3696, ...
3.159544
702
# Copyright The PyTorch Lightning team. # # 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 i...
[ 2, 15069, 383, 9485, 15884, 354, 12469, 1074, 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, 1...
2.921466
764
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from rentomatic.domain import room from rentomatic.repository.postgres_objects import Base, Room
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 198, 6738, 5602, 13730, 13, 27830, 1330, 2119, 198, 6738, 5602, 13730, 13, 260, 1930, 37765, 13, 7353, 34239, 62, 48205, 1330...
3.911111
45
from unittest.mock import call, patch from urllib.parse import urljoin from directory_sso_api_client.client import sso_api_client import pytest from rest_framework.response import Response from rest_framework.exceptions import AuthenticationFailed from rest_framework.views import APIView from django.contrib.auth.mode...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 869, 11, 8529, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 6738, 8619, 62, 82, 568, 62, 15042, 62, 16366, 13, 16366, 1330, 264, 568, 62, 15042, 62, 16366, 198, 11748, ...
2.662234
376
# Train with MRI Cine Data with 20 Channels # Date: 2nd April 2019 # Contact Ivy Chan at yanchi.chan@tum.de import os import time import numpy as np import keras from keras import backend as K import pylab import matplotlib.cm as cm import keras.layers import tensorflow as tf from keras.models import Sequential, mod...
[ 2, 16835, 351, 30278, 327, 500, 6060, 351, 1160, 609, 8961, 198, 2, 7536, 25, 362, 358, 3035, 13130, 198, 2, 14039, 27386, 18704, 379, 331, 3702, 72, 13, 3147, 31, 83, 388, 13, 2934, 628, 198, 11748, 28686, 198, 11748, 640, 198, 1...
2.416686
4,411
""" The Project class for use in instances of SA. """ from .hospital import Hospital class Project(Hospital): """A class to represent a project in an instance of SA. Parameters ---------- name : object An identifier. This should be unique and descriptive. capacity : int The maxim...
[ 37811, 383, 4935, 1398, 329, 779, 287, 10245, 286, 14719, 13, 37227, 198, 198, 6738, 764, 49257, 1330, 9256, 628, 198, 4871, 4935, 7, 39, 3531, 2599, 198, 220, 220, 220, 37227, 32, 1398, 284, 2380, 257, 1628, 287, 281, 4554, 286, 14...
2.751678
745
txt = "Foo Bar" num = 42.12 print("The user {} was born {} years ago.".format(txt, num)) print("The user {0} was born {1} years ago.".format(txt, num)) print("The user {1} was born {0} years ago.".format(num, txt))
[ 14116, 796, 366, 37, 2238, 2409, 1, 198, 22510, 796, 5433, 13, 1065, 198, 198, 4798, 7203, 464, 2836, 23884, 373, 4642, 23884, 812, 2084, 526, 13, 18982, 7, 14116, 11, 997, 4008, 198, 4798, 7203, 464, 2836, 1391, 15, 92, 373, 4642, ...
2.6875
80
from operator import attrgetter import logging import os import subprocess import pyfastaq import pymummer from cluster_vcf_records import vcf_record from varifier import utils dnadiff_output_extensions = [ "1coords", "1delta", "delta", "mcoords", "mdelta", "qdiff", "rdiff", "report", ...
[ 6738, 10088, 1330, 708, 81, 1136, 353, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 198, 11748, 12972, 7217, 30188, 198, 11748, 279, 4948, 31647, 198, 6738, 13946, 62, 85, 12993, 62, 8344, 3669, 1330, 410, 12993, 6...
1.733904
2,687
print("digite o primeiro numero: ") primeiro_numero = input () print("digite o segundo numero: ") segundo_numero = input () soma = float(primeiro_numero)+ float(segundo_numero) print(" o valor calculado dos dois números é: ",soma)
[ 4798, 7203, 12894, 578, 267, 6994, 7058, 997, 3529, 25, 366, 8, 201, 198, 35505, 7058, 62, 22510, 3529, 796, 5128, 7499, 201, 198, 4798, 7203, 12894, 578, 267, 384, 70, 41204, 997, 3529, 25, 366, 8, 201, 198, 325, 70, 41204, 62, 2...
2.521277
94
# -*- coding: utf-8 -*- ''' Created on: 2015 Author: Mizael Martinez ''' # Form implementation generated from reading ui file 'entrenamiento.ui' # # Created: Tue Sep 29 16:48:35 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! import sys, os,threading,time ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 198, 220, 15622, 319, 25, 1853, 198, 220, 6434, 25, 29975, 3010, 20741, 198, 198, 7061, 6, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393...
2.45092
326
import enum
[ 11748, 33829, 628, 198 ]
3.5
4
import os import subprocess ''' Could make this as configurable as desired. '''
[ 11748, 28686, 198, 11748, 850, 14681, 198, 198, 7061, 6, 198, 23722, 787, 428, 355, 4566, 11970, 355, 10348, 13, 198, 7061, 6 ]
3.478261
23
''' ISIS Genie Ops Object for IOSXE - CLI. ''' # Python import re # pyats from pyats.utils.objects import find, R # Genie from genie.libs.ops.isis.isis import Isis as SuperIsis from genie.libs.ops.utils.common import get_enable, to_int, to_list from genie.libs.sdk.libs.utils.normalize import GroupKeys # iosxe parse...
[ 7061, 6, 198, 29322, 49405, 26123, 9515, 329, 314, 2640, 55, 36, 532, 43749, 13, 198, 7061, 6, 198, 198, 2, 11361, 198, 11748, 302, 198, 198, 2, 12972, 1381, 198, 6738, 12972, 1381, 13, 26791, 13, 48205, 1330, 1064, 11, 371, 198, ...
1.378087
18,345
from phrase_counter.word_graph import generate_word_graph def test_simple_output_word_graph(): """Simple output test for word graph""" samlpe_text = "test number one" output = generate_word_graph(samlpe_text) assert output
[ 6738, 9546, 62, 24588, 13, 4775, 62, 34960, 1330, 7716, 62, 4775, 62, 34960, 628, 198, 4299, 1332, 62, 36439, 62, 22915, 62, 4775, 62, 34960, 33529, 198, 220, 220, 220, 37227, 26437, 5072, 1332, 329, 1573, 4823, 37811, 198, 220, 220, ...
3.050633
79
""" The PyGame frontend. Uses the renderer module and common game code, integrating it all with pygame. """
[ 37811, 198, 464, 9485, 8777, 2166, 437, 13, 198, 198, 5842, 274, 262, 9851, 11882, 8265, 290, 2219, 983, 2438, 11, 198, 18908, 8821, 340, 477, 351, 12972, 6057, 13, 198, 37811, 198 ]
3.30303
33
import os from .links import transform_href, transform_id, get_body_id, replace_asset_hrefs, rel_pdf_href from weasyprint import urls from bs4 import BeautifulSoup from slugify import slugify
[ 11748, 28686, 198, 198, 6738, 764, 28751, 1330, 6121, 62, 33257, 11, 6121, 62, 312, 11, 651, 62, 2618, 62, 312, 11, 6330, 62, 562, 316, 62, 33257, 82, 11, 823, 62, 12315, 62, 33257, 198, 198, 6738, 356, 4107, 4798, 1330, 2956, 727...
3.177419
62
from datetime import date, datetime from rest_framework import serializers from mkt.api.fields import ESTranslationSerializerField def es_to_datetime(value): """ Returns a datetime given an Elasticsearch date/datetime field. """ if not value or isinstance(value, (date, datetime)): return ...
[ 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 198, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 285, 21841, 13, 15042, 13, 25747, 1330, 17160, 26084, 7592, 32634, 7509, 15878, 628, 198, 4299, 1658, 62, 1462, 62, 19608...
2.348904
1,049
# flake8: noqa from .tracker import *
[ 2, 781, 539, 23, 25, 645, 20402, 201, 198, 6738, 764, 2213, 10735, 1330, 1635, 201, 198 ]
2.352941
17
from PIL import Image import re oxygen = Image.open("oxygen.png").convert('L') values = [] for i in range((oxygen.width - 14) // 7): values.append(oxygen.getpixel((i*7, 47))) result = ''.join(chr(i) for i in values) print(result) numArray = re.findall(r'(\d{2,3})(?=,|])', result) print(''.join(chr(int(i)) fo...
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 302, 198, 198, 23536, 5235, 796, 7412, 13, 9654, 7203, 23536, 5235, 13, 11134, 11074, 1102, 1851, 10786, 43, 11537, 198, 198, 27160, 796, 17635, 198, 198, 1640, 1312, 287, 2837, 19510, 23536, 523...
2.390071
141
print('{:^55}'.format('\033[1mCOLEÇÃO DE CDs\033[m')) print('-'*50) cds = int(input('* Quantidade de CDs adquiridos: ')) tot_cds = 0 tot_precos = 0 for tot_cds in range(cds): tot_cds += 1 preco = float(input(f'- Preço CD {tot_cds}: R$ ')) tot_precos += preco media = tot_precos / tot_cds print('{:^...
[ 4798, 10786, 90, 25, 61, 2816, 92, 4458, 18982, 10786, 59, 44427, 58, 16, 76, 8220, 2538, 127, 229, 5746, 46, 5550, 36731, 59, 44427, 58, 76, 6, 4008, 201, 198, 4798, 10786, 19355, 9, 1120, 8, 201, 198, 66, 9310, 796, 493, 7, 15...
1.985401
274
from django.contrib.auth.tokens import PasswordResetTokenGenerator email_confirmation_token_generator = EmailConfirmationTokenGenerator()
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 83, 482, 641, 1330, 30275, 4965, 316, 30642, 8645, 1352, 628, 198, 12888, 62, 10414, 36241, 62, 30001, 62, 8612, 1352, 796, 9570, 18546, 36241, 30642, 8645, 1352, 3419, 198 ]
3.589744
39
import csv import hashlib import math import sys import re from dwc_mapping import * # these input fields need to be created or massaged to be DWC-compatible specialhandling = 'collectionCode,eventDate,verbatimDepth,verbatimElevation,coordinateUncertaintyInMeters,associatedMedia'.split(',') dwc_mapping = [d for d in...
[ 11748, 269, 21370, 198, 11748, 12234, 8019, 198, 11748, 10688, 198, 11748, 25064, 198, 11748, 302, 198, 198, 6738, 43756, 66, 62, 76, 5912, 1330, 1635, 198, 198, 2, 777, 5128, 7032, 761, 284, 307, 2727, 393, 2347, 1886, 284, 307, 360,...
2.021474
2,049
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, ...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 6738, 384, 11925, 1505, 13...
3.524272
103
'''Test app.predict.''' from __future__ import division import unittest from math import exp from random import random, expovariate from feemodel.tests.config import (transientstatsref as transientstats, tmpdatadir_context) from feemodel.app.predict import (Prediction, DEFAULT_BLOCK...
[ 7061, 6, 14402, 598, 13, 79, 17407, 2637, 7061, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 555, 715, 395, 198, 6738, 10688, 1330, 1033, 198, 6738, 4738, 1330, 4738, 11, 1033, 709, 2743, 378, 198, 198, 6738, 730, 368, ...
2.301158
259
"""To create a Fusion script: Find all lines with <<<<<<<<>>>>>>>> and edit the code below 1. Change the default_name variable in run to the name you want your module to show up as in the dialog box. 2. Add the parameters you want to use to create the model using the parameters.addParamet...
[ 37811, 2514, 2251, 257, 21278, 4226, 25, 198, 220, 220, 220, 9938, 477, 3951, 351, 9959, 16791, 16791, 16791, 33717, 290, 4370, 262, 2438, 2174, 628, 198, 220, 220, 220, 352, 13, 9794, 262, 4277, 62, 3672, 7885, 287, 1057, 284, 262, ...
2.986079
1,724
# coding: utf-8 """ Prisma Cloud Compute API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 21.04.439 Generated by: https://openapi-generator.tech """ from __future__ import absolute_impor...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 35417, 64, 10130, 3082, 1133, 7824, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 4946, 15042, 35986, 3740, 1378, 12567, 13, 785, 14, 9654, 499, 270, 1014...
2.068078
3,496
import sqlite3 import os dir_path = os.path.dirname(os.path.abspath(__file__))
[ 11748, 44161, 578, 18, 198, 11748, 28686, 198, 198, 15908, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 628 ]
2.454545
33
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2019 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from flask_pluginengine import curre...
[ 2, 770, 2393, 318, 636, 286, 262, 1423, 3713, 20652, 13, 198, 2, 15069, 357, 34, 8, 6244, 532, 13130, 327, 28778, 198, 2, 198, 2, 383, 1423, 3713, 20652, 389, 1479, 3788, 26, 345, 460, 17678, 4163, 198, 2, 606, 290, 14, 273, 130...
3.664671
167
print("Hello World") print(5+1) print(10*2+5) print("Academy DQLab")
[ 4798, 7203, 15496, 2159, 4943, 198, 4798, 7, 20, 10, 16, 8, 198, 198, 4798, 7, 940, 9, 17, 10, 20, 8, 198, 4798, 7203, 12832, 324, 3065, 360, 9711, 397, 4943, 198 ]
2.121212
33
""" RPM Model """ class RPMModel(object): """ RPMModel - model of a layered RPM8 Shared data: geoParam - dictionary of geometry parameters Instance Data: inp - input deck name genome - genome(s) simulated by this geometry geo ...
[ 37811, 198, 49, 5868, 9104, 198, 37811, 198, 198, 4871, 32381, 17633, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 32381, 17633, 532, 2746, 286, 257, 37748, 32381, 23, 628, 220, 220, 220, 39403, 1366, 25, 198, 220, ...
1.913137
2,314
#!/usr/bin/env python # -*- coding: utf-8 -*- # ** # # ======================= # # GRAPH_WIDGET_CONTROLLER # # ======================= # # Graph controller # Adds a graph widget to the parent widget # # @author ES # ** import datetime import pyqtgraph
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 12429, 198, 2, 198, 2, 36658, 50155, 1303, 198, 2, 10863, 31300, 62, 54, 2389, 18851, 62, 10943, 5446, 46, 3069, ...
2.844444
90
__author__ = 'Fahim and Sajid' from pygame import * from math import * from random import* size = width, height = 1200, 800 screen = display.set_mode(size) myClock = time.Clock() font.init() """ '##:::::::'####:'##::: ##:'##:::'##: ##:::::::. ##:: ###:: ##: ##::'##:: ##:::::::: ##:: ####: ##: ##:'##::: ##:::::::: ...
[ 834, 9800, 834, 796, 705, 37, 993, 320, 290, 311, 1228, 312, 6, 198, 6738, 12972, 6057, 1330, 1635, 198, 6738, 10688, 1330, 1635, 198, 6738, 4738, 1330, 9, 198, 7857, 796, 9647, 11, 6001, 796, 24938, 11, 10460, 198, 9612, 796, 3359,...
1.930287
8,119
#!/usr/bin/env python #-*- coding: utf-8 -*- from WebHandler import * from BaseHandler import * from AjaxHandler import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 5313, 25060, 1330, 1635, 198, 6738, 7308, 25060, 1330, 1635, 198, 6738, 46362, 25060, 1330, 1635 ]
3.025
40
import os import pathlib import torch SEED_VALUE = 42 PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) LOCAL_DATA_LIMIT = 75000 TORCH_DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") DATA_FOLDER = os.path.join(PROJECT_ROOT, "data") EMBEDDINGS_FOLDER = os.path.joi...
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 28034, 198, 198, 5188, 1961, 62, 39488, 796, 5433, 198, 31190, 23680, 62, 13252, 2394, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15...
2.388235
170
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 13130, 383, 309, 22854, 37535, 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,...
3.195181
830
from sqlalchemy import Column, Integer from changes.config import db from changes.db.types.guid import GUID class ItemSequence(db.Model): """ Used to hold counters for autoincrement-style sequence number generation. In each row, value is the last sequence number returned for the corresponding parent....
[ 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 198, 198, 6738, 2458, 13, 11250, 1330, 20613, 198, 6738, 2458, 13, 9945, 13, 19199, 13, 5162, 312, 1330, 19348, 2389, 628, 198, 4871, 9097, 44015, 594, 7, 9945, 13, 17633, 2599, 198, 22...
3.061611
211
# coding: utf-8 import setuptools setuptools.setup( name='cloudkeeper', packages=setuptools.find_packages(), install_requires=[ 'requests', 'websocket-client', ], )
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 900, 37623, 10141, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 11639, 17721, 13884, 3256, 198, 220, 220, 220, 10392, 28, 2617, 37623, 10141, 13, 19796, 62, 43789, ...
2.302326
86
import flask.scaffold flask.helpers._endpoint_from_view_func = flask.scaffold._endpoint_from_view_func import flask_restful from flask import request from app import db, RestException, elastic_index from app.model.category import Category from app.model.event import Event from app.model.resource_category import Resour...
[ 11748, 42903, 13, 1416, 2001, 727, 198, 2704, 2093, 13, 16794, 364, 13557, 437, 4122, 62, 6738, 62, 1177, 62, 20786, 796, 42903, 13, 1416, 2001, 727, 13557, 437, 4122, 62, 6738, 62, 1177, 62, 20786, 198, 11748, 42903, 62, 2118, 913, ...
3.644068
118
from torch.autograd import Variable
[ 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 628, 198 ]
3.8
10
from urllib import urlopen, urlencode import md5 import re from unicodedata import normalize from functools import wraps from flask import request, current_app def jsonp(f): """Wraps JSONified output for JSONP""" @wraps(f) return decorated_function # derived from http://flask.pocoo.org/snippets/45/ (pd)...
[ 6738, 2956, 297, 571, 1330, 19016, 9654, 11, 2956, 11925, 8189, 198, 11748, 45243, 20, 198, 11748, 302, 198, 6738, 28000, 9043, 1045, 1330, 3487, 1096, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 42903, 1330, 2581, 11, 1459, 62...
2.554598
348
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-24 13:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import model_utils.fields
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1415, 319, 2864, 12, 2998, 12, 1731, 1511, 25, 1485, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.882353
85
# coding:utf-8 from __future__ import unicode_literals from __future__ import division from __future__ import print_function
[ 2, 19617, 25, 40477, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198 ]
3.676471
34
from setuptools import setup setup(name='AutoTicketsBot', version='0.0.1', description='A python package to automatically reserve tickets on a Chinese ticket selling website.', url='https://github.com/y95847frank/AutomatedTicketBot', author='y95847frank', author_email='y95847@gmail.com', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 27722, 43254, 20630, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 16, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 32, 21015, 5301, 284, 6...
2.233051
236
# Vector2.py - 2D vector utilities. # Created by Josh Kennedy on 17 May 2014 # # Pop a Dots # Copyright 2014 Chad Jensen and Josh Kennedy # Copyright 2015-2016 Sirkles LLC import math
[ 2, 20650, 17, 13, 9078, 532, 362, 35, 15879, 20081, 13, 198, 2, 15622, 416, 8518, 10401, 319, 1596, 1737, 1946, 198, 2, 198, 2, 8099, 257, 360, 1747, 198, 2, 15069, 1946, 19800, 32623, 290, 8518, 10401, 198, 2, 15069, 1853, 12, 53...
3.509434
53
import codecs import os from textx import metamodel_for_language try: import click except ImportError: raise Exception('Missing CLI dependencies. To use WASH from CLI, please run following command:/n' 'pip install wash-lang-prototype[cli]')
[ 11748, 40481, 82, 198, 11748, 28686, 198, 198, 6738, 2420, 87, 1330, 1138, 321, 375, 417, 62, 1640, 62, 16129, 628, 198, 28311, 25, 198, 220, 220, 220, 1330, 3904, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 5298, 35528, 10786, ...
2.904255
94
# coding: utf-8 """Test installation of JupyterLab extensions""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import glob import os import sys from os.path import join as pjoin from unittest import TestCase try: from unittest.mock import patch except ImportE...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 14402, 9988, 286, 449, 929, 88, 353, 17822, 18366, 37811, 198, 198, 2, 15069, 357, 66, 8, 449, 929, 88, 353, 7712, 4816, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 1...
2.766454
471
from datetime import timedelta import numpy as np
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 11748, 299, 32152, 355, 45941, 628, 198 ]
3.714286
14
"""Main library entrypoint.""" import copy import json import io import os import sys import random import numpy as np import tensorflow as tf from tensorflow.python.estimator.util import fn_args from google.protobuf import text_format from opennmt.utils import hooks, checkpoint, misc from opennmt.utils.evaluator ...
[ 37811, 13383, 5888, 5726, 4122, 526, 15931, 198, 198, 11748, 4866, 198, 11748, 33918, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, ...
2.499384
5,685
import unittest import logging # Available test results: class Results(unittest.TestCase): """Test results""" def test_success(self): """success""" def test_fail(self): """fail""" self.assertTrue(False) def test_error(self): """error""" 1 / 0 @unittest....
[ 11748, 555, 715, 395, 198, 11748, 18931, 628, 198, 2, 14898, 1332, 2482, 25, 198, 198, 4871, 15691, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 14402, 2482, 37811, 628, 220, 220, 220, 825, 1332, 62, 13138, 7...
2.409426
679
import torch import torch.nn as nn from torch.nn.modules import dropout from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence # self.dropout = nn.Dropout(p)
[ 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 18170, 1330, 4268, 448, 198, 6738, 28034, 13, 20471, 13, 26791, 13, 81, 20471, 1330, 2353, 62, 79, 29373, 62, 43167, 11, 14841, 62, 34860,...
2.80597
67
# coding: utf-8 """ job.py ~~~~~~ This module implements the main Job api for Viki :license: Apache2, see LICENSE for more details """ import ast import os import subprocess import json import uuid from typing import Any, Dict, Tuple, List, IO, Optional, Union from vikid import fs as filesystem class Job: """...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 21858, 13, 9078, 198, 8728, 4907, 198, 198, 1212, 8265, 23986, 262, 1388, 15768, 40391, 329, 569, 5580, 198, 25, 43085, 25, 24843, 17, 11, 766, 38559, 24290, 329, 517, 3307, 198,...
2.231136
4,824
import os import pkg_resources import sys from astropy.io import fits from bokeh.layouts import gridplot from bokeh.plotting import figure from bokeh.models import Range1d, LinearColorMapper, Label from bokeh.palettes import inferno import numpy as np from . import visibilityPA as vpa def contam(cube,...
[ 11748, 28686, 201, 198, 11748, 279, 10025, 62, 37540, 201, 198, 11748, 25064, 201, 198, 201, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 201, 198, 6738, 1489, 365, 71, 13, 10724, 5269, 1330, 10706, 29487, 201, 198, 6738, 1489, 365, ...
1.762979
8,379
__author__ = 'BrianAguirre' import unittest from hw2_set import OurSet if __name__ == "__main__": test1 = OurSet() test2 = OurSet() unit_test = MySetTest() unit_test.intersection_test(test1, test2) unit_test.union_test(test1,test2)
[ 834, 9800, 834, 796, 705, 24761, 32, 5162, 343, 260, 6, 198, 198, 11748, 555, 715, 395, 198, 6738, 289, 86, 17, 62, 2617, 1330, 3954, 7248, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 133...
2.33945
109
#!/usr/bin/env python # -*- coding: utf-8 -*- """Speech to text using IBM Watson Speech to Text API. Example usage: python stt_ibm.py /path/to/audio/sample.wav Notes: - Default sampling rate is 16 kHz - A localized version of this Watson service is available in Japan, see: http://www.softbank.jp/biz/wats...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 5248, 3055, 284, 2420, 1262, 19764, 14959, 24709, 284, 8255, 7824, 13, 198, 198, 16281, 8748, 25, 198, 220,...
2.483019
1,060
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Jiao Lin # California Institute of Technology # (C) 2007 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.435897
234
from sqlalchemy import create_engine from sqlalchemy import Column, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker # from models import OIDCProofRequest, User # TODO: Extract into ENV Vars DATABASE_URL = "postgresql://OIDC_DB_USER:OIDC_PASSWORD@oidc-server-db:54...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 10903, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 13, 579, ...
2.892405
158
# -*- coding: utf-8 -*- ############################################################################### # # common.py # # Common functionality # ############################################################################### def log(message: str): """log a message (for now just print to stdout)""" print(messa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 198, 2, 2219, 13, 9078, 198, 2, 198, 2, 8070, 11244, 198, 2, 198, 29113, 29113, 7804, 4242, 21017, 628, 198, 4299, 2604, 7, ...
3.12426
169
from django.shortcuts import render from .models import GameDetails,GameClass,Publishers from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.views.generic.detail import DetailView from django.contrib.auth.mixins import LoginRequiredMixin from django.db.models import Q from django.contri...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 764, 27530, 1330, 3776, 24259, 11, 8777, 9487, 11, 46471, 82, 198, 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 31525, 20900, 11, 33523, 9876, 11, 7873, 3673, 2025,...
3.319635
219
import pymongo from pymongo import MongoClient # dbIp = 'localhost'
[ 11748, 279, 4948, 25162, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 198, 2, 20613, 40, 79, 796, 705, 36750, 6, 198 ]
3
23
from enum import EnumMeta
[ 6738, 33829, 1330, 2039, 388, 48526, 628 ]
3.857143
7
""" Base Manager """ # pylint: disable=bare-except,super-init-not-called,no-else-break from __future__ import absolute_import import logging import time import requests from typing import Callable from kankaclient.constants import MAX_ATTEMPTS, GET, PATCH, POST, DELETE, PUT _requests = { GET: requests.get, ...
[ 37811, 198, 14881, 9142, 198, 198, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 49382, 12, 16341, 11, 16668, 12, 15003, 12, 1662, 12, 7174, 11, 3919, 12, 17772, 12, 9032, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 19...
2.380482
912
#! /usr/bin/python # -*- coding: utf-8 -*- from message import Message
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 3275, 1330, 16000, 628 ]
2.517241
29
""" --------------------------- ford_stabilizer_v0_8_1 for Maya --------------------------- v0.8.1 --------------------------- daniel forgacs / ford forgacs.daniel@gmail.com ------------------------------------------------------------------------- help: To add a second eye select...
[ 37811, 198, 220, 220, 220, 220, 22369, 6329, 198, 220, 220, 220, 329, 67, 62, 301, 14991, 7509, 62, 85, 15, 62, 23, 62, 16, 329, 26041, 198, 220, 220, 220, 220, 22369, 6329, 198, 220, 220, 220, 410, 15, 13, 23, 13, 16, 198, 22...
2.295601
1,705
from optparse import OptionParser usage = "usage: compiler.py [options] source" parser = OptionParser(usage) parser.add_option("-v", "--verbose", action="store_true", dest="verbose")
[ 6738, 2172, 29572, 1330, 16018, 46677, 198, 198, 26060, 796, 366, 26060, 25, 17050, 13, 9078, 685, 25811, 60, 2723, 1, 198, 198, 48610, 796, 16018, 46677, 7, 26060, 8, 198, 48610, 13, 2860, 62, 18076, 7203, 12, 85, 1600, 366, 438, 1...
3.245614
57
#!/opt/python27/bin/python import os, sys if __name__ == '__main__': main()
[ 2, 48443, 8738, 14, 29412, 1983, 14, 8800, 14, 29412, 198, 11748, 28686, 11, 25064, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.424242
33
"""Dump the html pages out of .zim; OR print all urls. """ import argparse import os from zim.zimpy_p3 import ZimFile if __name__ == '__main__': main()
[ 37811, 35, 931, 262, 27711, 5468, 503, 286, 764, 89, 320, 26, 6375, 3601, 477, 2956, 7278, 13, 198, 37811, 198, 11748, 1822, 29572, 198, 198, 11748, 28686, 198, 6738, 1976, 320, 13, 89, 320, 9078, 62, 79, 18, 1330, 1168, 320, 8979, ...
2.546875
64
from django.urls import path from .views import ListRoutes, CreateRoute, DetailRoute, EditRoute, DeleteRoute app_name = "routes" urlpatterns = [ path("list/", ListRoutes.as_view(), name="list_routes"), path("create/", CreateRoute.as_view(), name="create_route"), path("detail/<int:pk>", DetailRoute.as_vi...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 7343, 49, 448, 274, 11, 13610, 43401, 11, 42585, 43401, 11, 5312, 43401, 11, 23520, 43401, 628, 198, 1324, 62, 3672, 796, 366, 81, 448, 274, 1, 198, 198...
2.672131
183
import sys import os import json from pathlib import Path from types import SimpleNamespace from enum import Enum from contextlib import redirect_stderr, redirect_stdout from io import StringIO from azure.cli.core import get_default_cli from pyfakefs.fake_filesystem_unittest import Patcher, fake_filesystem from typin...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 220, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 3858, 1330, 17427, 36690, 10223, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 4732, 8019, 1330, 18941, 62, 301, 1082, 81, 11, 18941, ...
2.898678
227
with open("/home/debit/Downloads/rosalind_ini5.txt", 'r') as f: with open("/home/debit/Downloads/rosalind_ini5_resp.txt", 'w') as fw: fw.write(''.join(f.readlines()[1::2]))
[ 4480, 1280, 7203, 14, 11195, 14, 11275, 270, 14, 10002, 82, 14, 4951, 282, 521, 62, 5362, 20, 13, 14116, 1600, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 351, 1280, 7203, 14, 11195, 14, 11275, 270, 14, 10002, 82, 14, 4951, ...
2.078652
89
import docutils.parsers.rst from pygments import highlight from pygments.lexers import get_lexer_by_name, get_all_lexers from pygments.formatters import HtmlFormatter def code_block( name, arguments, options, content, lineno, content_offset, block_text, state, state_machine ): """ The code-block d...
[ 11748, 2205, 26791, 13, 79, 945, 364, 13, 81, 301, 198, 6738, 12972, 11726, 1330, 7238, 198, 6738, 12972, 11726, 13, 2588, 364, 1330, 651, 62, 2588, 263, 62, 1525, 62, 3672, 11, 651, 62, 439, 62, 2588, 364, 198, 6738, 12972, 11726, ...
2.609655
725
import BaseValidator
[ 11748, 7308, 47139, 1352, 198 ]
4.2
5
import os import json from unittest import TestCase from campaign_manager.aws import S3Data import requests from campaign_manager.models.campaign import Campaign
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 1923, 62, 37153, 13, 8356, 1330, 311, 18, 6601, 198, 11748, 7007, 198, 6738, 1923, 62, 37153, 13, 27530, 13, 35012, 1330, 13718, 628 ]
4.179487
39
# Generated by Django 3.2.3 on 2021-06-07 17:27 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 18, 319, 33448, 12, 3312, 12, 2998, 1596, 25, 1983, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from selenium import webdriver from time import sleep driver = webdriver.Chrome(executable_path='/Users/shuvampaul/Downloads/chromedriver') driver.get("https://10fastfingers.com/typing-test/english/") sleep(5) word_list = driver.execute_script("return document.getElementById('wordlist').innerHTML") words = word_list...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 640, 1330, 3993, 198, 198, 26230, 796, 3992, 26230, 13, 1925, 5998, 7, 18558, 18187, 62, 6978, 11639, 14, 14490, 14, 1477, 14795, 696, 2518, 14, 10002, 82, 14, 28663, 276, 38291, 1...
2.858065
155
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. 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 requir...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 2177, 3012, 11419, 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,...
3.190871
723
# -*- coding: utf-8 -*- # from __future__ import unicode_literals import warnings from tipi.repl import Replacement __all__ = ('langs',) class LangsLoader(object): """Dynamically loads replacements for given languages.""" def __getitem__(self, lang): """Returns list of replacements for given lan...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 14601, 198, 198, 6738, 8171, 72, 13, 35666, 1330, 43986, 628, 198, 834, 439, 834, 796,...
2.432024
331
import sqlite3, sys con = sqlite3.connect(':memory:') cur = con.cursor() cur.execute('pragma compile_options;') available_pragmas = cur.fetchall() con.close() print(available_pragmas) if ('ENABLE_FTS5',) in available_pragmas: print('YES') sys.exit(0) else: print('NO') sys.exit(1)
[ 11748, 44161, 578, 18, 11, 25064, 198, 198, 1102, 796, 44161, 578, 18, 13, 8443, 7, 10354, 31673, 25, 11537, 198, 22019, 796, 369, 13, 66, 21471, 3419, 198, 22019, 13, 41049, 10786, 1050, 363, 2611, 17632, 62, 25811, 26, 11537, 198, ...
2.354331
127
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 1853, 383, 309, 22854, 37535, 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, ...
3.979079
239
# pylint: disable=line-too-long, duplicate-code """ base initialization of automation infrastructure - init logger and etc. """ import logging import os import datetime _log = logging.getLogger('sync_tester') log_mode = os.environ.get('DEBUG_LOGS', None) # Define if use debug+ mode logs -> default info+ file_log = o...
[ 2, 279, 2645, 600, 25, 15560, 28, 1370, 12, 18820, 12, 6511, 11, 23418, 12, 8189, 198, 37811, 198, 8692, 37588, 286, 22771, 6884, 532, 2315, 49706, 290, 3503, 13, 198, 37811, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4818, 807...
2.848485
462
# You can write code above the if-main block. if __name__ == "__main__": # You should not modify this part. import argparse parser = argparse.ArgumentParser() parser.add_argument("--training", default="training_data.csv", help="input training data file name") parser.add_argument("--testing", defau...
[ 2, 921, 460, 3551, 2438, 2029, 262, 611, 12, 12417, 2512, 13, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 921, 815, 407, 13096, 428, 636, 13, 198, 220, 220, 220, 1330, 1822, 29572, ...
2.117647
1,649
import sys from pathlib import Path import inspect from typing import Generator, Tuple, Union, List # We have an input tape that lists out the memory in a file # We read it in, and turn it into a list of integers memory: List[int] memory = list( map( int, Path("day2_input.txt").read_text().split(",...
[ 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 10104, 198, 6738, 19720, 1330, 35986, 11, 309, 29291, 11, 4479, 11, 7343, 198, 198, 2, 775, 423, 281, 5128, 9154, 326, 8341, 503, 262, 4088, 287, 257, 2393, 198, 2, 775, ...
3.141109
1,389