content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
"""
Module for testing functionality associated with calculating the
thermal speed.
- `~plasmapy.formulary.parameters.kappa_thermal_speed`
- `~plasmapy.formulary.parameters.thermal_speed`
- `~plasmapy.formulary.parameters.thermal_speed_lite`
- `~plasmapy.formulary.parameters.thermal_speed_coefficients`
- `~plasmapy.for... | [
37811,
198,
26796,
329,
4856,
11244,
3917,
351,
26019,
262,
198,
490,
7617,
2866,
13,
198,
12,
4600,
93,
489,
8597,
12826,
13,
687,
377,
560,
13,
17143,
7307,
13,
74,
20975,
62,
490,
7617,
62,
12287,
63,
198,
12,
4600,
93,
489,
85... | 1.874157 | 6,079 |
HPO_ID = 'hpo_id'
COLUMN_NAME = 'column_name'
TABLE_NAME = 'table_name'
OMOP_TABLE_NAME = 'omop_table_name'
TABLE_ROW_COUNT = 'table_row_count'
PROJECT_ID = 'project_id'
APPLICATION_ID = 'APPLICATION_ID'
GOOGLE_APPLICATION_CREDENTIALS = 'GOOGLE_APPLICATION_CREDENTIALS'
BIGQUERY_DATASET_ID = 'BIGQUERY_DATASET_ID'
# Tem... | [
14082,
46,
62,
2389,
796,
705,
71,
7501,
62,
312,
6,
198,
25154,
5883,
45,
62,
20608,
796,
705,
28665,
62,
3672,
6,
198,
38148,
62,
20608,
796,
705,
11487,
62,
3672,
6,
198,
2662,
3185,
62,
38148,
62,
20608,
796,
705,
296,
404,
... | 2.348837 | 559 |
from setuptools import setup, find_packages
setup(
name='susi-assistant',
version='0.1.1',
url='https://susi.ai/',
description='SUSI.AI Smart Personal Assistant',
long_description='',
author='Norbert Preining',
author_email='norbert@preining.info',
license='Apache License',
pyt... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
628,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
82,
385,
72,
12,
562,
10167,
3256,
198,
220,
220,
220,
2196,
11639,
15,
13,
16,
13,
16,
3256,
198,
220,
220,
220,
19016... | 2.213533 | 1,138 |
from ..facades import View
| [
6738,
11485,
38942,
2367,
1330,
3582,
628
] | 4 | 7 |
# Generated by Django 3.1.5 on 2021-01-31 22:32
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
20,
319,
33448,
12,
486,
12,
3132,
2534,
25,
2624,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import torch
from involution_naive import involution
if __name__ == "__main__":
test()
| [
11748,
28034,
198,
6738,
1876,
1009,
62,
2616,
425,
1330,
1876,
1009,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
628,
220,
220,
220,
1332,
3419,
628
] | 3.064516 | 31 |
from flytekit.sdk.tasks import (
python_task,
inputs,
outputs,
)
from flytekit.sdk.types import Types
from flytekit.sdk.sagemaker.task import custom_training_job_task
from flytekit.sdk.workflow import workflow_class, Input, Output
from flytekit.models.sagemaker import training_job as training_job_models
im... | [
6738,
6129,
660,
15813,
13,
21282,
74,
13,
83,
6791,
1330,
357,
198,
220,
220,
220,
21015,
62,
35943,
11,
198,
220,
220,
220,
17311,
11,
198,
220,
220,
220,
23862,
11,
198,
8,
198,
6738,
6129,
660,
15813,
13,
21282,
74,
13,
19199,... | 2.627962 | 422 |
import sys
if len(sys.argv) != 4 :
print 'usage:', sys.argv[0], 'index_fn id_mapping_fn output_fn'
exit(9)
a = open(sys.argv[1])
a.readline()
header = a.readline()
dir = a.readline()
#build map: filename -> set of bad samples
mp = {}
mp_good = {}
mp_bad = {}
for line in a :
t = line.split()
mp[t[0]] = set()
... | [
11748,
25064,
198,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
14512,
604,
1058,
198,
220,
3601,
705,
26060,
25,
3256,
25064,
13,
853,
85,
58,
15,
4357,
705,
9630,
62,
22184,
4686,
62,
76,
5912,
62,
22184,
5072,
62,
22184,
6,
198,
... | 2.062035 | 403 |
from typing import Callable, List, Tuple, Iterator
import sys
import io
import datetime
from funicorn.http2 import Response, Request, ResponseBuilder, Header, Body
| [
6738,
19720,
1330,
4889,
540,
11,
7343,
11,
309,
29291,
11,
40806,
1352,
198,
11748,
25064,
198,
11748,
33245,
198,
11748,
4818,
8079,
198,
198,
6738,
1257,
291,
1211,
13,
4023,
17,
1330,
18261,
11,
19390,
11,
18261,
32875,
11,
48900,
... | 3.673913 | 46 |
import unittest as ut
import networkx as nx
from pysbm.sbm import DegreeCorrectedMicrocanonicalEntropy
from pysbm.sbm.nxpartitiongraphbased import NxPartitionGraphBased
# noinspection PyPep8Naming
| [
11748,
555,
715,
395,
355,
3384,
198,
198,
11748,
3127,
87,
355,
299,
87,
198,
198,
6738,
279,
893,
20475,
13,
32310,
1330,
34486,
42779,
276,
13031,
49883,
605,
14539,
28338,
198,
6738,
279,
893,
20475,
13,
32310,
13,
77,
87,
3911,
... | 3.014706 | 68 |
from .resnet import *
from .resnetv2 import *
from .wrn import *
from .vgg import *
from .ShuffleNetv1 import *
from .ShuffleNetv2 import *
from .mobilenetv2 import *
from .resnet_imagenet import * | [
6738,
764,
411,
3262,
1330,
1635,
198,
6738,
764,
411,
3262,
85,
17,
1330,
1635,
198,
6738,
764,
18351,
77,
1330,
1635,
198,
6738,
764,
85,
1130,
1330,
1635,
198,
6738,
764,
2484,
18137,
7934,
85,
16,
1330,
1635,
198,
6738,
764,
248... | 2.774648 | 71 |
import os
import cv2
import numpy as np
import numpy as np
os.chdir('.')
INPUT_PATH = 'pics/banana_staff/'
OUTPUT_PATH = 'res/'
image = cv2.imread('pics/img.jpg')
bg = cv2.imread('pics/banana-bg.PNG')
files = [val for sublist in [[os.path.join(i[0], j) for j in i[2]] for i in os.walk(INPUT_PATH)] for val in sublist]... | [
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
299,
32152,
355,
45941,
198,
418,
13,
354,
15908,
10786,
2637,
8,
198,
1268,
30076,
62,
34219,
796,
705,
79,
873,
14,
3820,
2271,
62,
28120,
14,
... | 2.242021 | 376 |
from logging import getLogger
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models as m
from guardian.models import UserObjectPermission
LOG = getLogger(__name__)
| [
6738,
18931,
1330,
651,
11187,
1362,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
11299,
19199,
13,
25747,
1330,
42044,
6892,
341,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
355,
285,
198,
6738,
21688,
13,
27530,
1330,
11787,
10... | 3.631579 | 57 |
# coding: utf-8
import abc
import typing
from rolling.map.generator.generator import Border
from rolling.map.generator.generator import TileMapGenerator
from rolling.map.source import WorldMapSource
from rolling.map.type.world import WorldMapTileType
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
11748,
450,
66,
198,
11748,
19720,
198,
198,
6738,
10708,
13,
8899,
13,
8612,
1352,
13,
8612,
1352,
1330,
15443,
198,
6738,
10708,
13,
8899,
13,
8612,
1352,
13,
8612,
1352,
1330,
47870,
13912,
86... | 3.577465 | 71 |
from browser import document, window
double_first_and_add = None
document["submit"].bind("click", add_numbers)
window.WebAssembly.instantiateStreaming(window.fetch("op.wasm")).then(
add_rust_fn
)
| [
6738,
6444,
1330,
3188,
11,
4324,
198,
198,
23352,
62,
11085,
62,
392,
62,
2860,
796,
6045,
628,
628,
198,
22897,
14692,
46002,
1,
4083,
21653,
7203,
12976,
1600,
751,
62,
77,
17024,
8,
198,
17497,
13,
13908,
49670,
13,
8625,
415,
9... | 2.887324 | 71 |
import logging
import json
from string import Template
from django.apps import apps
from django.urls import reverse
from echome.config import ecHomeConfig
from identity.models import User
from identity.manager import ServiceAccount
from vault.vault import Vault
from vault.exceptions import SecretDoesNotExistError
from ... | [
11748,
18931,
198,
11748,
33918,
198,
6738,
4731,
1330,
37350,
198,
6738,
42625,
14208,
13,
18211,
1330,
6725,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
304,
354,
462,
13,
11250,
1330,
9940,
16060,
16934,
198,
6738,
... | 4.15534 | 206 |
"""UCC Config Module
This is for load/save configuration in UCC server or TA.
The load/save action is based on specified schema.
"""
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import range
from builtin... | [
37811,
52,
4093,
17056,
19937,
201,
198,
1212,
318,
329,
3440,
14,
21928,
8398,
287,
471,
4093,
4382,
393,
21664,
13,
201,
198,
464,
3440,
14,
21928,
2223,
318,
1912,
319,
7368,
32815,
13,
201,
198,
37811,
201,
198,
201,
198,
6738,
... | 1.913401 | 5,358 |
"""models.py for connect_core app"""
| [
37811,
27530,
13,
9078,
329,
2018,
62,
7295,
598,
37811,
198
] | 3.363636 | 11 |
from typing import Any, Callable, Optional
from requests import Session
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from helixswarm.swarm import Response, Swarm
| [
6738,
19720,
1330,
4377,
11,
4889,
540,
11,
32233,
198,
198,
6738,
7007,
1330,
23575,
198,
6738,
7007,
13,
324,
12126,
1330,
14626,
47307,
198,
6738,
7007,
13,
43789,
13,
333,
297,
571,
18,
13,
22602,
13,
1186,
563,
1330,
4990,
563,
... | 3.807018 | 57 |
"""
Demo of a javascript inspector tool that shows a black bar over the active
value axis, as well as the values at the current index, with the numbers
shown in the colors matching the legend.
To Use
------
Run Python on this file which will generate six files,
plot_hover_coords.html
plot_hover_coords.png
... | [
37811,
198,
11522,
78,
286,
257,
44575,
24110,
2891,
326,
2523,
257,
2042,
2318,
625,
262,
4075,
198,
8367,
16488,
11,
355,
880,
355,
262,
3815,
379,
262,
1459,
6376,
11,
351,
262,
3146,
198,
42579,
287,
262,
7577,
12336,
262,
8177,
... | 2.648302 | 8,041 |
"""Tests for KustoConnectionStringBuilder."""
from uuid import uuid4
import unittest
from azure.kusto.data.request import KustoConnectionStringBuilder
class KustoConnectionStringBuilderTests(unittest.TestCase):
"""Tests class for KustoConnectionStringBuilder."""
def test_no_credentials(self):
... | [
37811,
51,
3558,
329,
509,
436,
78,
32048,
10100,
32875,
526,
15931,
201,
198,
201,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
201,
198,
11748,
555,
715,
395,
201,
198,
6738,
35560,
495,
13,
74,
436,
78,
13,
7890,
13,
25927,
1330,... | 2.089273 | 2,834 |
"""
Tools for loading hybridQA data
"""
import json
import os
from tqdm import tqdm
| [
37811,
198,
33637,
329,
11046,
14554,
48,
32,
1366,
198,
37811,
198,
11748,
33918,
198,
11748,
28686,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198
] | 3.111111 | 27 |
from random import randint
from typing import List
from retrying import retry
import apysc as ap
from tests.testing_helper import assert_attrs
| [
6738,
4738,
1330,
43720,
600,
201,
198,
6738,
19720,
1330,
7343,
201,
198,
201,
198,
6738,
1005,
14992,
1330,
1005,
563,
201,
198,
201,
198,
11748,
2471,
28349,
355,
2471,
201,
198,
6738,
5254,
13,
33407,
62,
2978,
525,
1330,
6818,
62... | 3.208333 | 48 |
from unittest import TestCase
from . import all_hgs, hg_index
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
764,
1330,
477,
62,
71,
14542,
11,
289,
70,
62,
9630,
198
] | 2.952381 | 21 |
import numpy as np
class WhaleOptimization():
"""class implements the whale optimization algorithm as found at
http://www.alimirjalili.com/WOA.html
and
https://doi.org/10.1016/j.advengsoft.2016.01.008
"""
def get_solutions(self):
"""return solutions"""
return self._sols... | [
11748,
299,
32152,
355,
45941,
198,
198,
4871,
44772,
27871,
320,
1634,
33529,
198,
220,
220,
220,
37227,
4871,
23986,
262,
22206,
23989,
11862,
355,
1043,
379,
198,
220,
220,
220,
2638,
1378,
2503,
13,
282,
13057,
73,
282,
2403,
13,
... | 1.609091 | 1,870 |
from django.conf import settings
from django.contrib.auth.models import User
from officehours_api.backends.backend_base import BackendBase
from officehours_api.backends.types import IMPLEMENTED_BACKEND_NAME
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
198,
6738,
2607,
24425,
62,
15042,
13,
1891,
2412,
13,
1891,
437,
62,
8692,
1330,
5157,
437,
14881,
198,
6738,
... | 3.42623 | 61 |
#!/usr/bin/env python
# coding: utf-8
# # Meta-Analytic Functional Decoding
# In[1]:
# First, import the necessary modules and functions
import os
import matplotlib.pyplot as plt
from myst_nb import glue
from nilearn import plotting
from repo2data.repo2data import Repo2Data
# Install the data if running locally, ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
1303,
30277,
12,
37702,
13370,
44224,
4280,
7656,
198,
198,
2,
554,
58,
16,
5974,
628,
198,
2,
3274,
11,
1330,
262,
3306,
13103,
290,
... | 3.588739 | 4,902 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | [
2,
16529,
10541,
198,
2,
15069,
357,
66,
8,
2211,
438,
11,
629,
1134,
270,
12,
65,
952,
2478,
1074,
13,
198,
2,
198,
2,
4307,
6169,
739,
262,
2846,
286,
262,
40499,
347,
10305,
13789,
13,
198,
2,
198,
2,
383,
1336,
5964,
318,
... | 4.051948 | 154 |
import os
import time
import shutil
from pathlib import Path
from subprocess import Popen, PIPE, STDOUT
import logging
import kmlistfi
'''
Focuses on extracted encoded information in a PDF
Built of poppler-utils
'''
def _runCLargs(cmd,showCMD=True):
'''
executes command passed in. Vulnerable to a... | [
628,
198,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
4423,
346,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
850,
14681,
1330,
8099,
268,
11,
350,
4061,
36,
11,
48571,
12425,
198,
11748,
18931,
198,
198,
11748,
479,
4029,
396,
... | 2.491484 | 411 |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | [
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,... | 2.704985 | 983 |
import tkinter as tk
from tkinter import ttk
import GUI.ROOT_AND_MAIN.SUBJECT_WINDOW.SCHEDULE_FRAME.callbacks as callbacks
from GUI.ROOT_AND_MAIN.SUBJECT_WINDOW.SCHEDULE_FRAME.grid import grid
# CALLBACKS
| [
11748,
256,
74,
3849,
355,
256,
74,
198,
6738,
256,
74,
3849,
1330,
256,
30488,
198,
198,
11748,
25757,
13,
13252,
2394,
62,
6981,
62,
5673,
1268,
13,
50,
10526,
23680,
62,
28929,
3913,
13,
50,
3398,
1961,
24212,
62,
10913,
10067,
1... | 2.420455 | 88 |
from . import TransportationImageProvider
from ...utils.header import render_header_to
| [
6738,
764,
1330,
15198,
5159,
29495,
198,
6738,
2644,
26791,
13,
25677,
1330,
8543,
62,
25677,
62,
1462,
628
] | 4.631579 | 19 |
from flask import Blueprint
import syft as sy
import torch as th
# Global variables must be initialized here.
hook = sy.TorchHook(th)
local_worker = hook.local_worker
main = Blueprint("main", __name__)
from . import routes, events
from .persistence.models import db
# Implement base search locally
# We need this l... | [
6738,
42903,
1330,
39932,
198,
198,
11748,
827,
701,
355,
827,
198,
11748,
28034,
355,
294,
198,
198,
2,
8060,
9633,
1276,
307,
23224,
994,
13,
198,
25480,
796,
827,
13,
15884,
354,
39,
566,
7,
400,
8,
198,
12001,
62,
28816,
796,
... | 2.545553 | 922 |
"""This module cooks up a docstring when imported. Its only purpose is to
be displayed in the sphinx documentation.
"""
from __future__ import annotations
import typing
from collections import defaultdict
from ..core import Add, Eq, Symbol
from ..printing import latex
from ..utilities import default_sort_key
from .m... | [
37811,
1212,
8265,
38383,
510,
257,
2205,
8841,
618,
17392,
13,
6363,
691,
4007,
318,
284,
198,
1350,
9066,
287,
262,
599,
20079,
87,
10314,
13,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
19720,
198,
... | 2.3083 | 506 |
# -*- coding: utf-8 -*-
'''
create the application
'''
__author__ = 'CY Lee'
import logging
from io import StringIO
import hashlib
from datetime import datetime
import json
import redis
from flask import Flask, g, request, make_response, session
from apscheduler.schedulers.background import BackgroundScheduler
from ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
7061,
6,
198,
17953,
262,
3586,
198,
7061,
6,
198,
198,
834,
9800,
834,
796,
705,
34,
56,
5741,
6,
198,
198,
11748,
18931,
198,
6738,
33245,
1330,
10903,
9399,
... | 2.257261 | 2,169 |
from itertools import chain, combinations
import numpy as np
from mdet.msg import GridDST, GridDSTMetaData, GridDSTMass
| [
6738,
340,
861,
10141,
1330,
6333,
11,
17790,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
285,
15255,
13,
19662,
1330,
24846,
35,
2257,
11,
24846,
35,
2257,
48526,
6601,
11,
24846,
35,
2257,
20273,
628,
628
] | 3.263158 | 38 |
"""Test Simplepush config flow."""
from unittest.mock import patch
import pytest
from simplepush import UnknownError
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.simplepush.const import CONF_DEVICE_KEY, CONF_SALT, DOMAIN
from homeassistant.const import CONF_NAME, CONF_PASSWO... | [
37811,
14402,
17427,
14689,
4566,
5202,
526,
15931,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
11748,
12972,
9288,
198,
6738,
2829,
14689,
1330,
16185,
12331,
198,
198,
6738,
1363,
562,
10167,
1330,
4566,
62,
298,
1678... | 2.492973 | 1,850 |
from database import mushilogger
from mac_vendor_lookup import MacLookup
import subprocess
import re
| [
6738,
6831,
1330,
15026,
346,
519,
1362,
198,
6738,
8352,
62,
85,
18738,
62,
5460,
929,
1330,
4100,
8567,
929,
198,
11748,
850,
14681,
198,
11748,
302,
628,
628,
198
] | 3.5 | 30 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Ve... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
3050,
3517,
32250,
10501,
290,
509,
1689,
25418,
25767,
669,
7,
16,
8,
198,
2,
198,
2,
357,
16,
8,
509... | 3.452096 | 334 |
from pipeline import Pipeline
from tools.reader import Reader
from cl_lexer import CoolLexer
from cl_parser import CoolParser
from visitors import *
import sys
if __name__ == "__main__":
main() | [
6738,
11523,
1330,
37709,
198,
6738,
4899,
13,
46862,
1330,
25342,
198,
6738,
537,
62,
2588,
263,
1330,
15226,
45117,
263,
198,
6738,
537,
62,
48610,
1330,
15226,
46677,
198,
6738,
9692,
1330,
1635,
198,
198,
11748,
25064,
198,
198,
361... | 3.553571 | 56 |
"""Tests for magmaweb.job except JobQuery and JobDb"""
import datetime
import os
import uuid
import unittest
import io
from mock import Mock, patch
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import transaction
from magmaweb.job import JobFactory, Job, JobDb, make_job_factory, JobQuery
... | [
37811,
51,
3558,
329,
2153,
76,
707,
1765,
13,
21858,
2845,
15768,
20746,
290,
15768,
43832,
37811,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
334,
27112,
198,
11748,
555,
715,
395,
198,
11748,
33245,
198,
6738,
15290,
1330,
... | 1.800928 | 5,390 |
#coding:utf-8
#
# id: bugs.core_3355
# title: Wrong comparsion of DATE and TIMESTAMP if index is used
# decription:
# tracker_id: CORE-3355
# min_versions: ['2.1.5']
# versions: 3.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 3.0
# resou... | [
2,
66,
7656,
25,
40477,
12,
23,
198,
2,
198,
2,
4686,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11316,
13,
7295,
62,
2091,
2816,
198,
2,
3670,
25,
220,
220,
220,
220,
220,
220,
220,
28843,
552,
945,
295,
286,
360,
... | 2.341912 | 544 |
from django.test import TestCase
from rest_framework.reverse import reverse
from rest_framework import status
from pprint import pprint
from authors.apps.authentication.tests.base import BaseTestMethods
from authors.apps.articles.models import Article
from authors.apps.authentication.models import User
| [
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
1334,
62,
30604,
13,
50188,
1330,
9575,
198,
6738,
1334,
62,
30604,
1330,
3722,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
198,
6738,
7035,
13,
18211,
13,
41299,
3299,
... | 4.205479 | 73 |
import pytest
import cov_bsv
nlp = cov_bsv.load()
| [
11748,
12972,
9288,
198,
198,
11748,
39849,
62,
1443,
85,
198,
198,
21283,
79,
796,
39849,
62,
1443,
85,
13,
2220,
3419,
198
] | 2.26087 | 23 |
import pickle
import numpy as np
import pytest
import torch
from torch import nn
from garage.tf.envs import TfEnv
from garage.torch.modules import MLPModule
from garage.torch.policies import DeterministicPolicy
from tests.fixtures.envs.dummy import DummyBoxEnv
| [
11748,
2298,
293,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
198,
6738,
15591,
13,
27110,
13,
268,
14259,
1330,
309,
69,
4834,
85,
198,
6738,
15591,
13,
1... | 3.219512 | 82 |
import cv2
import numpy as np
videoCapture = cv2.VideoCapture()
videoCapture.open(0)
fps = videoCapture.get(cv2.CAP_PROP_FPS)
font = cv2.FONT_HERSHEY_SCRIPT_SIMPLEX
success = True
while success:
success, frame = videoCapture.read()
edges = cv2.Canny(frame, 100, 100)
sum = np.sum(((edges != 0) + 0).reshape... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
198,
15588,
49630,
796,
269,
85,
17,
13,
10798,
49630,
3419,
198,
15588,
49630,
13,
9654,
7,
15,
8,
198,
29647,
796,
2008,
49630,
13,
1136,
7,
33967,
17,
13,
33177,
62,
... | 2.151786 | 336 |
import struct
from enum import Enum
import lxml.etree
from .h9msg import H9msg
| [
11748,
2878,
198,
6738,
33829,
1330,
2039,
388,
198,
198,
11748,
300,
19875,
13,
316,
631,
198,
198,
6738,
764,
71,
24,
19662,
1330,
367,
24,
19662,
628,
198
] | 2.862069 | 29 |
import Search
| [
11748,
11140,
628
] | 5 | 3 |
import pandas as pd
import csv
from optparse import OptionParser
import matplotlib.pyplot as plt
import numpy as np
import netinfo
''' This is the valid one 04/03/2018'''
global stats
stats = {}
| [
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
269,
21370,
201,
198,
6738,
2172,
29572,
1330,
16018,
46677,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
... | 1.930556 | 144 |
# Generated by Django 3.1.2 on 2020-10-06 18:38
import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
17,
319,
12131,
12,
940,
12,
3312,
1248,
25,
2548,
198,
198,
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,... | 2.966667 | 60 |
import PySimpleGUI as sg
import subprocess
# Please check Demo programs for better examples of launchers
layout = [
[sg.Text('Script output....', size=(40, 1))],
[sg.Output(size=(88, 20))],
[sg.Button('script1'), sg.FileBrowse(), sg.Button('Summarize'), sg.Button('EXIT')],
[sg.Text('Manual comma... | [
11748,
9485,
26437,
40156,
355,
264,
70,
198,
11748,
850,
14681,
198,
198,
2,
4222,
2198,
34588,
4056,
329,
1365,
6096,
286,
41065,
220,
220,
220,
220,
220,
220,
198,
198,
39786,
796,
685,
198,
220,
220,
220,
685,
45213,
13,
8206,
1... | 2.602597 | 385 |
import json
import random
import time
import uuid
from . import gpg_utils
from .constants import *
from .utils import hashfunc, merkley_helper, eprint
| [
11748,
33918,
198,
11748,
4738,
198,
11748,
640,
198,
11748,
334,
27112,
198,
6738,
764,
1330,
308,
6024,
62,
26791,
198,
6738,
764,
9979,
1187,
1330,
1635,
198,
198,
6738,
764,
26791,
1330,
12234,
20786,
11,
4017,
74,
1636,
62,
2978,
... | 3.276596 | 47 |
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
import sys
import traceback
from machinable import errors
from machinable.component import Component
from machinable.types import VersionType
from machinable.utils import Events, apply_seed
if TYPE_CHECKING:
from machinable.element import Element
f... | [
6738,
19720,
1330,
41876,
62,
50084,
2751,
11,
4377,
11,
360,
713,
11,
32233,
11,
4479,
198,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
198,
6738,
3235,
259,
540,
1330,
8563,
198,
6738,
3235,
259,
540,
13,
42895,
1330,
35100,
19... | 2.47384 | 2,026 |
#!/usr/local/bin/python3
# Desc: FP-tree implementation in fp-growth algorithm
# Auther: Gunther
# Date: 2012/07/17
# Log:
# created by wjg, 2012/07/17
import os
import sys
#Params:
#1. transSet=[[[itemx,...,itemy],support],...]
#Interfaces:
#1. build()
#2. isUniquePath()
#3. printTree()
#4. getCombinati... | [
2,
48443,
14629,
14,
12001,
14,
8800,
14,
29412,
18,
198,
2,
39373,
25,
220,
220,
31459,
12,
21048,
7822,
287,
277,
79,
12,
27922,
11862,
198,
2,
5231,
372,
25,
6748,
490,
198,
2,
7536,
25,
220,
220,
2321,
14,
2998,
14,
1558,
19... | 2.235043 | 234 |
from django.db import models
from localflavor.generic.models import IBANField
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
6738,
1179,
1604,
75,
5570,
13,
41357,
13,
27530,
1330,
34782,
1565,
15878,
628,
198
] | 3.375 | 24 |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
import torch.nn as nn
import torch.nn.functional as F
import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
220,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
... | 3.015625 | 128 |
"""
* Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
* 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
* By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.... | [
37811,
198,
9,
5501,
649,
3381,
287,
262,
41566,
261,
44456,
8379,
318,
7560,
416,
4375,
262,
2180,
734,
2846,
13,
2750,
3599,
351,
352,
290,
362,
11,
262,
717,
838,
2846,
481,
307,
25,
198,
9,
352,
11,
362,
11,
513,
11,
642,
11... | 3.136 | 125 |
import logging
from builtins import ValueError
import networkx as nx
import numpy as np
import numpy.ma as ma
from functions.convert_bit_array_to_int import convert_bit_array_to_int
from functions.convert_int_to_bit_array import convert_int_to_bit_array
from functions.convert_nag_to_json import convert_nag_to_json
from... | [
11748,
18931,
198,
6738,
3170,
1040,
1330,
11052,
12331,
198,
11748,
3127,
87,
355,
299,
87,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
299,
32152,
13,
2611,
355,
17266,
198,
6738,
5499,
13,
1102,
1851,
62,
2545,
62,
18747,
62,
1... | 2.84827 | 1,272 |
import csv
import datetime
import os
import pathlib
import re
import sys
import codecs
import sqlite3
import string
import binascii
import math
from bs4 import BeautifulSoup
class OutputParameters:
'''Defines the parameters that are common for '''
# static parameters
nl = '\n'
screen_output_file_path ... | [
11748,
269,
21370,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
40481,
82,
198,
11748,
44161,
578,
18,
198,
11748,
4731,
198,
11748,
9874,
292,
979,
72,
198,
11748,
1... | 2.530376 | 1,037 |
from django.contrib.gis import admin
from anthill.people.models import Profile
admin.site.register(Profile, admin.OSMGeoAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
13,
70,
271,
1330,
13169,
198,
6738,
26794,
359,
13,
15332,
13,
27530,
1330,
13118,
198,
198,
28482,
13,
15654,
13,
30238,
7,
37046,
11,
13169,
13,
2640,
44,
10082,
78,
46787,
8,
198
] | 3.2 | 40 |
'''
Module for "error" endpoints
'''
__author__ = 'Elisha Yadgaran'
from quart import render_template
| [
7061,
6,
198,
26796,
329,
366,
18224,
1,
886,
13033,
198,
7061,
6,
198,
198,
834,
9800,
834,
796,
705,
36,
1836,
64,
41449,
4563,
272,
6,
628,
198,
6738,
28176,
1330,
8543,
62,
28243,
628,
198
] | 2.891892 | 37 |
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read source image.
img_src = cv2.imread('images/3DCourtBasketball.jpg')
# Four corners of the 3D court + mid-court circle point in source image
pts_src = np.array([
[126, 113], # top left corner
[67, 378], # bottom left corner (top)
... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
2,
4149,
2723,
2939,
13,
198,
9600,
62,
10677,
796,
269,
85,
17,
13,
320,
961,
10786,
17566,
14,
18,
9... | 2.420313 | 640 |
"""Unit tests for the Queue class."""
import unittest
from lib.queue import Queue
| [
37811,
26453,
5254,
329,
262,
4670,
518,
1398,
526,
15931,
198,
198,
11748,
555,
715,
395,
198,
198,
6738,
9195,
13,
36560,
1330,
4670,
518,
198,
220,
220,
220,
220,
220,
220,
220,
220
] | 2.705882 | 34 |
import torch
from torch import nn
from torch.nn import functional as F
from torch import Tensor
from typing import List
import numpy as np
# Block Model. Represents a simple model with depth layers of width nodes and input_dim, output_dim as first and last layer size.
# Represents a customized conditional probabilist... | [
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
28034,
13,
20471,
1330,
10345,
355,
376,
198,
6738,
28034,
1330,
309,
22854,
198,
6738,
19720,
1330,
7343,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
9726,
9104,
13,
1432,
... | 3.692308 | 130 |
from gibson2.scenes.igibson_indoor_scene import InteractiveIndoorScene
from gibson2.simulator import Simulator
if __name__ == '__main__':
main()
| [
6738,
46795,
1559,
17,
13,
28123,
13,
328,
571,
1559,
62,
521,
2675,
62,
29734,
1330,
21365,
5497,
2675,
36542,
198,
6738,
46795,
1559,
17,
13,
14323,
8927,
1330,
13942,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834... | 3.04 | 50 |
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse
from .forms import LoginForm, JoinForm, ProfileForm, EditForm
from django.contrib import auth
from .models import Profile
# 메인 페이지
# 로그인 페이지
# 로그인 유효성 검사
# 로그아웃
# 회원가입 페이지
# 개인정보 수정 페이지 | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
11,
651,
62,
15252,
62,
273,
62,
26429,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
764,
23914,
1330,
23093,
8479,
11,
15251,
8479,
11,
13118,
8479,... | 1.497537 | 203 |
#Write a Python program to read a file line by line and store it into a list
fr = open("sample.txt",'r')
str1 = fr.readlines()
print(str1) | [
2,
16594,
257,
11361,
1430,
284,
1100,
257,
2393,
1627,
416,
1627,
290,
3650,
340,
656,
257,
1351,
198,
8310,
796,
1280,
7203,
39873,
13,
14116,
1600,
6,
81,
11537,
198,
2536,
16,
796,
1216,
13,
961,
6615,
3419,
198,
4798,
7,
2536,
... | 3.066667 | 45 |
from PyRequest import PyRequest
from PyConstants import Codes
import json
| [
6738,
9485,
18453,
1330,
9485,
18453,
198,
6738,
9485,
34184,
1187,
1330,
44380,
198,
11748,
33918,
628
] | 4.411765 | 17 |
#!/usr/bin/python
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
15069,
2864,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,... | 2.858597 | 884 |
#!/bin/env/python
# David Wright
# Copyright 2017
# Written for Python 3.5.2
"""A set of timers for round control and evaluation."""
# Timer.py
# import datetime
import time
# import traceback
# import sys
import threading
class TimerThread():
"""Simple egg timer that emits a signal each second until done."""
... | [
2,
48443,
8800,
14,
24330,
14,
29412,
198,
2,
3271,
12206,
198,
2,
15069,
2177,
198,
2,
22503,
329,
11361,
513,
13,
20,
13,
17,
198,
37811,
32,
900,
286,
48085,
329,
2835,
1630,
290,
12660,
526,
15931,
198,
2,
5045,
263,
13,
9078,... | 2.607362 | 652 |
import torch, math
import numpy as np
from torch.optim.optimizer import Optimizer
from itertools import tee
| [
11748,
28034,
11,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
28034,
13,
40085,
13,
40085,
7509,
1330,
30011,
7509,
198,
6738,
340,
861,
10141,
1330,
30479,
628,
628,
198
] | 3.612903 | 31 |
rent = float(input())
cake = rent * 0.2
drinks = cake - (cake * 0.45)
animator = rent / 3
total_price = rent + cake + drinks + animator
print(total_price) | [
1156,
796,
12178,
7,
15414,
28955,
198,
198,
30560,
796,
5602,
1635,
657,
13,
17,
198,
7109,
2973,
796,
12187,
532,
357,
30560,
1635,
657,
13,
2231,
8,
198,
11227,
1352,
796,
5602,
1220,
513,
198,
23350,
62,
20888,
796,
5602,
1343,
... | 2.785714 | 56 |
import libsbml
import time
from modules.NewReaction import *
from modules.setIdFromNames import *
from modules.utilityFunctions import * | [
11748,
9195,
36299,
4029,
220,
198,
11748,
640,
198,
6738,
13103,
13,
3791,
3041,
2673,
1330,
1635,
198,
6738,
13103,
13,
2617,
7390,
4863,
36690,
1330,
1635,
198,
6738,
13103,
13,
315,
879,
24629,
2733,
1330,
1635
] | 3.702703 | 37 |
"""empty message
Revision ID: 178762dff445
Revises: 12f9dcc2e36c
Create Date: 2015-03-26 11:02:49.934915
"""
# revision identifiers, used by Alembic.
revision = '178762dff445'
down_revision = '3d3fb04d1a98'
from alembic import op
from sqlalchemy.sql import table, column
from sqlalchemy import String, Boolean
import... | [
37811,
28920,
3275,
198,
198,
18009,
1166,
4522,
25,
27368,
48194,
67,
487,
43489,
198,
18009,
2696,
25,
1105,
69,
24,
67,
535,
17,
68,
2623,
66,
198,
16447,
7536,
25,
1853,
12,
3070,
12,
2075,
1367,
25,
2999,
25,
2920,
13,
24,
27... | 2.733871 | 124 |
import os
from .datacomm import *
CONST_PI = 3.14
datafile=os.path.join(os.getcwd(), 'data', 'data.csv')
| [
11748,
28686,
198,
6738,
764,
19608,
330,
2002,
1330,
1635,
198,
198,
10943,
2257,
62,
11901,
796,
513,
13,
1415,
198,
198,
7890,
7753,
28,
418,
13,
6978,
13,
22179,
7,
418,
13,
1136,
66,
16993,
22784,
705,
7890,
3256,
705,
7890,
13... | 2.319149 | 47 |
n = input()
count = 0
cards = []
for ch in n:
if ch == '9': ch = '6'
if ch not in cards:
tmp = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '6']
tmp.remove(ch)
cards.extend(tmp)
count += 1
else:
cards.remove(ch)
print(count)
| [
77,
796,
5128,
3419,
198,
9127,
796,
657,
198,
27761,
796,
17635,
198,
1640,
442,
287,
299,
25,
198,
220,
220,
220,
611,
442,
6624,
705,
24,
10354,
442,
796,
705,
21,
6,
198,
220,
220,
220,
611,
442,
407,
287,
4116,
25,
198,
220... | 1.865772 | 149 |
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from textwrap import dedent
from pants.backend.jvm.targets.import_jars_mixin import ImportJarsMixin
from pants.backend.jvm.targets.jar_library import JarLibrary
from pants.backend.jvm.tar... | [
2,
15069,
1946,
41689,
1628,
20420,
357,
3826,
27342,
9865,
3843,
20673,
13,
9132,
737,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
3826,
38559,
24290,
737,
198,
198,
6738,
2420,
37150,
1330,
4648,
298,
198,
19... | 3.259259 | 162 |
from pyriemann.estimation import Covariances
from alphawaves.dataset import AlphaWaves
import numpy as np
import mne
import random
"""
=============================
Get a covariance matrice sample from alphawaves dataset
=============================
The CovmatGen generate real covariance matrices which are SDP,
for ... | [
6738,
12972,
380,
368,
1236,
13,
395,
18991,
1330,
39751,
3699,
728,
198,
6738,
435,
746,
707,
3080,
13,
19608,
292,
316,
1330,
12995,
54,
3080,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
285,
710,
198,
11748,
4738,
198,
198,
378... | 2.398801 | 667 |
"""A fieldset validator to be used by specific validator classes."""
from maintain_frontend.services.validation.common_validator import CommonValidator
class FieldsetValidator(object):
"""Checks for validation errors and calls validation_error_builder to construct error messages.
parameters:
- data:... | [
37811,
32,
2214,
2617,
4938,
1352,
284,
307,
973,
416,
2176,
4938,
1352,
6097,
526,
15931,
198,
6738,
5529,
62,
8534,
437,
13,
30416,
13,
12102,
341,
13,
11321,
62,
12102,
1352,
1330,
8070,
47139,
1352,
628,
198,
4871,
7663,
2617,
471... | 2.367742 | 2,170 |
import logging
import random
import string
from django import template
logger = logging.getLogger(__name__)
register = template.Library()
@register.simple_tag
| [
11748,
18931,
198,
11748,
4738,
198,
11748,
4731,
198,
198,
6738,
42625,
14208,
1330,
11055,
628,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
30238,
796,
11055,
13,
23377,
3419,
628,
198,
31,
30238,
... | 3.565217 | 46 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
#!/usr/bin/env python
#coding:utf-8
from settings import *
from mongoengine import connect
connect("paste2image",host=DB_HOST,port=DB_PORT)
from models import Pasted
import tornado.wsgi
import tornado.httpserver
import tornado.httpclient
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.t... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
66,
7656,
25,
40477,
12,
23,
198,
6738,
6460,
1330,
1635,
198,
6738,
285,
25162,
18392,
1330,
2018,
198,
8443,
7203,
34274,
17,
9060,
1600,
4774,
28,
11012,
62,
39,
10892,
11,
634... | 3.39548 | 177 |
# Generated by Django 2.0.4 on 2018-04-23 14:06
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
19,
319,
2864,
12,
3023,
12,
1954,
1478,
25,
3312,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
142... | 3.019231 | 52 |
#!/usr/bin/python
#
# $ python aero_1b_logB.py <orbit> <AC1|AC2|FBA>
#
# Purpose: update local and remote sql tables with parameters
# 'uploaded', 'filename', 'logname' read from /tmp/hdffiles
# If this file doesn't exist, the script exits.
# If no HD... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
720,
21015,
257,
3529,
62,
16,
65,
62,
6404,
33,
13,
9078,
1279,
42594,
29,
1279,
2246,
16,
91,
2246,
17,
91,
37,
4339,
29,
198,
2,
198,
2,
... | 2.401265 | 2,846 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
# pip install selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver... | [
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,
834,
9800,
834,
796,
705,
541,
21879,
1077,
6,
628,
198,
2,
7347,
2721,
384,
11925,
1505,
198,
6738,
384,
... | 2.651731 | 491 |
import re
# Common ===============================================================================================================
WHITESPACE_RGX = re.compile(r'\s+')
TIME_RGX = re.compile(
r'(\b((\d{1,2}(\.\d\d)?\s*(am|pm|\s+o\s*\'?\s*clock))|(\d{1,2}[\.:]\d\d)))', re.I)
TIME_TOKEN = r'<time>'
WEEKDAY_RGX = re.... | [
11748,
302,
198,
198,
2,
8070,
38093,
10052,
25609,
855,
198,
12418,
2043,
1546,
47,
11598,
62,
48192,
55,
796,
302,
13,
5589,
576,
7,
81,
6,
59,
82,
10,
11537,
198,
198,
34694,
62,
48192,
55,
796,
302,
13,
5589,
576,
7,
198,
22... | 1.95911 | 1,932 |
# coding=utf-8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
| [
2,
19617,
28,
40477,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
11485,
1330,
32549,
355,
4455,
29495,
628
] | 3.846154 | 26 |
# coding: utf-8
"""
Automox Console API
API for use with the Automox Console # noqa: E501
OpenAPI spec version: 2021-11-16
Contact: support@automox.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python ... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
17406,
1140,
24371,
7824,
628,
220,
220,
220,
7824,
329,
779,
351,
262,
17406,
1140,
24371,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
4946,
17614,... | 2.288029 | 15,429 |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from pant... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
1946,
41689,
1628,
20420,
357,
3826,
27342,
9865,
3843,
20673,
13,
9132,
737,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
3826,
38559,
24290,
737,
198,
198,
6738,
1... | 3.384279 | 229 |
# -*- coding: utf-8 -*-
#pylint: disable-msg=E0611, E1103, C0103, R0901, R0902, R0903, R0904, W0232
#------------------------------------------------------------------------------
# Copyright (c) 2007-2014, Acoular Development Team.
#------------------------------------------------------------------------------
"""Impl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
79,
2645,
600,
25,
15560,
12,
19662,
28,
36,
3312,
1157,
11,
412,
11442,
18,
11,
327,
486,
3070,
11,
371,
2931,
486,
11,
371,
2931,
2999,
11,
371,
2931,
3070,
1... | 2.661648 | 1,262 |
#username david password cisco
#TELNET
import pyshark
capture = pyshark.LiveCapture('eth0')
for packet in capture:
if 'TELNET' in packet:
try:
output = packet.telnet
if 'USER' in str(output):
print('------------------------------------')
print('USERN... | [
2,
29460,
21970,
9206,
269,
4861,
198,
2,
51,
3698,
12884,
198,
198,
11748,
279,
893,
71,
668,
198,
198,
27144,
495,
796,
279,
893,
71,
668,
13,
18947,
49630,
10786,
2788,
15,
11537,
198,
1640,
19638,
287,
8006,
25,
198,
220,
220,
... | 1.933535 | 331 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018, Data61
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230.
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
198,
2,
15069,
2864,
11,
6060,
5333,
198,
2,
17165,
22060,
290,
19034,
4992,
30801,
357,
7902,
43708,
8,
198,... | 3.028169 | 426 |
#!/usr/bin/env python
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests for json_values_converter.py.
It tests json_values_converter.py.
"""
import argparse
import os
import sys
if __name_... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
357,
66,
8,
1584,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
... | 3.042735 | 117 |
#%%
import torch
import pandas as pd
import PIL
from PIL import Image
import os
import csv
from torch.utils.data import Dataset, DataLoader
import matplotlib.pyplot as plt
from torchvision import transforms
makeCSV('../../input/data/train/train.csv')
transform = transforms.Compose([
# you can add other transforma... | [
2,
16626,
198,
11748,
28034,
198,
11748,
19798,
292,
355,
279,
67,
220,
198,
11748,
350,
4146,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
28686,
220,
198,
11748,
269,
21370,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
... | 2.71118 | 322 |
print "Start."
#-----------------------------------------------------------------------------
# IMPORTS
#-----------------------------------------------------------------------------
# Lattice Requirements
from orbit.teapot import teapot
from orbit.teapot import TEAPOT_Lattice, TEAPOT_MATRIX_Lattice
from orbit.teapot ... | [
4798,
366,
10434,
526,
198,
2,
10097,
32501,
198,
2,
30023,
33002,
198,
2,
10097,
32501,
198,
198,
2,
406,
1078,
501,
24422,
198,
6738,
13066,
13,
660,
499,
313,
1330,
573,
499,
313,
198,
6738,
13066,
13,
660,
499,
313,
1330,
13368,... | 2.509668 | 3,310 |
# Copyright 2020 PerfKitBenchmarker 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 appli... | [
2,
15069,
12131,
2448,
69,
20827,
44199,
4102,
263,
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,
... | 3.235119 | 336 |
"""Test the TcEx Batch Module."""
# third-party
import pytest
# pylint: disable=no-self-use
class TestTags1:
"""Test the TcEx Batch Module."""
def setup_class(self):
"""Configure setup before all tests."""
@pytest.mark.parametrize('name,tag', [('pytest-adversary-i1-001', 'PyTest1')])
def tes... | [
37811,
14402,
262,
309,
66,
3109,
347,
963,
19937,
526,
15931,
198,
2,
2368,
12,
10608,
198,
11748,
12972,
9288,
628,
198,
2,
279,
2645,
600,
25,
15560,
28,
3919,
12,
944,
12,
1904,
198,
4871,
6208,
36142,
16,
25,
198,
220,
220,
2... | 2.284783 | 460 |
import json
from collections.__init__ import ChainMap
from dataclasses import asdict, fields
from .dataclass_json_core import _Encoder, _decode_dataclass
| [
11748,
33918,
198,
6738,
17268,
13,
834,
15003,
834,
1330,
21853,
13912,
198,
6738,
4818,
330,
28958,
1330,
355,
11600,
11,
7032,
198,
198,
6738,
764,
19608,
330,
31172,
62,
17752,
62,
7295,
1330,
4808,
27195,
12342,
11,
4808,
12501,
10... | 3.391304 | 46 |
# __init__.py
"""Woven, the Web Object Visualization Environment."""
| [
2,
11593,
15003,
834,
13,
9078,
198,
198,
37811,
54,
16206,
11,
262,
5313,
9515,
15612,
1634,
9344,
526,
15931,
198
] | 3.333333 | 21 |
#!/usr/biin/env python3
#Include Numpy
import numpy as np
#now the rest of the program continues
if __name__ == "__main__": #if the main function exists, run it
main() | [
2,
48443,
14629,
14,
8482,
259,
14,
24330,
21015,
18,
198,
2,
818,
9152,
399,
32152,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
2197,
262,
1334,
286,
262,
1430,
4477,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
129... | 2.964912 | 57 |