content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from collections import Counter
from eth2spec.test.helpers.keys import privkeys
from eth2spec.test.helpers.block import (
build_empty_block_for_next_slot,
)
from eth2spec.utils import bls
def compute_committee_indices(spec, state, committee):
"""
Given a ``committee``, calculate and return the relat... | [
6738,
17268,
1330,
15034,
198,
198,
6738,
4555,
17,
16684,
13,
9288,
13,
16794,
364,
13,
13083,
1330,
1953,
13083,
198,
6738,
4555,
17,
16684,
13,
9288,
13,
16794,
364,
13,
9967,
1330,
357,
198,
220,
220,
220,
1382,
62,
28920,
62,
9... | 3.017857 | 168 |
import json
from corehq.apps.api.tests.utils import APIResourceTest
from corehq.apps.fixtures.models import (
FieldList,
FixtureDataItem,
FixtureDataType,
FixtureTypeField,
)
from corehq.apps.fixtures.resources.v0_1 import (
LookupTableItemResource,
LookupTableResource,
)
| [
11748,
33918,
198,
198,
6738,
4755,
71,
80,
13,
18211,
13,
15042,
13,
41989,
13,
26791,
1330,
3486,
4663,
274,
1668,
14402,
198,
6738,
4755,
71,
80,
13,
18211,
13,
69,
25506,
13,
27530,
1330,
357,
198,
220,
220,
220,
7663,
8053,
11,... | 2.631579 | 114 |
"""Utilities related to timing various segments of code."""
__authors__ = "David Warde-Farley"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["David Warde-Farley"]
__license__ = "3-clause BSD"
__maintainer__ = "David Warde-Farley"
__email__ = "wardefar@iro"
from contextlib import context... | [
37811,
18274,
2410,
3519,
284,
10576,
2972,
17894,
286,
2438,
526,
15931,
198,
198,
834,
41617,
834,
796,
366,
11006,
12150,
68,
12,
21428,
1636,
1,
198,
834,
22163,
4766,
834,
796,
366,
15269,
3050,
12,
6999,
11,
26986,
578,
390,
128... | 2.619335 | 993 |
import time
import os
import logging
from camera import Camera, MockCamera, GridCamera, CurrentTimeCamera
from recorder import Recorder
import settings
camera = _create_cameras()
_recorder = _create_recorder()
# This only needs to be called if release_cameras is called prior - a camera will be create... | [
11748,
640,
198,
11748,
28686,
198,
11748,
18931,
198,
198,
6738,
4676,
1330,
20432,
11,
44123,
35632,
11,
24846,
35632,
11,
9236,
7575,
35632,
198,
6738,
38156,
1330,
3311,
2875,
198,
198,
11748,
6460,
628,
628,
198,
25695,
796,
4808,
... | 3.771739 | 92 |
import json
import requests
from activeledgerPythonSDK.classes import Connection as con | [
11748,
33918,
198,
11748,
7007,
198,
6738,
4075,
992,
1362,
37906,
10305,
42,
13,
37724,
1330,
26923,
355,
369
] | 4.578947 | 19 |
import math
import numpy as np
import torch
from torch import optim
from models import BaseVAE
from models.types_ import *
from utils import data_loader
import pytorch_lightning as pl
from torchvision import transforms, datasets
import torchvision.utils as vutils
from torchvision.datasets import CIFAR10, CelebA, MNIST
... | [
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
1330,
6436,
198,
6738,
4981,
1330,
7308,
11731,
36,
198,
6738,
4981,
13,
19199,
62,
1330,
1635,
198,
6738,
3384,
4487,
1330,
1366,
62,
29356,
198,
11... | 3.588235 | 119 |
import logging
from src.backup.datastore.backup_finder import BackupFinder
from src.restore.list.backup_list_restore_service import \
BackupListRestoreRequest, BackupItem, BackupListRestoreService
from src.restore.status.restoration_job_status_service import \
RestorationJobStatusService
| [
11748,
18931,
198,
198,
6738,
12351,
13,
1891,
929,
13,
19608,
459,
382,
13,
1891,
929,
62,
22805,
1330,
35071,
37,
5540,
198,
6738,
12351,
13,
2118,
382,
13,
4868,
13,
1891,
929,
62,
4868,
62,
2118,
382,
62,
15271,
1330,
3467,
198,... | 3.397727 | 88 |
class JudgerIllegalState(Exception):
"""
Exception class that indicates the Judger cannot recover from an illegal state.
We need to exit the program, but it is a situation we have handled and that is excepted.
The real reason and traceback information should have been logged to both console and log file... | [
4871,
4794,
1362,
33666,
18011,
9012,
7,
16922,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
35528,
1398,
326,
9217,
262,
4794,
1362,
2314,
8551,
422,
281,
5293,
1181,
13,
198,
220,
220,
220,
775,
761,
284,
8420,
262,
1430,
... | 3.671053 | 152 |
from utility_functions import cut_size
from copy import deepcopy
from operator import attrgetter
| [
6738,
10361,
62,
12543,
2733,
1330,
2005,
62,
7857,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
10088,
1330,
708,
81,
1136,
353,
628,
198
] | 3.96 | 25 |
# Natural Language Toolkit: Combinatory Categorial Grammar
#
# Copyright (C) 2001-2021 NLTK Project
# Author: Graeme Gange <ggange@csse.unimelb.edu.au>
# URL: <https://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
CCG Combinators
"""
from abc import ABCMeta, abstractmethod
from ccg.api import Function... | [
2,
12068,
15417,
16984,
15813,
25,
955,
8800,
2870,
327,
2397,
5132,
20159,
3876,
198,
2,
198,
2,
15069,
357,
34,
8,
5878,
12,
1238,
2481,
22879,
51,
42,
4935,
198,
2,
6434,
25,
7037,
34755,
402,
858,
1279,
1130,
858,
31,
6359,
32... | 3.775618 | 566 |
##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2021 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | [
29113,
29113,
7804,
2235,
198,
2,
1002,
407,
5081,
4306,
287,
428,
2393,
393,
428,
7515,
338,
10483,
4541,
13,
14116,
198,
2,
2393,
262,
1708,
6634,
290,
16625,
4174,
25,
198,
2,
198,
2,
15069,
33448,
31475,
42,
8549,
198,
2,
198,
... | 2.36342 | 5,041 |
__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"
import six
| [
834,
9800,
834,
796,
366,
18219,
16095,
1,
198,
834,
22163,
4766,
834,
796,
366,
15269,
2813,
8891,
66,
2118,
13,
2398,
1,
198,
834,
43085,
834,
796,
366,
21800,
11,
766,
13789,
13,
14116,
1,
198,
198,
11748,
2237,
628,
198
] | 2.880952 | 42 |
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from smart_settings.api import register_settings
register_settings(
namespace='mailer',
module='mailer.settings',
settings=[
{'name': 'LINK_SUBJECT_TEMPLATE', 'global_name': 'MAILER_LINK_SUBJECT_TEMPLA... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
198,
6738,
4451,
62,
33692,
13,
15042,
1330,
7881,
62,
33692,
198,
1... | 2.838509 | 483 |
# Copyright 2017 The TensorFlow Lattice Authors.
#
# 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 a... | [
2,
15069,
2177,
383,
309,
22854,
37535,
406,
1078,
501,
46665,
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,
... | 3.136116 | 551 |
from __future__ import absolute_import
import six
from sentry.api.serializers import Serializer, register
from sentry.models import (
AuthenticatorInterface,
RecoveryCodeInterface,
SmsInterface,
TotpInterface,
U2fInterface,
)
@register(AuthenticatorInterface)
@register(SmsInterface)
for inte... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
2237,
198,
198,
6738,
1908,
563,
13,
15042,
13,
46911,
11341,
1330,
23283,
7509,
11,
7881,
198,
6738,
1908,
563,
13,
27530,
1330,
357,
198,
220,
220,
220,
31885,
26407,
... | 3.403101 | 129 |
import difflib
def test_same_gitignore_dockerignore():
""" Asserts that the versions of .gitignore and .dockerignore matches """
with open(".gitignore", "r") as hosts0:
with open(".dockerignore", "r") as hosts1:
diff = difflib.unified_diff(
hosts0.readlines(),
... | [
11748,
814,
8019,
628,
198,
4299,
1332,
62,
31642,
62,
18300,
46430,
62,
45986,
46430,
33529,
198,
220,
220,
220,
37227,
2195,
861,
82,
326,
262,
6300,
286,
764,
18300,
46430,
290,
764,
45986,
46430,
7466,
37227,
198,
220,
220,
220,
3... | 2.045833 | 240 |
# Generated by Django 2.2.8 on 2020-01-18 16:22
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
23,
319,
12131,
12,
486,
12,
1507,
1467,
25,
1828,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# date: 2019.08.15
'''button hover color using Label with Enter/Leave events'''
import tkinter as tk
# --- functions ---
# --- main ---
root = tk.Tk()
button = tk.Label(root, text='Enter/Leave event on Label', relief='raised')
button.pack(fill='x', ipady=5, ipadx=5, pady=1, padx=1)
button.bind('<Button-1>', l... | [
198,
2,
3128,
25,
13130,
13,
2919,
13,
1314,
198,
198,
7061,
6,
16539,
20599,
3124,
1262,
36052,
351,
6062,
14,
35087,
2995,
7061,
6,
198,
198,
11748,
256,
74,
3849,
355,
256,
74,
198,
198,
2,
11420,
5499,
11420,
198,
198,
2,
1142... | 2.683908 | 174 |
import copy
UNCLASSIFIED = -2
NOISE = -1
| [
11748,
4866,
198,
198,
4944,
45449,
796,
532,
17,
198,
15285,
24352,
796,
532,
16,
628,
628,
628
] | 2.611111 | 18 |
import json
import pathlib
import unittest
import numpy as np
from pyflim.io.picoquant import pq_header, pq_numba
if __name__ == "__main__":
unittest.main()
| [
11748,
33918,
198,
11748,
3108,
8019,
198,
11748,
555,
715,
395,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
12972,
69,
2475,
13,
952,
13,
79,
3713,
40972,
1330,
279,
80,
62,
25677,
11,
279,
80,
62,
77,
2178,
64,
628,
... | 2.530303 | 66 |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
import pulumi.runtime
class LogDestinationPolicy(pulumi.CustomResource):
"""
Provides a CloudWatch Logs destinat... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
17202,
39410,
25,
428,
2393,
373,
7560,
416,
262,
21624,
12994,
24118,
687,
10290,
357,
27110,
5235,
8,
16984,
13,
17202,
198,
2,
17202,
2141,
407,
4370,
416,
1021,
4556,
345,
821,
1728,
345,
760... | 2.682243 | 749 |
"""Features API.""" | [
37811,
23595,
7824,
526,
15931
] | 3.8 | 5 |
""" Cisco_IOS_XR_l2vpn_cfg
This module contains a collection of YANG definitions
for Cisco IOS\-XR l2vpn package configuration.
This module contains definitions
for the following management objects\:
l2vpn\: L2VPN configuration
generic\-interface\-lists\: generic interface lists
evpn\: evpn
This YANG module a... | [
37811,
28289,
62,
40,
2640,
62,
55,
49,
62,
75,
17,
85,
21999,
62,
37581,
220,
198,
198,
1212,
8265,
4909,
257,
4947,
286,
575,
15567,
17336,
198,
1640,
28289,
314,
2640,
41441,
55,
49,
300,
17,
85,
21999,
5301,
8398,
13,
198,
198... | 1.426375 | 286,147 |
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import argparse
import math
import os
import time
from typing import Any, List, Union, cast
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
import torch.nn as nn
from torch.utils.data import DataLoader
from torch... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
1439,
2489,
10395,
13,
628,
198,
11748,
1822,
29572,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
640,
198,
6738,
19720,
1330,
4377,
11,
7343,
11,
4479,
11,
3350,
1... | 2.568327 | 783 |
#!/usr/bin/env python
import matplotlib.pyplot as plt
import pywt
import pywt.data
camera = pywt.data.camera()
wavelet = pywt.Wavelet('sym2')
level = 5
# Note: Running with transform="dwtn" is faster, but the resulting images will
# look substantially worse.
coeffs = pywt.mran(camera, wavelet=wavelet, level=l... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
11748,
12972,
46569,
198,
11748,
12972,
46569,
13,
7890,
198,
198,
25695,
796,
12972,
46569,
13,
7890,
13,
25695,
... | 2.269663 | 623 |
# -*- coding: utf-8 -*-
"""
Created on Sat Nov 9 19:21:52 2019
@author: YQ
"""
import tensorflow as tf
if __name__ == "__main__":
import numpy as np
#tf.debugging.set_log_device_placement(True)
z = np.random.normal(size=(1, 74)).astype(np.float32)
z = tf.convert_to_tensor(z)
g = ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
7031,
5267,
220,
860,
678,
25,
2481,
25,
4309,
13130,
198,
198,
31,
9800,
25,
575,
48,
198,
37811,
198,
198,
11748,
11192,
273,
11125,
355,
487... | 2.108247 | 194 |
""" Bond between atoms """
class Bond(object):
""" A bond between two Atom objects.
Currently, there is no reference to the actual Atom objects but instead
the atoms are indexed in the Molecule class storing these bond indices.
Bonds between two atoms `A` and `B`, i.e. `A` -- `B`, are con... | [
37811,
12812,
1022,
23235,
37227,
198,
198,
4871,
12812,
7,
15252,
2599,
198,
220,
220,
220,
37227,
317,
6314,
1022,
734,
33102,
5563,
13,
628,
220,
220,
220,
220,
220,
220,
220,
16888,
11,
612,
318,
645,
4941,
284,
262,
4036,
33102,
... | 2.33921 | 1,418 |
import torch
from sklearn.metrics import precision_recall_fscore_support
def categorical_accuracy(preds, y, tag_pad_idx, device):
"""
Returns accuracy per batch, i.e. if you get 8/10 right, this returns 0.8, NOT 8
"""
max_preds = preds.argmax(dim = 1, keepdim = True) # get the index of the max probabili... | [
11748,
28034,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
15440,
62,
8344,
439,
62,
69,
26675,
62,
11284,
198,
4299,
4253,
12409,
62,
4134,
23843,
7,
28764,
82,
11,
331,
11,
7621,
62,
15636,
62,
312,
87,
11,
3335,
2599,
198,
220,... | 2.367188 | 384 |
from django.db import models
from .user import User
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
6738,
764,
7220,
1330,
11787,
628
] | 3.6 | 15 |
from app import create_celery
from utils.logging import logger
celery_app = create_celery()
@celery_app.task(max_retries=3,time_limit=7200)
| [
6738,
598,
1330,
2251,
62,
7015,
88,
198,
6738,
3384,
4487,
13,
6404,
2667,
1330,
49706,
198,
198,
7015,
88,
62,
1324,
796,
2251,
62,
7015,
88,
3419,
198,
198,
31,
7015,
88,
62,
1324,
13,
35943,
7,
9806,
62,
1186,
1678,
28,
18,
... | 2.551724 | 58 |
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import os
import pytest
from datadog_checks.dev import docker_run
from datadog_checks.snmp import SnmpCheck
from .common import COMPOSE_DIR, SCALAR_OBJECTS, SCALAR_OBJECTS_WITH_TAGS, TABULAR_OBJECTS, generate_instan... | [
2,
357,
34,
8,
16092,
324,
519,
11,
3457,
13,
2864,
198,
2,
1439,
2489,
10395,
198,
2,
49962,
739,
45157,
1431,
347,
10305,
13789,
357,
3826,
38559,
24290,
8,
198,
198,
11748,
28686,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
481... | 2.775362 | 138 |
import matplotlib.pyplot as plt
import json
# how many of pokemons in our data set (in %) are witnessed more than 10 times,
# 20 times, 30 times, and so on. We need to take a look at it.
# Best is to visualize this info as a cumulative plot
# (x axis: number of times, y axis is % of the pokemons).
#filename = 'ap... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
33918,
628,
628,
198,
198,
2,
703,
867,
286,
22620,
11567,
287,
674,
1366,
900,
357,
259,
4064,
8,
389,
13923,
517,
621,
838,
1661,
11,
198,
2,
1160,
1661,
11,
1... | 2.597826 | 276 |
import os
import math
from ply import lex, yacc
tokens = (
'DATA', 'TEXT',
'BYTE', 'HALF', 'WORD', 'FLOAT', 'DOUBLE', 'ASCII', 'ASCIIZ',
'VALUE', "STRING",
'REG', 'OFFSET',
'NOP', 'ALIGN', 'SPACE', 'COMMA', 'COLON', 'ENDL',
'RCOM', 'ICOM', 'JCOM', 'PCOM',
'LWICOM', 'DRCOM', 'BZIC... | [
11748,
28686,
201,
198,
11748,
10688,
201,
198,
6738,
35960,
1330,
31191,
11,
331,
4134,
201,
198,
201,
198,
83,
482,
641,
796,
357,
201,
198,
220,
220,
220,
705,
26947,
3256,
705,
32541,
3256,
201,
198,
220,
220,
220,
705,
17513,
9... | 1.803106 | 8,177 |
# Author: Jeremy Compostella <jeremy.compostella@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of condition... | [
2,
6434,
25,
11753,
3082,
455,
12627,
1279,
73,
567,
1820,
13,
5589,
455,
12627,
31,
14816,
13,
785,
29,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
389,
10431,
... | 2.542945 | 1,956 |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import cv2
import time
import numpy as np
from src import utils
from src.hog_box import HOGBox
from src.estimator import VNectEstimator
#################
### Functions ###
#################
def joints_iter_gen():
"""
a generator to yield joints iteratively, supp... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
198,
11748,
269,
85,
17,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
12351,
1330,
3384,
4487,
198,... | 2.829044 | 1,088 |
# Copyright 2017 Google Inc. 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 law or a... | [
2,
15069,
2177,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.425926 | 648 |
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y)
plt.show() | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
87,
796,
45941,
13,
283,
858,
7,
15,
11,
642,
11,
657,
13,
16,... | 1.958333 | 72 |
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | [
29113,
29113,
7804,
4242,
2235,
198,
2,
198,
2,
15069,
357,
66,
8,
5878,
11,
6244,
1168,
3008,
5693,
290,
25767,
669,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
770,
3788,
318,
2426,
284,
262,
8617,
286,
262,
1168,
3008,
... | 3.511364 | 792 |
import unittest
import logging
import cmapPy.pandasGEXpress.setup_GCToo_logger as setup_logger
import os
import numpy as np
import pandas as pd
import cmapPy.pandasGEXpress.GCToo as GCToo
import cmapPy.pandasGEXpress.parse_gct as pg
import cmapPy.pandasGEXpress.write_gct as wg
FUNCTIONAL_TESTS_PATH = "../functional_te... | [
11748,
555,
715,
395,
198,
11748,
18931,
198,
11748,
269,
8899,
20519,
13,
79,
392,
292,
38,
6369,
8439,
13,
40406,
62,
38,
4177,
2238,
62,
6404,
1362,
355,
9058,
62,
6404,
1362,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
... | 2.494624 | 186 |
import abc
import logging
from multipledispatch import dispatch
from datastructs.assignment import Assignment
from datastructs.graph import Graph
from settings import Settings
dispatch_namespace = dict()
class Template:
"""
Representation of a (possibly underspecified) template for a Value. An example of
... | [
11748,
450,
66,
198,
11748,
18931,
198,
198,
6738,
5021,
10137,
8802,
963,
1330,
27965,
198,
198,
6738,
4818,
459,
1356,
82,
13,
562,
16747,
1330,
50144,
198,
6738,
4818,
459,
1356,
82,
13,
34960,
1330,
29681,
198,
6738,
6460,
1330,
1... | 2.747061 | 2,297 |
import cv2
import math
import numpy as np
from ImageProcessor import ImageProcessor
import Settings
import logger
from enum import Enum
logger = logger.get_logger(__name__)
| [
11748,
269,
85,
17,
220,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
7412,
18709,
273,
1330,
7412,
18709,
273,
198,
11748,
16163,
198,
11748,
49706,
198,
6738,
33829,
1330,
2039,
388,
198,
198,
6404,
1362,
796,
497... | 3.277778 | 54 |
""" .. _DtdReader-api:
DtdReader --- Reads a DTD file.
-------------------------------
This module defines the DtdReader class.
"""
import os
class DtdReader(object):
""" Class for reading in a dtd file and accumulating all of the different
bits.
Parameters
----------
... | [
37811,
11485,
4808,
35,
8671,
33634,
12,
15042,
25,
628,
220,
220,
220,
360,
8671,
33634,
11420,
4149,
82,
257,
360,
21016,
2393,
13,
198,
220,
220,
220,
34400,
24305,
628,
220,
220,
220,
770,
8265,
15738,
262,
360,
8671,
33634,
1398,... | 2.030888 | 1,813 |
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate
import scipy.misc
#import tikzplotlib
import DataFile
om = np.sqrt(4*k*m - c**2)/(2*m)
T = 2*pi/om
print(T)
Am = pi*Rm**2
Ag = pi*Rg**2
c = 8*pi*eta*L*Am**2/Ag**2
R = pi*2*Rs*N
| [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
629,
541,
88,
13,
18908,
4873,
198,
11748,
629,
541,
88,
13,
44374,
198,
2,
11748,
256,
1134,
89,
29487,
8019,
198,
11748,
6060,
... | 1.954887 | 133 |
from PIL import Image
import pytest
from docstore.thumbnails import create_thumbnail, get_dimensions
@pytest.mark.parametrize(
"filename", ["Newtons_cradle.gif", "Rotating_earth_(large).gif"]
)
| [
6738,
350,
4146,
1330,
7412,
198,
11748,
12972,
9288,
198,
198,
6738,
2205,
8095,
13,
18670,
1330,
2251,
62,
400,
20566,
11,
651,
62,
27740,
5736,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7,
198,
220,
220,
220,... | 2.915493 | 71 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from ctypes import *
from ctypes import wintypes
from commands import *
class Escpos:
""" ESC/POS Printer object """
handle = None
device = None
def _raw(self, msg):
""" Print any of the commands above, or clear text """
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
201,
198,
6738,
269,
19199,
1330,
1635,
201,
198,
6738,
269,
19199,
1330,
266,
600,
9497,
201,
19... | 1.765111 | 3,342 |
from pydantic.main import BaseModel
| [
6738,
279,
5173,
5109,
13,
12417,
1330,
7308,
17633,
628
] | 3.7 | 10 |
"""
Script to showcase domain randomization functionality.
"""
import robosuite.utils.macros as macros
from robosuite.controllers import load_controller_config
from robosuite.utils.input_utils import *
from robosuite.wrappers import DomainRandomizationWrapper, GymImageDomainRandomizationWrapper
from robosuite.wrapper... | [
37811,
198,
7391,
284,
21742,
7386,
4738,
1634,
11244,
13,
198,
37811,
198,
198,
11748,
3857,
418,
84,
578,
13,
26791,
13,
20285,
4951,
355,
34749,
198,
6738,
3857,
418,
84,
578,
13,
3642,
36667,
1330,
3440,
62,
36500,
62,
11250,
198,... | 2.41022 | 1,409 |
#
# Copyright 2016 The BigDL Authors.
#
# 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 ... | [
2,
198,
2,
15069,
1584,
383,
4403,
19260,
46665,
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,
13789,
13... | 2.127467 | 4,864 |
def for_u():
""" Pattern of Small Alphabet: 'u' using for loop """
for i in range(5):
for j in range(5):
if j%4==0 and i<4 or i==4 and j!=0:
print('*',end=' ')
else:
pri... | [
4299,
329,
62,
84,
33529,
201,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
23939,
286,
10452,
45695,
25,
705,
84,
6,
1262,
329,
9052,
37227,
201,
198,
220,
220,
220,
220,
220,
220,
220,
329,
1312,
287,
2837,
7,
20,
2599,
201,
... | 1.430108 | 558 |
import re
| [
11748,
302,
628
] | 3.666667 | 3 |
# Generated by Django 2.1.8 on 2019-10-13 13:51
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
23,
319,
13130,
12,
940,
12,
1485,
1511,
25,
4349,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#!/usr/bin/python
#
# (c) 2018 Extreme Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
357,
66,
8,
2864,
18111,
27862,
3457,
13,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
28038,
856,
198,
2,
198,
2,
28038,
856,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
... | 2.675841 | 1,635 |
import logging
from . import utils
logger = logging.getLogger(__name__)
def get_user_objs(load, *, ask_on_failure=True):
"""
Load the user's modules.
All objects from these modules will be imported e.g.
``from module import *`` and the objects will be returned.
Parameters
----------
lo... | [
11748,
18931,
198,
198,
6738,
764,
1330,
3384,
4487,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
4299,
651,
62,
7220,
62,
672,
8457,
7,
2220,
11,
1635,
11,
1265,
62,
261,
62,
32165,
495... | 2.044118 | 680 |
from aparent.predictor.aparent_predictor import *
| [
6738,
2471,
1580,
13,
79,
17407,
273,
13,
499,
1580,
62,
79,
17407,
273,
1330,
1635,
198
] | 2.941176 | 17 |
from time import sleep
from typing import List, Union
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import TimeoutException
BASE_QUERY_URL = 'https://www.linkedin.com/search/results/people/?origin=FA... | [
6738,
640,
1330,
3993,
198,
198,
6738,
19720,
1330,
7343,
11,
4479,
198,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
198,
6738,
384,
11925,
1505,
13,
... | 2.945578 | 147 |
"""LBANN Operators.
Operators are atomic tensor operations supported by LBANN.
"""
from __future__ import annotations
from lbann import operators_pb2 as OpProto
from lbann import DataType, DeviceAllocation
from lbann.util import make_iterable
class Operator:
"""Base class for LBANN operators"""
def __init_... | [
37811,
30501,
22846,
6564,
2024,
13,
198,
198,
18843,
2024,
389,
17226,
11192,
273,
4560,
4855,
416,
22199,
22846,
13,
198,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
18360,
1236,
1330,
12879,
62,
40842,
... | 2.924801 | 2,008 |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | [
2,
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,
670,
329,
3224,
1321,
5115,
6634,
9238,
13,
198,
2,
383,
... | 2.287232 | 17,035 |
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from github.com.metaprov.modelaapi.services.featurepipelinerun.v1 import featurepipelinerun_pb2 as github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_fea... | [
2,
2980,
515,
416,
262,
308,
49,
5662,
11361,
8435,
17050,
13877,
13,
8410,
5626,
48483,
0,
198,
37811,
11792,
290,
4382,
6097,
11188,
284,
1237,
672,
3046,
12,
23211,
2594,
526,
15931,
198,
11748,
1036,
14751,
198,
198,
6738,
33084,
... | 2.599338 | 2,114 |
"""Command containing path argument."""
import textwrap
from etest_test.fixtures_test.scripts_test import SCRIPTS
_ = {
"uuid": "c20ac8ba1ced46b8981c4037e23bf6a5",
"description": "command containing path argument",
"text": textwrap.dedent(
"""
python_install_all() {
distutils-... | [
37811,
21575,
7268,
3108,
4578,
526,
15931,
198,
198,
11748,
2420,
37150,
198,
198,
6738,
2123,
395,
62,
9288,
13,
69,
25506,
62,
9288,
13,
46521,
62,
9288,
1330,
6374,
32618,
4694,
198,
198,
62,
796,
1391,
198,
220,
220,
220,
366,
... | 2.217573 | 239 |
# -*- coding: utf-8 -*-
from pynput import keyboard
from mazeClient import Commands as command
from mazeClient import send_command
def on_press(key):
"""
Listen for input and move if any of 'WASD' is pressed
Exit if any other key is pressed
"""
# Not a valid key pressed?
if not hasattr(key, '... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
279,
2047,
1996,
1330,
10586,
198,
198,
6738,
31237,
11792,
1330,
49505,
355,
3141,
198,
6738,
31237,
11792,
1330,
3758,
62,
21812,
628,
198,
4299,
319,
62,
8439,
... | 2.488987 | 454 |
from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple, Union
from copy import deepcopy
import torch
from transformers.tokenization_utils_base import BatchEncoding, PreTrainedTokenizerBase
@dataclass
class DataCollatorForKmerModeling:
"""
Data collator used for Kmer modeling. Inputs... | [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
11,
32233,
11,
309,
29291,
11,
4479,
198,
6738,
4866,
1330,
2769,
30073,
198,
198,
11748,
28034,
198,
198,
6738,
6121,
364,
13,
30001,
1634,
6... | 2.47964 | 1,891 |
# coding=utf-8
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.HoutigeVegetatie import HoutigeVegetatie
from OTLMOW.OTLModel.Datatypes.KlNSB import KlNSB
from OTLMOW.GeometrieArtefact.VlakGeometrie import VlakGeometrie
# Generated with OTLClassCreator. To modify: extend,... | [
2,
19617,
28,
40477,
12,
23,
198,
6738,
440,
14990,
44,
3913,
13,
2394,
43,
17633,
13,
14881,
9487,
274,
13,
2394,
43,
8086,
822,
84,
315,
1330,
440,
14990,
8086,
822,
84,
315,
198,
6738,
440,
14990,
44,
3913,
13,
2394,
43,
17633,... | 2.411168 | 591 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
201,
198,
201,
198
] | 3.083333 | 12 |
"""Utility functions for email management in django"""
# Built-in
from threading import Thread
# Django
from django.contrib.staticfiles import finders
from django.core.mail import EmailMessage
# --------------------------------------------------------------------------------
# > Functions
# ------------------------... | [
37811,
18274,
879,
5499,
329,
3053,
4542,
287,
42625,
14208,
37811,
198,
198,
2,
28477,
12,
259,
198,
6738,
4704,
278,
1330,
14122,
198,
198,
2,
37770,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
12708,
16624,
1330,
1064,
364,
198,
67... | 3.123391 | 932 |
"""Benchmark of the Groebner bases algorithms. """
from __future__ import print_function, division
from sympy.polys.rings import vring
from sympy.polys.domains import QQ
from sympy.polys.groebnertools import groebner
R = vring("x1:13", QQ)
V = R.gens
E = [(x1, x2), (x2, x3), (x1, x4), (x1, x6), (x1, x12), (x2, x5),... | [
37811,
44199,
4102,
286,
262,
10299,
1765,
1008,
12536,
16113,
13,
37227,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
198,
198,
6738,
10558,
88,
13,
35428,
82,
13,
33173,
1330,
410,
1806,
198,
6738,
10558,
88,
1... | 1.860058 | 343 |
"""
Do not edit manually! Generated by tests/data/gen_standard.py from
https://github.com/mr-mixas/Nested-Diff/tree/master/tests/json/
"""
| [
37811,
198,
5211,
407,
4370,
14500,
0,
2980,
515,
416,
5254,
14,
7890,
14,
5235,
62,
20307,
13,
9078,
422,
198,
5450,
1378,
12567,
13,
785,
14,
43395,
12,
19816,
292,
14,
45,
7287,
12,
28813,
14,
21048,
14,
9866,
14,
41989,
14,
17... | 2.877551 | 49 |
from random import randint
import emoji | [
6738,
4738,
1330,
43720,
600,
198,
11748,
44805
] | 4.875 | 8 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 17 15:57:16 2020
@author: zettergm
"""
# Imports
import numpy as np
import math as ma
import matplotlib.pyplot as plt
# Illustrate number of operations required to execute Cramer's Rule directly
lN=10;
numops=np.zeros(lN)
for i in range(0,lN):
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
2447,
1596,
1315,
25,
3553,
25,
1433,
12131,
198,
198,
31,
9800,
25,
1976,
40088,
3... | 2.255544 | 947 |
import hmac
from hashlib import sha1
SECRET=b"SIGNING_SECRET_CHOOSE_FOR_YOURSELF"
c="123454:343245329954953"
hash=c.split(':')[0]
#h = hmac.new(key=SECRET,msg=b"1448452583", digestmod=sha1)
h = hmac.new(key=SECRET,msg=hash, digestmod=sha1)
print(" Cookie content: %s" % c)
print("Calculated content: %s:%s" % (hash... | [
11748,
289,
20285,
198,
6738,
12234,
8019,
1330,
427,
64,
16,
198,
198,
23683,
26087,
28,
65,
1,
50,
3528,
15871,
62,
23683,
26087,
62,
44899,
14058,
62,
13775,
62,
36981,
6998,
37738,
1,
198,
66,
2625,
10163,
34229,
25,
32118,
1731,
... | 2.194805 | 154 |
# Generated by Django 3.0.4 on 2020-11-13 18:48
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
19,
319,
12131,
12,
1157,
12,
1485,
1248,
25,
2780,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
import os
import sys
import time
import gzip
start_time = time.clock()
NUM_BP_PER_BIN = 200
CHR_COL_IND = 0 # column index that contains information about the chromosome
START_COL_IND = 1
END_COL_IND = 2
STATE_COL_IND = 3
def open_file(fn):
"""
Open a zipped or unzipped file. Return the open file object
"""
if fn[... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
308,
13344,
198,
9688,
62,
2435,
796,
640,
13,
15750,
3419,
198,
41359,
62,
20866,
62,
18973,
62,
33,
1268,
796,
939,
198,
37846,
62,
25154,
62,
12115,
796,
657,
1303,
5721... | 2.549708 | 171 |
"""``numpy``-based implementation of data queues
"""
__author__ = "Taro Sekiyama"
__copyright__ = "(C) Copyright IBM Corp. 2016"
| [
37811,
15506,
77,
32152,
15506,
12,
3106,
7822,
286,
1366,
43359,
198,
37811,
198,
198,
834,
9800,
834,
796,
366,
51,
12022,
37558,
7745,
1689,
1,
198,
834,
22163,
4766,
834,
796,
30629,
34,
8,
15069,
19764,
11421,
13,
1584,
1,
628
] | 3.119048 | 42 |
# -*- coding: utf-8 -*-
# IMPORT LIBRARIES
import random
from math import *
# DEFINE ENVIRONMENT VARIABLES
DEBUG = 1
EXAMPLES = 0
SORTS = 0
FEATURES = 0
SORT_SYMBOLS = 0
FEATURE_SYMBOLS = 0
SIMPLE_VALUES = 0
SIMPLE_VARIABLES = 0
# DEFINE ENVIRONMENT CONSTENTS
DEF_DOMAIN_MODEL = "Seat-DM"
DEF_ROOTNAME = "SEAT"
DEF... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
1849,
3955,
15490,
45651,
49,
1503,
11015,
198,
198,
11748,
4738,
198,
6738,
10688,
1330,
1635,
198,
198,
2,
23449,
8881,
12964,
53,
4663,
1340,
10979,
569,
1503... | 2.220096 | 209 |
t, sx, sy, ex, ey = map(int, input().split())
wind = [i for i in input()]
count = 0
flag = False
for i in wind:
if i == 'E' and sx < ex:
sx += 1
elif i == 'W' and sx > ex:
sx -= 1
elif i == 'N' and sy < ey:
sy += 1
elif i == 'S' and sy > ey:
sy -= 1
count += 1
... | [
83,
11,
264,
87,
11,
827,
11,
409,
11,
1926,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
198,
7972,
796,
685,
72,
329,
1312,
287,
5128,
3419,
60,
198,
198,
9127,
796,
657,
198,
32109,
796,
10352,
198,
198,
1640,
1312,
... | 1.865546 | 238 |
#!/usr/bin/env python
# encoding=utf-8
"""
Copyright (c) 2021 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFT... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
28,
40477,
12,
23,
198,
37811,
198,
15269,
357,
66,
8,
33448,
43208,
21852,
1766,
1539,
43,
8671,
13,
198,
198,
9654,
35389,
1046,
318,
11971,
739,
17996,
272,
6599,
43,
41... | 2.955645 | 248 |
import json
from os.path import exists
import requests
import time
search_results = json.load(open('search_results.json'))
counter = 0
total = len(search_results['gathers'])
for rec in search_results['gathers']:
counter+=1
url = rec['catalog_url'] + '.json'
filename = rec['catalog_url'].split('/')[-1] + '.json'... | [
11748,
33918,
198,
6738,
28686,
13,
6978,
1330,
7160,
198,
11748,
7007,
198,
11748,
640,
198,
198,
12947,
62,
43420,
796,
33918,
13,
2220,
7,
9654,
10786,
12947,
62,
43420,
13,
17752,
6,
4008,
198,
198,
24588,
796,
657,
198,
23350,
79... | 2.574661 | 221 |
mascota = Perro("Lassie", "Collie", 18)
#mascota.ladra()
| [
198,
76,
3372,
4265,
796,
2448,
305,
7203,
43,
562,
494,
1600,
366,
22667,
494,
1600,
1248,
8,
198,
2,
76,
3372,
4265,
13,
9435,
430,
3419,
198
] | 2.071429 | 28 |
import xbmcgui
| [
11748,
2124,
20475,
66,
48317,
198
] | 2.5 | 6 |
# Generated by Django 2.2.10 on 2020-05-15 18:46
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
940,
319,
12131,
12,
2713,
12,
1314,
1248,
25,
3510,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.8 | 30 |
'''
Renogy smart battery RS485 readout.
This script features:
- Detection of slave address
- Readout of register data
The intention is to use it as a starting point to figure out the meaning of the register data of the renogy LIFEPO smart batteries.
The global dictionary contains a complete list of all registers t... | [
7061,
6,
198,
26764,
9868,
4451,
6555,
19340,
32642,
1100,
448,
13,
198,
1212,
4226,
3033,
25,
198,
220,
532,
46254,
286,
11778,
2209,
198,
220,
532,
4149,
448,
286,
7881,
1366,
198,
198,
464,
6778,
318,
284,
779,
340,
355,
257,
359... | 2.08492 | 9,456 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
383,
7054,... | 3.228022 | 728 |
import math
PI = math.pi
CM = 1.E-2
MM = 1.E-3
IN = 2.54E-2
FT = 0.3048
PF = 1.E-12
NF = 1.E-9
UF = 1.E-6
NH = 1.E-9
UH = 1.E-6
# AWG radii in mm
(
AWG_0,
AWG_1,
AWG_2,
AWG_3,
AWG_4,
AWG_5,
AWG_6,
AWG_7,
AWG_8,
AWG_9,
AWG_10,
AWG_11,
AWG_12,
AWG_13,
AWG_14,... | [
11748,
10688,
198,
198,
11901,
796,
10688,
13,
14415,
198,
24187,
796,
352,
13,
36,
12,
17,
198,
12038,
796,
352,
13,
36,
12,
18,
198,
1268,
796,
362,
13,
4051,
36,
12,
17,
198,
9792,
796,
657,
13,
1270,
2780,
198,
42668,
796,
3... | 1.455446 | 505 |
from .config import get_bleach_default_options
from bleach import clean | [
6738,
764,
11250,
1330,
651,
62,
903,
620,
62,
12286,
62,
25811,
198,
6738,
49024,
1330,
3424
] | 4.176471 | 17 |
import matplotlib.image as im
import numpy as np
import cv2
import glob
import pickle
####################################################
### Get Camera Calibration Matrix (ONLY ONCE)#######
####################################################
#grid size
nx = 9
ny = 6
path = glob.glob('camera_cal/calibration*.JP... | [
11748,
2603,
29487,
8019,
13,
9060,
355,
545,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
11748,
15095,
198,
11748,
2298,
293,
628,
628,
198,
29113,
14468,
4242,
198,
21017,
3497,
20432,
2199,
571,
1358,
24936,
357... | 3.146119 | 219 |
from oem_framework.core.elapsed import Elapsed
from oem_framework.models.core import ModelRegistry
from oem_storage_codernitydb.database import DatabaseCodernityDbStorage
from oem_storage_codernitydb.indices import MetadataKeyIndex, MetadataCollectionIndex, ItemKeyIndex, CollectionKeyIndex
from oem_framework.storage im... | [
6738,
267,
368,
62,
30604,
13,
7295,
13,
417,
28361,
1330,
2574,
28361,
198,
6738,
267,
368,
62,
30604,
13,
27530,
13,
7295,
1330,
9104,
8081,
4592,
198,
6738,
267,
368,
62,
35350,
62,
19815,
1142,
414,
9945,
13,
48806,
1330,
24047,
... | 3.76875 | 160 |
#
# DRAGONS
#
# primitives_scorpio.py
# ------------------------------------------------------------------------------
from geminidr.gemini.primitives_gemini import Gemini
from . import parame... | [
2,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.777011 | 435 |
import registros_medio
class registro_superior(registros_medio.registro_medio):
"""ensino superior de registro""" | [
11748,
4214,
4951,
62,
1150,
952,
198,
198,
4871,
4214,
305,
62,
16668,
1504,
7,
2301,
396,
4951,
62,
1150,
952,
13,
2301,
396,
305,
62,
1150,
952,
2599,
198,
220,
220,
220,
37227,
641,
2879,
9098,
390,
4214,
305,
37811
] | 2.878049 | 41 |
import os.path as op
import pytest
from heudiconv.external.pydicom import dcm
from heudiconv.cli.run import main as runner
from heudiconv.dicoms import parse_private_csa_header
from .utils import TESTS_DATA_PATH
# Public: Private DICOM tags
DICOM_FIELDS_TO_TEST = {
'ProtocolName': 'tProtocolName'
}
| [
11748,
28686,
13,
6978,
355,
1034,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
339,
463,
4749,
85,
13,
22615,
13,
79,
5173,
291,
296,
1330,
288,
11215,
198,
6738,
339,
463,
4749,
85,
13,
44506,
13,
5143,
1330,
1388,
355,
17490,
19... | 2.646552 | 116 |
#!/usr/bin/env python
import os
import numpy as np
from fnmatch import fnmatch
from Generate_Fire_Points import generate_fire_points
# Definitions
proj_path = "/Users/nathan/Documents/Projects/GOES_Fire_Growth"
img_path = os.path.join(proj_path, "Raw_Data")
out_path = os.path.join(proj_path, "Fire_Points")
# List f... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
24714,
15699,
1330,
24714,
15699,
198,
198,
6738,
2980,
378,
62,
13543,
62,
40710,
1330,
7716,
62,
6495,
62,
13033,
198,... | 2.361446 | 415 |
from django.core.urlresolvers import reverse
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.template import RequestContext
from webshop.forms import MyUserCreationForm, MyAuthenticationForm, MyUserChangeForm, MyPasswordResetForm, MyPasswordChangeForm, AddressForm
from webshop.m... | [
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
62,
1462,
62,
26209,
11,
651,
62,
15252,
62,
273,
62,
26429,
11,
18941,
198,
6738,
42625,
14208,
13,
28243,
1330... | 2.940972 | 1,728 |
import asyncio
from time import time
from coworker import Coworker
import pytest
from utils import async_test
@async_test
@async_test
@async_test
@async_test
@async_test
@async_test
@async_test
@async_test
@async_test
@pytest.mark.parametrize('sliding_window', [True, False])
| [
11748,
30351,
952,
198,
6738,
640,
1330,
640,
198,
198,
6738,
30521,
263,
1330,
10417,
967,
263,
198,
198,
11748,
12972,
9288,
198,
6738,
3384,
4487,
1330,
30351,
62,
9288,
628,
628,
628,
198,
31,
292,
13361,
62,
9288,
628,
198,
31,
... | 2.542373 | 118 |
__version__ = "2.0.0beta3"
| [
834,
9641,
834,
796,
366,
17,
13,
15,
13,
15,
31361,
18,
1,
198
] | 1.928571 | 14 |
"""
Attribute providers
"""
| [
37811,
198,
220,
220,
220,
3460,
4163,
9549,
198,
37811,
198
] | 2.909091 | 11 |
print('My student_id: 19373178') | [
4798,
10786,
3666,
3710,
62,
312,
25,
28684,
18,
23188,
11537
] | 2.909091 | 11 |
import pygame
| [
11748,
12972,
6057,
628
] | 3.75 | 4 |
from app.models.baseModel import BaseModel, db
from sqlalchemy.orm import relationship
from app.models.contact_person import ContactPerson
from app.models.department import Department
class Employee(BaseModel):
'''This class represents the company model'''
__tablename__ = 'employee'
contact_person_id = ... | [
6738,
598,
13,
27530,
13,
8692,
17633,
1330,
7308,
17633,
11,
20613,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
198,
6738,
598,
13,
27530,
13,
32057,
62,
6259,
1330,
14039,
15439,
198,
6738,
598,
13,
27530,
13,
10378,
1823,
13... | 2.469043 | 533 |
#!/usr/bin/env python
# coding: utf-8
# In[188]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# In[189]:
# In[190]:
# In[191]:
# In[192]:
# In[193]:
t = np.linspace(0,10,1000)
G = 60
M = 10
m = 1
delta_t = 0.01
x = [10]
y = [0]
f_x = [force(x[0], y[0])]
f_y = [force(y[0],x[... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
554,
58,
20356,
5974,
628,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
... | 1.698556 | 554 |
import filter_plugins.config_encoders as CE
import os
import unittest
import yaml
if __name__ == '__main__':
unittest.main()
| [
11748,
8106,
62,
37390,
13,
11250,
62,
12685,
375,
364,
355,
18671,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
11748,
331,
43695,
628,
628,
628,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220... | 2.72549 | 51 |
#!/usr/bin/env python3
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
628,
198
] | 2.272727 | 11 |
#!/usr/bin/env python
"""eq-suggest-api entry point.
EQ Suggest API provides a simple ReST service that enables a range of data
sets to be queried with arbitrary terms. Given a term the API will return a
set of candidate matches that take an incomplete term, misspellings and typos
into account. The API also exposes ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
27363,
12,
47811,
12,
15042,
5726,
966,
13,
198,
198,
36,
48,
35042,
7824,
3769,
257,
2829,
797,
2257,
2139,
326,
13536,
257,
2837,
286,
1366,
198,
28709,
284,
307,
42517,
798,
... | 3.586777 | 121 |