content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import os from src.bin2png import bin2png for root, dirs, files in os.walk('./bin'): for file in files: if not file.endswith('.bin'): continue bin2png(os.path.join(root, file), './png') print('DONE')
[ 11748, 28686, 198, 6738, 12351, 13, 8800, 17, 11134, 1330, 9874, 17, 11134, 628, 198, 1640, 6808, 11, 288, 17062, 11, 3696, 287, 28686, 13, 11152, 7, 4458, 14, 8800, 6, 2599, 198, 220, 220, 220, 329, 2393, 287, 3696, 25, 198, 220, ...
2.122807
114
#!/usr/bin/python3 # -*- coding: utf-8 -*- import re from datetime import datetime import matplotlib.pyplot as plt logfile_live = "./android-live.logcat" logfile_app = "./android-app.logcat" TIMEFORMAT = "\d{2}-\d{2} (?P<datetime>\d{2}:\d{2}:\d{2}\.\d{3})" re_keyevent = re.compile(TIMEFORMAT + ".*action=0x0, flag...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 302, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, ...
2.197425
699
import time import uasyncio ad asyncio from ds18x20 import DS18X20 from homie.node import HomieNode from homie.device import HomieDevice, await_ready_state from homie.property import HomieProperty from homie.constants import FLOAT from machine import Pin from onewire import OneWire if __name__ == "__main__": ...
[ 11748, 640, 198, 11748, 334, 292, 13361, 952, 512, 30351, 952, 198, 198, 6738, 288, 82, 1507, 87, 1238, 1330, 17400, 1507, 55, 1238, 198, 6738, 3488, 494, 13, 17440, 1330, 8074, 494, 19667, 198, 6738, 3488, 494, 13, 25202, 1330, 8074,...
3.114286
105
import torch import torch.nn as nn
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77 ]
3.4
10
import pyxel from pongpy.interfaces.team import Team from pongpy.models.game_info import GameInfo from pongpy.models.state import State class ManualTeam(Team): """ デバッグ用の手動操作チーム。 Pyxel を直接読んでいるのでデバッグ用と以外では利用しない。 """ @property
[ 11748, 12972, 87, 417, 198, 198, 6738, 279, 506, 9078, 13, 3849, 32186, 13, 15097, 1330, 4816, 198, 6738, 279, 506, 9078, 13, 27530, 13, 6057, 62, 10951, 1330, 3776, 12360, 198, 6738, 279, 506, 9078, 13, 27530, 13, 5219, 1330, 1812, ...
1.858209
134
import random from tqdm import tqdm import glob import numpy as np import torch from sparse_ct.reconstructor_2d.n2self import ( N2SelfReconstructor) from sparse_ct.reconstructor_2d.dataset import ( DeepLesionDataset, EllipsesDataset) if __name__ == "__main__": params= {'batch_si...
[ 198, 11748, 4738, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 29877, 62, 310, 13, 260, 41571, 273, 62, 17, 67, 13, 77, 17, 944, 1330, 357...
1.9375
1,200
""" Team: d3.js Authors: David Anderson, Duncan Gans, Dustin Hines Course: Nature-Inspired Computation Assignment: Evolutionary Algorithms for MAXSAT: A Comparison of Genetic Algorithms and Population Based Incremental Learning Date: 1 October 2018 Description: This file implements a PBIL approach to finding op...
[ 37811, 198, 15592, 25, 288, 18, 13, 8457, 198, 30515, 669, 25, 3271, 9918, 11, 18625, 402, 504, 11, 37616, 367, 1127, 198, 49046, 25, 10362, 12, 41502, 1202, 22476, 341, 198, 8021, 16747, 25, 15815, 560, 978, 7727, 907, 329, 25882, ...
2.888453
3,317
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 628, 628, 628, 198 ]
3.5
12
from __future__ import division, print_function import sys from dark.btop import countGaps def _debugPrint(hsp, queryLen, localDict, msg=''): """ Print debugging information showing the local variables used during a call to normalizeHSP and the hsp and then raise an C{AssertionError}. @param hsp: Th...
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 198, 11748, 25064, 198, 198, 6738, 3223, 13, 65, 4852, 1330, 954, 38, 1686, 628, 198, 4299, 4808, 24442, 18557, 7, 71, 2777, 11, 12405, 30659, 11, 1957, 35, 713, 11, 31456, 28...
2.753837
3,258
# -*- coding: utf-8 -*- """Various utilities.""" import json import logging import os import random import string import time from collections import defaultdict from datetime import date, datetime, timedelta from itertools import filterfalse, groupby from urllib.parse import quote, urlencode, urlparse import emails ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 40009, 20081, 526, 15931, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 640, 198, 6738, 17268, 1330, ...
1.889842
66,550
# importa a biblioteca factorial existente em math from math import factorial # cabeçalho do programa print('-' * 30) print(f'{"Calcula Fatorial":^30}') print('-' * 30) # solicita o número ao usuário num = int(input('Digite um número: ')) # calcula o fatorial do número inserido fatorial = factorial(num) # imprime o...
[ 2, 1330, 64, 257, 275, 29142, 313, 31047, 1109, 5132, 2152, 21872, 795, 10688, 198, 6738, 10688, 1330, 1109, 5132, 198, 198, 2, 269, 11231, 16175, 282, 8873, 466, 1430, 64, 198, 4798, 10786, 19355, 1635, 1542, 8, 198, 4798, 7, 69, 6...
2.527027
148
#!/usr/bin/env python3 import rospy from sensor_msgs.msg import CompressedImage import processor from constants import PATH_USBCAM IS_DEBUG_MODE = True CURRENT_STATE = 'traffic_light' rospy.Subscriber(PATH_USBCAM, CompressedImage, processor.process_front_image, queue_size=1)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 686, 2777, 88, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, 3082, 2790, 5159, 198, 11748, 12649, 198, 6738, 38491, 1330, 46490, 62, 2937, 2749, 2390, 198, 198, 17...
2.936842
95
""" Copyright 2017 Globo.com 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 writ...
[ 37811, 198, 220, 220, 15069, 2177, 2671, 20391, 13, 785, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 1...
3.632743
226
import pywps
[ 11748, 12972, 86, 862, 198 ]
2.6
5
from django.db import models from jsonfield import JSONField
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 33918, 3245, 1330, 19449, 15878, 628 ]
4.133333
15
""" CREATE DATASETS """ # pylint: disable=C0301,E1101,W0622,C0103,R0902,R0915 import torch.utils.data as data import torch from random import shuffle from torchvision.datasets import DatasetFolder from pathlib import Path from PIL import Image import numpy as np import os import os.path import random import imageio ...
[ 37811, 198, 43387, 6158, 360, 1404, 1921, 32716, 198, 37811, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 34, 3070, 486, 11, 36, 1157, 486, 11, 54, 3312, 1828, 11, 34, 486, 3070, 11, 49, 2931, 2999, 11, 49, 2931, 1314, 198, 198, ...
2.126084
4,037
import torch import torch.nn as nn from model import DeepPSC import dataset from torch.utils.data import DataLoader import pathlib import os import time import logging import argparse from test import test import numpy as np parser = argparse.ArgumentParser() parser.add_argument('--loc_dim', type=int, ...
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 6738, 2746, 1330, 10766, 3705, 34, 201, 198, 11748, 27039, 201, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 201, 198, 11748, 3108, 8019, 201, 198, ...
2.07037
2,160
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
5.229167
96
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
[ 2, 220, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 41906, 17174, 4557, 35625, 198, 2, 45593, 2640, 11, 262, 7311, 276, 42410, 6779, 4482, 286, 262, 10373, 57, 198, 2, 15069, 357, 66, 8, 3717, 12, 1238, 2481, ...
3.930931
333
# MIT License # # Copyright (c) 2019 Morning Project Samurai (MPS) # # 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, cop...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 14410, 4935, 23882, 357, 44, 3705, 8, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 29...
3.684971
346
# templatetags/include_as_js_str.py from django import template from django.template.loader_tags import do_include from django.utils.encoding import force_text from django.utils.safestring import mark_safe register = template.Library() @register.tag('include_as_js_str')
[ 2, 2169, 489, 265, 316, 3775, 14, 17256, 62, 292, 62, 8457, 62, 2536, 13, 9078, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 28243, 13, 29356, 62, 31499, 1330, 466, 62, 17256, 198, 6738, 42625, 14208, 13, 26791, ...
3.136364
88
X XXXX XXXXXXXXX XXXX XXXXXXXXXXXXXXX XXXX XXXXXXXXXXXXXXXXXXXXXXX XXX X X XXX X XX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX X X XXX X XX XX X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX X XX XXX...
[ 55, 27713, 55, 1395, 24376, 24376, 27713, 55, 1395, 24376, 24376, 24376, 8051, 27713, 55, 1395, 24376, 24376, 24376, 24376, 24376, 8051, 198, 198, 43145, 1395, 1395, 198, 43145, 1395, 21044, 198, 8051, 1395, 1395, 24376, 24376, 24376, 24376...
3.698181
26,009
import numpy as np import cv2 as cv from matplotlib import pyplot as plt imgL = cv.imread('images/example_l.png', 0) imgR = cv.imread('images/example_r.png', 0) window_size = 3 # wsize default 3; 5; 7 for SGBM reduced size image; 15 for SGBM full size image (1300px and above); 5 Works nicely stereo = cv.StereoSGBM_cr...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 9600, 43, 796, 269, 85, 13, 320, 961, 10786, 17566, 14, 20688, 62, 75, 13, 11134, 3256, ...
2.389503
362
import re from model.contact import Contact """def test_data_on_home_page(app): contact_from_home_page = app.contact.get_contact_list()[0] contact_from_edit_page = app.contact.get_contact_info_from_edit_page(0) assert contact_from_home_page.all_phones_from_home_page == merge_phones_like_on_home_page( ...
[ 11748, 302, 198, 6738, 2746, 13, 32057, 1330, 14039, 628, 198, 37811, 4299, 1332, 62, 7890, 62, 261, 62, 11195, 62, 7700, 7, 1324, 2599, 198, 220, 220, 220, 2800, 62, 6738, 62, 11195, 62, 7700, 796, 598, 13, 32057, 13, 1136, 62, 3...
2.695489
266
import os import re import sys import random import unittest test_str_re = re.compile(r'([^ ]+) \((.*)\)') if __name__ == "__main__": tests = unittest.defaultTestLoader.discover(os.path.dirname(__file__), pattern='*.py') if len(sys.argv) == 2 and sys.argv[1] == '--discover': map_tests(print_test, tests...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 4738, 198, 11748, 555, 715, 395, 198, 198, 9288, 62, 2536, 62, 260, 796, 302, 13, 5589, 576, 7, 81, 6, 26933, 61, 2361, 28988, 16792, 7, 15885, 19415, 8, 11537, 628, 198,...
2.002217
451
import gfapy try: from functools import partialmethod except ImportError: #for compatibility with old python versions for shall_version in ["gfa1", "gfa2"]: setattr(VersionConversion, "to_"+shall_version+"_s", partialmethod(VersionConversion.to_version_s, version = shall_version)) setatt...
[ 11748, 308, 69, 12826, 198, 28311, 25, 198, 220, 422, 1257, 310, 10141, 1330, 13027, 24396, 198, 16341, 17267, 12331, 25, 198, 220, 1303, 1640, 17764, 351, 1468, 21015, 6300, 198, 198, 1640, 2236, 62, 9641, 287, 14631, 70, 13331, 16, ...
2.612069
232
import argparse from cliva_fl.utils import Logger, Plotter from pathlib import Path from datetime import datetime parser = argparse.ArgumentParser(description='Argument parser for log processing and plot creation') parser.add_argument('-n', '--num', type=int, required=False, help='Index of previously executed experime...
[ 11748, 1822, 29572, 198, 6738, 537, 12151, 62, 2704, 13, 26791, 1330, 5972, 1362, 11, 28114, 353, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7,...
3.057987
914
from typing import List, Optional from flask import escape, Response from rabbitai.models.dashboard import Dashboard from tests.dashboards.base_case import DashboardTestCase
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 42903, 1330, 6654, 11, 18261, 198, 198, 6738, 22746, 1872, 13, 27530, 13, 42460, 3526, 1330, 16189, 3526, 198, 6738, 5254, 13, 42460, 12821, 13, 8692, 62, 7442, 1330, 16189, 3526, 1440...
4.116279
43
"""A tmslack-specific wrapper for the slack client.""" from pathlib import Path from typing import Sequence, NoReturn from slackclient import SlackClient from tmslack.cache import Cache from tmslack.config import Config class ClientException(Exception): """Class for exceptions in the slack client.""" class Cl...
[ 37811, 32, 256, 907, 75, 441, 12, 11423, 29908, 329, 262, 30740, 5456, 526, 15931, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 45835, 11, 1400, 13615, 198, 198, 6738, 30740, 16366, 1330, 36256, 11792, 198, 198, 6738, 256...
2.604552
703
# Copyright (c) 2020, NVIDIA CORPORATION. from cudf.api import types
[ 2, 15069, 357, 66, 8, 12131, 11, 15127, 23929, 44680, 6234, 13, 198, 198, 6738, 269, 463, 69, 13, 15042, 1330, 3858, 198 ]
3.043478
23
from __future__ import print_function import sys import os from collections import OrderedDict from itertools import chain import numpy from six import iteritems, itervalues, reraise from openmdao.core.component import Component from openmdao.util.dict_util import _jac_to_flat_dict from openmdao.core.mpi_wrap impo...
[ 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 198, 11748, 299, 32152, 198, 198, 6738, 2237, 1330...
2.244228
4,418
"""Joint abstraction. It can be any DynamixelMotor or an OrbitaMotor. """ from abc import ABC from logging import Logger from typing import Callable, Dict, Optional, Tuple from .register import Register class Joint(ABC): """Joint abstraction. Should define the following registers: 'torque_enable' ...
[ 37811, 41, 1563, 34651, 13, 198, 198, 1026, 460, 307, 597, 14970, 7168, 34919, 393, 281, 38161, 64, 34919, 13, 198, 37811, 198, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 18931, 1330, 5972, 1362, 198, 6738, 19720, 1330, 4889, 540, 11,...
2.251917
913
import can import asyncio import time can0 = can.ThreadSafeBus(channel = 'can0', bustype = 'socketcan_ctypes') loop = asyncio.get_event_loop() ready = False przelaczone = False counter = 0; can.Notifier(can0, [ on_message ], loop=loop) loop.call_soon(send_status) loop.run_forever()
[ 11748, 460, 198, 11748, 30351, 952, 198, 11748, 640, 628, 198, 5171, 15, 796, 460, 13, 16818, 31511, 16286, 7, 17620, 796, 705, 5171, 15, 3256, 13076, 2981, 796, 705, 44971, 5171, 62, 310, 9497, 11537, 198, 198, 26268, 796, 30351, 952...
2.633929
112
import sys from PyQt6 import QtCore, QtGui, QtWidgets if __name__ == "__main__": main()
[ 11748, 25064, 198, 198, 6738, 9485, 48, 83, 21, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.365854
41
from .Point import Point
[ 6738, 764, 12727, 1330, 6252, 628 ]
4.333333
6
# -*- coding: utf-8 -*- # # Copyright 2012-2020 BigML # # 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 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2321, 12, 42334, 4403, 5805, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2,...
2.158051
72,546
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Contains a helper function for deploying and executing a packaged executable on a Target.""" from __future__ import print_function import common import ...
[ 2, 15069, 2864, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 37811...
2.645944
2,268
""" handle PEP 420 implicit namespace packages for labextensions """ # pylint: disable=protected-access import importlib import sys from pathlib import Path from jupyterlab import federated_labextensions from jupyterlab.labextensions import LabExtensionApp HERE = Path(__file__).parent ROOT = HERE.parent NODE_MODULES ...
[ 37811, 5412, 350, 8905, 28262, 16992, 25745, 10392, 329, 2248, 2302, 5736, 198, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 24326, 12, 15526, 198, 11748, 1330, 8019, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 673...
2.960591
203
# For faster and efficient mathematical evaluations we use numpy import numpy as np # For image proccesing we use openCV import cv2 # For creating and manipulating files import os # the time package provides various time-related functions import time # Create a video capture object to capture a video using device(came...
[ 2, 1114, 5443, 290, 6942, 18069, 34109, 356, 779, 299, 32152, 198, 11748, 299, 32152, 355, 45941, 198, 2, 1114, 2939, 386, 535, 274, 278, 356, 779, 1280, 33538, 198, 11748, 269, 85, 17, 198, 2, 1114, 4441, 290, 29349, 3696, 198, 117...
2.893471
582
import sys, os, shutil from PIL import Image import matplotlib.pyplot as plt import matplotlib.colors as colors import numpy as np if __name__ == '__main__': main(sys.argv[1])
[ 11748, 25064, 11, 28686, 11, 4423, 346, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 4033, 669, 355, 7577, 198, 11748, 299, 32152, 355, 45941, ...
2.666667
69
import FWCore.ParameterSet.Config as cms process = cms.Process("HLTCOMPARE") process.load("HLTriggerOffline.Common.HLTValidation_cff") process.load("HLTriggerOffline.Common.HLTValidationHarvest_cff") process.load("HLTriggerOffline.Common.HLTValidationQT_cff") process.load("L1TriggerConfig.L1GtConfigProducers.L1GtCon...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 14681, 796, 269, 907, 13, 18709, 7203, 6581, 4825, 2662, 47, 12203, 4943, 198, 198, 14681, 13, 2220, 7203, 6581, 48344, 28657, 13, 17227, 13, 6581, 6849, 10751, ...
2.409385
1,236
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse # so we can generate our API URL. # rest framework test helper tools: from rest_framework.test import APIClient # test client that we can use to make requests to our API and # then check what the response is...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 2, 523, 356, 460, 7716, 674, 7824, 10289, 13, ...
2.834455
2,972
# Copyright (C) 2017, Philsong <songbohr@gmail.com> import json import config from .market import Market from exchanges.okcoin.OkcoinSpotAPI import OKCoinSpot
[ 2, 15069, 357, 34, 8, 2177, 11, 1380, 4487, 506, 1279, 34050, 65, 1219, 81, 31, 14816, 13, 785, 29, 198, 198, 11748, 33918, 198, 11748, 4566, 198, 6738, 764, 10728, 1330, 5991, 198, 6738, 14525, 13, 482, 3630, 13, 18690, 3630, 32565...
3.3125
48
import io import pathlib from typing import Any, Dict, Union import numpy as np import pandas as pd from qcelemental.util.serialization import serialize from ..interface.collections import HDF5View
[ 11748, 33245, 198, 11748, 3108, 8019, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 10662, 344, 1732, 282, 13, 22602, 13, 46911, 1634, 1...
3.465517
58
#! /usr/local/bin/python # A simple gopher client. # # Usage: gopher [ [selector] host [port] ] import string import sys import os import socket # Default selector, host and port DEF_SELECTOR = '' DEF_HOST = 'gopher.micro.umn.edu' DEF_PORT = 70 # Recognized file types T_TEXTFILE = '0' T_MENU = '1' T_C...
[ 2, 0, 1220, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 198, 2, 317, 2829, 308, 8803, 5456, 13, 198, 2, 198, 2, 29566, 25, 308, 8803, 685, 685, 19738, 273, 60, 2583, 685, 634, 60, 2361, 198, 198, 11748, 4731, 198, 11748, 25064, ...
2.590851
787
# https://leetcode.com/problems/symmetric-tree/solution/ # Definition for a binary tree node. # recursive, by comparing two copies of the tree from collections import deque # level order traversal # just need to handle Null nodes carefully
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 1837, 3020, 19482, 12, 21048, 14, 82, 2122, 14, 198, 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 220, 220, 220, 1303, 45115, 11, 416, 14176, 734, 9088, 286, 262, 55...
3.5
72
import contextlib import numpy as np import mytorch import mytorch.simple_core from mytorch.simple_core import Variable, square, add ex1() ex2() ex3()
[ 11748, 4732, 8019, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 616, 13165, 354, 198, 11748, 616, 13165, 354, 13, 36439, 62, 7295, 198, 6738, 616, 13165, 354, 13, 36439, 62, 7295, 1330, 35748, 11, 6616, 11, 751, 628, 628,...
2.821429
56
#! coding=utf-8 """ high-level toolbox for Document Extractor """ import re import typing import nlpir from nlpir import get_instance as __get_instance__ from nlpir import native # class and class instance __cls__ = native.doc_extractor.DocExtractor __instance__: typing.Optional[native.doc_extractor.DocExtractor] = No...
[ 2, 0, 19617, 28, 40477, 12, 23, 198, 37811, 198, 8929, 12, 5715, 2891, 3524, 329, 16854, 29677, 273, 198, 37811, 198, 11748, 302, 198, 11748, 19720, 198, 11748, 299, 75, 4063, 198, 6738, 299, 75, 4063, 1330, 651, 62, 39098, 355, 115...
2.236073
2,944
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Ed Mountjoy (June 2018) Formats the output of bedtools into final format for loading ''' import argparse import pandas as pd def parse_args(): ''' Load command line args ''' parser = argparse.ArgumentParser() parser.add_argument('--inf', metavar='<file>',...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 7407, 5628, 2633, 357, 15749, 2864, 8, 198, 198, 8479, 1381, 262, 5072, 286, 3996, 31391, 656, 2457, 57...
2.746888
241
import torch import numpy as np from torch.utils.data.sampler import Sampler class UniformSampler(Sampler): """Samples elements with roughly uniform distribution of samples with the same label Arguments: """ def __init__(self, data_source, batch_size, number_of_diff...
[ 11748, 28034, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 37687, 20053, 1330, 3409, 20053, 628, 198, 4871, 35712, 16305, 20053, 7, 16305, 20053, 2599, 198, 220, 220, 220, 37227, 50, 12629, 4847, 3...
2.591518
448
""" Functions for reading ascidoc files (*.adoc, *.asc, *.asciidoc) and tagging each line """ import os import sys import glob import re import logging from shutil import copyfile from pugnlp import futil from nlpia.regexes import CRE_ACRONYM # from nlpia.data_utils import iter_lines # FIXME: reuse from nlpia.constan...
[ 37811, 40480, 329, 3555, 10570, 312, 420, 3696, 20789, 13, 324, 420, 11, 46866, 3372, 11, 46866, 292, 979, 312, 420, 8, 290, 49620, 1123, 1627, 37227, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 15095, 198, 11748, 302, 198, 11748,...
2.324217
9,799
import unittest # Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, # determine if s can be segmented into a space-separated sequence of one or more dictionary words. s = "leetcode" wordDict = ["leet", "code"] output_value = True if __name__ == '__main__': unittest.mai...
[ 11748, 555, 715, 395, 198, 198, 2, 11259, 257, 1729, 12, 28920, 4731, 264, 290, 257, 22155, 1573, 35, 713, 7268, 257, 1351, 286, 1729, 12, 28920, 2456, 11, 198, 2, 5004, 611, 264, 460, 307, 10618, 276, 656, 257, 2272, 12, 25512, 5...
3.099237
131
from django.core.cache import cache from enum import Enum Cache = CacheWrapper(cache)
[ 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 6738, 33829, 1330, 2039, 388, 628, 198, 198, 30562, 796, 34088, 36918, 2848, 7, 23870, 8, 198 ]
3.296296
27
''' 「検査陽性者の状況」画像から数値データを抽出する処理 パターン1 ''' import re import pytesseract import cv2
[ 7061, 6, 198, 13697, 162, 97, 250, 162, 253, 119, 165, 50159, 45250, 100, 38519, 17683, 232, 35050, 111, 223, 13700, 18796, 119, 161, 225, 237, 27370, 36853, 46763, 108, 161, 222, 97, 21959, 6312, 23376, 31758, 162, 232, 121, 49035, 1...
1.092105
76
#!/usr/bin/env python # # original code from # https://github.com/giampaolo/psutil/blob/master/examples/ # # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Print system memory information. """ i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 198, 2, 2656, 2438, 422, 220, 198, 2, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 12397, 13299, 14057, 14, 862, 22602, 14, 2436, 672, 14, 9866, 14, 1069, 12629, 14, 198,...
2.948276
174
""" Deep Interest Network. """ from .nn import Attention from .interest_net import InterestNet class DIN(InterestNet): """Deep Interest Network. Parameters ---------- features : Features attention_groups : list of AttentionGroup num_classes : int Number of classes. embedding_s...
[ 37811, 198, 29744, 12033, 7311, 13, 198, 37811, 198, 198, 6738, 764, 20471, 1330, 47406, 198, 6738, 764, 9446, 62, 3262, 1330, 12033, 7934, 628, 198, 4871, 360, 1268, 7, 19302, 7934, 2599, 198, 220, 220, 220, 37227, 29744, 12033, 7311, ...
2.708333
240
# coding=utf-8 import os from tqdm import tqdm import networkx as nx from networkx.algorithms import bipartite import argparse import torch """ import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt """ # maximal Bipartite matching. # python program to find if __name__ == "__main__": main(...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 28686, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 3127, 87, 355, 299, 87, 198, 6738, 3127, 87, 13, 282, 7727, 907, 1330, 14141, 433, 578, 198, 11748, 1822, 29572, 198, ...
2.900901
111
# SPDX-License-Identifier: MIT # # The MIT License (MIT) # # Copyright (c) <2021> Hottinger Brüel & Kjaer GmbH, Im Tiefen See 45, 64293 Darmstadt, Germany # # 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...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1279, 1238, 2481, 29, 6964, 889, 263, 1709, 9116, 417, 1222, 509, 6592, 263, 402, 2022, 39...
2.882096
687
#!/usr/bin/env python3 import pathlib from typing import Set import frontmatter import datetime import re import urllib.request import os if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 3108, 8019, 198, 6738, 19720, 1330, 5345, 198, 11748, 2166, 47635, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 28686, 628, 628,...
3.050847
59
import meta_ultra.config as config from meta_ultra.utils import * from meta_ultra.modules import * from meta_ultra.data_type import * modules.append(Humann2Module)
[ 11748, 13634, 62, 586, 430, 13, 11250, 355, 4566, 198, 6738, 13634, 62, 586, 430, 13, 26791, 1330, 1635, 198, 6738, 13634, 62, 586, 430, 13, 18170, 1330, 1635, 198, 6738, 13634, 62, 586, 430, 13, 7890, 62, 4906, 1330, 1635, 628, 197...
3.092593
54
import sys import traceback from bproxypool.scheduler import run from bproxypool.server import create_app from bproxypool.utils.notify import ding app = create_app() if __name__ == '__main__': # app.run(debug=True) if len(sys.argv) == 2: if sys.argv[1] == 'scheduler': try: ...
[ 11748, 25064, 198, 11748, 12854, 1891, 198, 198, 6738, 275, 1676, 87, 4464, 970, 13, 1416, 704, 18173, 1330, 1057, 198, 6738, 275, 1676, 87, 4464, 970, 13, 15388, 1330, 2251, 62, 1324, 198, 6738, 275, 1676, 87, 4464, 970, 13, 26791, ...
1.976027
292
from __future__ import division if (__name__ == "__main__"): import sys run(args=sys.argv[1:])
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 361, 357, 834, 3672, 834, 6624, 366, 834, 12417, 834, 1, 2599, 198, 220, 1330, 25064, 198, 220, 1057, 7, 22046, 28, 17597, 13, 853, 85, 58, 16, 25, 12962, 198 ]
2.564103
39
import random import sys from copy import deepcopy from .happines_base import Bot as HappinessBaseBot """ ........... .....3..... ....323.... ...32123... ..321H123.. ...32X23... ....323.... .....3..... ........... ........... ........... """ bot = Bot()
[ 11748, 4738, 198, 11748, 25064, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 764, 71, 1324, 1127, 62, 8692, 1330, 18579, 355, 38456, 14881, 20630, 628, 198, 37811, 198, 2109, 986, 198, 12359, 18, 12359, 198, 1106, 32637, 1106, 19...
3.107143
84
import os import sys import time import logging import logging.config from k8sPaiLibrary.maintainlib import add as k8s_add from k8sPaiLibrary.maintainlib import remove as k8s_remove from k8sPaiLibrary.maintainlib import etcdfix as k8s_etcd_fix from k8sPaiLibrary.maintainlib import kubectl_conf_check from k8sPaiLibrary...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 198, 6738, 479, 23, 82, 47, 1872, 23377, 13, 76, 32725, 8019, 1330, 751, 355, 479, 23, 82, 62, 2860, 198, 6738, 479, 23, 82, 47,...
2.948718
195
import requests url = 'https://api.quotable.io/random' r = requests.get(url) quote = r.json() print(quote['content']) print(' -',quote['author'])
[ 11748, 7007, 201, 198, 201, 198, 6371, 796, 705, 5450, 1378, 15042, 13, 421, 313, 540, 13, 952, 14, 25120, 6, 201, 198, 201, 198, 81, 796, 7007, 13, 1136, 7, 6371, 8, 201, 198, 22708, 796, 374, 13, 17752, 3419, 201, 198, 4798, 7...
2.430769
65
from ptvp3 import P3terpreter import sys import json p3p = P3terpreter.from_param_dict(json.load(open(sys.argv[1]))) p3p.start()
[ 6738, 279, 14981, 79, 18, 1330, 350, 18, 353, 3866, 353, 198, 11748, 25064, 198, 11748, 33918, 628, 198, 79, 18, 79, 796, 350, 18, 353, 3866, 353, 13, 6738, 62, 17143, 62, 11600, 7, 17752, 13, 2220, 7, 9654, 7, 17597, 13, 853, 8...
2.298246
57
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################## # # Copyright (c) 2018 Baidu.com, Inc. All Rights Reserved # ######################################################################## """ File: feature.py Author: zhenglinhai(zhenglinhai@baidu.com)...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 198, 2, 220, 198, 2, 15069, 357, 66, 8, 2864, 347, 1698, 84, 13, 785, 11, 3457, 13, 1439, 6923,...
2.35689
566
# This is an input class. Do not edit. """ def traversal(node, array): if not array: return left, right = -1, -1 for i in range(len(array)): if left == -1 and array[i] < node.value: left = i if right == -1 and array[i] >= node.value: right = i if left !=...
[ 2, 770, 318, 281, 5128, 1398, 13, 2141, 407, 4370, 13, 628, 198, 37811, 198, 4299, 33038, 282, 7, 17440, 11, 7177, 2599, 198, 220, 220, 220, 611, 407, 7177, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 198, 220, 220, 220, 1...
2.253731
335
import pytest from onesignalclient.app_client import OneSignalAppClient from requests.exceptions import HTTPError from .base_test import BaseTest
[ 11748, 12972, 9288, 198, 6738, 3392, 570, 282, 16366, 13, 1324, 62, 16366, 1330, 1881, 11712, 282, 4677, 11792, 198, 6738, 7007, 13, 1069, 11755, 1330, 14626, 12331, 198, 6738, 764, 8692, 62, 9288, 1330, 7308, 14402, 628 ]
3.868421
38
__author__ = 'Stefan Krawczyk <stefank@cs.stanford.edu>'
[ 834, 9800, 834, 796, 705, 7447, 24408, 509, 1831, 66, 46355, 1279, 301, 891, 962, 31, 6359, 13, 14192, 3841, 13, 15532, 29, 6, 198 ]
2.28
25
# ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # 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.apa...
[ 2, 41906, 17174, 46068, 1174, 198, 2, 15069, 2177, 12, 7908, 8180, 10501, 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, ...
4.404167
240
from dataclasses import dataclass, field from typing import TypeVar import websocket from io import IOBase import json WebSocket = TypeVar('WebSocket') @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 5994, 19852, 198, 11748, 2639, 5459, 198, 6738, 33245, 1330, 314, 9864, 589, 198, 11748, 33918, 198, 198, 13908, 39105, 796, 5994, 19852, 10786, 13908, 3910...
3.38
50
from .investments import * manager = InvestmentsManager()
[ 6738, 764, 24859, 902, 1330, 1635, 198, 198, 37153, 796, 46568, 13511, 3419, 198 ]
4.214286
14
# # ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # BitBake Toaster Implementation # # Copyright (C) 2013 Intel Corporation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # pub...
[ 2, 198, 2, 409, 25, 912, 28, 19, 25, 2032, 28, 19, 25, 6448, 28, 19, 25, 316, 198, 2, 532, 9, 12, 7400, 12, 10394, 25, 604, 26, 269, 12, 35487, 12, 28968, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12,...
3.385417
288
from setuptools import setup, find_packages setup( name="robosuite", packages=[ package for package in find_packages() if package.startswith("robosuite") ], install_requires=[ "numpy>=1.13.3", "scipy>=1.3.1", "opencv-python>=3.4.3.18", # "mujoco-py<1.50.2,>=1.50...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 22609, 418, 84, 578, 1600, 198, 220, 220, 220, 10392, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 5301, 329, 5301, 287,...
2.332278
316
__all__ = ["jobs", "staffing_plan", "transfer_generator"]
[ 834, 439, 834, 796, 14631, 43863, 1600, 366, 28120, 278, 62, 11578, 1600, 366, 39437, 62, 8612, 1352, 8973, 198 ]
2.9
20
import argparse import re import os import ssh_config import paramiko import getpass from pathlib import Path from ssh_config.hosts import ping def open_ssh_key(path: str, password: str=None) -> (paramiko.pkey.PKey, str): """ Function will return the Pkey object for the path specified :param path: The ...
[ 11748, 1822, 29572, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 26678, 62, 11250, 198, 11748, 5772, 12125, 198, 11748, 651, 6603, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 26678, 62, 11250, 13, 4774, 82, 1330, 29400, 628, ...
2.36165
412
from django.db import models from treeckle.common.models import TimestampedModel # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 5509, 694, 293, 13, 11321, 13, 27530, 1330, 5045, 395, 13322, 17633, 198, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.633333
30
from dateutil.parser import parse from configs import ConfigFactory config = ConfigFactory.factory()
[ 6738, 3128, 22602, 13, 48610, 1330, 21136, 198, 6738, 4566, 82, 1330, 17056, 22810, 198, 198, 11250, 796, 17056, 22810, 13, 69, 9548, 3419, 628 ]
4.12
25
try: from sympy import * # this kind of import puts a lot of stuff in global namespace; # usually better to import what you need or import sympy except ImportError: st_local("importerror", "True") raise x = Symbol('x') f = Function('f') f = eval(st_local("anything").replace('^','**')) st_local("a...
[ 28311, 25, 198, 220, 220, 220, 422, 10558, 88, 1330, 1635, 198, 220, 220, 220, 1303, 428, 1611, 286, 1330, 7584, 257, 1256, 286, 3404, 287, 3298, 25745, 26, 198, 220, 220, 220, 1303, 3221, 1365, 284, 1330, 644, 345, 761, 393, 1330, ...
2.797688
173
#!/usr/bin/python from sense_hat import SenseHat sense = SenseHat() sense.clear() temp = sense.get_temperature_from_pressure() temp = round(temp, 1) print("Temperature: %s C" % temp) humidity = sense.get_humidity() humidity = round(humidity, 2) print("Humidity: %s %%rH" % humidity)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 2565, 62, 5183, 1330, 24956, 40483, 198, 198, 33819, 796, 24956, 40483, 3419, 198, 33819, 13, 20063, 3419, 198, 198, 29510, 796, 2565, 13, 1136, 62, 11498, 21069, 62, 6738, 62, 361...
2.786408
103
''' Given a set of distinct integers, print the size of a maximal subset of where the sum of any numbers in is not evenly divisible by . For example, the array and . One of the arrays that can be created is . Another is . After testing all permutations, the maximum length solution array has elements. Function Desc...
[ 7061, 6, 198, 15056, 257, 900, 286, 7310, 37014, 11, 3601, 262, 2546, 286, 257, 40708, 24637, 286, 220, 810, 262, 2160, 286, 597, 220, 3146, 287, 220, 318, 407, 21894, 2659, 12843, 416, 764, 198, 1890, 1672, 11, 262, 7177, 220, 290,...
3.404938
405
from yowsup.layers.protocol_media.protocolentities.message_media import MediaMessageProtocolEntity from yowsup.layers.protocol_messages.protocolentities.test_message import MessageProtocolEntityTest from yowsup.structs import ProtocolTreeNode
[ 6738, 331, 1666, 929, 13, 75, 6962, 13, 11235, 4668, 62, 11431, 13, 11235, 4668, 298, 871, 13, 20500, 62, 11431, 1330, 6343, 12837, 19703, 4668, 32398, 198, 6738, 331, 1666, 929, 13, 75, 6962, 13, 11235, 4668, 62, 37348, 1095, 13, 1...
3.521739
69
# Parte 1 # with open('message.txt','r') as file: # print(file.read()) # # Parte 2 # with open('alice.txt','r') as file: # (file.read()) # Parte 2 #with open('alice.txt','r') as file: # line_counter = 0 # for line in file: # print(line, end="") # # if (line_counter != 0) and (line_counter % 20 =...
[ 2, 2142, 68, 352, 198, 2, 351, 1280, 10786, 20500, 13, 14116, 41707, 81, 11537, 355, 2393, 25, 198, 2, 220, 3601, 7, 7753, 13, 961, 28955, 198, 2, 220, 220, 220, 220, 198, 220, 220, 198, 2, 2142, 68, 362, 198, 2, 351, 1280, 10...
2.346491
456
# -*- coding: utf-8 -*- """ pybitcoin ~~~~~ :copyright: (c) 2014 by Halfmoon Labs :license: MIT, see LICENSE for more details. """ import json, requests, traceback from ..hash import reverse_hash BLOCKCHAIN_API_BASE_URL = "https://blockchain.info" from .blockchain_client import BlockchainClient def...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 12972, 35395, 198, 220, 220, 220, 220, 8728, 93, 628, 220, 220, 220, 1058, 22163, 4766, 25, 357, 66, 8, 1946, 416, 13139, 22977, 23500, 198,...
2.72482
556
""" REST API Documentation for the NRS TFRS Credit Trading Application The Transportation Fuels Reporting System is being designed to streamline compliance reporting for transportation fuel suppliers in accordance with the Renewable & Low Carbon Fuel Requirements Regulation. OpenAPI spec version: ...
[ 37811, 198, 220, 220, 220, 30617, 7824, 43925, 329, 262, 40034, 24958, 6998, 10504, 25469, 15678, 628, 220, 220, 220, 383, 15198, 13333, 1424, 29595, 4482, 318, 852, 3562, 284, 4269, 1370, 198, 220, 220, 220, 11846, 6447, 329, 9358, 525...
2.714449
1,751
import numpy as np from itertools import product from prostagma.techniques.technique import SearchTechnique from prostagma.performances.cross_validation import CrossValidation from sklearn.grid_search import ParameterGrid class GridSearch(SearchTechnique): """ The class implement the simple Grid Search algorit...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 198, 6738, 11825, 363, 2611, 13, 23873, 6368, 13, 23873, 2350, 1330, 11140, 25574, 2350, 198, 6738, 11825, 363, 2611, 13, 525, 687, 1817, 13, 19692, 62, ...
2.913366
404
import os import numpy as np from omero.gateway import BlitzGateway from am_utils.utils import imsave
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 267, 647, 78, 13, 10494, 1014, 1330, 29299, 22628, 1014, 198, 198, 6738, 716, 62, 26791, 13, 26791, 1330, 545, 21928, 628, 628 ]
3.147059
34
from src.utils import utils from src.configurations import classifier_config as config from src.configurations import embeddings_config as embeddings_config from src.dataset.dataset import * from src.modules.contextual_embedder import ContextualEmbedder from src.evaluation.evaluators import ParaphraseEvaluator from src...
[ 6738, 12351, 13, 26791, 1330, 3384, 4487, 198, 6738, 12351, 13, 11250, 20074, 1330, 1398, 7483, 62, 11250, 355, 4566, 198, 6738, 12351, 13, 11250, 20074, 1330, 11525, 67, 654, 62, 11250, 355, 11525, 67, 654, 62, 11250, 198, 6738, 12351,...
2.654232
697
#!/bin/python import os import sys import numpy as np ''' input: VW training file ''' ''' output: feature_to_id.txt, feature_appearence_pos.npy, feature_appearence_neg.npy ''' ''' note for data with sample weight feature_off = 3, otherwise feature_off = 2''' feature_off = 3 #calculate the appearche of each featur...
[ 2, 48443, 8800, 14, 29412, 628, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 198, 7061, 6, 5128, 25, 220, 31388, 3047, 2393, 705, 7061, 198, 7061, 6, 5072, 25, 3895, 62, 1462, 62, 312, 13, 14116, 11...
2.117647
578
import pytest from ethereum import tester from utils import sign from eth_utils import encode_hex, is_same_address from tests.utils import balance_proof_hash, closing_message_hash from tests.fixtures import ( owner_index, owner, contract_params, create_contract, get_token_contract, get_accounts,...
[ 11748, 12972, 9288, 198, 6738, 304, 17733, 1330, 256, 7834, 198, 6738, 3384, 4487, 1330, 1051, 198, 6738, 4555, 62, 26791, 1330, 37773, 62, 33095, 11, 318, 62, 31642, 62, 21975, 198, 6738, 5254, 13, 26791, 1330, 5236, 62, 13288, 62, 1...
2.8
200
import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(('localhost', 7777)) sock.send('Hello, server! :)'.encode('utf-8')) d = sock.recv(1024) print(d.decode('utf-8')) sock.close()
[ 11748, 17802, 198, 198, 82, 735, 796, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 17802, 13, 50, 11290, 62, 2257, 32235, 8, 198, 82, 735, 13, 8443, 7, 10786, 36750, 3256, 767, 29331, 4008, 198, 82, 735, 13, 21280, 10...
2.382022
89
import os import csv #maxi function identified to get the maximum number in a list and give its index in the list together as a list #min function identified to get the minimum number in a list and give its index in the list together as a list #initiating lists list_date=[] list_rev=[] list_change=[] csv_path=os.pat...
[ 11748, 28686, 198, 11748, 269, 21370, 198, 2, 9806, 72, 2163, 5174, 284, 651, 262, 5415, 1271, 287, 257, 1351, 290, 1577, 663, 6376, 287, 262, 1351, 1978, 355, 257, 1351, 198, 198, 2, 1084, 2163, 5174, 284, 651, 262, 5288, 1271, 287...
2.902098
715
from typing import List, Dict import json import spacy import pickle import multiprocessing import argparse from scispacy.abbreviation import AbbreviationDetector from tqdm import tqdm from collections import defaultdict from forecite.consts import * from forecite import s2_utils def compute_noun_phrases_worker(inp...
[ 6738, 19720, 1330, 7343, 11, 360, 713, 198, 198, 11748, 33918, 198, 11748, 599, 1590, 198, 11748, 2298, 293, 198, 11748, 18540, 305, 919, 278, 198, 11748, 1822, 29572, 198, 198, 6738, 629, 8802, 1590, 13, 397, 4679, 47625, 1330, 2275, ...
1.994755
2,669
from django.contrib import admin from mptt.admin import DraggableMPTTAdmin from .models import Customer, Product, Category, Order # Register your models here. admin.site.register(Customer, CustomerAdmin) admin.site.register(Product, Productdmin) admin.site.register(Category, CategoryAdmin) admin.site.regi...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 201, 198, 6738, 285, 457, 83, 13, 28482, 1330, 1583, 9460, 540, 7378, 15751, 46787, 201, 198, 6738, 764, 27530, 1330, 22092, 11, 8721, 11, 21743, 11, 8284, 201, 198, 2, 17296, 534, 4981,...
3.233645
107
#!/usr/bin/env python3 from utilities import ImagesLoader from utilities import VideoLoader from utilities import Visualizer from Line import ImageProcessor import argparse import sys if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 20081, 1330, 5382, 17401, 198, 6738, 20081, 1330, 7623, 17401, 198, 6738, 20081, 1330, 15612, 7509, 198, 6738, 6910, 1330, 7412, 18709, 273, 198, 11748, 1822, 29572, 198, ...
3.645161
62
if ping('52.113.194.132', verbose = True): print('ping occuring was succesful') else: print('website is vulnerable to be hacked')
[ 361, 29400, 10786, 4309, 13, 16616, 13, 22913, 13, 19924, 3256, 15942, 577, 796, 6407, 2599, 201, 198, 197, 4798, 10786, 13886, 1609, 870, 373, 17458, 274, 913, 11537, 201, 198, 17772, 25, 201, 198, 197, 4798, 10786, 732, 12485, 318, ...
2.833333
48
# -*- coding: utf-8 -*- """ Created on Wed Sep 16 15:08:51 2020 @author: Albo """ from qcodes import Instrument from qcodes.utils.validators import Numbers from functools import reduce class VirtualInstrument(Instrument): """ Implements a device as a virtual instrument for QCoDeS """ def __init__(se...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 8621, 1467, 1315, 25, 2919, 25, 4349, 12131, 198, 198, 31, 9800, 25, 978, 2127, 198, 37811, 198, 198, 6738, 10662, 40148, 1330, 42410, 198,...
2.238051
1,067
import copy import os import math import numpy as np import random '''inputs''' os.chdir('input/') questionInput = open('Prob-30A-50.txt', 'r') questionInput = questionInput.readlines() noOfVehicles = int(questionInput[0]) maxCapacity = int(questionInput[1]) Tmax = int(questionInput[2]) depo...
[ 11748, 4866, 201, 198, 11748, 28686, 201, 198, 11748, 10688, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 4738, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 7061, 6, 15414, 82, 7061, 6, 201, 198...
2.137482
2,764
""" 3D Anchor Generator for Voxel """ import math import sys import numpy as np import torch import torch.nn.functional as F from opencood.data_utils.post_processor.voxel_postprocessor \ import VoxelPostprocessor from opencood.utils import box_utils
[ 37811, 198, 18, 35, 29253, 273, 35986, 329, 28035, 417, 198, 37811, 198, 11748, 10688, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 128...
3.185185
81