content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from dataclasses import dataclass from typing_extensions import Final # Constants ID: Final = "id" NAME: Final = "name" URL_BACKGROUND: Final = "urlbackground" CODE: Final = "code" TYPE: Final = "type" HAS_MEDALS: Final = "hasmedals" LEVEL: Final = "level" NAME_LEVEL: Final = "namelevel" PROGRESSION: Final = "progres...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 19720, 62, 2302, 5736, 1330, 8125, 198, 198, 2, 4757, 1187, 198, 2389, 25, 8125, 796, 366, 312, 1, 198, 20608, 25, 8125, 796, 366, 3672, 1, 198, 21886, 62, 31098, 46025...
2.793651
126
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2017 Anler Hernández ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 1946, 12, 5539, 843, 4364, 3738, 2724, 71, 1279, 8461, 37686, 31, 8461, 37686, 13, 27305, 29, 198, 2, 15069, 357, 34, 8, 1946, 12, 5539, 4804, ...
3.397188
569
import os import sys import random import math import re import time import numpy as np import tensorflow as tf import matplotlib import matplotlib.pyplot as plt import matplotlib.patches as patches import shutil import glob import os.path as osp # Root directory of the project ROOT_DIR = os.path.abspa...
[ 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 4738, 201, 198, 11748, 10688, 201, 198, 11748, 302, 201, 198, 11748, 640, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 11192, 273, 11125, 355, 48700, 201, 198, 11748, 2...
2.552885
1,664
# Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ # FUNDAMENTALS STRINGS HASHES DATA STRUCTURES import unittest import allure from utils.log_func import print_log from kyu_6.count_letters_in_string.count_letters_in_string import letter_count @allu...
[ 2, 220, 15622, 416, 412, 7053, 509, 455, 272, 13, 198, 2, 220, 21722, 25, 3740, 1378, 12567, 13, 785, 14, 1134, 455, 272, 198, 2, 220, 27133, 25, 3740, 1378, 2503, 13, 25614, 259, 13, 785, 14, 259, 14, 1533, 273, 12, 74, 455, ...
2.028159
1,456
import torch from functools import wraps @wraps(torch._nested_tensor) # TODO: This entire class is not really necessary now that NestedTensor lives # in tree; before it lived out of tree and there was no way to conveniently # override the string printing behavior. Now that we are in tree, we can # directly overrid...
[ 11748, 28034, 198, 6738, 1257, 310, 10141, 1330, 27521, 628, 198, 31, 29988, 862, 7, 13165, 354, 13557, 77, 7287, 62, 83, 22854, 8, 628, 198, 2, 16926, 46, 25, 770, 2104, 1398, 318, 407, 1107, 3306, 783, 326, 399, 7287, 51, 22854, ...
3.696
125
# coding=utf-8 """ stop.py divia_api is a Python library that allows to retrieve the timetable of Divia’s bus and tramways straight from a Python script. Copyright (C) 2021 Firmin Launay This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publ...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 198, 11338, 13, 9078, 198, 198, 7146, 544, 62, 15042, 318, 257, 11361, 5888, 326, 3578, 284, 19818, 262, 40021, 198, 1659, 4777, 544, 447, 247, 82, 1323, 290, 29957, 1322, 3892, 422, 257...
3.679688
256
import functools from abc import ABC, abstractmethod from dataclasses import dataclass, field import pika import ujson from django.conf import settings from typing import Callable, Any, Optional, List """ BB = Bitrix24 Bridge """ def get_var(name) -> Callable[[], Optional[Any]]: """ Safe wraper over setting...
[ 11748, 1257, 310, 10141, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 198, 11748, 279, 9232, 198, 11748, 334, 17752, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460...
3.092486
173
import os import sys import warnings import unittest try: from setuptools import setup except ImportError: from distutils.core import setup from setuptools.command.test import test as TestCommand """ https://packaging.python.org/guides/making-a-pypi-friendly-readme/ check the README.rst works on pypi as th...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 14601, 198, 11748, 555, 715, 395, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 1233, 26791, 13, 7295, ...
2.379186
1,105
import json import os from os import listdir from os.path import isfile, join SCRIPT_BUCKET = 'mybucket' SCRIPT_FOLDER = 'artifacts' # Copy Glue script files to S3 bucket script_path = 'artifacts' #my_bucket = s3.Bucket(SCRIPT_BUCKET) for path, subdirs, files in os.walk(script_path): path = path.replace("\\","/") ...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 198, 6173, 46023, 62, 33, 16696, 2767, 796, 705, 1820, 27041, 316, 6, 198, 6173, 46023, 62, 37, 3535, 14...
2.705521
163
# Sekvencia DNA sa skladá zo štyroch typov nukleových báz (A, C, G, T). Relatívna početnosť bázy vyjadruje, aká časť sekvencie je tvorená daným typom bázy (počet výskytov bázy / dĺžka sekvencie). Súčet relatívnej početnosti je teda vždy rovna 1. # Napíšte definíciu funkcie funkcia3, ktorá zoberie ako parameter sekvenci...
[ 2, 37558, 574, 33743, 7446, 473, 1341, 9435, 6557, 40565, 25370, 94, 774, 305, 354, 2170, 709, 299, 2724, 293, 709, 127, 121, 354, 275, 6557, 89, 357, 32, 11, 327, 11, 402, 11, 309, 737, 4718, 265, 8836, 85, 2616, 745, 46195, 316,...
1.87037
702
L = ['apples', 'oranges', 'kiwis', 'pineapples'] print(stdDevOfLengths(L))
[ 198, 43, 796, 37250, 1324, 829, 3256, 705, 273, 6231, 3256, 705, 4106, 86, 271, 3256, 705, 23908, 1324, 829, 20520, 198, 4798, 7, 19282, 13603, 5189, 24539, 82, 7, 43, 4008 ]
2.34375
32
""" History: (file) logging for nuqql conversations """ import datetime import logging import pathlib import os from typing import List, Optional, TYPE_CHECKING import nuqql.config from .logmessage import LogMessage if TYPE_CHECKING: # imports for typing # pylint: disable=cyclic-import from .conversation ...
[ 37811, 198, 18122, 25, 357, 7753, 8, 18931, 329, 14364, 80, 13976, 10275, 198, 37811, 198, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 3108, 8019, 198, 11748, 28686, 198, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 41876, 62...
2.057971
4,416
#!/usr/bin/python -t # 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 version. # # This program is distributed in the hope that it...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 532, 83, 198, 2, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 13789, 355, 3199, 416, 198, 2, 262, ...
3.102258
753
import os import time import re import bisect from collections import OrderedDict import numpy as np import tensorflow as tf import scipy.ndimage import scipy.misc import config import misc import tfutil import train import dataset #---------------------------------------------------------------------------- # Genera...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 302, 198, 11748, 47457, 478, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 629, 541, 88, 13, 358, 9060...
4.914894
188
import gin import torch @gin.configurable def pow_loss(X, X_true, power=2, **kwargs): """Difference between items to a power, avg over dataset, sum over items.""" assert X.shape == X_true.shape, (X.shape, X_true.shape) abs_diff = torch.abs(X - X_true) loss = torch.pow(abs_diff, power) # ...
[ 11748, 39733, 201, 198, 11748, 28034, 201, 198, 201, 198, 31, 1655, 13, 11250, 11970, 201, 198, 4299, 7182, 62, 22462, 7, 55, 11, 1395, 62, 7942, 11, 1176, 28, 17, 11, 12429, 46265, 22046, 2599, 201, 198, 220, 220, 220, 37227, 28813...
2.359431
281
# Generated by Django 3.0.6 on 2020-05-22 15:31 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 2713, 12, 1828, 1315, 25, 3132, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
""" Basel IV Standardised Approach to Credit Risk.py (b4sacr.py) ---------------- This package encapsulates the Basel Committee on Bank Supervision's finalisation of Basel III for standardised credit risk. The text is found at https://www.bis.org/bcbs/publ/d424.htm This will serve as the foundation of any Basel 4 impa...
[ 37811, 198, 15522, 417, 8363, 8997, 1417, 38066, 284, 10504, 19602, 13, 9078, 357, 65, 19, 30584, 81, 13, 9078, 8, 198, 1783, 198, 1212, 5301, 32652, 15968, 262, 6455, 417, 4606, 319, 5018, 3115, 10178, 338, 2457, 5612, 286, 6455, 417...
3.676815
427
#!/usr/bin/env python """ Copyright 2010-2019 University Of Southern California 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 appli...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 15269, 3050, 12, 23344, 2059, 3226, 8050, 3442, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 7...
2.24922
3,844
from .abstract_is_admin import AbstractIsAdmin from .abstract_is_examiner import AbstractIsExaminer from .abstract_is_candidate import AbstractIsCandidate from .basenode import BaseNode from .subject import Subject from .period import Period, PeriodApplicationKeyValue from .period_tag import PeriodTag from .relateduser...
[ 6738, 764, 397, 8709, 62, 271, 62, 28482, 1330, 27741, 3792, 46787, 198, 6738, 764, 397, 8709, 62, 271, 62, 1069, 32086, 1330, 27741, 3792, 3109, 32086, 198, 6738, 764, 397, 8709, 62, 271, 62, 46188, 20540, 1330, 27741, 3792, 41572, 2...
3.484663
489
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------------...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 10097, 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, ...
3.799197
249
from .base import GnuRecipe
[ 6738, 764, 8692, 1330, 18509, 84, 37523, 628 ]
3.625
8
from bitstring import Bits from baseconvert import base from src.funcionalidades import Funcionalidad
[ 6738, 1643, 8841, 1330, 44733, 198, 6738, 2779, 1102, 1851, 1330, 2779, 198, 6738, 12351, 13, 20786, 1538, 312, 2367, 1330, 11138, 66, 1538, 32482, 628, 628, 628, 198 ]
3.724138
29
import Bot # This is the local Python Module that we made # Initialization bot_1 = Bot.Bot("ya boi", "just got bamboozled", "Bot_1") # Find Functionality find_input = { "function_name": "One_Stock", "parameters": [ "FIS" ] } find_output = bot_1.Find(find_input) # Finance Functionality finance_inp...
[ 11748, 18579, 1303, 770, 318, 262, 1957, 11361, 19937, 326, 356, 925, 198, 198, 2, 20768, 1634, 198, 13645, 62, 16, 796, 18579, 13, 20630, 7203, 3972, 1489, 72, 1600, 366, 3137, 1392, 275, 22651, 8590, 992, 1600, 366, 20630, 62, 16, ...
2.906375
502
from pathlib import Path import pytest @pytest.fixture
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602 ]
3.294118
17
#!/usr/bin/env python2.7 import numpy as np import sys import cv2 import tf import pdb import yaml import rosbag import rospy from sensor_msgs.msg import Image from nav_msgs.msg import Odometry from message_filters import ApproximateTimeSynchronizer, Subscriber from cv_bridge import CvBridge from apriltag_tracker._Ap...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 48700, 198, 11748, 279, 9945, 198, 11748, 331, 43695, 198, 198, 11748, 686, 82, 21454...
2.295151
1,196
import os import configparser from .client import RestAPI from .lib.server import Server from .lib.server_group import ServerGroup from .lib.volume import Volume from .lib.flavor import Flavor from .lib.floating_ip import FloatingIp from .lib.image import Image from .lib.region import Region from .lib.network import Ne...
[ 11748, 28686, 198, 11748, 4566, 48610, 198, 6738, 764, 16366, 1330, 8324, 17614, 198, 6738, 764, 8019, 13, 15388, 1330, 9652, 198, 6738, 764, 8019, 13, 15388, 62, 8094, 1330, 9652, 13247, 198, 6738, 764, 8019, 13, 29048, 1330, 14701, 19...
3.290155
193
from unittest.mock import patch from requests.exceptions import ConnectionError from zulip_bots.test_lib import BotTestCase, DefaultTests, StubBotHandler from zulip_bots.bots.google_translate.google_translate import TranslateError help_text = ''' Google translate bot Please format your message like: `@-mention "<text...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 6738, 7007, 13, 1069, 11755, 1330, 26923, 12331, 198, 198, 6738, 1976, 377, 541, 62, 42478, 13, 9288, 62, 8019, 1330, 18579, 14402, 20448, 11, 15161, 51, 3558, 11, 41135, 20630, 25060...
3.35
140
class Opp(object): """docstring for MC"""
[ 4871, 9385, 7, 15252, 2599, 198, 197, 37811, 15390, 8841, 329, 13122, 37811, 198, 197, 197, 198, 197 ]
2.611111
18
import pandas as pd from sqlalchemy import create_engine, exc from load_transform import extract_from_mongodb, extract_data_from_json from bert_model import load_bert_model, sentiment_prediction from logo_detection_model import logo_detection import time import logging from config import POSTGRES, TAG # Pos...
[ 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 2859, 201, 198, 6738, 3440, 62, 35636, 1330, 7925, 62, 6738, 62, 31059, 375, 65, 11, 7925, 62, 7890, 62, 6738, 62, 17752, 201, 198, 6738,...
2.422489
916
from CanonizerBase import Page from Identifiers import HelpIdentifiers
[ 6738, 19507, 7509, 14881, 1330, 7873, 198, 6738, 11440, 13350, 1330, 10478, 33234, 13350, 628, 628, 198 ]
4.411765
17
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-01-05 02:27 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, 1157, 13, 1959, 319, 33448, 12, 486, 12, 2713, 7816, 25, 1983, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.754386
57
# -*- coding: utf-8 -*- from mock import patch, MagicMock import os import six import shutil import sys import testtools from doc8.main import main, doc8 # Location to create test files TMPFS_DIR_NAME = ".tmp" # Expected output OUTPUT_CMD_NO_QUIET = """\ Scanning... Validating... {path}/invalid.rst:1: D002 Trailin...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 15290, 1330, 8529, 11, 6139, 44, 735, 198, 11748, 28686, 198, 11748, 2237, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 1332, 31391, 198, 198, 6738, ...
2.738617
1,186
from .models import Brand,Size,BrandColor,Category,Master_Page from django import forms from django import forms
[ 6738, 764, 27530, 1330, 13512, 11, 10699, 11, 38416, 10258, 11, 27313, 11, 18254, 62, 9876, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 1330, 5107, 628, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220...
2.869565
46
# Copyright 2019 NREL # 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 distribu...
[ 2, 15069, 13130, 399, 16448, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 779, 198, 2, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 257, 4866, ...
2.149533
2,461
#!/usr/bin/python3 import sys, getopt import plistlib from optparse import OptionParser from sys import version_info if __name__ == "__main__": main(sys.argv[1:])
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 11, 651, 8738, 198, 11748, 458, 396, 8019, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 6738, 25064, 1330, 2196, 62, 10951, 628, 628, 628, 198, 361, 11593, 3672, 83...
2.761905
63
import torch import numpy as np from deep_privacy import torch_utils from deep_privacy.visualization import utils as vis_utils import os from deep_privacy.inference import infer from deep_privacy.data_tools.dataloaders import load_dataset_files, cut_bounding_box import matplotlib.pyplot as plt if __name__ == "__main_...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2769, 62, 13776, 1590, 1330, 28034, 62, 26791, 198, 6738, 2769, 62, 13776, 1590, 13, 41464, 1634, 1330, 3384, 4487, 355, 1490, 62, 26791, 198, 11748, 28686, 198, 6738, 2769, 6...
2.098958
1,152
import os inputfile = "c:\ip.txt" inputfile='c:\column.bmp' outputfile = 'c:\ip_result.txt' outputfile2 = 'c:\ip_result2.txt' import sys if __name__ == '__main__': if (len(sys.argv)) != 2: print 'Input filepath' exit(1) f_input = sys.argv[1] print f_input travsedir(f_input)
[ 11748, 28686, 201, 198, 15414, 7753, 796, 366, 66, 7479, 541, 13, 14116, 1, 201, 198, 15414, 7753, 11639, 66, 7479, 28665, 13, 65, 3149, 6, 201, 198, 22915, 7753, 796, 705, 66, 7479, 541, 62, 20274, 13, 14116, 6, 201, 198, 22915, ...
2.054054
148
import json import os from json import JSONDecodeError import magic import requests from PyPDF2 import PdfFileReader from django.http import Http404 from config.configuration import django_backend_service_api_url, verify_certificate from eatb.utils.fileutils import read_file_content, find_files from util.djangoutils ...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 33918, 1330, 19449, 10707, 1098, 12331, 198, 198, 11748, 5536, 198, 11748, 7007, 198, 6738, 9485, 20456, 17, 1330, 350, 7568, 8979, 33634, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26...
3.441176
102
import os import matplotlib.pyplot as plt import matplotlib import pandas as pd import numpy as np import logging import sys from sklearn.metrics import mean_absolute_error import seaborn from .common import INSOLES_FILE_NAME, LABELS_FILE_NAME seaborn.set() matplotlib.rcParams['text.latex.preamble'] = [r'\usepackage...
[ 11748, 28686, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 1...
2.555556
225
# Copyright 2021 The FACEGOOD 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 la...
[ 2, 15069, 33448, 383, 44216, 7156, 22808, 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...
1.857055
4,876
""" Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. """ # Time Complexity O(min(N,M)) # where N and M are the number of nodes for the trees. # Space Complexity O(min(height1, heig...
[ 37811, 198, 15056, 734, 13934, 7150, 11, 3551, 257, 2163, 284, 2198, 198, 361, 484, 389, 4961, 393, 407, 13, 198, 198, 7571, 13934, 7150, 389, 3177, 4961, 611, 484, 389, 198, 7249, 20221, 10411, 290, 262, 13760, 423, 262, 976, 1988, ...
3.605505
109
from flask import Flask, render_template, jsonify, send_file import random, json, base64, os # import my_utils as utils import opt_db # 获取server.py当前路径,以及父路径、祖父路径 current_dir = os.path.dirname(__file__) parent_dir = os.path.dirname(current_dir) # 获得current_dir所在的目录, grandparent_dir = os.path.dirname(parent_dir) prin...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 33918, 1958, 11, 3758, 62, 7753, 198, 11748, 4738, 11, 33918, 11, 2779, 2414, 11, 28686, 198, 2, 1330, 616, 62, 26791, 355, 3384, 4487, 198, 11748, 2172, 62, 9945, 628, 198, 2, 5525...
1.870763
944
########################################################################## # NSAp - Copyright (C) CEA, 2016 # Distributed under the terms of the CeCILL-B license, as published by # the CEA-CNRS-INRIA. Refer to the LICENSE file or to # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html # for details. ##########...
[ 29113, 29113, 7804, 2235, 198, 2, 10551, 79, 532, 15069, 357, 34, 8, 327, 16412, 11, 1584, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 20101, 34, 8267, 12, 33, 5964, 11, 355, 3199, 416, 198, 2, 262, 327, 16412, 12, 34, 41256, ...
2.15657
3,219
import json from os.path import abspath, dirname import discord import os from discord.ext import commands from discord.ext.commands import Bot from cogs.Utils import Utils with open(dirname(abspath(__file__)) + '/data/locales.json') as f: locales = json.load(f) with open(dirname(abspath(__file__)) + '/data/co...
[ 11748, 33918, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 11, 26672, 3672, 198, 198, 11748, 36446, 198, 11748, 28686, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 18579, 198, 198, 6738, 269...
2.764398
191
''' Copyright (c) 2019 Aria-K-Alethia@github.com Description: embedding class supporting multiple features and customized merge method Licence: MIT THE USER OF THIS CODE AGREES TO ASSUME ALL LIABILITY FOR THE USE OF THIS CODE. Any use of this code should display all the info above. ''' import ...
[ 7061, 6, 197, 201, 198, 197, 15269, 357, 66, 8, 13130, 6069, 64, 12, 42, 12, 37474, 31079, 31, 12567, 13, 785, 201, 198, 197, 201, 198, 197, 11828, 25, 201, 198, 197, 197, 20521, 12083, 1398, 6493, 3294, 3033, 201, 198, 197, 197, ...
2.416409
646
# Generated by Django 2.2 on 2019-06-06 09:02 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 13130, 12, 3312, 12, 3312, 7769, 25, 2999, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, ...
3.1
50
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc from scipy.ndimage import gaussian_filter import numpy as np class CropDiagonal(AffinityRefinementOperation): """Crop the diagonal. Replace diagonal element by the max value of row. W...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 450, 66, 198, 6738, 629, 541, 88, 13, 358, 9060, 1330, 31986, 31562, 62, 24...
3.504098
244
""" analyze EEG data Created by Dirk van Moorselaar on 10-03-2015. Copyright (c) 2015 DvM. All rights reserved. """ import mne import os import logging import itertools import pickle import copy import glob import sys import time import itertools import numpy as np import scipy as sp import pandas as pd import seabo...
[ 37811, 198, 38200, 2736, 48749, 1366, 198, 198, 41972, 416, 42761, 5719, 31451, 741, 64, 283, 319, 838, 12, 3070, 12, 4626, 13, 198, 15269, 357, 66, 8, 1853, 360, 85, 44, 13, 1439, 2489, 10395, 13, 198, 37811, 198, 198, 11748, 285, ...
2.192681
29,157
import FWCore.ParameterSet.Config as cms process = cms.Process("FedCablingBuilder") process.MessageLogger = cms.Service("MessageLogger", debugModules = cms.untracked.vstring(''), cablingBuilder = cms.untracked.PSet( threshold = cms.untracked.string('INFO') ), destinations = cms.untracked.vstri...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 14681, 796, 269, 907, 13, 18709, 7203, 42268, 34, 11716, 32875, 4943, 198, 198, 14681, 13, 12837, 11187, 1362, 796, 269, 907, 13, 16177, 7203, 12837, 11187, 1362,...
2.085189
1,033
import os import mobase from ..basic_features import BasicGameSaveGameInfo from ..basic_game import BasicGame
[ 11748, 28686, 201, 198, 201, 198, 11748, 7251, 589, 201, 198, 201, 198, 6738, 11485, 35487, 62, 40890, 1330, 14392, 8777, 16928, 8777, 12360, 201, 198, 6738, 11485, 35487, 62, 6057, 1330, 14392, 8777, 201, 198, 201, 198 ]
3.157895
38
#! /usr/bin/python # -*- coding: utf-8 -*- # Simple Python OpenSCAD Code Generator # Copyright (C) 2009 Philipp Tiefenbacher <wizards23@gmail.com> # Amendments & additions, (C) 2011 Evan Jones <evan_t_jones@mac.com> # # License: LGPL 2.1 or later # import os, sys, re import inspect openscad_builtins =...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 220, 220, 220, 17427, 11361, 4946, 6173, 2885, 6127, 35986, 198, 2, 220, 220, 220, 15069, 357, 34, 8, 3717, 220,...
2.242505
4,136
from contextlib import contextmanager import datetime import unittest import diagnose from diagnose import probes diagnose.manager.instrument_classes.setdefault( "test", diagnose.instruments.ProbeTestInstrument )
[ 6738, 4732, 8019, 1330, 4732, 37153, 198, 11748, 4818, 8079, 198, 11748, 555, 715, 395, 198, 198, 11748, 37489, 198, 6738, 37489, 1330, 33124, 198, 198, 47356, 577, 13, 37153, 13, 259, 43872, 62, 37724, 13, 2617, 12286, 7, 198, 220, 2...
3.666667
60
from django.conf.urls import url, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns = [ url(r'^blog/', include('blogtools.tests.test_blog.urls', app_name='blogtools', namespace='test_blog')), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 12708, 16624, 13, 6371, 82, 1330, 9037, 16624, 62, 6371, 33279, 82, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, ...
2.890244
82
# Generated by Django 2.0 on 2019-12-09 08:54 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 319, 13130, 12, 1065, 12, 2931, 8487, 25, 4051, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
import numpy as np from sklearn.metrics import fbeta_score from keras import backend as K def FScore2(y_true, y_pred): ''' The F score, beta=2 ''' B2 = K.variable(4) OnePlusB2 = K.variable(5) pred = K.round(y_pred) tp = K.sum(K.cast(K.less(K.abs(pred - K.clip(y_true, .5, 1.)), 0.01), 'floa...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 277, 31361, 62, 26675, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 198, 198, 4299, 376, 26595, 17, 7, 88, 62, 7942, 11, 331, 62, 28764, 2599, 198, ...
2.018382
272
import json from django.conf import settings from rest_framework import status from rest_framework.response import Response from iiif_api_services.models.QueueModel import Queue from iiif_api_services.models.ActivityModel import Activity if settings.QUEUE_RUNNER=="THREAD": from threading import Thread as Runner els...
[ 11748, 33918, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 21065, 361, 62, 15042, 62, 30416, 13, 27530, 13, 34991, 17633, 1330, 46...
3.373913
115
import stat from os import stat as os_stat from os.path import join, exists from tempfile import TemporaryDirectory import pytest from jinja2 import UndefinedError, TemplateSyntaxError from mlvtools.exception import MlVToolException from mlvtools.helper import extract_type, to_dvc_meta_filename, to_instructions_list,...
[ 11748, 1185, 198, 6738, 28686, 1330, 1185, 355, 28686, 62, 14269, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 7160, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 198, 11748, 12972, 9288, 198, 6738, 474, 259, 6592, 17, 1330, 13794, 18...
2.562136
3,259
import os import json import time import datetime import tablo from lib import backgroundthread from .util import logger SAVE_VERSION = 1 INTERVAL_HOURS = 2 INTERVAL_TIMEDELTA = datetime.timedelta(hours=INTERVAL_HOURS) PENDING_UPDATE = {}
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 198, 11748, 7400, 5439, 198, 198, 6738, 9195, 1330, 4469, 16663, 198, 6738, 764, 22602, 1330, 49706, 198, 198, 4090, 6089, 62, 43717, 796, 352, 198, 41358, 2...
3
82
#!/usr/bin/env python import argparse import csv from pyplot_helper import barchart from matplotlib import pyplot from palettable.colorbrewer.qualitative import Paired_12 as Colors parser = argparse.ArgumentParser(description='Plot benchmark results.') parser.add_argument('--inputs', type=str, required=True, nargs=...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 198, 6738, 12972, 29487, 62, 2978, 525, 1330, 275, 998, 433, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 198, 198, 6738, 6340, 3087...
2.235071
1,842
# -*- coding: utf-8 -*- # # Copyright 2019 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, 13130, 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...
2.822624
2,599
import numpy as np import pyamg #the function must be called solve and take (A,b) as inputs
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 321, 70, 198, 198, 2, 1169, 2163, 1276, 307, 1444, 8494, 290, 1011, 357, 32, 11, 65, 8, 355, 17311, 198 ]
3.133333
30
#!/usr/bin/env python # coding=utf-8 """ This is a script for downloading and converting the pascal voc 2012 dataset and the berkely extended version. # original PASCAL VOC 2012 # wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar # 2 GB # berkeley augmented Pascal VOC # w...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 1212, 318, 257, 4226, 329, 22023, 290, 23202, 262, 279, 27747, 12776, 2321, 27039, 198, 392, 262, 18157, 365, 306, 7083, 2196, 13, 628, ...
3.096033
479
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198 ]
3.625
8
import matplotlib.pyplot as plt import numpy as np import pandas as pd def load_CHEMorPO(station, inputDir, CHEMorPO="CHEM", fromSource=True): """ Import the concentration file into a DataFrame Parameters ---------- stationName: str, the name of the station inputDir: str, the path of file ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 3440, 62, 3398, 3620, 273, 16402, 7, 17529, 11, 5128, 35277, 11, 5870, 3620, 273, 16402...
2.096708
1,458
import datetime import numpy as np import pandas as pd import pymc3 as pm import scipy import scipy.stats from bb_utils.ids import BeesbookID from bb_utils.meta import BeeMetaInfo
[ 11748, 4818, 8079, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 279, 4948, 66, 18, 355, 9114, 198, 11748, 629, 541, 88, 198, 11748, 629, 541, 88, 13, 34242, 198, 198, 6738, 275, 65, 62, ...
2.904762
63
import spatialHeterogeneity as sh import pickle as pk import os import matplotlib.pyplot as plt hdf = '/Users/art/Documents/spatial-omics/spatialOmics.hdf5' f = '/Users/art/Documents/spatial-omics/spatialOmics.pkl' # so = SpatialOmics.form_h5py(f) with open(f, 'rb') as f: so = pk.load(f) # with open(f, 'wb') as f...
[ 11748, 21739, 39, 2357, 37477, 355, 427, 198, 11748, 2298, 293, 355, 279, 74, 198, 11748, 28686, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 71, 7568, 796, 31051, 14490, 14, 433, 14, 38354, 14, 2777, 34961,...
2.238897
653
import importA my_drive = importA.HasConstants(importA.HasConstants.DRIVE)
[ 11748, 1330, 32, 198, 198, 1820, 62, 19472, 796, 1330, 32, 13, 19242, 34184, 1187, 7, 11748, 32, 13, 19242, 34184, 1187, 13, 7707, 9306, 8, 198 ]
2.814815
27
# Copyright 2007-2009 by Peter Cock. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. import os import unittest from Bio import SeqIO from Bio.Alphabet import single_letter_alph...
[ 2, 15069, 4343, 12, 10531, 416, 5613, 23769, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 2438, 318, 636, 286, 262, 8436, 404, 7535, 6082, 290, 21825, 416, 663, 198, 2, 5964, 13, 220, 4222, 766, 262, 38559, 24290, 2393, 326, 815, ...
2.959514
247
import numpy as np import matplotlib.pyplot as plt import pandas as pd from context import bbfsa #read csv file spectra = pd.read_csv('./tests/workflow/input/700cow.csv', delimiter=',', names= ['wn', 'ab']) # cristallinity index s = bbfsa.slice(spectra,700,400) #slice for baseline b = bbfsa.baseline(s) #baseline ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 4732, 1330, 275, 65, 9501, 64, 198, 198, 2, 961, 269, 21370, 2393, 198, 4443, 430, 79...
2.217009
341
from typing import Callable, Optional, Union from dataclasses import dataclass import hashlib import hodgepodge.types from hodgepodge.serialization import Serializable DEFAULT_FILE_IO_BLOCK_SIZE = 8192 MD5 = 'md5' SHA1 = 'sha1' SHA256 = 'sha256' SHA512 = 'sha512' HASH_ALGORITHMS = [MD5, SHA1, SHA256, SHA512] @dat...
[ 6738, 19720, 1330, 4889, 540, 11, 32233, 11, 4479, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 11748, 12234, 8019, 198, 11748, 289, 9728, 79, 9728, 13, 19199, 198, 6738, 289, 9728, 79, 9728, 13, 46911, 1634, 1330, 2...
2.57931
145
#!/usr/bin/env python3 # Web client, html parsing import aiohttp from lxml import html from bs4 import BeautifulSoup as BS # Web driver, browser/network interaction from seleniumwire import webdriver from selenium.webdriver.firefox.options import Options # Downloading, compressing images from PIL import Image impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 5313, 5456, 11, 27711, 32096, 198, 11748, 257, 952, 4023, 198, 6738, 300, 19875, 1330, 27711, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 24218, 198, 198, 2, 531...
2.208804
5,043
import zmq from getpass import getpass if __name__ == '__main__': main()
[ 11748, 1976, 76, 80, 198, 6738, 651, 6603, 1330, 651, 6603, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.6
30
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Ke Sun (sunk@mail.ustc.edu.cn) # ------------------------------------------------------------------------------ from __future__ import absolute_import from __...
[ 2, 16529, 26171, 201, 198, 2, 15069, 357, 66, 8, 5413, 201, 198, 2, 49962, 739, 262, 17168, 13789, 13, 201, 198, 2, 22503, 416, 3873, 3825, 357, 82, 2954, 31, 4529, 13, 436, 66, 13, 15532, 13, 31522, 8, 201, 198, 2, 16529, 26171...
2.256952
899
# coding=utf-8 """Given the multifuture trajectory output, compute NLL""" import argparse import os import pickle import numpy as np from tqdm import tqdm parser = argparse.ArgumentParser() parser.add_argument("gt_path") parser.add_argument("prediction_file") parser.add_argument("--scene_h", type=int, default=18) pa...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 15056, 262, 43543, 1832, 22942, 5072, 11, 24061, 399, 3069, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 256,...
2.229493
1,085
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' vi $HOME/.LoginAccount.txt [mailClient] host = smtp.qq.com port = 25 user = *** pass = *** fr = xxxxxx@qq.com to = xxxxxx@gmail.com debuglevel = True login = False starttls = False ''' __all__ = ['get_smtp_client', 'sendmail'] import os, sys from ConfigParser import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 8903, 720, 39069, 11757, 47790, 30116, 13, 14116, 198, 58, 4529, 11792, 60, 198, 4774, 796, 895, 3...
2.49375
480
import re import struct from django import forms from django.core.validators import RegexValidator from django.db import models, connection from django.utils import six from django.utils.translation import ugettext_lazy as _ __all__ = ["HexadecimalField", "HexIntegerField"] hex_re = re.compile(r"^[0-9A-f]+$") postg...
[ 11748, 302, 198, 11748, 2878, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 797, 25636, 47139, 1352, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 4637, 198, 6738, 42625, 14208, 13, ...
2.779116
498
import os import sys input = sys.argv[1] output = sys.argv[2] f1 = open(input, 'r') f2 = open('temp.txt', 'w') start = 0 for line in f1: start += 1 if start < 3: f2.write(line) continue parts = line.split() if float(parts[2]) > 1e-3: f2.write(line) f1.close() f2.close() command...
[ 11748, 28686, 198, 11748, 25064, 198, 15414, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 22915, 796, 25064, 13, 853, 85, 58, 17, 60, 198, 198, 69, 16, 796, 1280, 7, 15414, 11, 705, 81, 11537, 198, 69, 17, 796, 1280, 10786, 29510, ...
2.161616
198
import jax.numpy as jnp import jaxlib from arraytainers import Jaxtainer from main_tests.test_class import ArraytainerTests
[ 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 201, 198, 11748, 474, 897, 8019, 201, 198, 6738, 7177, 3153, 364, 1330, 13790, 742, 10613, 201, 198, 6738, 1388, 62, 41989, 13, 9288, 62, 4871, 1330, 15690, 3153, 263, 51, 3558, 201 ]
3.02381
42
# -*- coding: utf-8 -*- # Function to evaluate Post Fix expression #Calculation function for different opeartors #Printing the Menu print "" print "" print "" print "" menu = {} menu['1']="What are infix postfix and prefix notations?" menu['2']="Infix to Postfix Expression Conversion" menu['3']="E...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 198, 2, 15553, 284, 13446, 2947, 13268, 5408, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 9771, 14902, 2163, 329, 1180, 267, 431, 433, 669, 198, 2...
2.315441
1,360
import argparse import numpy as np import os import pandas as pd import time import torch from data import ( eval_collate_fn, EvalDataset, TrainCollator, TrainDataset, ) from evaluate import predict, make_word_outputs_final from transformers import ( AdamW, AutoConfig, AutoModelWithLMHead, ...
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 640, 198, 11748, 28034, 198, 198, 6738, 1366, 1330, 357, 198, 220, 220, 220, 5418, 62, 26000, 378, 62, 22184, ...
2.163896
3,008
import modules.open_file as of # read in the file downloaded from the run archive, in this partcular case https://www.ncbi.nlm.nih.gov/Traces/study/?query_key=1&WebEnv=MCID_6178e8ee92f0234b8354c36f&o=acc_s%3Aa (may not be functional) # SraRunTable.txt # Contains Metadata for all samples # check for each l...
[ 11748, 13103, 13, 9654, 62, 7753, 355, 286, 628, 198, 2, 1100, 287, 262, 2393, 15680, 422, 262, 1057, 15424, 11, 287, 428, 636, 10440, 1339, 3740, 1378, 2503, 13, 10782, 8482, 13, 21283, 76, 13, 37373, 13, 9567, 14, 2898, 2114, 14, ...
3.243077
325
from jsonobject import JsonObject, StringProperty from taxjar.data.iterable import TaxJarIterable
[ 6738, 33918, 15252, 1330, 449, 1559, 10267, 11, 10903, 21746, 198, 6738, 1687, 9491, 13, 7890, 13, 2676, 540, 1330, 9241, 47511, 29993, 540, 198 ]
3.92
25
from api.models import ClassTypeEnum from api.parser.registrar import Registrar
[ 6738, 40391, 13, 27530, 1330, 5016, 6030, 4834, 388, 198, 6738, 40391, 13, 48610, 13, 2301, 396, 20040, 1330, 46439 ]
3.95
20
from flask import render_template from flask_assets import Environment, Bundle from flask_compress import Compress from factory import create_app app = create_app(__name__) app.config.from_object("config.DevelopmentConfig") assets = Environment(app) Compress(app) testing_site = app.config["TESTING_SITE"] app.jinj...
[ 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 62, 19668, 1330, 9344, 11, 25282, 198, 6738, 42903, 62, 5589, 601, 1330, 3082, 601, 198, 6738, 8860, 1330, 2251, 62, 1324, 198, 198, 1324, 796, 2251, 62, 1324, 7, 834, 3672, 834, ...
2.245556
900
################################################################################ ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public ## License as published by the Free Software Foundation; either ## version 2.1 of the License, or (at your op...
[ 29113, 29113, 14468, 198, 2235, 198, 2235, 770, 5888, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2235, 13096, 340, 739, 262, 2846, 286, 262, 22961, 12892, 263, 3611, 5094, 198, 2235, 13789, 355, 3199, 416, 262...
2.702218
2,119
import pytest from starlette.testclient import TestClient from .fastapi_app import app, deps, Inner, ContextLoaded @pytest.fixture
[ 11748, 12972, 9288, 198, 6738, 3491, 21348, 13, 9288, 16366, 1330, 6208, 11792, 198, 198, 6738, 764, 7217, 15042, 62, 1324, 1330, 598, 11, 390, 862, 11, 24877, 11, 30532, 8912, 276, 628, 628, 198, 198, 31, 9078, 9288, 13, 69, 9602, ...
3.181818
44
#!/usr/bin/python # Allen Daniel Yesa # Aditya Subramanian Muralidaran import sys curr_key = None curr_val = 0 for key_val in sys.stdin: key,str_val = key_val.split("\t",1) try: val = int(str_val) except: continue if(curr_key==key): curr_val=curr_val+val; else: if(curr_key is not None): print(cu...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 9659, 7806, 3363, 64, 198, 2, 1215, 414, 64, 3834, 859, 38336, 337, 1523, 312, 19173, 198, 198, 11748, 25064, 198, 198, 22019, 81, 62, 2539, 796, 6045, 198, 22019, 81, 62, 2100, 7...
1.976526
213
from ..base import HaravanResource
[ 6738, 11485, 8692, 1330, 2113, 12421, 26198, 628 ]
4.5
8
from boto.s3.connection import S3Connection from boto.s3.key import Key from boto.exception import S3ResponseError from pydoc import locate import json import redis from provider.utils import unicode_encode # TODO : replace with better implementation - e.g. use Redis/Elasticache
[ 6738, 275, 2069, 13, 82, 18, 13, 38659, 1330, 311, 18, 32048, 198, 6738, 275, 2069, 13, 82, 18, 13, 2539, 1330, 7383, 198, 6738, 275, 2069, 13, 1069, 4516, 1330, 311, 18, 31077, 12331, 198, 6738, 279, 5173, 420, 1330, 17276, 198, ...
3.321839
87
#!/usr/bin/env python # # Common lint functions applicable to multiple types of files. from __future__ import print_function import re def VerifyLineLength(filename, lines, max_length): """Checks to make sure the file has no lines with lines exceeding the length limit. Args: filename: the file under consid...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 8070, 300, 600, 5499, 9723, 284, 3294, 3858, 286, 3696, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 302, 198, 198, 4299, 49899, 13949, 24539, ...
2.910345
870
# pip install pdfminer.six docx2txt # to install win32com use the pywin32install.py script import shutil import sys from pathlib import Path from pprint import pprint import docx2txt from pdfminer.high_level import extract_text if sys.platform == "win32": import win32com.client as win32 from win32com.client...
[ 2, 7347, 2721, 37124, 1084, 263, 13, 19412, 2205, 87, 17, 14116, 198, 2, 284, 2721, 1592, 2624, 785, 779, 262, 12972, 5404, 2624, 17350, 13, 9078, 4226, 198, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644...
3.086957
138
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 198, 2, 15069, 2177, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 77...
2.728932
1,863
import sys sys.path.insert(0, "./") import os from Scripts import * if __name__ == "__main__": if len(sys.argv) <= 1: usage() else: module = "Scripts." + sys.argv[1] if module in sys.modules: sys.modules[module].start() else: print("No module named {}"....
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 366, 19571, 4943, 198, 11748, 28686, 198, 198, 6738, 12327, 82, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 611, 18896, ...
2.054945
182
"""Unit test for treadmill.scheduler. """ # Disable too many lines in module warning. # # pylint: disable=C0302 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import datetime import itertools import sys import time ...
[ 37811, 26453, 1332, 329, 49246, 13, 1416, 704, 18173, 13, 198, 37811, 198, 198, 2, 31529, 1165, 867, 3951, 287, 8265, 6509, 13, 198, 2, 198, 2, 279, 2645, 600, 25, 15560, 28, 34, 15, 22709, 198, 198, 6738, 11593, 37443, 834, 1330, ...
2.051698
36,191
from flask import Flask app = Flask(__name__) @app.route("/")
[ 6738, 42903, 1330, 46947, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 31, 1324, 13, 38629, 7203, 14, 4943, 198 ]
2.818182
22
""" File: runOstranderCustomer.py Final Project - Main file Reads the files of a company, which contain its customers and their orders, and prints the contents in a comprehendible format. """ from ostranderCustomer import OstranderCustomer # customers is {304: ostranderCustomer.OstranderCustomer object at 0x00......
[ 37811, 198, 8979, 25, 1057, 46, 2536, 4066, 44939, 13, 9078, 198, 19006, 4935, 532, 8774, 2393, 198, 198, 5569, 82, 262, 3696, 286, 257, 1664, 11, 543, 3994, 663, 4297, 290, 511, 6266, 11, 290, 20842, 262, 198, 3642, 658, 287, 257, ...
3.490385
104
import os import sys from unittest import mock import pytest sys.path.append( os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir) ) from fixtures import ( fixture_registry_url, fixture_repository, fixture_repositories, fixture_tags, fixture_digest, fixture_tags_url, fix...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 555, 715, 395, 1330, 15290, 198, 11748, 12972, 9288, 198, 198, 17597, 13, 6978, 13, 33295, 7, 198, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13,...
2.573034
178
from flask import flash, redirect, url_for, abort from flask_login import current_user from srcode.models import Permission, User from functools import wraps def check_confirmed(func): '''Checks whether a certain user is confirmed''' @wraps(func) return decorated_function
[ 6738, 42903, 1330, 7644, 11, 18941, 11, 19016, 62, 1640, 11, 15614, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 198, 6738, 12351, 1098, 13, 27530, 1330, 2448, 3411, 11, 11787, 198, 6738, 1257, 310, 10141, 1330, 27521, 628, 198, ...
3.411765
85
import TestData from kol.Session import Session import unittest
[ 11748, 6208, 6601, 198, 6738, 479, 349, 13, 36044, 1330, 23575, 198, 198, 11748, 555, 715, 395, 198 ]
3.611111
18
''' Created on March 21, 2018 @author: Alejandro Molina ''' from collections import OrderedDict from enum import Enum from spn.algorithms.Validity import is_valid from spn.structure.Base import Product, Sum, rebuild_scopes_bottom_up, assign_ids, Leaf import numpy as np _node_to_str = {} _str_to_spn = OrderedD...
[ 7061, 6, 198, 41972, 319, 2805, 2310, 11, 2864, 198, 198, 31, 9800, 25, 9300, 47983, 17958, 1437, 198, 7061, 6, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 599, 77, 13, 282, 7727,...
2.877193
114