content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import unittest import dace import numpy as np from dace.transformation.dataflow import MapTiling, OutLocalStorage N = dace.symbol('N') if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 288, 558, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 288, 558, 13, 7645, 1161, 13, 7890, 11125, 1330, 9347, 51, 4386, 11, 3806, 14565, 31425, 198, 198, 45, 796, 288, 558, 13, 1837, 23650, 10786, ...
2.764706
68
# Licensed under a 3-clause BSD style license - see PYFITS.rst import gzip import os from .base import _BaseHDU, BITPIX2DTYPE from .hdulist import HDUList from .image import PrimaryHDU from astropy.io.fits.file import _File from astropy.io.fits.header import _pad_length from astropy.io.fits.util import fileobj_name ...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 350, 56, 37, 29722, 13, 81, 301, 198, 198, 11748, 308, 13344, 198, 11748, 28686, 198, 198, 6738, 764, 8692, 1330, 4808, 14881, 10227, 52, 11, 36992, 47, 10426,...
2.944954
109
import django from django.test import TestCase from django.template import Template, Context def render(template_string, context_dict=None): """ A shortcut for testing template output. """ if context_dict is None: context_dict = {} c = Context(context_dict) t = Template(t...
[ 11748, 42625, 14208, 201, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 201, 198, 6738, 42625, 14208, 13, 28243, 1330, 37350, 11, 30532, 201, 198, 201, 198, 201, 198, 201, 198, 4299, 8543, 7, 28243, 62, 8841, 11, 4732, 62, 116...
2.622378
143
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """A module containing the workflow TaskGroup model.""" from sqlalchemy import or_ from ggrc import db from ggrc.login import get_current_user from ggrc.models.associationproxy import association_proxy fr...
[ 2, 15069, 357, 34, 8, 1584, 3012, 3457, 13, 198, 2, 49962, 739, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 1279, 3826, 38559, 24290, 2393, 29, 198, 198, 37811, 32, 8265, 7268, 262, ...
3.234043
188
import pytest import rumps from src.app_functions.menu.change_auto_login import change_auto_login def test_setting_is_true(mocker, basic_app): """Check if setting is changed correctly if True""" basic_app.settings["auto_login"] = True mock_function = mocker.patch("src.app_functions.menu.change_auto_login...
[ 11748, 12972, 9288, 198, 11748, 7440, 862, 198, 6738, 12351, 13, 1324, 62, 12543, 2733, 13, 26272, 13, 3803, 62, 23736, 62, 38235, 1330, 1487, 62, 23736, 62, 38235, 628, 198, 198, 4299, 1332, 62, 33990, 62, 271, 62, 7942, 7, 76, 127...
2.868195
349
# -*- coding: utf-8 -*- """VGG 19 architecture for CIFAR-100.""" import tensorflow as tf from ._vgg import _vgg from ..datasets.cifar100 import cifar100 from .testproblem import TestProblem
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 53, 11190, 678, 10959, 329, 327, 5064, 1503, 12, 3064, 526, 15931, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 47540, 85, 1130, 1330, 4808, 85...
2.757143
70
year = int(input())
[ 198, 1941, 796, 493, 7, 15414, 28955, 198 ]
2.625
8
"""Contains utility functions.""" BIN_MODE_ARGS = {'mode', 'buffering', } TEXT_MODE_ARGS = {'mode', 'buffering', 'encoding', 'errors', 'newline'} def split_args(args): """Splits args into two groups: open args and other args. Open args are used by ``open`` function. Other args are used by ``load``/``dum...
[ 37811, 4264, 1299, 10361, 5499, 526, 15931, 198, 198, 33, 1268, 62, 49058, 62, 1503, 14313, 796, 1391, 6, 14171, 3256, 705, 36873, 1586, 3256, 1782, 198, 32541, 62, 49058, 62, 1503, 14313, 796, 1391, 6, 14171, 3256, 705, 36873, 1586, ...
2.55536
569
import asyncio import functools import time import weakref from collections import defaultdict from typing import AsyncIterable from typing import Awaitable from typing import Callable from typing import Dict from typing import List from typing import Optional from typing import TypeVar T = TypeVar("T") # NOTE: thi...
[ 11748, 30351, 952, 198, 11748, 1257, 310, 10141, 198, 11748, 640, 198, 11748, 4939, 5420, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 1081, 13361, 29993, 540, 198, 6738, 19720, 1330, 5851, 4548, 540, 198, 6738, 19720, 133...
4.13
100
#!/usr/bin/python ''' generate dataset ''' import csv import argparse import numpy as np import sklearn.metrics import theanets from sklearn.metrics import accuracy_score import logging from trendStrategy import OptTrendStrategy, TrendStrategy from util import visu def load_dataset(stock, ratio=0.8, name=OptTrendStra...
[ 1303, 48443, 14629, 14, 8800, 14, 29412, 198, 7061, 6, 7716, 27039, 705, 7061, 198, 11748, 269, 21370, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 35720, 13, 4164, 10466, 198, 11748, 262, 272, 1039, 19...
2.646566
597
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file distributed # with the package. """ Basis Pursuit DeNoising ======================= This example demonstrates the use of class :class:`.admm.bpdn....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 770, 2393, 318, 636, 286, 262, 6226, 1581, 8220, 5301, 13, 14890, 286, 262, 6634, 198, 2, 290, 2836, 5964, 460, ...
2.791921
1,312
# This file was generated automatically by the Snowball to Python compiler # http://snowballstem.org/ from .basestemmer import BaseStemmer from .among import Among
[ 2, 770, 2393, 373, 7560, 6338, 416, 262, 7967, 1894, 284, 11361, 17050, 198, 2, 2638, 1378, 82, 2197, 1894, 927, 13, 2398, 14, 198, 198, 6738, 764, 12093, 395, 368, 647, 1330, 7308, 1273, 368, 647, 198, 6738, 764, 35131, 1330, 9754,...
3.659574
47
# -*- coding: utf-8 -*- # ================================================================= # uspec # # Copyright (c) 2020 Takahide Nogayama # # This software is released under the MIT License. # http://opensource.org/licenses/mit-license.php # ================================================================= from __...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 38093, 198, 2, 514, 43106, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 15804, 993, 485, 399, 519, 323, 1689, 198, 2, 198, 2, 770, 3788, 318, 2716, 739, 262, ...
3.494505
273
import pygame from game.game_logic.game import Game import matplotlib.pyplot as plt if __name__ == "__main__": main()
[ 11748, 12972, 6057, 198, 6738, 983, 13, 6057, 62, 6404, 291, 13, 6057, 1330, 3776, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, ...
2.717391
46
import os import sys from glob import glob if __name__=="__main__": main()
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 15095, 1330, 15095, 628, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.625
32
#!/usr/bin/env python # coding: utf-8 # In[1]: # src: http://datareview.info/article/prognozirovanie-ottoka-klientov-so-scikit-learn/ # In[ ]: # -, # # . # , # , # ( 5 20 ). # : # 1. , # , # 2. , # , # . # 3. A , # , . # , # , ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 2, 12351, 25, 2638, 1378, 19608, 533, 1177, 13, 10951, 14, 20205, 14, 1676, 70, 3919, 89, 7058, 10438, 4...
2.185501
1,407
# MIT License # # Copyright (c) 2020 Airbyte # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 3701, 26327, 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, 290, 3917, 10314, 3696, 357, ...
3.846395
319
""" A simple python api wrapper for https://opentdb.com/ """ from aiohttp import ClientSession from requests import get from pytrivia.__helpers import decode_dict, get_token, make_request from pytrivia.enums import *
[ 37811, 198, 32, 2829, 21015, 40391, 29908, 329, 3740, 1378, 404, 298, 9945, 13, 785, 14, 198, 37811, 198, 198, 6738, 257, 952, 4023, 1330, 20985, 36044, 198, 6738, 7007, 1330, 651, 198, 198, 6738, 12972, 28461, 8869, 13, 834, 16794, 3...
3.384615
65
import requests import tarfile import os
[ 11748, 7007, 198, 11748, 13422, 7753, 198, 11748, 28686 ]
4.444444
9
import shlex from os import path from itertools import imap, ifilter from urlparse import urljoin from .css import CSSParser, iter_events def get_spritemap_url(self, fname): "Get output image URL for spritemap *fname*." return self.absurl(path.relpath(fname, self.root)) def get_css_out(self, f...
[ 11748, 427, 2588, 198, 6738, 28686, 1330, 3108, 198, 6738, 340, 861, 10141, 1330, 545, 499, 11, 611, 346, 353, 198, 6738, 19016, 29572, 1330, 19016, 22179, 198, 6738, 764, 25471, 1330, 9429, 4303, 28198, 11, 11629, 62, 31534, 628, 220, ...
2.196154
520
""" A bar graph. (c) September 2017 by Daniel Seita """ import argparse from collections import defaultdict from keras.models import Sequential from keras.layers import Dense, Activation import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sys np.set_printoptions(suppress=...
[ 37811, 317, 2318, 4823, 13, 198, 198, 7, 66, 8, 2693, 2177, 416, 7806, 1001, 5350, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 2...
2.042895
1,119
#!/usr/bin/env python from setuptools import find_packages, setup import os import re ROOT = os.path.dirname(__file__) VERSION_RE = re.compile(r'''__version__ = \'([0-9.]+)\'''') setup( name='groceries-api', version=get_version(), license='MIT', packages=find_packages(), include_package_data=Tr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 11748, 28686, 198, 11748, 302, 628, 198, 13252, 2394, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, ...
1.728916
498
from direct.showbase.ShowBase import * from direct.interval.IntervalGlobal import * from toontown.battle.BattleProps import * from direct.distributed.ClockDelta import * from direct.showbase.PythonUtil import Functor from direct.showbase.PythonUtil import StackTrace from direct.gui.DirectGui import * from panda3d.core ...
[ 6738, 1277, 13, 12860, 8692, 13, 15307, 14881, 1330, 1635, 198, 6738, 1277, 13, 3849, 2100, 13, 9492, 2100, 22289, 1330, 1635, 198, 6738, 284, 756, 593, 13, 38471, 13, 24064, 2964, 862, 1330, 1635, 198, 6738, 1277, 13, 17080, 6169, 13...
3.431755
359
# SPDX-License-Identifier: Apache-2.0 """Unit Tests for custom rnns.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow.python.ops import init_ops from backend_test_base import Tf2OnnxBackendTest...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 628, 198, 37811, 26453, 30307, 329, 2183, 374, 77, 5907, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, ...
2.359155
568
#!/user/bin/env python3 # -*- coding: utf-8 -*- #!/user/bin/env python3 # -*- coding: utf-8 -*- # @Author: Kevin Brgisser # @Email:kevin.buergisser@edu.hefr.ch # @Date: 04.2020 # Context: CHARMPROJECT- Harzard perception """ Module documentation. """ # Imports import sys #import os # Global variables # Class dec...
[ 2, 48443, 7220, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 48443, 7220, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, ...
2.579618
157
import numpy
[ 11748, 299, 32152, 628 ]
3.5
4
import traceback try: raise Exception('This is the error message.') except: errorFile = open('./Chapter 10/errorInfo.txt', 'w') errorFile.write(traceback.format_exc()) errorFile.close() print('The traceback info was written to errorInfo.txt')
[ 11748, 12854, 1891, 198, 28311, 25, 198, 220, 220, 220, 5298, 35528, 10786, 1212, 318, 262, 4049, 3275, 2637, 8, 198, 16341, 25, 198, 220, 220, 220, 4049, 8979, 796, 1280, 7, 4458, 14, 14126, 838, 14, 18224, 12360, 13, 14116, 3256, ...
2.977273
88
# Databricks notebook source from pyspark.sql.types import * from pyspark.sql import functions as F import base64 import array # COMMAND ---------- # s is a base64 encoded float[] with first element being the magnitude # Register udf functions so that it could be used in dataframe # # Perform same computation as cos...
[ 2, 16092, 397, 23706, 20922, 2723, 198, 6738, 279, 893, 20928, 13, 25410, 13, 19199, 1330, 1635, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 5499, 355, 376, 198, 11748, 2779, 2414, 198, 11748, 7177, 198, 198, 2, 22240, 6981, 24200, 4...
3.184739
498
print("Press q to quit") quit = False while quit is False: in_val = input("Please enter a positive integer.\n > ") if in_val is 'q': quit = True elif int(in_val) % 3 == 0 and int(in_val) % 5 == 0: print("FizzBuzz") elif int(in_val) % 5 == 0: print("Buzz") elif int(in_val) % ...
[ 4798, 7203, 13800, 10662, 284, 11238, 4943, 198, 47391, 796, 10352, 198, 198, 4514, 11238, 318, 10352, 25, 198, 220, 220, 220, 287, 62, 2100, 796, 5128, 7203, 5492, 3802, 257, 3967, 18253, 13, 59, 77, 1875, 366, 8, 198, 220, 220, 22...
2.083799
179
from lesson14_projects.pen.data.const import ( A, E_A, E_AN, E_IS, E_OVER, E_PEN, E_PIN, E_THAT, E_THIS, E_WAS, INIT, IS, PEN, THIS, ) pen_transition_doc_v19 = { "title": "This is a pen", "entry_state": INIT, "data": { INIT: { E_OV...
[ 6738, 11483, 1415, 62, 42068, 13, 3617, 13, 7890, 13, 9979, 1330, 357, 198, 220, 220, 220, 317, 11, 198, 220, 220, 220, 412, 62, 32, 11, 198, 220, 220, 220, 412, 62, 1565, 11, 198, 220, 220, 220, 412, 62, 1797, 11, 198, 220, 2...
1.38003
671
import gd,os,time from Html import Animation_Html from Iteration import Animation_Iteration from Write import Animation_Write from Base import * from Canvas2 import * from Canvas2 import Canvas2 from Image import Image from HTML import HTML __Canvas__=None
[ 11748, 308, 67, 11, 418, 11, 2435, 198, 198, 6738, 367, 20369, 1330, 23535, 62, 39, 20369, 198, 6738, 40806, 341, 1330, 23535, 62, 29993, 341, 198, 6738, 19430, 1330, 23535, 62, 16594, 198, 198, 6738, 7308, 1330, 1635, 198, 6738, 1680...
3.513514
74
#! /usr/bin/env python3 from .base_miner import BasePostGradientMiner import torch from ..utils import loss_and_miner_utils as lmu # adapted from # https://github.com/chaoyuaw/incubator-mxnet/blob/master/example/gluon/ # /embedding_learning/model.py
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 764, 8692, 62, 1084, 263, 1330, 7308, 6307, 42731, 1153, 44, 7274, 198, 11748, 28034, 198, 6738, 11485, 26791, 1330, 2994, 62, 392, 62, 1084, 263, 62, 26791, 355, 30...
2.75
92
# -*- coding: utf-8 -*- from .Alarm.alarm import Alarm from .DeliveryView.bolus import Bolus from .DeliveryView.info import Info from .DeliveryView.infusion import Infusion from .DeliveryView.infusion_parameter import InfusionParameter from .DeliveryView.priming import Priming from .HardwareControl.motor import Motor ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 2348, 1670, 13, 282, 1670, 1330, 978, 1670, 198, 6738, 764, 33129, 7680, 13, 28984, 385, 1330, 10797, 385, 198, 6738, 764, 33129, 7680, 13, 10951, 1330, ...
2.645408
392
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # ---------------------------------------------------------
[ 2, 20368, 22369, 12, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 20368, 22369, 12, 628, 628 ]
7.625
24
from functools import partial from pulsar import Connection, Pool, get_actor from pulsar.utils.pep import to_string from pulsar.apps.data import RemoteStore from pulsar.apps.ds import redis_parser from .client import RedisClient, Pipeline, Consumer, ResponseError from .pubsub import RedisPubSub, RedisChannels ...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 22271, 283, 1330, 26923, 11, 19850, 11, 651, 62, 11218, 198, 6738, 22271, 283, 13, 26791, 13, 431, 79, 1330, 284, 62, 8841, 198, 6738, 22271, 283, 13, 18211, 13, 7890, 1330, 21520, ...
2.516923
650
# Generated by Django 3.0.7 on 2020-06-16 05:23 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 3312, 12, 1433, 8870, 25, 1954, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
2.926829
41
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
[ 2, 15069, 357, 66, 8, 13130, 532, 383, 23652, 1523, 16588, 329, 21347, 1765, 78, 7035, 198, 2, 1114, 1321, 319, 262, 11756, 6634, 4870, 766, 262, 28536, 2393, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
4.005495
182
import mock import pytest from werkzeug.exceptions import NotFound import app.main.helpers as helpers from dmcontent.content_loader import ContentLoader from dmtestutils.api_model_stubs import BriefStub, FrameworkStub, LotStub content_loader = ContentLoader('tests/fixtures/content') content_loader.load_manifest('dos...
[ 11748, 15290, 198, 11748, 12972, 9288, 198, 6738, 266, 9587, 2736, 1018, 13, 1069, 11755, 1330, 1892, 21077, 198, 198, 11748, 598, 13, 12417, 13, 16794, 364, 355, 49385, 198, 6738, 288, 76, 11299, 13, 11299, 62, 29356, 1330, 14041, 1740...
3.242188
128
import deephaven.TableTools as tt import deephaven.Plot as plt t = tt.emptyTable(50)\ .update("X = i + 5", "XLow = X -1", "XHigh = X + 1", "Y = Math.random() * 5", "YLow = Y - 1", "YHigh = Y + 1", "USym = i % 2 == 0 ? `AAPL` : `MSFT`") p = plt.plot("S1", t, "X", "Y").lineColor("black").show() p2 = plt.plot("S1"...
[ 11748, 2769, 39487, 13, 10962, 33637, 355, 256, 83, 198, 11748, 2769, 39487, 13, 43328, 355, 458, 83, 628, 198, 83, 796, 256, 83, 13, 28920, 10962, 7, 1120, 19415, 198, 220, 220, 220, 764, 19119, 7203, 55, 796, 1312, 1343, 642, 1600...
2.191573
1,519
# Copyright 2019 Arie Bregman # # 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 agree...
[ 2, 15069, 13130, 317, 5034, 347, 2301, 805, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846...
3.393443
244
from .read import ( read_request_head, read_response_head, connection_close, expected_http_body_size, validate_headers, ) from .assemble import ( assemble_request, assemble_request_head, assemble_response, assemble_response_head, assemble_body, ) __all__ = [ "read_request_head", ...
[ 6738, 764, 961, 1330, 357, 198, 220, 220, 220, 1100, 62, 25927, 62, 2256, 11, 198, 220, 220, 220, 1100, 62, 26209, 62, 2256, 11, 198, 220, 220, 220, 4637, 62, 19836, 11, 198, 220, 220, 220, 2938, 62, 4023, 62, 2618, 62, 7857, 11...
2.6
210
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-05-21 19:33 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 319, 2177, 12, 2713, 12, 2481, 678, 25, 2091, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, ...
2.791045
67
#4 lines: Fibonacci, tuple assignment parents, babies = (1, 1) while babies < 100: print ('This generation has {0} babies'.format(babies)) parents, babies = (babies, parents + babies)
[ 2, 19, 3951, 25, 41566, 261, 44456, 11, 46545, 16237, 198, 23743, 11, 11903, 796, 357, 16, 11, 352, 8, 198, 4514, 11903, 1279, 1802, 25, 198, 220, 220, 220, 3601, 19203, 1212, 5270, 468, 1391, 15, 92, 11903, 4458, 18982, 7, 65, 43...
3.131148
61
import typing from .core import Component _Controller = typing.TypeVar('_Controller') _ControllerType = typing.Type[_Controller] ControllerFactory = typing.NewType('ControllerFactory', typing.Callable[[typing.Type], object]) _controller_factory: typing.Optional[ControllerFactory] = None
[ 11748, 19720, 198, 198, 6738, 764, 7295, 1330, 35100, 198, 198, 62, 22130, 796, 19720, 13, 6030, 19852, 10786, 62, 22130, 11537, 198, 62, 22130, 6030, 796, 19720, 13, 6030, 29795, 22130, 60, 198, 22130, 22810, 796, 19720, 13, 3791, 6030...
3.868421
76
# Copyright 2014 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ 2, 15069, 1946, 383, 347, 41319, 46665, 13, 1439, 2489, 10395, 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.596121
2,372
#!/usr/bin/env python # -*- coding: utf-8 -*- import calendar import csv from datetime import datetime import os from flask_sqlalchemy import SQLAlchemy from sqlalchemy import and_ from ..constants import CONST from ..models import AccidentMarker from ..utilities import init_flask, decode_hebrew, open_utf8 from ..imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 11845, 198, 11748, 269, 21370, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 28686, 198, 198, 6738, 42903, ...
2.271087
2,217
import unittest from numpy.testing import assert_array_equal import numpy as np from libact.base.dataset import Dataset from libact.models import LogisticRegression from libact.query_strategies import VarianceReduction from .utils import run_qs if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 40496, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 9195, 529, 13, 8692, 13, 19608, 292, 316, 1330, 16092, 292, 316, 198, 6738, 9195, 529, ...
3.09375
96
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import open from builtins import str from future import standard_library standard_library.install_aliases() import os import re import json import copy imp...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 628, 198, 6738, 3170, 1040, 1...
2.093696
5,251
# Copyright 2015, Rackspace, US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ 2, 15069, 1853, 11, 37927, 13200, 11, 1294, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 1378...
3.660256
312
'''Load image/class/box from a annotation file. The annotation file is organized as: image_name #obj xmin ymin xmax ymax class_index .. ''' from __future__ import print_function import os import sys import os.path import random import numpy as np import torch import torch.utils.data as data import torchvision.t...
[ 7061, 6, 8912, 2939, 14, 4871, 14, 3524, 422, 257, 23025, 2393, 13, 198, 198, 464, 23025, 2393, 318, 8389, 355, 25, 198, 220, 220, 220, 2939, 62, 3672, 1303, 26801, 2124, 1084, 331, 1084, 2124, 9806, 331, 9806, 1398, 62, 9630, 11485...
3.474576
118
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 15069, 12131, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743...
2.619623
3,975
# Copyright (c) 2010 by Cisco Systems, Inc. """ Manage the tool plugins and use them appropriately. """ import os TOOLNAME_PLUGIN_PREFIX = "toolname"
[ 2, 15069, 357, 66, 8, 3050, 416, 28289, 11998, 11, 3457, 13, 198, 37811, 198, 5124, 496, 262, 2891, 20652, 290, 779, 606, 20431, 13, 198, 37811, 198, 11748, 28686, 198, 198, 10468, 3535, 20608, 62, 6489, 7340, 1268, 62, 47, 31688, 1...
3.081633
49
import time from http import HTTPStatus from itertools import count from typing import Sequence import gevent import grequests import pytest import structlog from eth_utils import to_canonical_address from flask import url_for from raiden.api.python import RaidenAPI from raiden.api.rest import APIServer, RestAPI from...
[ 11748, 640, 198, 6738, 2638, 1330, 14626, 19580, 198, 6738, 340, 861, 10141, 1330, 954, 198, 6738, 19720, 1330, 45835, 198, 198, 11748, 4903, 1151, 198, 11748, 308, 8897, 3558, 198, 11748, 12972, 9288, 198, 11748, 2878, 6404, 198, 6738, ...
2.341255
2,693
# -*- coding: utf-8 -*- # file: preprocess.py # author: jackie # Copyright (C) 2021. All Rights Reserved. import os import pandas as pd import argparse import emoji import re from sklearn.model_selection import train_test_split parser = argparse.ArgumentParser() parser.add_argument("--inpath", type=str, required=True...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2393, 25, 662, 14681, 13, 9078, 198, 2, 1772, 25, 14509, 494, 198, 2, 15069, 357, 34, 8, 33448, 13, 1439, 6923, 33876, 13, 198, 198, 11748, 28686, 198, 11748, 197...
2.984848
198
import os import shutil import requests
[ 11748, 28686, 198, 11748, 4423, 346, 198, 198, 11748, 7007, 628, 628 ]
3.666667
12
from __future__ import absolute_import, division, print_function from fnmatch import fnmatch from glob import glob import os import uuid from warnings import warn import pandas as pd from toolz import merge from .io import _link from ...base import get_scheduler from ..core import DataFrame, new_dd_object from ... i...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 24714, 15699, 1330, 24714, 15699, 198, 6738, 15095, 1330, 15095, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 6738, 14601, 1330, 9828, 198, ...
2.356103
6,456
# -*- coding: utf-8 -*- """ media info manager module. """ from pyrin.core.mixin import HookMixin from pyrin.core.structs import Manager import pyrin.utils.path as path_utils from charma.media_info import MediaInfoPackage from charma.media_info.interface import AbstractMediaInfoProvider from charma.media_info.except...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 11431, 7508, 4706, 8265, 13, 198, 37811, 198, 198, 6738, 279, 2417, 259, 13, 7295, 13, 19816, 259, 1330, 18531, 35608, 259, 198, 6738, 279, 2417, 259, 13, ...
3.306306
111
import unittest from boxrec.parsers import FightParser
[ 11748, 555, 715, 395, 198, 6738, 3091, 8344, 13, 79, 945, 364, 1330, 10480, 46677, 628, 628 ]
3.411765
17
from datetime import datetime, timedelta from bson.objectid import ObjectId WORK_TIMEOUT = 600
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 275, 1559, 13, 15252, 312, 1330, 9515, 7390, 198, 198, 33249, 62, 34694, 12425, 796, 10053, 628 ]
3.37931
29
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lic...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 67...
3.779783
277
import os import sys import bpy script_dir = os.path.dirname(os.path.abspath(__file__)) utils_dir = os.path.join(script_dir, "../../blender_utils") sys.path.append(utils_dir) from utils import bake_model, clean_unused, export_ig_object, import_obj_folder ############################################# # Parse command...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 275, 9078, 198, 198, 12048, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 26791, 62, 15908, 796, 28686, 13, 69...
2.636639
1,321
# Copyright 2012 OpenStack Foundation # 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 requ...
[ 2, 15069, 2321, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
3.328402
338
import json import os import re import subprocess from base64 import b64decode from enum import Enum from math import ceil, floor from pathlib import Path from urllib.error import HTTPError from urllib.request import urlopen import yaml from charmhelpers.core import hookenv from charmhelpers.core.unitdata import kv ...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 6738, 2779, 2414, 1330, 275, 2414, 12501, 1098, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 10688, 1330, 2906, 346, 11, 4314, 198, 6738, 3108, 8019, 1330, ...
2.465649
3,668
import socket import csv import traceback import threading s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) usrpass={} ihost=socket.gethostname() host=socket.gethostbyname(ihost) ihost=socket.gethostname() host=socket.gethostbyname(ihost) iport=[] hostfile="host.csv" with open(hostfile,'r')as host_file: ...
[ 11748, 17802, 198, 11748, 269, 21370, 198, 11748, 12854, 1891, 198, 11748, 4704, 278, 198, 198, 82, 28, 44971, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 44971, 13, 50, 11290, 62, 2257, 32235, 8, 198, 14629, 6603, 34758, 92, ...
2.037037
324
from itertools import product from sklearn.base import clone from sklearn.preprocessing import FunctionTransformer from sklearn.model_selection import ParameterGrid from imblearn.pipeline import Pipeline from rlearn.utils import check_random_states def check_pipelines(objects_list, random_state, n_runs): """Extra...
[ 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 1341, 35720, 13, 8692, 1330, 17271, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 15553, 8291, 16354, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 25139, 2357, 41339, 198, 6738, 545, ...
2.237485
859
from mushroom_rl.utils.plots import PlotItemBuffer, DataBuffer from mushroom_rl.utils.plots.plot_item_buffer import PlotItemBufferLimited
[ 6738, 28520, 62, 45895, 13, 26791, 13, 489, 1747, 1330, 28114, 7449, 28632, 11, 6060, 28632, 198, 6738, 28520, 62, 45895, 13, 26791, 13, 489, 1747, 13, 29487, 62, 9186, 62, 22252, 1330, 28114, 7449, 28632, 37214, 628, 628, 628 ]
3.575
40
# -*- coding: utf-8 -*- # # test/test_metadata.py # Part of python-daemon, an implementation of PEP 3143. # # This is free software, and you are welcome to redistribute it under # certain conditions; see the end of this file for copyright # information, grant of license, and disclaimer of warranty. """ Unit test for _...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 1332, 14, 9288, 62, 38993, 13, 9078, 198, 2, 2142, 286, 21015, 12, 6814, 7966, 11, 281, 7822, 286, 350, 8905, 513, 21139, 13, 198, 2, 198, 2, 770, 318, ...
3.039046
922
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. from typing import Union, List from .purpose import * from .trait_reference import TraitReference from cdm.utilities import JObject
[ 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, 198, 6738, 19720, 1330, 4479, 11, 7343, 198, 198, 6738,...
4.202899
69
import re from typing import Union, List import nltk from bs4 import BeautifulSoup
[ 11748, 302, 198, 6738, 19720, 1330, 4479, 11, 7343, 198, 198, 11748, 299, 2528, 74, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198 ]
3.36
25
""" For backwards-compatibility. keep this file. (Many people are going to have key bindings that rely on this file.) """ from __future__ import unicode_literals from .app import * __all__ = [ # Old names. 'HasArg', 'HasCompletions', 'HasFocus', 'HasSelection', 'HasValidationError', 'IsDon...
[ 37811, 198, 1890, 16196, 12, 5589, 25901, 13, 1394, 428, 2393, 13, 198, 7, 7085, 661, 389, 1016, 284, 423, 1994, 34111, 326, 8814, 319, 428, 2393, 2014, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.852359
657
#spaces.py ''' AlgoHack Genetic Algorithm for University Semaster Planning Version 0.03 2018 Niranjan Meegammana Shilpasayura.org ''' import xdb if __name__ == "__main__": delay=0.05 conn=xdb.opendb('genetic56.db') cursor =conn.cursor() # create a cursor object success=crt_spaces_tabl...
[ 2, 2777, 2114, 13, 9078, 201, 198, 7061, 6, 201, 198, 2348, 2188, 32833, 42295, 978, 42289, 329, 2059, 12449, 1603, 21913, 201, 198, 14815, 657, 13, 3070, 2864, 201, 198, 45, 343, 272, 13881, 337, 1453, 28483, 805, 64, 911, 346, 444...
2.429864
221
import urllib.request import cv2 import numpy as np import time import threading
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 4704, 278, 198 ]
3.24
25
#! /usr/bin/python3 import time import random import json import os from pprint import pprint from kubernetes.client.rest import ApiException from pint import UnitRegistry from collections import defaultdict from kubernetes import client, config, watch from timeloop import Timeloop from datetime import timedelt...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 479, 18478, 3262, 274, 13, 16366, 13, 2118, 1330, 5949, 72, ...
2.272727
957
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from clean_transcript import clean_transcript ALPHABET_FILE_PATH = "/DeepSpeech/bin/bangor_welsh/alphabet.txt"
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 3424, 62, 7645, 6519, 1330, 3424, 62, 7645, 6519, 198, 198, 1847, 11909, 6242, 2767, 62, 25664, 62, 34...
2.461538
65
# Copyright (c) 2019-2020, NVIDIA 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...
[ 2, 15069, 357, 66, 8, 13130, 12, 42334, 11, 15127, 23929, 44680, 6234, 13, 1439, 2489, 10395, 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...
3.171838
419
import json import csv import sys import os import re import codecs import logging from logging.config import dictConfig import click import yaml from sqlalchemy import create_engine from jsontableschema_sql import Storage from smart_open import smart_open from . import postgres from . import carto csv.field_size_li...
[ 11748, 33918, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 40481, 82, 198, 11748, 18931, 198, 6738, 18931, 13, 11250, 1330, 8633, 16934, 198, 198, 11748, 3904, 198, 11748, 331, 43695, 198, 673...
3.510417
96
# Copyright (c) 2020, NVIDIA 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 appli...
[ 2, 15069, 357, 66, 8, 12131, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 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...
3.45
400
from manimlib.imports import * from manimlib.utils import bezier import numpy as np
[ 6738, 582, 320, 8019, 13, 320, 3742, 1330, 1635, 198, 6738, 582, 320, 8019, 13, 26791, 1330, 307, 89, 959, 198, 11748, 299, 32152, 355, 45941 ]
3.192308
26
from setuptools import setup setup(name='rapid_plotly', version='0.1', description='Convenience functions to rapidly create beautiful Plotly graphs', author='Joseph Dasenbrock', author_email='dasenbrockjw@gmail.com', packages=['rapid_plotly'], zip_safe=False)
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 2416, 312, 62, 29487, 306, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 3103, 574, 1240, 5499, 28...
2.582609
115
#! /usr/bin/doit -f # https://pydoit.org # `pip install [--user] doit` adds `doit.exe` to the PATH # - Note `doit auto`, the file watcher only works on Linux/Mac # - All commands are relative to dodo.py (doit runs in the working dir of dodo.py # even if ran from a different directory `doit -f path/to/dodo.py`) from g...
[ 2, 0, 1220, 14629, 14, 8800, 14, 4598, 270, 532, 69, 198, 2, 3740, 1378, 9078, 4598, 270, 13, 2398, 198, 2, 4600, 79, 541, 2721, 685, 438, 7220, 60, 466, 270, 63, 6673, 4600, 4598, 270, 13, 13499, 63, 284, 262, 46490, 198, 2, ...
2.62201
418
filenames = ["myfile1", "nonExistent", "emptyFile", "myfile2"] for file in filenames: try: f = open(file, 'r') line = f.readline() if line == "": f.close() raise EmptyFileError("%s: is empty" % file) # except IOError as error: # print("%s: co...
[ 10379, 268, 1047, 796, 14631, 1820, 7753, 16, 1600, 366, 13159, 3109, 7609, 1600, 366, 28920, 8979, 1600, 366, 1820, 7753, 17, 8973, 198, 1640, 2393, 287, 1226, 268, 1047, 25, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 2...
1.926667
300
# Crumbling In # Like randomised coloured dots and then they # increase on both sides getting closer and closer into the middle. import sys, traceback, random from numpy import array,full
[ 2, 3864, 14739, 554, 198, 2, 4525, 4738, 1417, 34746, 22969, 290, 788, 484, 198, 2, 2620, 319, 1111, 5389, 1972, 5699, 290, 5699, 656, 262, 3504, 13, 198, 198, 11748, 25064, 11, 12854, 1891, 11, 4738, 198, 6738, 299, 32152, 1330, 71...
4.108696
46
from __future__ import division from unittest import skipIf, TestCase import os from pandas import DataFrame import numpy as np from numpy.testing import assert_array_equal BACKEND_AVAILABLE = os.environ.get("ETS_TOOLKIT", "qt4") != "null" if BACKEND_AVAILABLE: from app_common.apptools.testing_utils import asser...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 6738, 555, 715, 395, 1330, 14267, 1532, 11, 6208, 20448, 198, 11748, 28686, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1...
1.9375
656
import os.path from .. import *
[ 11748, 28686, 13, 6978, 198, 198, 6738, 11485, 1330, 1635, 628, 628 ]
3
12
from collections import namedtuple # Basic example Point = namedtuple('Point', ['x', 'y']) p = Point(11, y=22) print(p[0] + p[1]) x, y = p print(x, y) print(p.x + p.y) print(Point(x=11, y=22)) from collections import namedtuple import csv f = open("users.csv", "r") next(f) reader = csv.reader(f) student_list = [] fo...
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 2, 14392, 1672, 198, 12727, 796, 3706, 83, 29291, 10786, 12727, 3256, 37250, 87, 3256, 705, 88, 6, 12962, 198, 79, 796, 6252, 7, 1157, 11, 331, 28, 1828, 8, 198, 4798, 7, 79, 58, 15, ...
2.472892
332
# Profile mitmdump with apachebench and # yappi (https://code.google.com/p/yappi/) # # Requirements: # - Apache Bench "ab" binary # - pip install click yappi from mitmproxy.main import mitmdump from os import system from threading import Thread import time import yappi import click if __name__ == '__main__': ...
[ 2, 13118, 10255, 9132, 931, 351, 2471, 4891, 26968, 290, 198, 2, 331, 1324, 72, 357, 5450, 1378, 8189, 13, 13297, 13, 785, 14, 79, 14, 88, 1324, 72, 34729, 198, 2, 198, 2, 24422, 25, 198, 2, 532, 24843, 25187, 366, 397, 1, 13934...
3
109
# -*- coding: utf-8 -*- """ Various plots """ import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation, FFMpegWriter import xarray as xr import os def quiver(data, arrScale = 25.0, threshold = None, nthArr = 1, contourLevels = None, colbar = True, logscale = Fa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 40009, 21528, 198, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, ...
2.058153
4,213
# model settings norm_cfg = dict(type='BN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='pretrain/vit_base_patch16_224.pth', backbone=dict( type='VisionTransformer', img_size=(224, 224), patch_size=16, in_channels=3, embed_dim=768, dept...
[ 2, 2746, 6460, 198, 27237, 62, 37581, 796, 8633, 7, 4906, 11639, 15766, 3256, 4433, 62, 9744, 28, 17821, 8, 198, 19849, 796, 8633, 7, 198, 220, 220, 220, 2099, 11639, 27195, 12342, 10707, 12342, 3256, 198, 220, 220, 220, 2181, 13363, ...
1.88785
642
#!/usr/bin/python # Copyright (c) 2019 OpenStack Foundation # 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, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 357, 66, 8, 13130, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156,...
2.438889
13,860
#!/usr/bin/env python from setuptools import setup # Modified from http://stackoverflow.com/questions/2058802/ # how-can-i-get-the-version-defined-in-setup-py-setuptools-in-my-package # Explicitly list bin scripts to be installed, seeing as I have a few local # bin files that are not (yet) part of the distribution...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 2, 40499, 422, 2638, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 1238, 3365, 30863, 14, 198, 2, 703, 12, 5171, 12, 72, ...
2.044797
2,143
# ====================================================================================================================== # Fakulta informacnich technologii VUT v Brne # Bachelor thesis # Author: Filip Bali (xbalif00) # License: MIT # ======================================================================================...
[ 2, 38093, 10052, 4770, 1421, 28, 198, 2, 376, 461, 586, 64, 4175, 330, 77, 488, 1579, 928, 4178, 569, 3843, 410, 1709, 710, 198, 2, 33399, 21554, 198, 2, 6434, 25, 24600, 347, 7344, 357, 87, 6893, 361, 405, 8, 198, 2, 13789, 25,...
4.612121
165
from pycfmodel.model.resources.properties.policy_document import PolicyDocument from pycfmodel.model.resources.properties.property import Property from pycfmodel.model.types import Resolvable, ResolvableStr
[ 6738, 12972, 12993, 19849, 13, 19849, 13, 37540, 13, 48310, 13, 30586, 62, 22897, 1330, 7820, 24941, 198, 6738, 12972, 12993, 19849, 13, 19849, 13, 37540, 13, 48310, 13, 26745, 1330, 14161, 198, 6738, 12972, 12993, 19849, 13, 19849, 13, ...
4.078431
51
from .stacking import StackingClassifier, stack_features from .multitask import MultiTaskEstimator
[ 6738, 764, 301, 5430, 1330, 520, 5430, 9487, 7483, 11, 8931, 62, 40890, 198, 6738, 764, 16680, 270, 2093, 1330, 15237, 25714, 22362, 320, 1352, 198 ]
3.807692
26
# Copyright (C) 2019 Intel Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") load( "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "feature", "flag_group", "flag_set", "tool_p...
[ 2, 15069, 357, 34, 8, 13130, 8180, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 13315, 27140, 15996, 12, 1069, 4516, 198, 198, 2220, 7203, 31, 65, 41319, 62, 31391, 10...
2.437276
279
from __future__ import print_function import json from typing import List from functools import lru_cache from cloud_storages.http_shortcuts import * from database.database import Database from models.models import StorageMetaInfo, Resource, Size from cloud_storages.storage import Storage from cloud_storages.gdrive.c...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 33918, 198, 6738, 19720, 1330, 7343, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 198, 6738, 6279, 62, 301, 273, 1095, 13, 4023, 62, 19509, 23779, 1330, 1...
2.361214
1,614
from django.urls import re_path, include from . import views app_name='logged' # url mappings for the webapp. urlpatterns = [ re_path(r'^$', views.logged_count, name="logged_count"), re_path(r'^loggedusers/', views.logged, name="logged_users"), re_path(r'^settings/', views.user_settings, name="update_info...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 302, 62, 6978, 11, 2291, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 11639, 6404, 2004, 6, 198, 198, 2, 19016, 285, 39242, 329, 262, 3992, 1324, 13, 198, 6371, 33279, 82, 796, 685, ...
2.516729
269
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from scout.dao.space import get_spots_by_filter, _get_spot_filters, \ _get_extended_info_by_key import copy
[ 2, 15069, 33448, 33436, 12, 2043, 11, 2059, 286, 2669, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 6738, 24490, 13, 67, 5488, 13, 13200, 1330, 651, 62, 2777, 1747, 62, 1525, 62, 24455, 11, ...
2.77027
74
#Scraper for Minnesota Court of Appeals Published Opinions #CourtID: minnctapp #Court Short Name: MN #Author: mlr #Date: 2016-06-03 from juriscraper.opinions.united_states.state import minn
[ 2, 3351, 38545, 329, 8919, 3078, 286, 20172, 26372, 8670, 259, 507, 198, 2, 36699, 2389, 25, 949, 77, 310, 1324, 198, 2, 36699, 10073, 6530, 25, 29060, 198, 2, 13838, 25, 285, 14050, 198, 2, 10430, 25, 1584, 12, 3312, 12, 3070, 62...
3.063492
63
from __future__ import absolute_import import os import errno from contextlib import contextmanager __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2013, The Materials Project' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = 'ongsp@ucsd.edu' __date__ = '1/24/14' def makedirs_p(path, **k...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 28686, 198, 11748, 11454, 3919, 198, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 834, 9800, 834, 796, 705, 2484, 88, 518, 34263, 48041, 6, 198, 834, 22163, 4766, ...
2.490798
326
import sys REQUIRED_PYTHON = "python3" required_major = 3 if __name__ == '__main__': main()
[ 11748, 25064, 198, 198, 2200, 10917, 37819, 62, 47, 56, 4221, 1340, 796, 366, 29412, 18, 1, 198, 35827, 62, 22478, 796, 513, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 19...
2.348837
43