content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 #coding=utf-8 import fcntl,subprocess,socket,struct,multiprocessing,queue,threading sock_dict={} sock_dict_lock=threading.Lock() Buffer=2048 accept_access() for k,v in zip(sock_dict.keys(),sock_dict.values()): print(k,v) th1=threading.Thread(target=router,args=(socket.inet_aton('172.16.10.1...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 11748, 277, 66, 429, 75, 11, 7266, 14681, 11, 44971, 11, 7249, 11, 16680, 541, 305, 919, 278, 11, 36560, 11, 16663, 278, 198, 198, 8...
2.382353
272
__author__ = 'noe' from .api import *
[ 834, 9800, 834, 796, 705, 77, 2577, 6, 198, 198, 6738, 764, 15042, 1330, 1635, 198 ]
2.4375
16
"""Alter OAuth2Token.token_type to Enum Revision ID: 82184d7d1e88 Revises: 5e2954a2af18 Create Date: 2016-11-10 21:14:33.787194 """ # revision identifiers, used by Alembic. revision = '82184d7d1e88' down_revision = '5e2954a2af18' from alembic import op import sqlalchemy as sa
[ 37811, 2348, 353, 440, 30515, 17, 30642, 13, 30001, 62, 4906, 284, 2039, 388, 198, 198, 18009, 1166, 4522, 25, 9415, 22883, 67, 22, 67, 16, 68, 3459, 198, 18009, 2696, 25, 642, 68, 1959, 4051, 64, 17, 1878, 1507, 198, 16447, 7536, ...
2.378151
119
import os import signal from os.path import join from sys import argv from utils.csv_table import CsvTable from utils.fasta_map import FastaMap from utils.hierarchy_tree import HierarchyTree signal.signal(signal.SIGTSTP, signal.SIG_IGN) if __name__ == '__main__': if len(argv) == 2: pid_h = os.fork() ...
[ 11748, 28686, 198, 11748, 6737, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 25064, 1330, 1822, 85, 198, 198, 6738, 3384, 4487, 13, 40664, 62, 11487, 1330, 327, 21370, 10962, 198, 6738, 3384, 4487, 13, 7217, 64, 62, 8899, 1330, ...
2.009967
301
from rest_framework import status from rest_framework.response import Response
[ 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 628, 628, 198 ]
4.611111
18
from datastructures.stack import Stack import unittest if __name__ == '__main__': unittest.main()
[ 6738, 4818, 459, 1356, 942, 13, 25558, 1330, 23881, 198, 11748, 555, 715, 395, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419 ]
2.810811
37
from PIL import Image import requests url = "https://www.yr.no/place/Norway/Viken/Halden/Halden//meteogram.png" response = requests.get(url, stream = True) img = Image.open(response.raw) #TODO! Test image size 800, x img.thumbnail((800, 262)) #Resizing #TODO! Convert better img = img.convert("L") #img.show() img...
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 7007, 628, 198, 6371, 796, 366, 5450, 1378, 2503, 13, 2417, 13, 3919, 14, 5372, 14, 21991, 1014, 14, 53, 29943, 14, 39, 1940, 268, 14, 39, 1940, 268, 1003, 4164, 68, 21857, 13, 11134, 1, 19...
2.589552
134
# Copyright 2018-2019 David Corbett # Copyright 2019-2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ 2, 15069, 2864, 12, 23344, 3271, 2744, 48138, 198, 2, 15069, 13130, 12, 1238, 2481, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, ...
3.398239
1,022
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-05 04:42 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 22, 319, 2177, 12, 2919, 12, 2713, 8702, 25, 3682, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
import asyncio from .Client import CLIENT
[ 11748, 30351, 952, 201, 198, 6738, 764, 11792, 1330, 45148, 201, 198, 201, 198, 201, 198 ]
3
16
import numpy as np, math
[ 11748, 299, 32152, 355, 45941, 11, 10688, 198 ]
3.125
8
#!/usr/bin/env python # coding: utf-8 import argparse import base64 import glob import os import platform import re import sys import tempfile import json import time import logging from pymongo import MongoClient import requests log = logging.getLogger(name=__name__) if platform.system() != 'Windows': from Cr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 1822, 29572, 198, 11748, 2779, 2414, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 302, 198, 11748, 25064, 198, 1...
2.612218
753
from osp.corpus.syllabus import Syllabus def test_log_path(mock_osp): """ Syllabus#log_path should return the .log file path. """ path = mock_osp.add_file() syllabus = Syllabus(path) assert syllabus.log_path == path+'.log'
[ 198, 198, 6738, 267, 2777, 13, 10215, 79, 385, 13, 1837, 297, 46844, 1330, 1632, 297, 46844, 628, 198, 4299, 1332, 62, 6404, 62, 6978, 7, 76, 735, 62, 2117, 2599, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 1632, 297, 46844, 2,...
2.419048
105
#!/usr/bin/env python # coding: utf-8 # # Title : 1985 Auto Imports Database Analyses # <img src='Large10.jpg'> # ## <font color='green'>Data Dictionary</font> # ### Input variables # # 01. **symboling**: [its assigned insurance risk rating -> [-3, -2, -1, 0, 1, 2, 3]] # 02. **normalized-losses**: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 11851, 1058, 12863, 11160, 1846, 3742, 24047, 1052, 43710, 220, 198, 198, 2, 1279, 9600, 12351, 11639, 21968, 940, 13, 9479, 44167, ...
2.512661
4,344
import discord from discord.ext import commands from motor.motor_asyncio import AsyncIOMotorClient import json with open('config.json') as f: config_var = json.load(f) cluster = AsyncIOMotorClient(config_var['mango_link']) cursor = cluster["custom_prefix"]["prefix"] bcursor = cluster['bot']['blacklist'] in...
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 5584, 13, 76, 20965, 62, 292, 13361, 952, 1330, 1081, 13361, 40, 2662, 20965, 11792, 198, 11748, 33918, 628, 198, 4480, 1280, 10786, 11250, 13, 17752, 11537, 355, 277, 25,...
2.607565
423
""" imjayigpayatinlay.py Jim's pig latin See ./readme.md. Here are tests based on the design constraints, in roughly order of increasing difficulty. --- tests -------------------------------------- >>> text_to_piglatin("apple") # word starts with vowel 'appleway' >>> text_to_piglatin("cat") ...
[ 37811, 198, 545, 33708, 328, 15577, 10680, 10724, 13, 9078, 628, 5395, 338, 12967, 3042, 259, 628, 4091, 24457, 961, 1326, 13, 9132, 13, 220, 220, 628, 3423, 389, 5254, 1912, 319, 262, 1486, 17778, 11, 220, 198, 287, 7323, 1502, 286, ...
2.54288
1,236
import torch import torch.nn as nn
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 198 ]
3.083333
12
# Generated by Django 3.2.5 on 2021-07-21 15:15 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 20, 319, 33448, 12, 2998, 12, 2481, 1315, 25, 1314, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import random import copy import json import time import sys players = [QLearnerModelAgent(), RandomAgent()] game = XOGame() '''print players[1].observe([[['X', 'O', 'X'],['O', 'O', '.'],['.', 'X', '.']], 'O'], 0, game) sys.exit(0)''' totalx = 0 totalo = 0 total_games = 10000 for x in range(2): for i in ran...
[ 11748, 4738, 198, 11748, 4866, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 25064, 628, 628, 628, 198, 32399, 796, 685, 9711, 451, 1008, 17633, 36772, 22784, 14534, 36772, 3419, 60, 198, 6057, 796, 1395, 7730, 480, 3419, 198, 7061, 6...
2.131343
670
# Clone Graph # https://www.interviewbit.com/problems/clone-graph/ # # Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Definition for a undirected graph node # class U...
[ 2, 30698, 29681, 198, 2, 3740, 1378, 2503, 13, 3849, 1177, 2545, 13, 785, 14, 1676, 22143, 14, 21018, 12, 34960, 14, 198, 2, 198, 2, 30698, 281, 3318, 1060, 276, 4823, 13, 5501, 10139, 287, 262, 4823, 4909, 257, 6167, 290, 257, 13...
2.571429
196
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand-.- XBMC Plugin # Canale casacinema # ------------------------------------------------------------ import re import urlparse from core import httptools from core import config from core import logger from core impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 20368, 1783, 10541, 198, 2, 4269, 623, 368, 392, 12, 7874, 1395, 33, 9655, 42636, 198, 2, 1680, 1000, 6124, 330, 7749, 64, 198, 198, 2, 20368, 1783, 10541, 198, 1...
7.114478
297
try: # Python 2 old-style classes from types import ClassType as class_type # type: ignore class_types = (class_type, type) string_types = (unicode, str) # type: ignore # pylint: disable=undefined-variable except ImportError: class_types = (type,) # type: ignore string_types = (str,) # typ...
[ 28311, 25, 198, 220, 220, 220, 1303, 11361, 362, 1468, 12, 7635, 6097, 198, 220, 220, 220, 422, 3858, 1330, 5016, 6030, 355, 1398, 62, 4906, 220, 1303, 2099, 25, 8856, 628, 220, 220, 220, 1398, 62, 19199, 796, 357, 4871, 62, 4906, ...
2.869565
115
""" This is an equality comparator for hdf5 files. """ import h5py import itertools import numpy import sys def files_match(filename1, filename2): "Checks that two files have the same HDF5 structure." f1 = h5py.File(filename1, mode='r') f2 = h5py.File(filename2, mode='r') for k in iter(f1): # s...
[ 37811, 198, 1212, 318, 281, 10537, 4616, 1352, 329, 289, 7568, 20, 3696, 13, 198, 37811, 198, 11748, 289, 20, 9078, 198, 11748, 340, 861, 10141, 198, 11748, 299, 32152, 198, 11748, 25064, 198, 198, 4299, 3696, 62, 15699, 7, 34345, 16,...
1.932023
1,221
print("This is pandas basics") brics = pd.DataFrame(dict) print(brics)
[ 198, 4798, 7203, 1212, 318, 19798, 292, 19165, 4943, 198, 198, 1671, 873, 796, 279, 67, 13, 6601, 19778, 7, 11600, 8, 198, 4798, 7, 1671, 873, 8, 198 ]
2.517241
29
import os from django.conf import settings from django.core.management.base import BaseCommand import gspread from conferences.models import ( ConferenceEmailTemplate, ConferenceEmailRegistration, ConferenceEmailLogs, )
[ 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 11748, 308, 43639, 628, 198, 6738, 19993, 13, 27530, 1330, 357, 198, 220, 220, 220, ...
3.646154
65
from django.urls import path from .views import index, store, update urlpatterns = [ path('tallas/', index, name='sizes.index'), path('crear-nueva-talla/', store, name='sizes.store'), path('actualizar-talla/<id>/', update, name='sizes.update'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 201, 198, 6738, 764, 33571, 1330, 6376, 11, 3650, 11, 4296, 201, 198, 201, 198, 6371, 33279, 82, 796, 685, 201, 198, 220, 220, 220, 3108, 10786, 83, 7826, 14, 3256, 6376, 11, 1438, 11639...
2.509434
106
from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import KBinsDiscretizer pipe_cat = OneHotEncoder(handle_unknown='ignore') pipe_num = KBinsDiscretizer()
[ 6738, 1341, 35720, 13, 3866, 36948, 1330, 1881, 21352, 27195, 12342, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 14204, 1040, 15642, 1186, 7509, 198, 198, 34360, 62, 9246, 796, 1881, 21352, 27195, 12342, 7, 28144, 62, 34680, 11639, 464...
3.396226
53
import unittest from RegExpBuilder import RegExpBuilder if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 201, 198, 6738, 3310, 16870, 32875, 1330, 3310, 16870, 32875, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 201, 198 ]
2.658537
41
from __future__ import unicode_literals import os from django.conf import settings from mayan.apps.converter.classes import Layer from mayan.apps.converter.layers import layer_saved_transformations from ..literals import PAGE_RANGE_ALL from ..models import DocumentType from .literals import ( TEST_DOCUMENT_TYP...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 743, 272, 13, 18211, 13, 1102, 332, 353, 13, 37724, 1330, 34398, 198, 6738, 743, ...
2.609665
269
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the ...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
2.485555
1,973
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import math import random as rand from itertools import product import numpy as np from mapel.voting.models_main import store_ordinal_election from mapel.voting.metrics.main_ordinal_distances import compute_swap_bf_distance from mapel.voting.objects.OrdinalElection import OrdinalElection try: from sympy.utilitie...
[ 11748, 10688, 198, 11748, 4738, 355, 43720, 198, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 3975, 417, 13, 85, 10720, 13, 27530, 62, 12417, 1330, 3650, 62, 585, 1292, 62, 14300, 198, 67...
2.148594
1,245
from django.conf.urls import url, include from rest_framework import routers from . import views router = routers.DefaultRouter() router.register(r'budget-detail', views.BudgetViewSet) urlpatterns = [ url(r'^', include(router.urls)), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 1334, 62, 30604, 1330, 41144, 198, 198, 6738, 764, 1330, 5009, 628, 198, 472, 353, 796, 41144, 13, 19463, 49, 39605, 3419, 198, 472, 353, 13, 30238, 7, 8...
2.939759
83
# Copyright 2020 AUI, Inc. Washington DC, USA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 2, 220, 220, 15069, 12131, 317, 10080, 11, 3457, 13, 2669, 6257, 11, 4916, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, ...
2.701287
1,088
import os from setuptools import find_packages, setup # TODO random links... # https://docs.pytest.org/en/latest/goodpractices.html?highlight=src#tests-outside-application-code # https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure # https://realpython.com/pypi-publish-python-package/ # https://github.c...
[ 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 2, 16926, 46, 4738, 6117, 986, 198, 2, 3740, 1378, 31628, 13, 9078, 9288, 13, 2398, 14, 268, 14, 42861, 14, 11274, 29152, 1063, 13, 6494, 30...
2.654062
714
# Python3 from solution1 import floatRange as f qa = [ (-0.9, 0.45, 0.2, [-0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3]), (1.5, 1.5, 10, []), (1, 2, 1.5, [1]), (-21.11, 21.11, 1.11, [-21.11, -20, -18.89, -17.78, -16.67, -15.56, -14.45, -13.34, -12.23, -11.12, -10.01, -8.9, -7.79, -6.68, ...
[ 2, 11361, 18, 198, 198, 6738, 4610, 16, 1330, 12178, 17257, 355, 277, 198, 198, 20402, 796, 685, 198, 220, 220, 220, 13841, 15, 13, 24, 11, 657, 13, 2231, 11, 657, 13, 17, 11, 198, 220, 220, 220, 220, 25915, 15, 13, 24, 11, 53...
1.612903
589
import asyncio from typing import List import discord import discord.ext from osu.game import Game from settings import tourney_name, rulebook_url, footer_icon, footer_note, \ veto_timeout, newline from utils.checks import beatmapCheck, playerCheck class Match: """ Represents an osu! match """ ...
[ 11748, 30351, 952, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 36446, 198, 11748, 36446, 13, 2302, 198, 198, 6738, 267, 2385, 13, 6057, 1330, 3776, 198, 6738, 6460, 1330, 4205, 1681, 62, 3672, 11, 3896, 2070, 62, 6371, 11, 2366, 26...
2.282609
322
from typing import Dict, Optional import base64 import hashlib import hmac import json import re import arrow from pydantic import conint RequestContent = Dict def verify_signed_request( signed_request, app_secret, acceptable_freshness_sec: Optional[conint(ge=0)] = None, ) -> Optional[RequestContent]...
[ 6738, 19720, 1330, 360, 713, 11, 32233, 198, 198, 11748, 2779, 2414, 198, 11748, 12234, 8019, 198, 11748, 289, 20285, 198, 11748, 33918, 198, 11748, 302, 198, 198, 11748, 15452, 198, 6738, 279, 5173, 5109, 1330, 369, 600, 628, 198, 198,...
2.64026
770
""" Undo/redo framework for anim.edit """ from x7.geom.typing import * from x7.geom.model import ControlPoint __all__ = ['Command', 'CommandDummy', 'CommandStack', 'CommandEditCP'] class Command(object): """ABC for Command pattern""" def do(self): """Apply the change and call .update() or .erase()...
[ 37811, 198, 31319, 78, 14, 48454, 9355, 329, 2355, 13, 19312, 198, 37811, 198, 198, 6738, 2124, 22, 13, 469, 296, 13, 774, 13886, 1330, 1635, 198, 6738, 2124, 22, 13, 469, 296, 13, 19849, 1330, 6779, 12727, 628, 198, 834, 439, 834, ...
2.994975
199
# # COPYRIGHT (C) 2012-2013 TCS Ltd # """ .. module:: fpvariants :platform: Unix, Windows, MacOSX :synopsis: Module to list out variants downstream to frameshift/stopgain mutation also present in same chromatid. .. moduleauthor:: Kunal Kundu (kunal@atc.tcs.com); modified by changjin.hong@gmail.c...
[ 2, 198, 2, 27975, 38162, 9947, 357, 34, 8, 2321, 12, 6390, 309, 7902, 12052, 198, 2, 198, 37811, 198, 492, 8265, 3712, 277, 79, 25641, 1187, 198, 220, 220, 220, 1058, 24254, 25, 33501, 11, 3964, 11, 4100, 2640, 55, 198, 220, 220, ...
1.644023
10,113
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import streamlit as st from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from tensorflow import keras from tensorflow.keras.models ...
[ 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 384, 397, 1211, 355, 3013, 82, 201, 198, 201, 198, 11748, 4269, 18250, 355, ...
2.836243
1,661
import logging from typing import ( Iterator, List, Optional, Tuple, ) from quakestats.core.game.qlmatch import ( FullMatchInfo, ) from quakestats.core.q3parser.api import ( Q3ParserAPI, ) from quakestats.core.q3toql.api import ( Q3toQLAPI, QuakeGame, ) from quakestats.core.ql import ( ...
[ 11748, 18931, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 40806, 1352, 11, 198, 220, 220, 220, 7343, 11, 198, 220, 220, 220, 32233, 11, 198, 220, 220, 220, 309, 29291, 11, 198, 8, 198, 198, 6738, 627, 461, 395, 1381, 13, 7295...
2.406349
315
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Reinhard Stampp # This file is part of fortrace - http://fortrace.fbi.h-da.de # See the file 'docs/LICENSE' for copying permission. """This python script destroy the networks local and internet using libvirt. """ from __future__ import absolute...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 2211, 12, 4967, 22299, 10424, 30097, 381, 198, 2, 770, 2393, 318, 636, 286, 329, 40546, 532, ...
2.849785
233
import itertools import re from collections import defaultdict from dataclasses import dataclass from typing import Iterable, Optional import common.input_data as input_data @dataclass PASSPORTS: list[str] = input_data.read("input/input4.txt") if __name__ == "__main__": print(f"Number of valid passports: " ...
[ 11748, 340, 861, 10141, 198, 11748, 302, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 40806, 540, 11, 32233, 198, 198, 11748, 2219, 13, 15414, 62, 7890, 355, 5128, 62,...
2.707865
178
from http.server import HTTPServer, SimpleHTTPRequestHandler import ssl import os import argparse if __name__ == '__main__': top_parser = argparse.ArgumentParser(description='Simple HTTPS server') top_parser.add_argument('--port', action="store", dest="port", type=int, help="The port to listen on", default="443")...
[ 6738, 2638, 13, 15388, 1330, 38288, 18497, 11, 17427, 40717, 18453, 25060, 198, 11748, 264, 6649, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 1353, 62, 48610, ...
2.812287
293
#!/usr/bin/python import sys, os, re; dTs = 0 oldTs=-1 for l in sys.stdin: l2=l.rstrip() t = l2.split(' ') if len(t) < 2: continue ts = t[1].split(':') tsInMs = (int(ts[0])*3600 + int(ts[1])*60 + float(ts[2]))*1000 #print '%f -- %s ffffffffffffff\n' % ( tsInMs, t[1]) if (oldTs > 0): d...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 201, 198, 11748, 25064, 11, 28686, 11, 302, 26, 201, 198, 201, 198, 67, 33758, 796, 657, 201, 198, 727, 33758, 10779, 16, 201, 198, 201, 198, 1640, 300, 287, 25064, 13, 19282, 259, 2...
1.772
250
""" Programmer: Trinav Bhattacharyya Date of Development: 18/10/2020 This code has been developed according to the procedures mentioned in the following research article: X.-S. Yang, S. Deb, “Cuckoo search via Levy flights”, in: Proc. of World Congress on Nature & Biologically Inspired Computing (NaBIC 2009), December ...
[ 37811, 198, 15167, 647, 25, 833, 26802, 347, 11653, 620, 560, 3972, 198, 10430, 286, 7712, 25, 1248, 14, 940, 14, 42334, 198, 1212, 2438, 468, 587, 4166, 1864, 284, 262, 9021, 4750, 287, 262, 1708, 2267, 2708, 25, 198, 55, 7874, 50,...
2.383109
817
from fontTools.ttLib import TTFont from fontTools.ttLib.tables._c_m_a_p import CmapSubtable HALF2FULLWIDTH = dict((i, i + 0xFEE0) for i in range(0x21, 0x7F)) FULL2HALFWIDTH = dict((i + 0xFEE0, i) for i in range(0x21, 0x7F)) if __name__ == "__main__": text = 'This is a test\nABCDEFGHIJKLMNOPQRSTUVW' fontSpec =...
[ 6738, 10369, 33637, 13, 926, 25835, 1330, 309, 10234, 756, 198, 6738, 10369, 33637, 13, 926, 25835, 13, 83, 2977, 13557, 66, 62, 76, 62, 64, 62, 79, 1330, 327, 8899, 7004, 11487, 198, 198, 39, 1847, 37, 17, 37, 9994, 54, 2389, 422...
2.169421
242
ELECTION_YEAR_LIST = [ 1989, 1994, 2000, 2001, 2004, 2010, 2015, 2020, ]
[ 36, 16779, 2849, 62, 56, 17133, 62, 45849, 796, 685, 198, 220, 220, 220, 11104, 11, 198, 220, 220, 220, 9162, 11, 198, 220, 220, 220, 4751, 11, 198, 220, 220, 220, 5878, 11, 198, 220, 220, 220, 5472, 11, 198, 220, 220, 220, 3050...
1.721311
61
import pandas as pd from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.metrics import accuracy_score, precision_recall_fscore_support, confusion_matrix,plot_confusion_matrix, ConfusionMatrixDisplay from catboost import CatBoostClassifier import matplotlib.pyplot as plt from explore import ...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 11, 24846, 18243, 33538, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 9922, 62, 26675, 11, 15440, 62, 8344, 439, 62...
2.325231
2,386
from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix from sklearn.linear_model import LogisticRegression from sklearn.ensemble import RandomForestClassifier import select_data as sd ''' See paper: Sensors 2018, 18(4), 1055; https://doi.org/10.3390/s18041055 "Divide and Conquer-Base...
[ 6738, 1341, 35720, 13, 4164, 10466, 1330, 9922, 62, 26675, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 10802, 62, 6759, 8609, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 198, 6738, 1341, 35720, 13, 107...
2.854872
1,950
# Copyright 2019 EMBL - European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ 2, 15069, 13130, 17228, 9148, 532, 3427, 16024, 259, 18982, 873, 5136, 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...
3.295608
592
# -*- coding: utf-8 -*- import sys import os import os.path import subprocess import JTutils if len(sys.argv)>1: destproc = sys.argv[1] else: destproc = "999" if len(sys.argv) >2: showRES = sys.argv[2] else: showRES = "y" data2d = CURDATA() data1d = data2d[:] data1d[2] = destproc fulld2d = JTutils.fullpat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 850, 14681, 198, 11748, 449, 51, 26791, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 29, 1...
2.082305
243
"""Initialization of version_query package.""" __all__ = ['VersionComponent', 'Version', 'query_folder', 'query_caller', 'query_version_str', 'predict_git_repo', 'predict_caller', 'predict_version_str'] from .version import VersionComponent, Version from .query import query_folder, query_caller,...
[ 37811, 24243, 1634, 286, 2196, 62, 22766, 5301, 526, 15931, 198, 198, 834, 439, 834, 796, 37250, 14815, 21950, 3256, 705, 14815, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 22766, 62, 43551, 3256, 705, 22766, 62,...
2.993103
145
"""Private utilities.""" import numpy as np # from sklearn.utils.validation import NotFittedError # Copied from scikit-learn 0.19. def _validate_covars(covars, covariance_type, n_components): """Do basic checks on matrix covariance sizes and values.""" from scipy import linalg if covariance_type == 'sphe...
[ 37811, 29067, 20081, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 2, 422, 1341, 35720, 13, 26791, 13, 12102, 341, 1330, 1892, 37, 2175, 12331, 628, 198, 2, 6955, 798, 422, 629, 1134, 270, 12, 35720, 657, 13, 1129, 13, 1...
2.04056
1,356
from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required, permission_required from django.template.context_processors import csrf from django.shortcuts import render, render_to_response, get_object_or_404 from django.http i...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 17594, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, ...
2.509997
3,351
import nibabel as nib import numpy as np from util.util import transform_single, warning, error, remove_outliers, normalize_with_opt
[ 11748, 33272, 9608, 355, 33272, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 7736, 13, 22602, 1330, 6121, 62, 29762, 11, 6509, 11, 4049, 11, 4781, 62, 448, 75, 3183, 11, 3487, 1096, 62, 4480, 62, 8738, 628 ]
3.461538
39
import pytest from django.conf import settings from django.urls import reverse, resolve from django.test import RequestFactory, Client from django.http import Http404 from rsscraper.feeds.models import Feed, FeedItem from rsscraper.feeds.views import FeedDetailView, FeedItemDetailView,\ FeedDeleteView from rsscrap...
[ 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 11, 10568, 198, 6738, 42625, 14208, 13, 9288, 1330, 19390, 22810, 11, 20985, 198, 6738, 42625, 14208, 13, 4023, 1330, ...
3.214286
126
# subprocess to return the information of the directory import subprocess subprocess.call('dir',shell=True)
[ 2, 850, 14681, 284, 1441, 262, 1321, 286, 262, 8619, 198, 11748, 850, 14681, 198, 7266, 14681, 13, 13345, 10786, 15908, 3256, 29149, 28, 17821, 8, 198 ]
4
27
from src.utils.program3.node import Node from src.utils.program3.statements.statement import Statement
[ 6738, 12351, 13, 26791, 13, 23065, 18, 13, 17440, 1330, 19081, 198, 6738, 12351, 13, 26791, 13, 23065, 18, 13, 14269, 3196, 13, 26090, 1330, 21983, 628, 628 ]
3.785714
28
""" OpenstackDriver for Compute based on BaseDriver for Compute Resource """ import mock from keystoneauth1.exceptions.base import ClientException from calplus.tests import base from calplus.v1.compute.drivers.openstack import OpenstackDriver fake_config_driver = { 'os_auth_url': 'http://controller:5000/v2...
[ 37811, 4946, 25558, 32103, 329, 3082, 1133, 198, 220, 220, 220, 1912, 319, 7308, 32103, 329, 3082, 1133, 20857, 198, 37811, 628, 198, 11748, 15290, 198, 198, 6738, 1994, 6440, 18439, 16, 13, 1069, 11755, 13, 8692, 1330, 20985, 16922, 19...
2.3875
400
from six.moves import range NO_MORE_SENTINEL = object() def take(seq, count): """ Take count many elements from a sequence or generator. Args ---- seq : sequnce or generator The sequnce to take elements from. count : int The number of elments to take. """ for _ in ran...
[ 6738, 2237, 13, 76, 5241, 1330, 2837, 198, 198, 15285, 62, 23346, 62, 50, 3525, 1268, 3698, 796, 2134, 3419, 628, 198, 4299, 1011, 7, 41068, 11, 954, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7214, 954, 867, 4847, 422, ...
2.330623
369
import warnings warnings.warn( '`import vital` is deprecated, use import kwiver.vital instead', UserWarning ) from kwiver.vital import * # NOQA
[ 11748, 14601, 198, 40539, 654, 13, 40539, 7, 198, 220, 220, 220, 705, 63, 11748, 9204, 63, 318, 39224, 11, 779, 1330, 479, 86, 1428, 13, 85, 1287, 2427, 3256, 198, 220, 220, 220, 11787, 20361, 198, 8, 198, 198, 6738, 479, 86, 1428...
2.8
55
# -*- coding: utf-8 -*- """Модуль, описывающий CLI-утилиту пакета gvapi""" import sys from os import environ from pathlib import Path from hashlib import md5 import pickle import click from gvapi import Hero, errors @click.command() @click.option('-g', '--god', required=False, default=environ.get('GVAPI_GOD'), help='...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 140, 250, 25443, 112, 35072, 30143, 45367, 11, 12466, 122, 140, 123, 18849, 21727, 45035, 38857, 16142, 141, 236, 141, 231, 18849, 140, 117, 43749, 12, 35072, 20375...
1.80523
1,109
from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ "class": "ei", "dataset": "interim", "date": "1979-01-01/to/1979-12-31", "expver": "1", "grid": "0.75/0.75", "levtype": "sfc", "param": "34.128/49.128/134.128/143.128/164.128/165.128/166.128/167.128/168...
[ 6738, 9940, 76, 86, 69, 15042, 1330, 13182, 14326, 37, 6601, 10697, 198, 198, 15388, 796, 13182, 14326, 37, 6601, 10697, 3419, 198, 15388, 13, 1186, 30227, 15090, 198, 197, 220, 220, 220, 366, 4871, 1298, 366, 20295, 1600, 198, 197, 2...
1.815306
8,663
# 后台 from flask import Blueprint from flask.views import MethodView from flask import render_template, session, g from apps.cms.forms import UserForm, ResetPwdForm, ResetEailForm, ResetEmailSendCode,URL from flask import request, jsonify from apps.common.baseResp import * from ext import db, mail from flask_mail import...
[ 2, 10263, 238, 236, 20998, 108, 198, 6738, 42903, 1330, 39932, 198, 6738, 42903, 13, 33571, 1330, 11789, 7680, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 6246, 11, 308, 198, 6738, 6725, 13, 46406, 13, 23914, 1330, 11787, 8479, 11, 3...
2.093974
1,394
""" Solve the unique lowest-cost assignment problem using the Hungarian algorithm (also known as Munkres algorithm). """ # Based on original code by Brain Clapper, adapted to numpy by Gael Varoquaux # Copyright (c) 2008 Brian M. Clapper <bmc@clapper.org>, Gael Varoquaux # Author: Brian M. Clapper, Gael Varoquaux # LI...
[ 37811, 198, 50, 6442, 262, 3748, 9016, 12, 15805, 16237, 1917, 1262, 262, 198, 39505, 3699, 11862, 357, 14508, 1900, 355, 337, 2954, 411, 11862, 737, 198, 198, 37811, 198, 2, 13403, 319, 2656, 2438, 416, 14842, 44834, 11, 16573, 284, ...
2.254207
4,516
import logging import sys import time import torch from model import MatchModel from data import TripletTextDataset from util import seed_all logging.disable(sys.maxsize) start_time = time.time() input_path = "./data/test/test.json" output_path = "./data/test/output.txt" if len(sys.argv) == 3: input_path = sys...
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 28034, 198, 198, 6738, 2746, 1330, 13225, 17633, 198, 6738, 1366, 1330, 19817, 83, 8206, 27354, 292, 316, 198, 6738, 7736, 1330, 9403, 62, 439, 198, 198, 6404, 2667, 13,...
2.622807
342
''' Analysis and figures for research notes Requires running OH_1665_narrowchannel_imaging ''' from os.path import join as osjoin from paths import c_path # Masking and moment-making scripts # Make velocity corrected cubes execfile(osjoin(c_path, "Lines/OH_maser_luminosity.py")) execfile(osjoin(c_path, "Lines/OH_...
[ 198, 7061, 6, 198, 32750, 290, 5538, 329, 2267, 4710, 198, 198, 39618, 2491, 18723, 62, 1433, 2996, 62, 77, 6018, 17620, 62, 320, 3039, 198, 7061, 6, 198, 198, 6738, 28686, 13, 6978, 1330, 4654, 355, 28686, 22179, 198, 198, 6738, 13...
3.180451
133
from functools import reduce, wraps from typing import Any import requests import tinder from tinder.recs import Rec, TimeOutException, RetryException
[ 6738, 1257, 310, 10141, 1330, 4646, 11, 27521, 201, 198, 6738, 19720, 1330, 4377, 201, 198, 201, 198, 11748, 7007, 201, 198, 201, 198, 11748, 256, 5540, 201, 198, 6738, 256, 5540, 13, 260, 6359, 1330, 3311, 11, 3862, 7975, 16922, 11, ...
3.354167
48
import abc if __name__ == '__main__': #se crean los diferentes archivos que formaran parte del directorio root = directory('/') etc = directory('/etc') var = directory('/var') usr = directory('/usr') include = directory('/include') home = directory('/home') users = directory('/user...
[ 11748, 450, 66, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 325, 1126, 272, 22346, 288, 361, 9100, 274, 3934, 452, 418, 8358, 1296, 19173, 636, 68, 1619, 3437, 952, 198, 22...
2.298592
355
import time if __name__ == '__main__': print(enc_test()) print(dec_test())
[ 11748, 640, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 12685, 62, 9288, 28955, 198, 220, 220, 220, 3601, 7, 12501, 62, 9288, 28955, 198 ]
2.388889
36
""" 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 use this ...
[ 37811, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 17080, 6169, 351, 428, 670, 329, 3224, 1321, 198, 2301, 13493, 6634, 9238, 13...
3.564841
347
# -*- coding: utf-8 -*- """module containg the API wrapper""" import io import requests import yaml from pysolar import solar import pandas as pd class EndpointWrapper: """Base class for endpoint wrapper The usage of the API requires an API key that can be requested for free at: "https://developer.nrel....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 21412, 542, 64, 278, 262, 7824, 29908, 37811, 628, 198, 11748, 33245, 198, 11748, 7007, 198, 11748, 331, 43695, 198, 6738, 279, 893, 6192, 1330, 6591, 198, 11748, ...
2.180424
2,217
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.testutils import APITestCase
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 198, 6738, 1908, 563, 13, 9288, 26791, 1330, 3486, 2043, 395, 20448, 628 ]
3.555556
36
# Handlers handlers = [PreciseF32, Pthreads] # client-side asm code modification
[ 198, 2, 7157, 8116, 198, 198, 4993, 8116, 796, 685, 6719, 37561, 37, 2624, 11, 350, 16663, 82, 60, 198, 198, 2, 5456, 12, 1589, 355, 76, 2438, 17613, 628 ]
2.833333
30
import skimage as sk import numpy as np from rectpack import newPacker ## not commented
[ 198, 11748, 1341, 9060, 355, 1341, 220, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 13621, 8002, 1330, 649, 47, 10735, 198, 198, 2235, 407, 16476, 628, 198 ]
3.241379
29
""" Created on Sep 22, 2018 @author: Yizhe Sun """ import os import uuid from werkzeug.utils import secure_filename from redis import Redis from rq import Queue import sqlalchemy as db from .config import ALLOWED_EXTENSIONS, DATABASE_URI # Initialise the task queue for background tasks q = Queue(connection=Redis()...
[ 37811, 198, 41972, 319, 8621, 2534, 11, 2864, 198, 198, 31, 9800, 25, 575, 528, 258, 3825, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 198, 6738, 266, 9587, 2736, 1018, 13, 26791, 1330, 5713, 62, 34345, 198, 6738,...
3.249042
261
import argparse import warnings import json # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-c", "--conf", required=True, help="path to the JSON configuration file") args = vars(ap.parse_args()) # filter warnings, load the configuration and initialize the Dro...
[ 198, 11748, 1822, 29572, 198, 11748, 14601, 198, 11748, 33918, 198, 198, 2, 5678, 262, 4578, 30751, 290, 21136, 262, 7159, 198, 499, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 499, 13, 2860, 62, 49140, 7203, 12, 66, 1600, 36...
3.57265
117
# -*- coding: utf-8 -*- """ This script is a help for checking if the new NUMBA functions are correctly integrated into acoular. One has to make a savefile (see 'all_bfWeave.sav') for both, the old acoular version an the new one. In section '#%% Compare Weave vs Numba' both versions are compared. This scri...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 1212, 4226, 318, 257, 1037, 329, 10627, 611, 262, 649, 36871, 4339, 5499, 389, 9380, 220, 201, 198, 18908, 4111, 656, 936, 2852, 283, 13, 201, 19...
2.115944
6,529
from django import template register = template.Library() @register.filter(name='percent')
[ 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 198, 198, 31, 30238, 13, 24455, 7, 3672, 11639, 25067, 11537 ]
3.833333
24
""" Styling for prompt_toolkit applications. """ from __future__ import unicode_literals from .base import * from .defaults import * from .from_dict import * from .from_pygments import * from .utils import * #: The default built-in style. #: (For backwards compatibility, when Pygments is installed, this includes the...
[ 37811, 198, 18716, 1359, 329, 6152, 62, 25981, 15813, 5479, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 764, 8692, 1330, 1635, 198, 6738, 764, 12286, 82, 1330, 1635, 198, 6738, 764, ...
3.111111
162
from sqlalchemy.ext.declarative import declarative_base # Base sqlalchemy Base = declarative_base()
[ 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 198, 2, 7308, 44161, 282, 26599, 198, 14881, 796, 2377, 283, 876, 62, 8692, 3419, 198 ]
3.060606
33
# -*- coding: utf-8 -*- from typing import Iterable, ClassVar from .actions import GenerateCertAction, RemoveCertAction, GenerateSignerCertificateAction from .schema import CertsSchema from ..feature import Feature from ..schema import FeatureSchema from ...action import Action class CertsFeature(Feature): """ ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 19720, 1330, 40806, 540, 11, 5016, 19852, 198, 198, 6738, 764, 4658, 1330, 2980, 378, 37608, 12502, 11, 17220, 37608, 12502, 11, 2980, 378, 11712, 263, 37608, 22460,...
3.320611
131
""" Majordomo Protocol client example. Uses the mdcli API to hide all MDP aspects Author : Min RK <benjaminrk@gmail.com> """ import sys from mdcliapi2 import MajorDomoClient if __name__ == '__main__': main()
[ 37811, 198, 44, 1228, 585, 17902, 20497, 5456, 1672, 13, 36965, 262, 45243, 44506, 7824, 284, 7808, 477, 337, 6322, 7612, 198, 198, 13838, 1058, 1855, 371, 42, 1279, 11722, 13337, 81, 74, 31, 14816, 13, 785, 29, 198, 198, 37811, 198, ...
2.88
75
# Make a program that reads a person's name and displays a welcome message.
[ 2, 6889, 257, 1430, 326, 9743, 257, 1048, 338, 1438, 290, 11298, 257, 7062, 3275, 13, 198 ]
4.470588
17
from . import ppo AGENTS = { "PPO": ppo.PPOAlgo, }
[ 6738, 764, 1330, 279, 7501, 198, 198, 4760, 15365, 796, 1391, 198, 220, 220, 220, 366, 10246, 46, 1298, 279, 7501, 13, 10246, 46, 2348, 2188, 11, 198, 92, 628 ]
1.9
30
# -*- coding: utf-8 -*- from __future__ import unicode_literals from typing import Optional from django.apps import apps from django.db import models from modules.packages.consts import UserPackageStatus, USER_PACKAGE_STATUSES from modules.packages.models.utils import get_reward_token from users.models.end_workers ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625,...
2.482733
1,332
import os import h5py import numpy as np import pytest from torch.testing import assert_allclose from loguru import logger from skimage.data import binary_blobs import survos import survos2.frontend.control from survos2.frontend.control import Launcher from survos2.entity.pipeline import Patch import survos2.fronten...
[ 11748, 28686, 198, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 28034, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 6738, 2604, 14717, 1330, 49706, 198, 6738, 1341, 9060, 13, 7890, 13...
1.961261
2,220
import math import random from itertools import product from chalk import * random.seed(1337) h = math.sqrt(3) / 2 h1 = math.cos(math.pi / 3) dia = hex_variation(12).line_width(0.02).rotate_by(1 / 4) dia.render("examples/output/hex-variation.png", height=512) dia.render_svg("examples/output/hex-variation.sv...
[ 11748, 10688, 198, 11748, 4738, 198, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 198, 6738, 30860, 1330, 1635, 628, 198, 25120, 13, 28826, 7, 1485, 2718, 8, 628, 198, 71, 796, 10688, 13, 31166, 17034, 7, 18, 8, 1220, 362, 198, 71, ...
2.488889
135
# -*- coding: utf-8 - # # This file is part of restkit released under the MIT license. # See the NOTICE for more information. """ TeeInput replace old FileInput. It use a file if size > MAX_BODY or memory. It's now possible to rewind read or restart etc ... It's based on TeeInput from Gunicorn. """ import copy impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 1334, 15813, 2716, 739, 262, 17168, 5964, 13, 198, 2, 4091, 262, 28536, 329, 517, 1321, 13, 628, 198, 37811, 198, 51, 1453, 20560, 6330, ...
3.318519
135
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-10-18 02:51 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 17, 319, 2177, 12, 940, 12, 1507, 7816, 25, 4349, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.73913
69
""" Example 1 of logging usage """ import logging logging.basicConfig(filename="logs.log", filemode="w", level=logging.DEBUG) def process1(): """ Process 1, okay? """ logging.info("Process 1 is complete...") return def process2(): """ Process 2, okay? """ logging.info("Process 2 i...
[ 37811, 198, 16281, 352, 286, 18931, 8748, 198, 37811, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 2625, 6404, 82, 13, 6404, 1600, 2393, 14171, 2625, 86, 1600, 1241, 28, 6404, 2667, 13, 30531, 8, 198, 198, 4299...
2.50108
463
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from mock import patch, Mock from diamond.collector import Collector from kafka_consumer_lag import KafkaConsumerLagCollector ##########...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 19617, 28, 40477, 12, 23, 198, 29113, 29113, 7804, 2235, 198, 198, 6738, 1332, 1330, 17573, 14402, 20448, 198, 6738, 1332, 1330, 651, 62, 33327, 273, 62, 11250, 198, 6738, 15290, 1330, 852...
5.078947
76
# Unit 3 | Assignment - Py Me Up, Charlie (PyPoll) # Import Modules/Dependencies import os import csv # Variables total_votes = 0 khan_votes = 0 correy_votes = 0 li_votes = 0 otooley_votes = 0 # Set Path For File csvpath = os.path.join('.', 'PyPoll', 'Resources', 'election_data.csv') # Open & Read CSV File with ope...
[ 2, 11801, 513, 930, 50144, 532, 9485, 2185, 3205, 11, 11526, 357, 20519, 39176, 8, 198, 198, 2, 17267, 3401, 5028, 14, 35, 2690, 3976, 198, 11748, 28686, 198, 11748, 269, 21370, 198, 198, 2, 15965, 2977, 198, 23350, 62, 29307, 796, ...
2.457711
1,206
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Author: hzsunshx # Created: 2015-03-23 14:42 """ sift """ import aircv as ac if __name__ == '__main__': # sift_test() # tmpl_test()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 6434, 25, 220, 289, 89, 19155, 1477, 87, 198, 2, 15622, 25, 1853, 12, 3070, 12, 1954, 1478, 25, 3682...
2.030928
97
import re from typing import ( TYPE_CHECKING, Any, Tuple, ) from urllib import ( parse, ) from platon_typing import ( URI, BlockNumber, HexStr, ) from platon_utils import ( add_0x_prefix, is_integer, remove_0x_prefix, ) from hexbytes import ( HexBytes, ) from platonpm.const...
[ 11748, 302, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 41876, 62, 50084, 2751, 11, 198, 220, 220, 220, 4377, 11, 198, 220, 220, 220, 309, 29291, 11, 198, 8, 198, 6738, 2956, 297, 571, 1330, 357, 198, 220, 220, 220, 21136, 11...
2.0625
768
# terrascript/resource/vmware/vmc.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:30:35 UTC) import terrascript __all__ = [ "vmc_cluster", "vmc_public_ip", "vmc_sddc", "vmc_site_recovery", "vmc_srm_node", ]
[ 2, 8812, 15961, 14, 31092, 14, 14761, 1574, 14, 14761, 66, 13, 9078, 198, 2, 17406, 4142, 7560, 416, 4899, 14, 15883, 8189, 13, 9078, 357, 1731, 12, 19117, 12, 1238, 2481, 1315, 25, 1270, 25, 2327, 18119, 8, 198, 11748, 8812, 15961,...
2.135593
118
########################################################################### # ____ _____________ __ __ __ _ _____ ___ _ # # / __ \/ ____/ ___/\ \/ / | \/ (_)__ _ _ __|_ _/ __| /_\ (R) # # / / / / __/ \__ \ \ / | |\/| | / _| '_/ _ \| || (__ / _ \ # # / /_/ / /___...
[ 29113, 29113, 7804, 21017, 198, 2, 220, 220, 220, 220, 220, 220, 1427, 220, 220, 2602, 29343, 220, 11593, 220, 220, 220, 11593, 220, 11593, 4808, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29343, 46444, 220, 220, 4808, 2...
1.96519
632
"""Tests for ietf.py""" from pathlib import Path from dataplaybook.const import ATable import dataplaybook.tasks.ietf as ietf def test_extract_standards(): """Test starting from string.""" txt = "IEEE 802.3ah" std = list(ietf.extract_standards(txt)) assert std == ["IEEE 802.3ah"] txt = "draft-i...
[ 37811, 51, 3558, 329, 220, 1155, 69, 13, 9078, 37811, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 1366, 1759, 2070, 13, 9979, 1330, 5161, 540, 198, 11748, 1366, 1759, 2070, 13, 83, 6791, 13, 1155, 69, 355, 220, 1155, 69, 628...
2.203729
2,199