content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# Copyright (C) 2014-2015 LiuLang <gsushzhsosgsu@gmail.com> # Use of this source code is governed by GPLv3 license that can be found # in http://www.gnu.org/licenses/gpl-3.0.html import hashlib import os import zlib CHUNK = 2 ** 20
[ 198, 2, 15069, 357, 34, 8, 1946, 12, 4626, 18258, 43, 648, 1279, 14542, 1530, 89, 11994, 418, 70, 2385, 31, 14816, 13, 785, 29, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 38644, 85, 18, 5964, 326, 460, 307, 1043, 198, ...
2.712644
87
#!/usr/bin/python # encoding: utf-8 '''a rich client 1. for one server (instead of multi like in libmc.Client) 2. encapsulate @, ?, gc ... use is instead of libmc.Client ''' import telnetlib import logging import libmc import string import urllib import itertools import warnings from collections import defaul...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 7061, 6, 64, 5527, 5456, 198, 220, 220, 220, 352, 13, 329, 530, 4382, 357, 38070, 286, 5021, 588, 287, 9195, 23209, 13, 11792, 8, 198, 220, 220, 220...
2.271637
1,167
import matplotlib.pyplot __author__ = 'xiongyi' line1 = [(200, 100), (200, 400)] line2 = [(190, 190), (210, 210)] if __name__ == '__main__': matplotlib.pyplot.plot((line1[0][0],line1[1][0]),(line1[0][1],line1[1][1])) matplotlib.pyplot.hold(True) matplotlib.pyplot.plot((line2[0][0],line2[1][0]),(line2[0][1...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 198, 834, 9800, 834, 796, 705, 87, 295, 1360, 72, 6, 198, 1370, 16, 796, 47527, 2167, 11, 1802, 828, 357, 2167, 11, 7337, 15437, 198, 1370, 17, 796, 47527, 19782, 11, 19884, 828, 357, 21536...
2.120879
182
from sqlalchemy import select from sqlalchemy.schema import Column from .declarative import Model class ModelLoader(Loader): class AliasLoader(ModelLoader): class ColumnLoader(Loader): class TupleLoader(Loader): class CallableLoader(Loader): class ValueLoader(Loader):
[ 6738, 44161, 282, 26599, 1330, 2922, 198, 6738, 44161, 282, 26599, 13, 15952, 2611, 1330, 29201, 198, 198, 6738, 764, 32446, 283, 876, 1330, 9104, 628, 198, 198, 4871, 9104, 17401, 7, 17401, 2599, 628, 198, 4871, 978, 4448, 17401, 7, ...
3.582278
79
# Standard imports import logging import math import json from uuid import UUID from datetime import datetime, timedelta import time # Our imports from emission.core.get_database import get_trip_db, get_section_db import emission.analysis.result.carbon as carbon import emission.core.common as common import emission.ne...
[ 2, 8997, 17944, 198, 11748, 18931, 198, 11748, 10688, 198, 11748, 33918, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 640, 198, 198, 2, 3954, 17944, 198, 6738, 25592, 13...
3.947183
284
#!/usr/bin/env python """ HAR Formatter for REDbot. """ __author__ = "Jerome Renard <jerome.renard@gmail.com>" __copyright__ = """\ Copyright (c) 2008-2010 Mark Nottingham Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software")...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 39, 1503, 5178, 1436, 329, 23848, 13645, 13, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 36134, 462, 7152, 446, 1279, 44009, 462, 13, 918, 446, 31, 14816, 13, 78...
3.576623
385
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020-2021 by Murray Altheim. All rights reserved. This file is part # of the Robot Operating System project, released under the MIT License. Please # see the LICENSE file included as part of this package. # # author: Murray Altheim # created: 2020-09-19 # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 12131, 12, 1238, 2481, 416, 12164, 978, 1169, 320, 13, 1439, 2489, 10395, 13, 770, 2393, 318, ...
3.212963
216
""" Module: 'urequests' on esp32 1.12.0 """ # MCU: (sysname='esp32', nodename='esp32', release='1.12.0', version='v1.12 on 2019-12-20', machine='ESP32 module (spiram) with ESP32') # Stubber: 1.3.2 usocket = None
[ 37811, 198, 26796, 25, 705, 495, 421, 3558, 6, 319, 15024, 2624, 352, 13, 1065, 13, 15, 198, 37811, 198, 2, 13122, 52, 25, 357, 17597, 3672, 11639, 9774, 2624, 3256, 18666, 12453, 11639, 9774, 2624, 3256, 2650, 11639, 16, 13, 1065, ...
2.393258
89
#!/usr/bin/env python #-*- coding=utf-8 -*- # # Copyright 2012 Jike Inc. All Rights Reserved. # Author: liwei@jike.com import re from urlparse import urlparse parse1()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 28, 40477, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2321, 449, 522, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 6434, 25, 7649, 42990, 31, 73, 522, 13, 785,...
2.725806
62
from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label from kivy.uix.textinput import TextInput from kivy.garden.matplotlib.backend_kivyagg import FigureCanvasKivyAgg from kivy.uix.anchorlayout import AnchorLayout from kivy.uix.boxlayout import BoxLayout from kivy.uix.button import Button import ma...
[ 6738, 479, 452, 88, 13, 84, 844, 13, 25928, 39786, 1330, 24846, 32517, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 18242, 1330, 36052, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 5239, 15414, 1330, 8255, 20560, 198, 6738, 479, 452, 88...
2.985816
282
from dataclasses import dataclass, field from typing import List from Car2 import Car
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 7343, 198, 6738, 1879, 17, 1330, 1879, 628 ]
3.954545
22
import subprocess import threading import time import errno import socket import urllib import pathlib from io import StringIO from http.server import BaseHTTPRequestHandler, HTTPServer import lib.stations as stations import lib.epg2xml as epg2xml import lib.channels_m3u as channels_m3u from lib.templates import templ...
[ 11748, 850, 14681, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 11454, 3919, 198, 11748, 17802, 198, 11748, 2956, 297, 571, 198, 11748, 3108, 8019, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 2638, 13, 15388, 1330, 7308, 40717,...
2.942643
401
from django import template from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.template import loader
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 28243, 1330, 40213,...
3.809524
42
import os from pathlib import Path import numpy as np AUDIO_FILENAME_ENDINGS = (".aiff", ".flac", ".m4a", ".mp3", ".ogg", ".opus", ".wav") def get_file_paths( root_path, filename_endings=AUDIO_FILENAME_ENDINGS, traverse_subdirectories=True ): """Return a list of paths to all files with the given filename ex...
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 48877, 9399, 62, 46700, 1677, 10067, 62, 10619, 20754, 796, 357, 1911, 64, 733, 1600, 27071, 2704, 330, 1600, 27071, 76, 19, 64, 1600, ...
2.547325
972
s = "([}}])" stack = [] if len(s) % 2 == 1: print(False) exit() for i in s: if i == "(": stack.append("(") elif i == "[": stack.append("[") elif i == "{": stack.append("{") elif i == ")": if len(stack) < 1: print(False) exit() if...
[ 82, 796, 366, 26933, 11709, 12962, 1, 198, 198, 25558, 796, 17635, 198, 198, 361, 18896, 7, 82, 8, 4064, 362, 6624, 352, 25, 198, 220, 220, 220, 3601, 7, 25101, 8, 198, 220, 220, 220, 8420, 3419, 198, 198, 1640, 1312, 287, 264, ...
1.647388
536
import random import string import os from IPython.display import display, HTML from .utils import html_loader from .utils import get_content from jinja2 import Template
[ 11748, 4738, 198, 11748, 4731, 198, 11748, 28686, 198, 198, 6738, 6101, 7535, 13, 13812, 1330, 3359, 11, 11532, 198, 6738, 764, 26791, 1330, 27711, 62, 29356, 198, 6738, 764, 26791, 1330, 651, 62, 11299, 198, 6738, 474, 259, 6592, 17, ...
3.909091
44
from decimal import Decimal from fixtures import * # noqa: F401,F403 from fixtures import TEST_NETWORK from flaky import flaky # noqa: F401 from pyln.client import RpcError, Millisatoshi from utils import ( only_one, wait_for, sync_blockheight, EXPERIMENTAL_FEATURES, COMPAT, VALGRIND ) import os import pytes...
[ 6738, 32465, 1330, 4280, 4402, 198, 6738, 34609, 1330, 1635, 220, 1303, 645, 20402, 25, 376, 21844, 11, 37, 31552, 198, 6738, 34609, 1330, 43001, 62, 12884, 33249, 198, 6738, 781, 15492, 1330, 781, 15492, 220, 1303, 645, 20402, 25, 376,...
2.637161
1,254
"""Provides plots of mutations for Isolates and Lines.""" from microbepy.common import constants as cn from microbepy.common.dataframe_sorter import DataframeSorter from microbepy.common.isolate import Isolate from microbepy.common import util from microbepy.correlation import genome_correlation from microbepy.data.m...
[ 37811, 15946, 1460, 21528, 286, 220, 23005, 329, 1148, 349, 689, 290, 26299, 526, 15931, 198, 198, 6738, 4580, 65, 538, 88, 13, 11321, 1330, 38491, 355, 269, 77, 198, 6738, 4580, 65, 538, 88, 13, 11321, 13, 7890, 14535, 62, 82, 4337...
2.656627
332
# Copyright (c) 2017 Sony Corporation. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ 2, 15069, 357, 66, 8, 2177, 10184, 10501, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351...
2.506925
1,083
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # import collections import os imp...
[ 2, 15069, 357, 66, 8, 2177, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 38559, 24290, 2393, 287, 198, 2, 262, 6808, 8619, 286, 42...
2.104292
2,493
#!/usr/bin/env python """ This parses a log file series (i.e. log, log.1, log.2, etc..) and outputs timing and call frequency information for HAL messages. Hazen 5/18 """ from datetime import datetime import os pattern = '%Y-%m-%d %H:%M:%S,%f' def getIterable(dict_or_list): """ Returns an iterable given a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 1212, 13544, 274, 257, 2604, 2393, 2168, 357, 72, 13, 68, 13, 2604, 11, 2604, 13, 16, 11, 2604, 13, 17, 11, 3503, 492, 8, 290, 198, 22915, 82, 10576, 290, 869, 8373, ...
2.05309
2,524
from django.core.management.base import BaseCommand from django.utils import termcolors from jsonschema import Draft4Validator from jsonschema.exceptions import SchemaError import json
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 26791, 1330, 3381, 4033, 669, 198, 6738, 44804, 684, 2395, 2611, 1330, 13650, 19, 47139, 1352, 198, 6738, 44804, 684, 2395, 2611, 13, 106...
3.72
50
import cv2, time import numpy as np import Tkinter """ Wraps up some interfaces to opencv user interface methods (displaying image frames, event handling, etc). If desired, an alternative UI could be built and imported into get_pulse.py instead. Opencv is used to perform much of the data analysis, but there is no re...
[ 11748, 269, 85, 17, 11, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 309, 74, 3849, 198, 198, 37811, 198, 36918, 862, 510, 617, 20314, 284, 1280, 33967, 2836, 7071, 5050, 357, 13812, 278, 198, 9060, 13431, 11, 1785, 9041, 11, ...
3.033254
421
# -*- coding: utf-8 -*- # Natural Language Toolkit: Transformation-based learning # # Copyright (C) 2001-2018 NLTK Project # Author: Marcus Uneson <marcus.uneson@gmail.com> # based on previous (nltk2) version by # Christopher Maloof, Edward Loper, Steven Bird # URL: <http://nltk.org/> # For license information, see...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 12068, 15417, 16984, 15813, 25, 49127, 12, 3106, 4673, 198, 2, 198, 2, 15069, 357, 34, 8, 5878, 12, 7908, 22879, 51, 42, 4935, 198, 2, 6434, 25, 17068, 791, 42038...
2.301616
2,228
import json import logging import sys import numpy as np import torch from task_config import SuperGLUE_LABEL_MAPPING from snorkel.mtl.data import MultitaskDataset sys.path.append("..") # Adds higher directory to python modules path. logger = logging.getLogger(__name__) TASK_NAME = "WSC"
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 4876, 62, 11250, 1330, 3115, 8763, 8924, 62, 48780, 3698, 62, 44, 24805, 2751, 198, 198, 6738, 3013, 273, 7750, 1...
2.950495
101
import re import json __all__ = ["Simplimental"]
[ 11748, 302, 198, 11748, 33918, 198, 198, 834, 439, 834, 796, 14631, 8890, 489, 9134, 8973, 198 ]
2.941176
17
# This example shows how to read or modify the Axes Optimization settings using the RoboDK API and a JSON string. # You can select "Axes optimization" in a robot machining menu or the robot parameters to view the axes optimization settings. # It is possible to update the axes optimization settings attached to a robot o...
[ 2, 770, 1672, 2523, 703, 284, 1100, 393, 13096, 262, 12176, 274, 30011, 1634, 6460, 1262, 262, 39702, 48510, 7824, 290, 257, 19449, 4731, 13, 198, 2, 921, 460, 2922, 366, 31554, 274, 23989, 1, 287, 257, 9379, 3235, 3191, 6859, 393, ...
2.274547
1,599
from slr_parser.grammar import Grammar import unittest if __name__ == '__main__': unittest.main()
[ 6738, 1017, 81, 62, 48610, 13, 4546, 3876, 1330, 20159, 3876, 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, 198 ]
2.625
40
# Generated by Django 3.1 on 2020-09-08 07:43 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 319, 12131, 12, 2931, 12, 2919, 8753, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 628 ]
2.904762
42
import torch import numpy as np from mpi4py import MPI from parallel_pytorch.ops import tensor_merge from parallel_pytorch.utils import abort_on_exception def run_all(): test_1() test_2() if __name__ == '__main__': run_all()
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 285, 14415, 19, 9078, 1330, 4904, 40, 198, 198, 6738, 10730, 62, 9078, 13165, 354, 13, 2840, 1330, 11192, 273, 62, 647, 469, 198, 6738, 10730, 62, 9078, 13165, 354, 13, 2679...
2.595745
94
"""Day 07""" if __name__ == '__main__': process('test.txt') process('input.txt')
[ 37811, 12393, 8753, 37811, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1429, 10786, 9288, 13, 14116, 11537, 198, 220, 220, 220, 1429, 10786, 15414, 13, 14116, 11537, 198 ]
2.432432
37
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ utilities @author: boyangzhao """ import pandas as pd import re
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 315, 2410, 198, 31, 9800, 25, 2933, 648, 89, 23778, 198, 37811, 198, 198, 11748, 19798, 292, 355, 279...
2.32
50
#!/usr/bin/python3.7 # Copyright 2020 Aragubas # # 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, 48443, 14629, 14, 8800, 14, 29412, 18, 13, 22, 198, 2, 220, 220, 15069, 12131, 943, 363, 549, 292, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 22...
3.328221
326
from robotpy_ext.control.toggle import Toggle from robotpy_ext.misc.precise_delay import NotifierDelay
[ 6738, 9379, 9078, 62, 2302, 13, 13716, 13, 44256, 1330, 34098, 198, 6738, 9379, 9078, 62, 2302, 13, 44374, 13, 3866, 37561, 62, 40850, 1330, 1892, 7483, 13856, 323, 628, 628 ]
3.419355
31
''' This file contains test cases for tflearn ''' import tensorflow.compat.v1 as tf import tflearn import unittest if __name__ == "__main__": unittest.main()
[ 7061, 6, 198, 220, 220, 220, 770, 2393, 4909, 1332, 2663, 329, 256, 27919, 1501, 198, 7061, 6, 198, 198, 11748, 11192, 273, 11125, 13, 5589, 265, 13, 85, 16, 355, 48700, 198, 11748, 256, 27919, 1501, 198, 11748, 555, 715, 395, 198, ...
2.609375
64
#!/usr/bin/python3 # ***************************************************************************** # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 41906, 17174, 4557, 35625, 198, 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 23...
2.567148
901
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
2.80354
565
# -*- coding: utf-8 -*- # utopia-cms 2020. Anbal Pacheco. from django.core.management import BaseCommand from django.db.utils import IntegrityError from apps import core_articleviewedby_mdb from core.models import ArticleViewedBy
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 3384, 24464, 12, 46406, 12131, 13, 1052, 6893, 350, 4891, 1073, 13, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13,...
3.106667
75
import torch import torch.nn as nn from torch.optim import SGD import MinkowskiEngine as ME from MinkowskiEngine.modules.resnet_block import BasicBlock, Bottleneck from examples.common import data_loader from examples.resnet import ResNetBase if __name__ == '__main__': # loss and network cr...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 40085, 1330, 26147, 35, 198, 198, 11748, 337, 676, 12079, 13798, 355, 11948, 198, 198, 6738, 337, 676, 12079, 13798, 13, 18170, 13, 411, 3262, 62, 9967, 1...
2.458661
508
"""TODO.""" from setuptools import setup setup( name='nginx-access-tailer', version='0.1', author='swfrench', url='https://github.com/swfrench/nginx-tailer', packages=['nginx_access_tailer',], license='BSD three-clause license', entry_points={ 'console_scripts': ['nginx-access-tail...
[ 37811, 51, 3727, 46, 526, 15931, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 782, 28413, 12, 15526, 12, 13199, 263, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198...
2.259259
243
# Copyright (c) 2017 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 2, 15069, 357, 66, 8, 2177, 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, 351, 262, 13789, 13, 198, 2, ...
3.890244
164
#!/usr/bin/env python # -*- coding: utf-8 -* import os from setuptools import find_packages, setup # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) with open('requirements.txt') as f: install_requires = f.read().splitlines() setup( name...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 198, 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 2, 1249, 9058, 13, 9078, ...
2.584466
515
import collections import unittest import driver from driver.protocol import * _server = ('localhost', 11211) _dead_retry = 30 _socket_timeout = 3 _max_receive_size = 4096 def _raise_exception(message): raise Exception(message)
[ 11748, 17268, 198, 11748, 555, 715, 395, 198, 11748, 4639, 198, 6738, 4639, 13, 11235, 4668, 1330, 1635, 198, 198, 62, 15388, 796, 19203, 36750, 3256, 13539, 1157, 8, 198, 62, 25124, 62, 1186, 563, 796, 1542, 198, 62, 44971, 62, 48678...
3.118421
76
# -------------- # Import packages import numpy as np import pandas as pd from scipy.stats import mode path # code starts here bank = pd.read_csv(path) categorical_var = bank.select_dtypes(include = 'object') print(categorical_var) numerical_var = bank.select_dtypes(include = 'number') print(numerical_var) # code...
[ 2, 220, 26171, 198, 2, 17267, 10392, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 629, 541, 88, 13, 34242, 1330, 4235, 220, 198, 220, 198, 198, 6978, 198, 198, 2, 2438, 4940, 994, 198, 17796, ...
2.680713
617
# This file is part of Patsy # Copyright (C) 2013 Nathaniel Smith <njs@pobox.com> # See file LICENSE.txt for license information. # Regression tests for fixed bugs (when not otherwise better covered somewhere # else) from patsy import (EvalEnvironment, dmatrix, build_design_matrices, PatsyError, Or...
[ 2, 770, 2393, 318, 636, 286, 47216, 88, 198, 2, 15069, 357, 34, 8, 2211, 49536, 4176, 1279, 77, 8457, 31, 79, 672, 1140, 13, 785, 29, 198, 2, 4091, 2393, 38559, 24290, 13, 14116, 329, 5964, 1321, 13, 198, 198, 2, 3310, 2234, 525...
3.018519
108
__all__ = ['imread', 'imsave'] import numpy as np from PIL import Image from ...util import img_as_ubyte, img_as_uint def imread(fname, dtype=None, img_num=None, **kwargs): """Load an image from file. Parameters ---------- fname : str or file File name or file-like-object. dtype : numpy ...
[ 834, 439, 834, 796, 37250, 320, 961, 3256, 705, 12078, 1015, 20520, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 6738, 2644, 22602, 1330, 33705, 62, 292, 62, 549, 88, 660, 11, 33705, 62, 292, ...
2.218286
3,500
# -*- coding: utf-8 -*- """ Linear chain of reactions. """ from __future__ import print_function, division import tellurium as te model = ''' model feedback() // Reactions: J0: $X0 -> S1; (VM1 * (X0 - S1/Keq1))/(1 + X0 + S1 + S4^h); J1: S1 -> S2; (10 * S1 - 2 * S2) / (1 + S1 + S2); J2: S2 -> S3; (10 * S2...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 14993, 451, 6333, 286, 12737, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 1560, 333, 1505, 355, 573, 198, 198, ...
2.002882
347
from .users import User, UserCreate, UserUpdate from .transactions import Transaction, TransactionCreate, TransactionUpdate from .accounts import Account, AccountList, AccountSingle, AccountCreate, AccountUpdate from .categories import Category, CategoryCreate, CategoryUpdate
[ 6738, 764, 18417, 1330, 11787, 11, 11787, 16447, 11, 11787, 10260, 198, 6738, 764, 7645, 4658, 1330, 45389, 11, 45389, 16447, 11, 45389, 10260, 198, 6738, 764, 23317, 82, 1330, 10781, 11, 10781, 8053, 11, 10781, 28008, 11, 10781, 16447, ...
4.928571
56
def method_accepting_cls(cls, self): # Using plain `super()` is not valid here, since there's no `__class__` cell found # (Exact exception would be 'RuntimeError: super(): __class__ cell not found') # Instead, we expect to *not* see a warning about `super-with-arguments`. # Explicitly passing `cl...
[ 628, 628, 628, 198, 4299, 2446, 62, 13635, 278, 62, 565, 82, 7, 565, 82, 11, 2116, 2599, 198, 220, 220, 220, 1303, 8554, 8631, 4600, 16668, 3419, 63, 318, 407, 4938, 994, 11, 1201, 612, 338, 645, 4600, 834, 4871, 834, 63, 2685, ...
2.941176
136
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import accuracy_score from flask import flash import numpy as np
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, ...
3.662791
86
# This version of the bitcoin experiment imports data preprocessed in Matlab, and uses the GCN baseline # The point of this script is to do link prediction # Imports and aliases import pickle import torch as t import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.datasets as datas...
[ 2, 770, 2196, 286, 262, 8550, 6306, 17944, 1366, 662, 14681, 276, 287, 6550, 23912, 11, 290, 3544, 262, 20145, 45, 14805, 198, 2, 383, 966, 286, 428, 4226, 318, 284, 466, 2792, 17724, 198, 198, 2, 1846, 3742, 290, 47217, 198, 11748,...
2.290851
2,809
import cPickle import numpy as np from elm import ELMClassifier from sklearn import linear_model if __name__ == '__main__': # Load data sets train_x, train_y, val_x, val_y, test_x, test_y = get_datasets(load_mnist()) # Build ELM cls = ELMClassifier(n_hidden=7000, alpha=0.93, ...
[ 11748, 269, 31686, 293, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1288, 76, 1330, 17852, 44, 9487, 7483, 198, 6738, 1341, 35720, 1330, 14174, 62, 19849, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, ...
2.006309
317
# -*- coding: utf-8 -*- #!/usr/bin/env python3 from PKC_Classes import NetworkUser, KDC from DES import DES from RSA_Class import RSA import socket import os import sys import threading import time if sys.version_info[0] < 3: raise Exception("Must be using Python 3") bob = NetworkUser('Alice', DES(), RSA(9973, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 29673, 34, 62, 9487, 274, 1330, 7311, 12982, 11, 509, 9697, 198, 6738, 22196, 1330, 22196, 198, 6738, ...
2.368506
616
from __future__ import print_function import argparse import itertools import os import pickle import sys from datetime import datetime import matplotlib import numpy as np import torch matplotlib.use('Agg') import matplotlib.pyplot as plt import proj.archs as archs from proj.utils.cluster.general import config_to_...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 1822, 29572, 198, 11748, 340, 861, 10141, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 2603, 29487, ...
2.323216
4,415
"""empty message Revision ID: 0084_add_job_stats Revises: 0083_add_perm_types_and_svc_perm Create Date: 2017-05-12 13:16:14.147368 """ # revision identifiers, used by Alembic. revision = "0084_add_job_stats" down_revision = "0083_add_perm_types_and_svc_perm" import sqlalchemy as sa from alembic import op from sqlal...
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 3571, 5705, 62, 2860, 62, 21858, 62, 34242, 198, 18009, 2696, 25, 3571, 5999, 62, 2860, 62, 16321, 62, 19199, 62, 392, 62, 21370, 66, 62, 16321, 198, 16447, 7536, 25, 2177, 12, 27...
2.62963
135
import unittest from future.moves.urllib.parse import urlparse, urljoin, parse_qs import pytest from addons.twofactor.tests.utils import _valid_code from nose.tools import (assert_equal, assert_false, assert_is_none, assert_is_not_none, assert_true) from osf_tests.factories import UserFactory ...
[ 11748, 555, 715, 395, 198, 6738, 2003, 13, 76, 5241, 13, 333, 297, 571, 13, 29572, 1330, 19016, 29572, 11, 19016, 22179, 11, 21136, 62, 48382, 198, 198, 11748, 12972, 9288, 198, 6738, 751, 684, 13, 4246, 1659, 11218, 13, 41989, 13, ...
2.664179
134
import numpy as np from torchvision import transforms np.random.seed(1)
[ 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 10178, 1330, 31408, 198, 37659, 13, 25120, 13, 28826, 7, 16, 8 ]
3.55
20
import torch import os from torch import nn import numpy as np import torch.nn.functional from termcolor import colored from .logger import get_logger
[ 11748, 28034, 198, 11748, 28686, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 13, 45124, 198, 6738, 3381, 8043, 1330, 16396, 198, 6738, 764, 6404, 1362, 1330, 651, 62, 6404, 1362, 62...
3.642857
42
from django.apps import AppConfig #pragma: no cover
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 1303, 1050, 363, 2611, 25, 645, 3002, 628 ]
3.3125
16
from __future__ import division from timeit import default_timer as timer import csv import numpy as np import itertools from munkres import Munkres, print_matrix, make_cost_matrix import sys from classes import * from functions import * from math import sqrt import Tkinter as tk import tkFileDialog as filedialog root...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 198, 11748, 269, 21370, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 340, 861, 10141, 198, 6738, 285, 2954, 411, 1330, 337, 2954, 411, 11, ...
2.662274
2,049
"""Setup script for PySyReNN. Adapted from: https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/ """ import codecs import os import re from setuptools import setup, find_packages ################################################################### NAME = "pysyrenn" PACKAGES = [ "syrenn_prot...
[ 37811, 40786, 4226, 329, 9485, 13940, 3041, 6144, 13, 198, 198, 48003, 276, 422, 25, 198, 5450, 1378, 12114, 710, 74, 13, 1326, 14, 26845, 14, 21987, 12, 14108, 12, 75, 4820, 12, 1659, 12, 23205, 12, 79, 4464, 72, 12, 24209, 12, 3...
2.533871
1,240
REST_PATH = u"" WS_PATH = u"/api/notifications/v1"
[ 49, 6465, 62, 34219, 796, 334, 15931, 198, 19416, 62, 34219, 796, 334, 1, 14, 15042, 14, 1662, 6637, 14, 85, 16, 1, 198 ]
2.125
24
__all__ = ["load"] import imp import importlib def load(name, path): """Load and initialize a module implemented as a Python source file and return its module object""" if hasattr(importlib, "machinery"): loader = importlib.machinery.SourceFileLoader(name, path) return loader.load_module() ...
[ 834, 439, 834, 796, 14631, 2220, 8973, 628, 198, 11748, 848, 198, 11748, 1330, 8019, 628, 198, 4299, 3440, 7, 3672, 11, 3108, 2599, 198, 220, 220, 220, 37227, 8912, 290, 41216, 257, 8265, 9177, 355, 257, 11361, 2723, 2393, 290, 1441, ...
3.033898
118
import itertools from pygears.common.sieve import sieve from pygears.svgen.inst import SVGenInstPlugin from pygears.svgen.svmod import SVModuleGen from functools import partial from pygears.svgen.svgen import SVGenPlugin from pygears.svgen.util import svgen_visitor from pygears.core.hier_node import HierVisitorBase fr...
[ 11748, 340, 861, 10141, 198, 198, 6738, 12972, 70, 4127, 13, 11321, 13, 82, 12311, 1330, 264, 12311, 198, 6738, 12972, 70, 4127, 13, 21370, 5235, 13, 8625, 1330, 20546, 13746, 6310, 37233, 198, 6738, 12972, 70, 4127, 13, 21370, 5235, ...
2.963415
164
#encoding=utf-8 import qlib import pandas as pd import pickle import xgboost as xgb import numpy as np import re from qlib.constant import REG_US from qlib.utils import exists_qlib_data, init_instance_by_config from qlib.workflow import R from qlib.workflow.record_temp import SignalRecord, PortAnaRecord from qlib.utils...
[ 2, 12685, 7656, 28, 40477, 12, 23, 198, 11748, 10662, 8019, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2298, 293, 198, 11748, 2124, 70, 39521, 355, 2124, 22296, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 302, 198, 6738, 10...
2.186313
2,265
from fastapi import APIRouter router = APIRouter()
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 198, 198, 472, 353, 796, 3486, 4663, 39605, 3419, 628 ]
3.117647
17
import numpy as np import scipy.sparse as sp import torch import torch.nn as nn import networkx as nx import time from embed_methods.dgi.models import DGI, LogReg from embed_methods.dgi.utils import process
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 3127, 87, 355, 299, 87, 198, 11748, 640, 198, 198, 6738, 11525, 62, 24396, ...
3.058824
68
"""Deploys binaries to a GitHub release given the specified tag name.""" import argparse import os import time from github import Github THIS_FILE_DIRECTORY = os.path.dirname(os.path.realpath(__file__)) GH_REPO_IDENT = "ETCLabs/RDMnet" GH_USERNAME = "svc-etclabs" GH_API_TOKEN = os.getenv("SVC_ETCLABS_REPO_TOKEN") de...
[ 37811, 49322, 82, 38640, 284, 257, 21722, 2650, 1813, 262, 7368, 7621, 1438, 526, 15931, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 640, 198, 198, 6738, 33084, 1330, 38994, 198, 198, 43559, 62, 25664, 62, 17931, 23988, 15513,...
2.350554
542
import logging import numpy from ..Fragments import Fragments from ..typing import SpectrumType logger = logging.getLogger("matchms") def add_losses(spectrum_in: SpectrumType, loss_mz_from=0.0, loss_mz_to=1000.0) -> SpectrumType: """Derive losses based on precursor mass. Parameters ---------- spect...
[ 11748, 18931, 198, 11748, 299, 32152, 198, 6738, 11485, 42974, 902, 1330, 24229, 902, 198, 6738, 11485, 774, 13886, 1330, 27217, 6030, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7203, 15699, 907, 4943, 628, 198, 4299, 751, ...
2.258209
670
import re from .dict_functions import gen_schema, ParameterSchema, sort_dict from cornflow_client.constants import JSON_TYPES, DATASCHEMA
[ 11748, 302, 198, 6738, 764, 11600, 62, 12543, 2733, 1330, 2429, 62, 15952, 2611, 11, 25139, 2357, 27054, 2611, 11, 3297, 62, 11600, 198, 6738, 11676, 11125, 62, 16366, 13, 9979, 1187, 1330, 19449, 62, 9936, 47, 1546, 11, 360, 1404, 19...
3.088889
45
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import os import platform import unittest import rspub.util.resourcefilter as rf
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 555, 715, 395, 198, 198, 11748, 374, 2777, 549, 13, 22602, 13, 3109...
2.545455
55
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_package(host): """ check if packages are installed """ assert host.package('grafana').is_installed def test_service(host)...
[ 11748, 28686, 198, 198, 11748, 1332, 10745, 430, 13, 26791, 13, 504, 856, 62, 16737, 198, 198, 9288, 10745, 430, 62, 4774, 82, 796, 1332, 10745, 430, 13, 26791, 13, 504, 856, 62, 16737, 13, 2025, 82, 856, 49493, 7, 198, 220, 220, ...
2.861272
173
"""Class representations of heatsinks.""" import math from scipy import constants as const from materials import Aluminium_6063 as aluminium
[ 37811, 9487, 24612, 286, 37876, 2973, 526, 15931, 198, 198, 11748, 10688, 198, 6738, 629, 541, 88, 1330, 38491, 355, 1500, 198, 198, 6738, 5696, 1330, 978, 35241, 62, 1899, 5066, 355, 40412, 628, 198 ]
4.142857
35
import inspect foo()
[ 11748, 10104, 220, 198, 220, 198, 21943, 3419 ]
2.875
8
import base58 from plenum.common.signer_did import DidSigner from plenum.common.verifier import DidVerifier from plenum.common.eventually import eventually from plenum.test.helper import assertEquality from sovrin.common.identity import Identity MsgForSigning = {'sender': 'Mario', 'msg': 'Lorem ipsum'}
[ 11748, 2779, 3365, 198, 6738, 458, 44709, 13, 11321, 13, 12683, 263, 62, 20839, 1330, 7731, 11712, 263, 198, 6738, 458, 44709, 13, 11321, 13, 332, 7483, 1330, 7731, 13414, 7483, 198, 6738, 458, 44709, 13, 11321, 13, 15596, 935, 1330, ...
3.181818
99
import astropy import datetime import numpy as np from edibles.utils.edibles_spectrum import EdiblesSpectrum if __name__ == "__main__": filename = "HD170740_w860_redl_20140915_O12.fits" testEdiblesSpectrum(filename=filename)
[ 11748, 6468, 28338, 198, 11748, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1225, 18764, 13, 26791, 13, 276, 18764, 62, 4443, 6582, 1330, 1717, 18764, 49738, 6582, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 124...
2.788235
85
# Copyright (c) 2010-2013 OpenStack, 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 applicable law or agreed to ...
[ 2, 15069, 357, 66, 8, 3050, 12, 6390, 4946, 25896, 11, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
2.821937
1,404
# uncompyle6 version 2.11.3 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] # Embedded file name: scripts/common/dossiers2/custom/cache.py import nations from items import vehicles _g_cache = {}
[ 2, 34318, 2349, 21, 2196, 362, 13, 1157, 13, 18, 198, 2, 11361, 18022, 8189, 362, 13, 22, 357, 21, 1828, 1157, 8, 198, 2, 4280, 3361, 3902, 422, 25, 11361, 362, 13, 22, 13, 940, 357, 12286, 11, 1737, 2242, 1853, 11, 7769, 25, ...
2.785714
98
#!/usr/bin/python from code import TreeNode from code import ThreeAddressCode from lexer import tokens from random import * from symbol_table import SymbolTable from symbol_table import SymbolTableNode import logging import ply.lex as lex import ply.yacc as yacc import sys from codegen import convert_tac from code...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 2438, 1330, 12200, 19667, 198, 6738, 2438, 1330, 7683, 20231, 10669, 198, 6738, 31191, 263, 1330, 16326, 198, 6738, 4738, 1330, 1635, 198, 6738, 6194, 62, 11487, 1330, 38357, 10962, ...
1.925113
17,533
import argparse import imageio import progressbar from _routines import ffi, lib from pylab import * from random import Random RESOLUTIONS = { "2160p": (3840, 2160), "1440p": (2560, 1440), "1080p": (1920, 1080), "720p": (1280, 720), "480p": (854, 480), "360p": (640, 360), "240p": (426, 240)...
[ 11748, 1822, 29572, 198, 11748, 2939, 952, 198, 11748, 4371, 5657, 198, 6738, 4808, 81, 448, 1127, 1330, 277, 12463, 11, 9195, 198, 6738, 279, 2645, 397, 1330, 1635, 198, 6738, 4738, 1330, 14534, 198, 198, 19535, 3535, 3843, 11053, 796,...
2.682519
778
# Copyright (c) 2015 Nicolas JOUANIN # # See the file license.txt for copying permission. import anyio import unittest from hbmqtt.mqtt.subscribe import SubscribePacket, SubscribePayload from hbmqtt.mqtt.packet import PacketIdVariableHeader from hbmqtt.mqtt.constants import QOS_1, QOS_2 from hbmqtt.adapters import Buf...
[ 2, 15069, 357, 66, 8, 1853, 29737, 449, 2606, 1565, 1268, 198, 2, 198, 2, 4091, 262, 2393, 5964, 13, 14116, 329, 23345, 7170, 13, 198, 11748, 597, 952, 198, 11748, 555, 715, 395, 198, 198, 6738, 289, 20475, 80, 926, 13, 76, 80, ...
2.990991
111
import logging logging.basicConfig( format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', datefmt='%Y/%m/%d %H:%M:%S', level=logging.INFO, ) logger = logging.getLogger("Main") import os,random import numpy as np import torch from processing import convert_examples_to_features, read_squad_exam...
[ 11748, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 198, 220, 220, 220, 5794, 11639, 4, 7, 292, 310, 524, 8, 82, 532, 4064, 7, 5715, 3672, 8, 82, 532, 4064, 7, 3672, 8, 82, 532, 220, 4064, 7, 20500, 8, 82, 3256, 198, 220, 220,...
3.083942
274
# EXPERIMENTAL: all may be removed soon from gym.benchmarks import scoring from gym.benchmarks.registration import benchmark_spec, register_benchmark, registry, register_benchmark_view # imports used elsewhere register_benchmark( id='Atari200M', scorer=scoring.TotalReward(), name='Atari200M', view_gr...
[ 2, 7788, 18973, 3955, 3525, 1847, 25, 477, 743, 307, 4615, 2582, 198, 198, 6738, 11550, 13, 26968, 14306, 1330, 9689, 198, 6738, 11550, 13, 26968, 14306, 13, 2301, 33397, 1330, 18335, 62, 16684, 11, 7881, 62, 26968, 4102, 11, 20478, 1...
1.764511
7,839
#!/usr/bin/env python3 # Copyright 2020 Benjamin Ehret # # 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, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 12131, 14533, 31480, 1186, 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, ...
2.600327
3,668
from django.conf import settings from django.core import serializers from django.utils import timezone import requests from Posts.commentModel import Comments #from Posts.commentView import add_Comment from rest_framework import status from rest_framework.decorators import api_view, authentication_classes, permission_c...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 1330, 11389, 11341, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 11748, 7007, 198, 6738, 12043, 13, 23893, 17633, 1330, 19502, 198, 2, 6738, 12043...
4.061728
243
import pytest import sys, os import xarray as xr import numpy as np sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import process from process._common import ProcessArgumentInvalid, ProcessArgumentRequired ################################### # tests: ##################################...
[ 11748, 12972, 9288, 198, 11748, 25064, 11, 28686, 198, 11748, 2124, 18747, 355, 2124, 81, 198, 11748, 299, 32152, 355, 45941, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, ...
3.235556
225
#!/usr/bin/env python # # Copyright 2016 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Generate Android.bp for Skia from GN configuration. import json import os import pprint import string import subprocess import tempfile import gn_to_bp_utils ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 1584, 3012, 3457, 13, 198, 2, 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, ...
1.904896
3,901
"""The Ray autoscaler uses tags/labels to associate metadata with instances.""" # Tag for the name of the node TAG_RAY_NODE_NAME = "ray-node-name" # Tag for the kind of node (e.g. Head, Worker). For legacy reasons, the tag # value says 'type' instead of 'kind'. TAG_RAY_NODE_KIND = "ray-node-type" NODE_KIND_HEAD = "he...
[ 37811, 464, 7760, 44619, 9948, 263, 3544, 15940, 14, 23912, 1424, 284, 11602, 20150, 351, 10245, 526, 15931, 198, 198, 2, 17467, 329, 262, 1438, 286, 262, 10139, 198, 42197, 62, 30631, 62, 45, 16820, 62, 20608, 796, 366, 2433, 12, 174...
2.858844
588
import unittest from worldengine.plates import Step, center_land, world_gen from worldengine.world import World from tests.draw_test import TestBase if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 995, 18392, 13, 17041, 1330, 5012, 11, 3641, 62, 1044, 11, 995, 62, 5235, 198, 6738, 995, 18392, 13, 6894, 1330, 2159, 198, 198, 6738, 5254, 13, 19334, 62, 9288, 1330, 6208, 14881, 628, 198, 198, 361...
3.174603
63
import pytest import torch from mmedit.models.builder import build_component from mmedit.models.components.discriminators.light_cnn import MaxFeature
[ 11748, 12972, 9288, 198, 11748, 28034, 198, 198, 6738, 285, 1150, 270, 13, 27530, 13, 38272, 1330, 1382, 62, 42895, 198, 6738, 285, 1150, 270, 13, 27530, 13, 5589, 3906, 13, 15410, 3036, 47721, 13, 2971, 62, 66, 20471, 1330, 5436, 388...
3.477273
44
import json import logging from typing import Iterable from kafka import KafkaConsumer log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) # I've used this example: # https://github.com/aiven/aiven-examples/blob/master/kafka/python/consumer_example.py # as well as Aiven Kafka tutorials
[ 11748, 33918, 198, 11748, 18931, 198, 198, 6738, 19720, 1330, 40806, 540, 198, 198, 6738, 479, 1878, 4914, 1330, 46906, 49106, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 6404, 13, 2860, 25060, 7, 640...
3.161616
99
from tensorflow.keras import * import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers, Sequential,regularizers from tensorflow.keras.layers import Dropout # from tensorflow.keras import * # 3x3kernel_initializer='he_normal','glorot_normal' from tensorflow.python.keras....
[ 201, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 1635, 201, 198, 11748, 220, 11192, 273, 11125, 355, 48700, 201, 198, 6738, 220, 220, 220, 11192, 273, 11125, 1330, 41927, 292, 201, 198, 6738, 220, 220, 220, 11192, 273, 11125, 1...
2.277826
3,441
""" A universal module with functions / classes without dependencies. """ import sys import contextlib import functools import re import os from medi._compatibility import reraise _sep = os.path.sep if os.path.altsep is not None: _sep += os.path.altsep _path_re = re.compile(r'(?:\.[^{0}]+|[{0}]__init__\.py)$'.fo...
[ 37811, 317, 10112, 8265, 351, 5499, 1220, 6097, 1231, 20086, 13, 37227, 198, 11748, 25064, 198, 11748, 4732, 8019, 198, 11748, 1257, 310, 10141, 198, 11748, 302, 198, 11748, 28686, 198, 198, 6738, 16957, 13557, 5589, 25901, 1330, 302, 402...
3.202614
459
"""Bioconductor run git transition code. This module assembles the classes for the SVN --> Git transition can be run in a sequential manner. It runs the following aspects fo the Bioconductor transition. Note: Update the SVN dump 1. Run Bioconductor Software package transition 2. Run Bioconductor Experiment Data pac...
[ 37811, 23286, 420, 40990, 1057, 17606, 6801, 2438, 13, 198, 198, 1212, 8265, 11156, 829, 262, 6097, 329, 262, 20546, 45, 14610, 15151, 6801, 198, 5171, 307, 1057, 287, 257, 35582, 5642, 13, 198, 198, 1026, 4539, 262, 1708, 7612, 11511, ...
3.015038
399
from __future__ import with_statement from .. import Lock, NeedRegenerationException from ..util import NameRegistry from . import exception from ..util import PluginLoader, memoized_property, coerce_string_conf from .util import function_key_generator, function_multi_key_generator from .api import NO_VALUE, CachedValu...
[ 6738, 11593, 37443, 834, 1330, 351, 62, 26090, 198, 6738, 11485, 1330, 13656, 11, 10664, 8081, 877, 341, 16922, 198, 6738, 11485, 22602, 1330, 6530, 8081, 4592, 198, 6738, 764, 1330, 6631, 198, 6738, 11485, 22602, 1330, 42636, 17401, 11, ...
2.491484
10,216
# -*- coding: utf-8 -*- """ Module projectparallelprogrammeren.codesimulatie ================================================================= Deze module simuleert alles. """ import projectparallelprogrammeren def simulatie(): """ Deze functie voert alle versies uit zodat deze vergeleken kunnen worden qua timi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 26796, 1628, 1845, 29363, 23065, 76, 14226, 13, 40148, 320, 377, 265, 494, 220, 198, 23926, 28, 198, 198, 5005, 2736, 8265, 985, 2261, 861, 477, 274, ...
2.780172
232
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from haruhi_dl.aes import aes_decrypt, aes_encrypt, aes_cbc_decrypt, aes_cbc_encrypt, aes_decrypt_text from haruh...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 2, 22507, 1277, 9706, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 17597, 13, 6978, ...
2.629442
197
import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc def generate_dropdown_selection(): "return a Div containing the dropdown selection box" return dcc.Dropdown( id='dropdown_select_process', style={"display": "none"}, options=[...
[ 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 628, 198, 4299, 7716, 62, 14781, 2902, 62, 49283, 33...
1.63074
6,272
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # This test is based on the test suite implemented for Recommenders project # https://github.com/Microsoft/Recommenders/tree/master/tests import papermill as pm import pytest import scrapbook as sb from utils_cv.common.data...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 198, 2, 770, 1332, 318, 1912, 319, 262, 1332, 18389, 9177, 329, 19237, 7338, 1628, 198, 2, 3740, 1378, 12567, 13, 785, 1...
3.512195
164
_base_ = [ '../retinanet_r50_fpn_1x_coco.py', '../../_base_/datasets/hdr_detection_minmax_glob_gamma.py', ] # optimizer # lr is set for a batch size of 8 optimizer = dict(type='SGD', lr=0.0005, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(grad_clip=None) # dict(grad_clip=dict(max_norm=35, norm_t...
[ 62, 8692, 62, 796, 685, 198, 220, 220, 220, 705, 40720, 1186, 259, 272, 316, 62, 81, 1120, 62, 69, 21999, 62, 16, 87, 62, 66, 25634, 13, 9078, 3256, 198, 220, 220, 220, 705, 40720, 40720, 62, 8692, 62, 14, 19608, 292, 1039, 14, ...
2.21097
237