content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Test the comparison of sets l = [1,2,3,4,1,1] print l s = set(l) print s print '# equal' eq = set(l) print eq print '# forwards' print s.isdisjoint(eq) print s > eq print s.issuperset(eq) print s >= eq print s == eq print s != eq print s.issubset(eq) print s <= eq print s < eq print '# backwards' print eq.isdisjoi...
[ 2, 6208, 262, 7208, 286, 5621, 198, 75, 796, 685, 16, 11, 17, 11, 18, 11, 19, 11, 16, 11, 16, 60, 198, 4798, 300, 198, 82, 796, 900, 7, 75, 8, 198, 4798, 264, 198, 198, 4798, 705, 2, 4961, 6, 198, 27363, 796, 900, 7, 75, ...
2.366492
191
import socket # create a socket object s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # get local machine name host = socket.gethostname() port = 9999 # connection to hostname on the port. s.connect((host, port)) # Receive no more than 1024 bytes msg = s.recv(1024) s.close() print (msg.decode('ascii')...
[ 11748, 17802, 201, 198, 2, 2251, 257, 17802, 2134, 201, 198, 82, 796, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 17802, 13, 50, 11290, 62, 2257, 32235, 8, 201, 198, 2, 651, 1957, 4572, 1438, 201, 198, 4774, 796, 178...
2.7
120
import argparse import os import sqlite3 import requests ROUTES_URL = 'http://api.bus.southampton.ac.uk/dump/routes' STOPS_URL = 'http://api.bus.southampton.ac.uk/dump/stops' OPERATORS_URL = 'http://api.bus.southampton.ac.uk/dump/operators' if __name__ == "__main__": parser = argparse.ArgumentParser(...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 44161, 578, 18, 198, 198, 11748, 7007, 198, 198, 49, 12425, 1546, 62, 21886, 796, 705, 4023, 1378, 15042, 13, 10885, 13, 35782, 23427, 13, 330, 13, 2724, 14, 39455, 14, 81, 448, 274, ...
2.623116
199
# coding=utf-8 from uuid import UUID from django.test import TestCase from django_mptt_admin.util import get_tree_queryset, get_tree_from_queryset, get_javascript_value, serialize_id from ..models import Country from .utils import read_testdata
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 42625, 14208, 62, 76, 457, 83, 62, 28482, 13, 22602, 1330, 651, 62, 21048, 62, 10819, 8...
2.988095
84
from contextlib import contextmanager from typing import Optional, TypeVar from fastapi.concurrency import contextmanager_in_threadpool from fastapi.exceptions import HTTPException from fastapi.requests import Request from fastapi.responses import Response from fastapi_login.fastapi_login import LoginManager from wat...
[ 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 19720, 1330, 32233, 11, 5994, 19852, 198, 198, 6738, 3049, 15042, 13, 1102, 34415, 1330, 4732, 37153, 62, 259, 62, 16663, 7742, 198, 6738, 3049, 15042, 13, 1069, 11755, 1330, 14626, 16922, ...
3.259574
235
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.377755
1,951
import torch from .volumetric_rendering import * from .generators import ImplicitGenerator3d
[ 11748, 28034, 198, 6738, 764, 10396, 388, 19482, 62, 13287, 278, 1330, 1635, 198, 6738, 764, 8612, 2024, 1330, 34347, 3628, 8645, 1352, 18, 67, 198 ]
3.576923
26
""" This module is in charge of providing the source code corresponding to a 'code id'. In this prototype, it returns a hardcoded example. In the future, it should connect to an Aleph node and retrieve the code from there. """ import asyncio import json import hashlib import logging import os import re from os.path im...
[ 37811, 198, 1212, 8265, 318, 287, 3877, 286, 4955, 262, 2723, 2438, 11188, 284, 257, 705, 8189, 4686, 4458, 198, 198, 818, 428, 14879, 11, 340, 5860, 257, 1327, 40976, 1672, 13, 198, 818, 262, 2003, 11, 340, 815, 2018, 284, 281, 930...
3.487562
201
from flask_babel import lazy_gettext as _ from flask_login import current_user from wtforms.fields import TextAreaField from wtforms.fields.html5 import DateField from wtforms.validators import InputRequired from ..forms.base import BaseObjectForm from ..models import TastingNote
[ 6738, 42903, 62, 65, 9608, 1330, 16931, 62, 1136, 5239, 355, 4808, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 198, 6738, 266, 83, 23914, 13, 25747, 1330, 8255, 30547, 15878, 198, 6738, 266, 83, 23914, 13, 25747, 13, 6494, 20, ...
3.723684
76
import pytest import numpy as np from sklearn.base import BaseEstimator from sklearn.utils import check_X_y from imblearn.base import BaseSampler from imblearn.utils.estimator_checks import check_estimator from imblearn.utils import check_target_type class BaseBadSampler(BaseEstimator): """Sampler without input...
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1341, 35720, 13, 8692, 1330, 7308, 22362, 320, 1352, 198, 6738, 1341, 35720, 13, 26791, 1330, 2198, 62, 55, 62, 88, 198, 198, 6738, 545, 903, 1501, 13, 8692, 1330...
3.032338
402
import tensorflow as tf
[ 11748, 11192, 273, 11125, 355, 48700, 628, 198 ]
3.25
8
import shutil
[ 11748, 4423, 346, 198 ]
3.5
4
"""The Operator class defines acceptable operators. It will be used to identify dialogue act item operator """ __author__ = 'Javeria Habib' from enum import Enum class Operator(Enum): """The Operator class defines acceptable operators. It will be used to identify dialogue act item operator""" EQ = 1 ...
[ 37811, 464, 35946, 1398, 15738, 10909, 12879, 13, 198, 1026, 481, 307, 973, 284, 5911, 10721, 719, 2378, 10088, 198, 37811, 198, 198, 834, 9800, 834, 796, 705, 41, 8770, 544, 19654, 571, 6, 198, 198, 6738, 33829, 1330, 2039, 388, 628,...
2.02907
516
from sebs.cache import Cache from sebs.faas.config import Credentials, Resources, Config from sebs.utils import LoggingHandlers from sebs.storage.config import MinioConfig from typing import cast, Optional
[ 6738, 384, 1443, 13, 23870, 1330, 34088, 198, 6738, 384, 1443, 13, 13331, 292, 13, 11250, 1330, 327, 445, 14817, 11, 13864, 11, 17056, 198, 6738, 384, 1443, 13, 26791, 1330, 5972, 2667, 12885, 8116, 198, 6738, 384, 1443, 13, 35350, 13...
3.684211
57
# Copyright (C) 2019-2022 Intel Corporation # # SPDX-License-Identifier: MIT from typing import Any import logging as log import os.path as osp from attrs import define import pycocotools.mask as mask_utils from datumaro.components.annotation import ( AnnotationType, Bbox, Caption, CompiledMask, Label, LabelCate...
[ 2, 15069, 357, 34, 8, 13130, 12, 1238, 1828, 8180, 10501, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 6738, 19720, 1330, 4377, 198, 11748, 18931, 355, 2604, 198, 11748, 28686, 13, 6978, 355, 267, 2777...
3.012232
327
import json from pathlib import Path
[ 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198 ]
4.111111
9
import sys sys.path.append('../..') from typing import Set, Dict, Tuple, Sequence, List, Any from src.array._118_Pascal import * num = 5 print(pascalTriangle(num)) assert(2 == pascalTriangle(num)) print("All pass")
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 492, 11537, 198, 6738, 19720, 1330, 5345, 11, 360, 713, 11, 309, 29291, 11, 45835, 11, 7343, 11, 4377, 198, 6738, 12351, 13, 18747, 13557, 16817, 62, 47, 27747, 1330, 1635, ...
2.868421
76
# _filter_static_genes.py __module_name__ = "_filter_static_genes.py" __author__ = ", ".join(["Michael E. Vinyard"]) __email__ = ", ".join(["vinyard@g.harvard.edu",]) # package imports # # --------------- # import licorice import scipy.optimize import matplotlib.pyplot as plt import numpy as np import vinplots fro...
[ 198, 2, 4808, 24455, 62, 12708, 62, 5235, 274, 13, 9078, 198, 198, 834, 21412, 62, 3672, 834, 796, 45434, 24455, 62, 12708, 62, 5235, 274, 13, 9078, 1, 198, 834, 9800, 834, 796, 33172, 27071, 22179, 7, 14692, 13256, 412, 13, 569, ...
2.157401
1,385
# -*- coding: utf-8 -*- # Time: 2021-10-20 11:17 # Copyright (c) 2021 # author: Euraxluo import unittest from loguru import logger import logging import HTMLReport.src.tools.result as test_result # type:ignore import HTMLReport.src.test_runner as test_runner # type:ignore logger.getLogger = logging.getLogger # ty...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 198, 2, 3862, 25, 33448, 12, 940, 12, 1238, 1367, 25, 1558, 198, 2, 15069, 357, 66, 8, 33448, 198, 2, 1772, 25, 36554, 897, 2290, 78, 198, 11748, 555, 715, 395, 19...
2.778409
176
from typing import Optional, Dict import math import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal, Independent from ding.torch_utils import fc_block, noise_block, NoiseLinearLayer, MLP from ding.rl_utils import beta_function_map from ding.utils import lists_to_dic...
[ 6738, 19720, 1330, 32233, 11, 360, 713, 198, 198, 11748, 10688, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 17080, 2455, 507, 1330, 14435, 11, ...
2.096265
23,695
# !/usr/bin/env python # -*- coding:utf-8 -*- import mmh3 from bitarray import bitarray from random import randint
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 8085, 71, 18, 198, 198, 6738, 1643, 18747, 1330, 1643, 18747, 198, 6738, 4738, 1330, 43720, 600, 628, 198 ]
2.704545
44
from django.contrib import admin from blog.models import Category, Article, Comment, Contact admin.site.register(Category) @admin.register(Article) @admin.register(Comment) @admin.register(Contact)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 4130, 13, 27530, 1330, 21743, 11, 10172, 11, 18957, 11, 14039, 198, 198, 28482, 13, 15654, 13, 30238, 7, 27313, 8, 628, 198, 31, 28482, 13, 30238, 7, 14906, 8, 628, 198...
3.433333
60
from model import *
[ 6738, 2746, 1330, 1635, 628 ]
4.2
5
# -*- coding: utf-8 -*- from openprocurement.api.utils import ( get_now, context_unpack, json_view, set_ownership, APIResource, raise_operation_error, ) from openprocurement.tender.core.utils import save_tender, optendersresource, apply_patch from openprocurement.tender.core.validation import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1280, 36942, 495, 434, 13, 15042, 13, 26791, 1330, 357, 198, 220, 220, 220, 651, 62, 2197, 11, 198, 220, 220, 220, 4732, 62, 403, 8002, 11, 198, 220, 220, 220,...
2.80826
339
import wanakana import csv
[ 11748, 266, 272, 461, 2271, 198, 11748, 269, 21370, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
1.782609
23
import pygame
[ 11748, 12972, 6057, 198 ]
3.5
4
# -*- coding: utf-8 -*- from css import style sm = style.CsStyleManager() rules = sm.link(open('test.css').read()) p1 = P('paragraph1') p2 = P('p2', p1, 'note') a1 = A('a1', p2) h2 = H2('caption', p1) assert sm.calc(p1, rules) == {'color': 'red', 'font-family': None, u'margin': u'0'} assert sm.calc(p2, rules) =...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 269, 824, 1330, 3918, 628, 628, 628, 198, 5796, 796, 3918, 13, 32274, 21466, 13511, 3419, 198, 38785, 796, 895, 13, 8726, 7, 9654, 10786, 9288, 13, 25471, 27691, ...
2.679623
849
from collections import defaultdict from typing import Any, Dict, List, Optional from unittest import TestCase from unittest.mock import MagicMock, patch from openslides_backend.services.datastore.commands import GetManyRequest from openslides_backend.services.datastore.extended_adapter import ( ExtendedDatastoreA...
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 198, 6738, 9808...
3.446043
139
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import socket, struct import select import time import json import sys import os DISTANCE_THRESHOLD = 0.5 MAXIMUM_MOTOR_INPUT = 99 with_connection = True if with_connection: print("Establishing the connection to the BBG device...") else: print("Ignoring the conne...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 17802, 11, 2878, 198, 11748, 2922, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 28686, ...
2.088323
2,004
import pandas as pd import sys import os import csv DiagnosisTrackerfilename="DiagnosisTracker.csv" if __name__ == "__main__": images_path=sys.argv[1] #Path of all images folder check_new_file_and_update_in_csv(images_path) #check new image file and update in CSV print("CSV File che...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 269, 21370, 198, 198, 18683, 4660, 5958, 35694, 34345, 2625, 18683, 4660, 5958, 35694, 13, 40664, 1, 220, 628, 628, 220, 220, 220, 220, 628, 198, 198, ...
2.544974
189
from __future__ import unicode_literals from django.apps import AppConfig
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.75
20
"""Test the Eshop class.""" import pytest from pytest_homeassistant_custom_component.async_mock import AsyncMock, Mock, patch from custom_components.nintendo_wishlist.eshop import ( NO_BOX_ART_URL, EShop, get_percent_off, ) @pytest.fixture def client_mock(): """Pytest fixture to mock the algoliasearc...
[ 37811, 14402, 262, 412, 24643, 1398, 526, 15931, 198, 11748, 12972, 9288, 198, 6738, 12972, 9288, 62, 11195, 562, 10167, 62, 23144, 62, 42895, 13, 292, 13361, 62, 76, 735, 1330, 1081, 13361, 44, 735, 11, 44123, 11, 8529, 198, 198, 673...
1.977596
4,285
expected_output = { "domain_number":{ 0:{ "message_event_ip_dscp":59, "message_general_ip_dscp":47, "profile_state":"disabled", "profile_type":"DEFAULT", "transport_method":"802.3" } } }
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 366, 27830, 62, 17618, 1298, 90, 198, 220, 220, 220, 220, 220, 657, 29164, 198, 220, 220, 220, 220, 220, 220, 220, 220, 366, 20500, 62, 15596, 62, 541, 62, 67, 1416, 79, 1298, 3270, 11, ...
1.893939
132
import numpy as np import tools21cm as t2c box_dims = 200 dims = [128,128,128] gauss = np.random.normal(loc=0., scale=1., size=dims) kbins = 10 mubins = 2 def test_cross_power_spectrum_1d(): ''' With this test, cross_power_spectrum_nd and radial_average are also test. ''' pp, kk = t2c.cross_power_spectrum_1...
[ 11748, 299, 32152, 355, 45941, 220, 198, 11748, 4899, 2481, 11215, 355, 256, 17, 66, 220, 198, 198, 3524, 62, 67, 12078, 796, 939, 198, 67, 12078, 220, 220, 796, 685, 12762, 11, 12762, 11, 12762, 60, 198, 4908, 1046, 220, 796, 45941...
2.003158
950
# MIT License # # Copyright (c) 2019 Michael J Simms. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
[ 2, 220, 17168, 13789, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 13130, 3899, 449, 3184, 907, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, ...
2.468894
1,736
import unittest from datetime import datetime import numpy as np import netCDF4 as nc from ocgis.api.operations import OcgOperations from ocgis.util.shp_cabinet import ShpCabinet from shapely.geometry.polygon import Polygon from ocgis import env from ocgis.api.interpreter import OcgInterpreter from ocgis.util.inspect i...
[ 11748, 555, 715, 395, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2010, 34, 8068, 19, 355, 299, 66, 198, 6738, 267, 66, 70, 271, 13, 15042, 13, 3575, 602, 1330, 440, 66, 70, 18843, 602, ...
2.672727
165
#!/usr/bin/env python import csv import datetime import os try: from StringIO import StringIO except ImportError: from io import StringIO __all__ = ("CommaDialect", "CommaRow", "Comma", "make_backup") #__slots__ = ("row", "header", "header_dict", "parsers", "serializers")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 21370, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 28311, 25, 220, 198, 220, 220, 220, 422, 10903, 9399, 1330, 10903, 9399, 198, 16341, 17267, 12331, 25, 198, ...
2.700935
107
import logging import sys import os from logging.handlers import TimedRotatingFileHandler LOG_FILE_NAME = os.path.dirname(__file__)+'/logs/log.log' # set up formatting formatter = logging.Formatter('[%(asctime)s] %(levelname)s (%(process)d) %(module)s:%(lineno)d %(message)s') # set up logging to STDOUT for...
[ 11748, 18931, 201, 198, 11748, 25064, 201, 198, 11748, 28686, 201, 198, 6738, 18931, 13, 4993, 8116, 1330, 5045, 276, 24864, 803, 8979, 25060, 201, 198, 201, 198, 25294, 62, 25664, 62, 20608, 796, 28686, 13, 6978, 13, 15908, 3672, 7, ...
2.749288
351
import sys import json from time import time from requests_oauthlib import OAuth2Session from collections import OrderedDict # Local Imports import turbo_config as config import turbo_util as util from turbo_db import DBSession this = sys.modules[__name__] # TODO: change this into a TempSessionClerk that gets shared...
[ 11748, 25064, 198, 11748, 33918, 198, 6738, 640, 1330, 640, 198, 6738, 7007, 62, 12162, 1071, 8019, 1330, 440, 30515, 17, 36044, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 2, 10714, 1846, 3742, 198, 11748, 29292, 62, 11250,...
3.866667
240
import unittest from cert_core import to_certificate_model from mock import Mock from cert_verifier.checks import * if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 5051, 62, 7295, 1330, 284, 62, 22583, 22460, 62, 19849, 198, 6738, 15290, 1330, 44123, 198, 198, 6738, 5051, 62, 332, 7483, 13, 42116, 1330, 1635, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.947368
57
from django.contrib import admin from . models import City admin.site.register(City)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 4981, 1330, 2254, 198, 198, 28482, 13, 15654, 13, 30238, 7, 14941, 8, 198 ]
3.346154
26
import json from flask import Flask, request, abort from dotenv import dotenv_values from skola_online import SkolaOnline from fablab import Fablab from salina import Salina from alojz import Alojz from functools import wraps import datetime import time from pprint import * app = Flask(__name__) # file .env # USERNAM...
[ 11748, 33918, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 15614, 198, 6738, 16605, 24330, 1330, 16605, 24330, 62, 27160, 198, 6738, 1341, 5708, 62, 25119, 1330, 3661, 5708, 14439, 198, 6738, 7843, 23912, 1330, 14236, 23912, 198, 6738, 36...
2.215109
1,562
from typing import List, NamedTuple
[ 6738, 19720, 1330, 7343, 11, 34441, 51, 29291, 628 ]
4.111111
9
A_26_02_9 = {0: {'A': 0.109, 'C': -0.186, 'E': -0.694, 'D': -0.616, 'G': 0.238, 'F': -0.231, 'I': 0.156, 'H': -0.098, 'K': 0.739, 'M': -0.153, 'L': 0.27, 'N': -0.117, 'Q': 0.048, 'P': 0.109, 'S': -0.019, 'R': 0.694, 'T': -0.034, 'W': -0.351, 'V': 0.229, 'Y': -0.093}, 1: {'A': -0.866, 'C': 0.214, 'E': 0.5, 'D': 0.294, '...
[ 32, 62, 2075, 62, 2999, 62, 24, 796, 1391, 15, 25, 1391, 6, 32, 10354, 657, 13, 14454, 11, 705, 34, 10354, 532, 15, 13, 25096, 11, 705, 36, 10354, 532, 15, 13, 45214, 11, 705, 35, 10354, 532, 15, 13, 44214, 11, 705, 38, 10354,...
1.61831
1,420
# -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Sean Bell # -------------------------------------------------------- # ------------------------------------------------------...
[ 2, 20368, 22369, 198, 2, 38996, 371, 12, 18474, 198, 2, 15069, 357, 66, 8, 1853, 5413, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 22503, 416, 9847, 23837, 1477, 624, 290, 11465, 7459, 198,...
2.037722
2,704
#======================================================================= __version__ = '''0.0.22''' __sub_version__ = '''20120704184132''' __copyright__ = '''(c) Alex A. Naanou 2003-2008''' #----------------------------------------------------------------------- import types import new import sys #---------------...
[ 2, 23926, 1421, 18604, 198, 198, 834, 9641, 834, 796, 705, 7061, 15, 13, 15, 13, 1828, 7061, 6, 198, 834, 7266, 62, 9641, 834, 796, 705, 7061, 1264, 1238, 32869, 22883, 19924, 7061, 6, 198, 834, 22163, 4766, 834, 796, 705, 7061, 7...
2.872862
5,553
# Copyright 2016 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 law or agreed to in writing,...
[ 2, 15069, 1584, 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, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, ...
2.533988
3,869
""" This program plays the cookie clicker game in an aoutmated way using the Selenium Webdriver Browser """ # Import required libraries from selenium import webdriver from time import time if __name__ == '__main__': main()
[ 37811, 198, 1212, 1430, 5341, 262, 19751, 3904, 263, 983, 287, 281, 257, 448, 76, 515, 835, 1262, 262, 15300, 47477, 5313, 26230, 34270, 198, 37811, 198, 198, 2, 17267, 2672, 12782, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, ...
3.553846
65
from .ner import NER, TextOrSentences, text_to_sentences, sentences_to_text from .result import NerResult, NerResultEntity from .mapping import ONTONOTES_TO_WIKIPEDIA_LABEL_MAPPING MODELS_MAPPING = { 'small_en': 'en_core_web_sm', 'small_multi': 'xx_ent_wiki_sm', # 'large_en': 'en_core_web_lg' }
[ 198, 6738, 764, 1008, 1330, 399, 1137, 11, 8255, 5574, 31837, 3007, 11, 2420, 62, 1462, 62, 34086, 3007, 11, 13439, 62, 1462, 62, 5239, 198, 6738, 764, 20274, 1330, 21783, 23004, 11, 21783, 23004, 32398, 198, 6738, 764, 76, 5912, 1330...
2.459677
124
import numpy as np import time import imutils import cv2 from picamera.array import PiRGBArray from picamera import PiCamera avg = None xvalues = list() motion = list() count1 = 0 count2 = 0 with PiCamera(resolution=(640,480), framerate=30) as camera: with PiRGBArray(camera, size=(640,480)) as rawCapture: ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 545, 26791, 198, 11748, 269, 85, 17, 198, 6738, 8301, 18144, 13, 18747, 1330, 13993, 36982, 19182, 198, 6738, 8301, 18144, 1330, 13993, 35632, 198, 198, 615, 70, 796, 6045, 198...
1.757377
1,525
# %% from IPython import get_ipython from IPython.core.display import display get_ipython().run_line_magic('load_ext', 'autoreload') get_ipython().run_line_magic('autoreload', '2') get_ipython().run_line_magic('run', 'setup') # %% leeftijdsgroepen: download RIVM data #leeftijdsgroepen = SimpleNamespace() @run # %% Do...
[ 2, 43313, 198, 6738, 6101, 7535, 1330, 651, 62, 541, 7535, 198, 6738, 6101, 7535, 13, 7295, 13, 13812, 1330, 3359, 198, 1136, 62, 541, 7535, 22446, 5143, 62, 1370, 62, 32707, 10786, 2220, 62, 2302, 3256, 705, 2306, 382, 2220, 11537, ...
2.682848
309
from code import app from flask import request, make_response, redirect from code.database import Database as database @app.route("/login", methods=['GET', 'POST'])
[ 6738, 2438, 1330, 598, 198, 6738, 42903, 1330, 2581, 11, 787, 62, 26209, 11, 18941, 198, 6738, 2438, 13, 48806, 1330, 24047, 355, 6831, 198, 198, 31, 1324, 13, 38629, 7203, 14, 38235, 1600, 5050, 28, 17816, 18851, 3256, 705, 32782, 6,...
3.772727
44
import sys import etcd import traceback from log import get_logger logger = get_logger(__name__, '/var/log/etcd_watcher.log') if __name__ == "__main__": try: args = sys.argv logger.info("etcd client args: {}".format(str(args))) if len(args) < 2: logger.error("Invalid parame...
[ 11748, 25064, 198, 11748, 3503, 67, 198, 11748, 12854, 1891, 198, 6738, 2604, 1330, 651, 62, 6404, 1362, 198, 198, 6404, 1362, 796, 651, 62, 6404, 1362, 7, 834, 3672, 834, 11, 31051, 7785, 14, 6404, 14, 316, 10210, 62, 86, 34734, 13...
2.017448
917
import paramiko import os from ocha.libs import utils CURR_DIR = os.getcwd() ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
[ 11748, 5772, 12125, 198, 11748, 28686, 198, 6738, 267, 11693, 13, 8019, 82, 1330, 3384, 4487, 198, 198, 34, 31302, 62, 34720, 796, 28686, 13, 1136, 66, 16993, 3419, 198, 198, 45824, 796, 5772, 12125, 13, 5432, 39, 11792, 3419, 198, 45...
2.704918
61
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.3.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11420, 198, 2, 474, 929, 88, 353, 25, 198, 2, 220, 220, 474, 929, 88, 5239, 25, 198, 2, 220, 220, 220, 220, 17519, 25, 20966, 2047, 65, 11, 9078, 25, 25067, 1...
2.251198
1,043
import bpy import sys import os dir = os.path.dirname(bpy.data.filepath) if not dir in sys.path: sys.path.append(dir) from RT_ParticleExporter.ParticleExporter import ParticleExporter classes = [ PEProperties, PEXPORT_PT_main_panel, PEXPORT_OT_Export, PEXPORT_OT_GetParticles, ] if __name_...
[ 11748, 275, 9078, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 65, 9078, 13, 7890, 13, 7753, 6978, 8, 198, 361, 407, 26672, 287, 25064, 13, 6978, 25, 198, 220, 220, 220, 25064, 13,...
2.4375
144
import logging import socket from thrift.transport.TTransport import TTransportException from jiffy.directory.directory_client import ReplicaChain from jiffy.directory.ttypes import rpc_replica_chain from jiffy.storage import block_request_service from jiffy.storage.block_client import BlockClient from jiffy.storage....
[ 11748, 18931, 198, 11748, 17802, 198, 198, 6738, 5636, 2135, 13, 7645, 634, 13, 51, 8291, 634, 1330, 309, 8291, 634, 16922, 198, 198, 6738, 474, 733, 88, 13, 34945, 13, 34945, 62, 16366, 1330, 18407, 3970, 35491, 198, 6738, 474, 733, ...
3.522936
109
# Copyright 2015 Rafe Kaplan # # 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, soft...
[ 2, 15069, 1853, 371, 8635, 37105, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743,...
3.683333
180
import setuptools with open("README.md", "r", encoding="utf-8") as file: long_description = file.read() setuptools.setup( name="csv_db_package", version="0.0.3", author="Ankita Liya", author_email="ankitaliya321@gmail.com", description="This package is found useful for those who wants to modif...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 2393, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 2393, 13, 961, 3419, 198, 198, 2617, 37623, ...
2.633987
459
import PyQt5 from PyQt5 import QtWidgets, uic from PyQt5.uic import loadUi from PyQt5.QtWidgets import QApplication,QMainWindow,QDialog,QWidget import arcpy import os import sys app = QtWidgets.QApplication([]) win = MainPage() win.show() try: sys.exit(app.exec()) except: print("EXITING")
[ 11748, 9485, 48, 83, 20, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 11, 334, 291, 198, 6738, 9485, 48, 83, 20, 13, 84, 291, 1330, 3440, 52, 72, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195...
2.316176
136
""" The MIT License (MIT) Copyright (c) 2021-present Village 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, mer...
[ 37811, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 33448, 12, 25579, 14812, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 30073, 286, 428, 3788, 290, 3917, ...
3.820122
328
import discord from discord.ext import commands class yoda_say: """May the force be with you""" @commands.command() async def yoda_say(self, sentence): """ Credit to Zenadix and muddyfish source: https://codegolf.stackexchange.com/questions/68559/ a-yoda-speaking-challenge-this-is ...
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 4871, 331, 11329, 62, 16706, 25, 198, 220, 220, 220, 37227, 6747, 262, 2700, 307, 351, 345, 37811, 628, 220, 220, 220, 2488, 9503, 1746, 13, 21812, 3419, 198, 220, 220, ...
1.991124
338
import cv2 import numpy as np import dlib import sys # 얼굴 검출기와 랜드마크 검출기 생성 --- ① detector = dlib.get_frontal_face_detector() predictor = dlib.shape_predictor('./shape_predictor_68_face_landmarks.dat') # 얼굴 및 랜드마크 검출해서 좌표 반환하는 함수 ---② # 랜드마크 좌표로 들로네 삼각형 반환 ---③ # 삼각형 어핀 변환 함수 ---④ if __name__ == '__main__' : # ...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 288, 8019, 198, 11748, 25064, 198, 198, 2, 23821, 244, 120, 166, 113, 112, 220, 166, 110, 222, 168, 114, 250, 166, 116, 108, 168, 247, 222, 31619, 252, 250, 167, ...
1.386285
1,152
#input your own client info from #reddit>user settings>privacy &security>manage third-party app authorization CLIENT_ID = "" CLIENT_SECRETS = "" USER_AGENT = "" # any input
[ 2, 15414, 534, 898, 5456, 7508, 422, 220, 198, 2, 10748, 29, 7220, 6460, 29, 13776, 1590, 1222, 12961, 29, 805, 496, 2368, 12, 10608, 598, 19601, 198, 5097, 28495, 62, 2389, 796, 13538, 198, 5097, 28495, 62, 23683, 2200, 4694, 796, ...
3.264151
53
# coding: utf-8 from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() t_4sdian = db.Table( '4sdian', db.Column('id', db.Integer), db.Column('loyalty', db.Float(asdecimal=True)), db.Column('frequency', db.Integer), db.Column('money', db.Float(asdecimal=True)), db.Column('L', db.Text), ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 628, 198, 9945, 796, 16363, 2348, 26599, 3419, 628, 198, 198, 83, 62, 19, 21282, 666, 796, 20613, 13, 10962, 7, 198, 220, 220, 220, ...
2.467584
4,288
import glob as gl import pandas as pd # Read original data fname = 'diagnosis-of-covid-19-and-its-clinical-spectrum.csv' path = gl.glob(f'../../**//**/{fname}') df = pd.read_csv(path[0]) # Choose interesting columns and remove missing data with open('data-columns.txt', 'r') as f: colnames = f.read().splitlines() df...
[ 11748, 15095, 355, 1278, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 2, 4149, 2656, 1366, 198, 69, 3672, 796, 705, 47356, 5958, 12, 1659, 12, 66, 709, 312, 12, 1129, 12, 392, 12, 896, 12, 47367, 12, 4443, 6582, 13, 40664, 6, ...
2.538462
247
from Crypto.Cipher import AES ZEROIV = "\x00"*16 def removePadding(blocksize, s): 'Remove rfc 1423 padding from string.' n = ord(s[-1]) # last byte contains number of padding bytes if n > blocksize or n > len(s): raise Exception('invalid padding') return s[:-n]
[ 6738, 36579, 13, 34, 10803, 1330, 34329, 201, 198, 201, 198, 57, 34812, 3824, 796, 37082, 87, 405, 1, 9, 1433, 201, 198, 4299, 4781, 47, 26872, 7, 27372, 1096, 11, 264, 2599, 201, 198, 220, 220, 220, 705, 27914, 374, 16072, 1478, ...
2.525424
118
#!/usr/bin/env python from distutils.core import setup setup(name='pysett', version='0.1', description='python xml setting parser', author='wizath', author_email='wm.goldio@gmail.com', url='https://github.com/wizath/pysett', packages=['pysett'], )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 79, 893, 3087, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, ...
2.299213
127
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################# # Copyright 2018 Konrad Sakowski, Stanislaw Krukowski, Pawel Strak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 4242, 2, 198, 2, 220, 220, 15069, 2864, 17431, 6335, 13231, 12079, 11, 7299, 3044, 707, 33909, ...
3.217597
1,057
from ImportMLModel import main import demistomock as demisto done = False
[ 6738, 17267, 5805, 17633, 1330, 1388, 198, 198, 11748, 1357, 396, 296, 735, 355, 1357, 396, 78, 198, 198, 28060, 796, 10352, 628 ]
3.347826
23
import json from datetime import date, datetime, timedelta from typing import Any, Generator, Generic, List, Optional, TypeVar import pandas as pd import plotly.express as px import tinytuya from pydantic import BaseModel from pydantic.generics import GenericModel from pytemperature import f2c from pytz import timezon...
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 11, 28805, 12514, 198, 6738, 19720, 1330, 4377, 11, 35986, 11, 42044, 11, 7343, 11, 32233, 11, 5994, 19852, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7110, ...
3.154839
155
"""Automated smart testing strategies for web services. This 'agilkia' package is for testing web services and managing set of traces. Traces may come from user interactions, or from automated test suites, etc. The main data structure for traces is the ``TraceSet``: * class TraceSet supports loading/saving traces as ...
[ 37811, 38062, 515, 4451, 4856, 10064, 329, 3992, 2594, 13, 198, 198, 1212, 705, 363, 43545, 544, 6, 5301, 318, 329, 4856, 3992, 2594, 290, 11149, 900, 286, 20675, 13, 198, 2898, 2114, 743, 1282, 422, 2836, 12213, 11, 393, 422, 16359, ...
3.006494
616
from .correios_sigep import CorreiosSIGEPCEPProvider # noqa from .republicavirtual import RepublicaVirtualCEPProvider # noqa from .viacep import ViaCEPProvider # noqa
[ 6738, 764, 10215, 260, 4267, 62, 82, 328, 538, 1330, 2744, 260, 4267, 50, 3528, 8905, 5222, 47, 29495, 220, 1303, 645, 20402, 198, 6738, 764, 7856, 841, 615, 22341, 1330, 2066, 64, 37725, 5222, 47, 29495, 220, 1303, 645, 20402, 198, ...
2.982456
57
import pytest from api.base.settings.defaults import API_BASE from osf_tests.factories import ( WithdrawnRegistrationFactory, RegistrationFactory, InstitutionFactory, AuthUserFactory, NodeFactory, ) from website.util import permissions @pytest.mark.django_db @pytest.mark.django_db
[ 11748, 12972, 9288, 198, 198, 6738, 40391, 13, 8692, 13, 33692, 13, 12286, 82, 1330, 7824, 62, 33, 11159, 198, 6738, 267, 28202, 62, 41989, 13, 22584, 1749, 1330, 357, 198, 220, 220, 220, 2080, 41549, 47133, 22810, 11, 198, 220, 220, ...
3
103
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.stats, name='rq_stats'), url(r'^queues/(?P<queue>.+)/$', views.queue, name='rq_queue'), url(r'^workers/(?P<worker>.+)/$', views.worker, name='rq_worker'), url(r'^jobs/(?P<job>.+)/$', views.job, name='rq_job'), u...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 5009, 13, 34242, 11, 1438, 11639, 81, 80, 62, 34242,...
2.206704
179
#!/usr/bin/env python # -*- coding: utf-8 -*- # Print experiment.xml # https://github.com/IHEC/ihec-metadata/blob/master/specs/Ihec_metadata_specification.md # Ihec_metadata_specification.md: # Chromatin Accessibility, WGBS, MeDIP-Seq, MRE-Seq, ChIP-Seq, RNA-Seq # I added ATAC-seq, RRBS following existing data for...
[ 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, 12578, 6306, 13, 19875, 198, 2, 3740, 1378, 12567, 13, 785, 14, 40, 39, 2943, 14, 72, 258, 66, 12, 38993, ...
2.075052
1,439
from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver from .app_logic import calendar_functions
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 5436, 11395, 47139, 1352, 11, 1855, 11395, 47139, 1352, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12...
3.516484
91
import zipfile import os # from tqdl import download from tqdm import tqdm import re import gc import numpy as np import codecs import gensim.downloader as api from gensim.test.utils import get_tmpfile class WE(): """The Word embedding class. The main class that facilitates the word embedding struct...
[ 11748, 19974, 7753, 198, 11748, 28686, 198, 2, 422, 256, 80, 25404, 1330, 4321, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 302, 198, 11748, 308, 66, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 40481, 82, 198, 117...
1.951849
3,759
#!/usr/bin/env python # -*- coding: utf-8 -*- # # alvadescpy/wrapper.py # v.0.1.2 # Developed in 2019 by Travis Kessler <travis.j.kessler@gmail.com> # # contains `alvadesc` function, a wrapper for alvaDesc software # # stdlib. imports from subprocess import check_output, PIPE, Popen, call from csv import writer, QUOTE...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 435, 85, 2367, 66, 9078, 14, 48553, 13, 9078, 198, 2, 410, 13, 15, 13, 16, 13, 17, 198, 2, 6013, 276...
2.408336
2,831
"""Python side of the Python to Arduino bridge.""" from __future__ import (absolute_import, division, print_function, unicode_literals) from contextlib import contextmanager from multiprocessing import Process, Queue import serial from serial.serialutil import SerialException from communicat...
[ 37811, 37906, 1735, 286, 262, 11361, 284, 27634, 7696, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
3.235772
123
""" Set up the plot figures, axes, and items to be done for each frame. This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. """ from clawpack.clawutil.data import ClawData from numpy import linspace probdata = ClawData() probdata.read('setprob.d...
[ 198, 37811, 220, 198, 7248, 510, 262, 7110, 5538, 11, 34197, 11, 290, 3709, 284, 307, 1760, 329, 1123, 5739, 13, 198, 198, 1212, 8265, 318, 17392, 416, 262, 29353, 31878, 290, 788, 262, 198, 8818, 900, 29487, 318, 1444, 284, 900, 26...
2.372176
1,682
from util import LabelEncoder import editdistance from torch import Tensor from torchmetrics import Metric class CharacterErrorRate(Metric): """ Calculates Character Error Rate, calculated as Levenshtein edit distance divided by length of the target. Roughly speaking, this indicates the percentage or ...
[ 6738, 7736, 1330, 36052, 27195, 12342, 198, 198, 11748, 4370, 30246, 198, 6738, 28034, 1330, 309, 22854, 198, 6738, 28034, 4164, 10466, 1330, 3395, 1173, 628, 198, 4871, 15684, 12331, 32184, 7, 9171, 1173, 2599, 198, 220, 220, 220, 37227,...
2.190263
1,561
# Copyright 2021 Inspur # # 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, soft...
[ 2, 15069, 33448, 25300, 333, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330...
3.584746
236
import os import unittest import numpy import moments import time suite = unittest.TestLoader().loadTestsFromTestCase(ResultsTestCase) if __name__ == '__main__': unittest.main()
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 198, 11748, 7188, 198, 11748, 640, 628, 198, 2385, 578, 796, 555, 715, 395, 13, 14402, 17401, 22446, 2220, 51, 3558, 4863, 14402, 20448, 7, 25468, 14402, 20448, 8, 198, ...
2.936508
63
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628, 628, 198 ]
3.25
8
import yaml import copy import os.path from PIL import Image as PILImage,ImageTk from tkinter import Canvas, Tk, NW, mainloop #Opening the Yaml File to Print out the Contents #Name all Nodes #Generates all Numbers Attached to Waypoints, Finds the Next Unused Number #Editing Existing Node Data in the Yaml File #Del...
[ 11748, 331, 43695, 198, 11748, 4866, 198, 11748, 28686, 13, 6978, 198, 6738, 350, 4146, 1330, 7412, 355, 350, 4146, 5159, 11, 5159, 51, 74, 198, 6738, 256, 74, 3849, 1330, 1680, 11017, 11, 309, 74, 11, 21966, 11, 1388, 26268, 198, 2...
2.955556
270
from erlei.underscore import underscore as _ from erlei.underscore import uunderscore as __ from erlei.pipe import pipe __all__ = [ '_', '__', 'pipe' ] __version__ = "1.0.0" name = "erlei"
[ 6738, 1931, 293, 72, 13, 41116, 7295, 1330, 44810, 355, 4808, 201, 198, 6738, 1931, 293, 72, 13, 41116, 7295, 1330, 334, 41116, 7295, 355, 11593, 201, 198, 6738, 1931, 293, 72, 13, 34360, 1330, 12656, 201, 198, 201, 198, 834, 439, 8...
2.21875
96
import glob import os import re import subprocess import time import uuid import pytest import parse import logging from ccmlib import common from dtest import Tester, create_ks, create_cf from tools.assertions import assert_length_equal, assert_stderr_clean since = pytest.mark.since logger = logging.getLogger(__nam...
[ 11748, 15095, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 640, 198, 11748, 334, 27112, 198, 11748, 12972, 9288, 198, 11748, 21136, 198, 11748, 18931, 198, 198, 6738, 36624, 4029, 571, 1330, 2219, 198, 198, 6738...
2.577083
480
# base code was taken from @DeletedUser420's Userge-Plugins repo # originally authored by Phyco-Ninja (https://github.com/Phyco-Ninja) (@PhycoNinja13b) # I've just tweaked his file a bit (maybe a lot) # But i sticked to the format he used which looked cool """ Search for Anime related Info using Anilist API """ ...
[ 2, 2779, 2438, 373, 2077, 422, 2488, 5005, 33342, 12982, 27211, 338, 11787, 469, 12, 23257, 1040, 29924, 201, 198, 2, 6198, 33941, 416, 1380, 88, 1073, 12, 36091, 6592, 357, 5450, 1378, 12567, 13, 785, 14, 2725, 88, 1073, 12, 36091, ...
2.323087
4,652
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. import re from .. import If from . import exactly_one, json_checker def validate_json_checker(x): """ Property: BackupVault.AccessPolicy """ return json_checker(x) def backup_vault_n...
[ 2, 15069, 357, 66, 8, 2321, 12, 1238, 1828, 11, 2940, 2631, 988, 1279, 4102, 31, 431, 988, 13, 2398, 29, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 4091, 38559, 24290, 2393, 329, 1336, 5964, 13, 628, 198, 11748, 302, 198, 19...
2.391781
365
# re-write of the dosleg parser to have # the same output as senapy import sys import re from urllib.parse import urljoin import dateparser from bs4 import BeautifulSoup from lawfactory_utils.urls import clean_url, download, parse_national_assembly_url, AN_OLD_URL_TEMPLATE from anpy.dossier_from_opendata import par...
[ 2, 302, 12, 13564, 286, 262, 23430, 1455, 30751, 284, 423, 198, 2, 262, 976, 5072, 355, 3308, 12826, 198, 198, 11748, 25064, 198, 11748, 302, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 11748, 3128, 48610, 198,...
2.007951
7,043
import os import re import numpy import itertools from . import config, dataset_generation, preprocessing class FormatSentence: """ Take a sentence, annotated or not, and generate the vectors associated """ sentence = '' words = [] __size_vector = 26+11 __dictionary = None __vectoriz...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 299, 32152, 198, 11748, 340, 861, 10141, 198, 198, 6738, 764, 1330, 4566, 11, 27039, 62, 20158, 11, 662, 36948, 628, 198, 4871, 18980, 31837, 594, 25, 198, 220, 220, 220, 37227, 198, 220, 220...
2.552823
1,098
# -*- coding: utf-8 -*- """ builders/layers/transformer.py Created on 01/05/19 @author: Tu Bui tb00083@surrey.ac.uk """ import tensorflow as tf from tensorflow.keras import backend as K from ..utils import scaled_dot_product_attention, positional_encoding class SelfAttnV1(tf.keras.layers.Layer): """ Keras at...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 50034, 14, 75, 6962, 14, 7645, 16354, 13, 9078, 198, 41972, 319, 5534, 14, 2713, 14, 1129, 198, 31, 9800, 25, 16749, 347, 9019, 256, 65, 830, 5999, 31, 1...
2.145737
1,736
names = ['appu','chakrapani','upadhyaya',23,'TRUE'] for name in names: print(name) print(names[0]) print(names[2:4]) names.insert(2,"Shraddha") print(names) names.append("Shreshta") print(names) names.append("Shreshta") print(names) names[2]="Updated" print(names) names.remove("Updated") print(names) rec =...
[ 14933, 796, 37250, 1324, 84, 41707, 354, 461, 2416, 3216, 41707, 929, 324, 12114, 11729, 3256, 1954, 4032, 5446, 8924, 20520, 198, 198, 1640, 1438, 287, 3891, 25, 198, 220, 220, 220, 3601, 7, 3672, 8, 198, 198, 4798, 7, 14933, 58, 1...
2.395973
149
import selectors import socket import types import queue import threading from message_handler import MessageHandler from datetime import datetime
[ 11748, 2922, 669, 198, 11748, 17802, 198, 11748, 3858, 198, 11748, 16834, 198, 11748, 4704, 278, 198, 6738, 3275, 62, 30281, 1330, 16000, 25060, 198, 6738, 4818, 8079, 1330, 4818, 8079 ]
4.709677
31
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Yue-Wen FANG' __maintainer__ = "Yue-Wen FANG" __email__ = 'fyuewen@gmail.com' __license__ = 'Apache License 2.0' __creation_date__= 'Dec. 26, 2018' """ single inheritance """ class Person: """ define a CLASS Person with three methods """ clas...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 56, 518, 12, 54, 268, 376, 15567, 6, 198, 834, 76, 2913, 10613, 834, 796, 366, 56, ...
2.402174
276
''' assumptions: - credit one, the leading provider of identity management is a division of capital one (e.g. https://capitalone.com/creditone) - user already has an account with capital one (they've been verified id, passport, credit, ...) - participating banks, institutions, ... realize credit one the leading ...
[ 7061, 6, 198, 562, 388, 8544, 25, 198, 220, 532, 3884, 530, 11, 262, 3756, 10131, 286, 5369, 4542, 318, 257, 7297, 286, 3139, 530, 357, 68, 13, 70, 13, 3740, 1378, 27544, 505, 13, 785, 14, 43082, 505, 8, 198, 220, 532, 2836, 154...
3.472593
675
import numpy as np import logging import time class TrainingEnvironment: """ Class to handle the processing of the game loop.""" def run_epoch(self, num_steps, training=True): """ Run a training epoch for a giving number of steps. Return the average reward, and number of episodes.""" ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 18931, 198, 11748, 640, 198, 198, 4871, 13614, 31441, 25, 198, 220, 220, 220, 37227, 5016, 284, 5412, 262, 7587, 286, 262, 983, 9052, 526, 15931, 628, 198, 220, 220, 220, 825, 1057, 62, 538, ...
2.322137
655
import os,sys import heapq from chardet.universaldetector import UniversalDetector #train_pos, test_pos = create_sample(’pos’, 0.75) #train_neg, test_neg = create_sample(’neg’, 0.75) #train = train_pos + train_neg #test = test_pos + test_neg
[ 198, 11748, 28686, 11, 17597, 198, 11748, 24575, 80, 198, 6738, 442, 446, 316, 13, 403, 1191, 1940, 316, 9250, 1330, 14499, 11242, 9250, 628, 628, 198, 2, 27432, 62, 1930, 11, 1332, 62, 1930, 796, 2251, 62, 39873, 7, 447, 247, 1930,...
2.217742
124