content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import logging
from django.conf import settings
from django.contrib.auth import get_user_model
from apps.emailutil.tasks import Email
from apps.org.models import Org
from apps.physicaldevice.models import Device
from apps.project.models import Project
from apps.sqsworker.action import Action
from apps.sqsworker.excep... | [
11748,
18931,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
198,
6738,
6725,
13,
12888,
22602,
13,
83,
6791,
1330,
9570,
198,
6738,
6725,
1... | 3.001908 | 524 |
"""
Copyright 2018 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from six.moves import xrange
import numpy as np
import h5py
from copy import ... | [
37811,
198,
15069,
2864,
25824,
21183,
2059,
220,
357,
13838,
25,
5803,
9757,
282,
7012,
8,
198,
24843,
362,
13,
15,
220,
357,
4023,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
8,
198,
3781... | 3.028249 | 177 |
import sys
"""
Version has unique source in pyproject.toml.
importlib fetches version from distribution metadata files
(in dist-info or egg-info dirs).
From Python 3.8, importlib_metadata is in standard library as importlib.metadata.
"""
if sys.version_info >= (3, 8):
from importlib import metadata
else:
impor... | [
11748,
25064,
198,
198,
37811,
198,
14815,
468,
3748,
2723,
287,
12972,
16302,
13,
39532,
75,
13,
198,
11748,
8019,
11351,
2052,
2196,
422,
6082,
20150,
3696,
198,
7,
259,
1233,
12,
10951,
393,
5935,
12,
10951,
288,
17062,
737,
198,
4... | 3.357143 | 126 |
"""Enums used by pipelinewise-target-snowflake"""
from enum import Enum, unique
from types import ModuleType
from typing import Callable
import target_snowflake.file_formats
from target_snowflake.exceptions import FileFormatNotFoundException, InvalidFileFormatException
# Supported types for file formats.
@unique
clas... | [
37811,
4834,
5700,
973,
416,
7347,
27176,
413,
786,
12,
16793,
12,
82,
2197,
47597,
37811,
198,
6738,
33829,
1330,
2039,
388,
11,
3748,
198,
6738,
3858,
1330,
19937,
6030,
198,
6738,
19720,
1330,
4889,
540,
198,
198,
11748,
2496,
62,
... | 2.509274 | 1,294 |
# This function is not intended to be invoked directly. Instead it will be
# triggered by an orchestrator function.
import logging
import os
from azure.mgmt.containerservice import ContainerServiceClient
from azure.identity import ClientSecretCredential
from azure.mgmt.subscription import SubscriptionClient
from az... | [
2,
770,
2163,
318,
407,
5292,
284,
307,
24399,
3264,
13,
5455,
340,
481,
307,
198,
2,
13973,
416,
281,
28127,
1352,
2163,
13,
198,
198,
11748,
18931,
220,
220,
198,
11748,
28686,
198,
198,
6738,
35560,
495,
13,
11296,
16762,
13,
364... | 3.793103 | 145 |
from commaqa.configs.step_config import StepConfig
from commaqa.dataset.utils import get_predicate_args
| [
6738,
39650,
20402,
13,
11250,
82,
13,
9662,
62,
11250,
1330,
5012,
16934,
198,
6738,
39650,
20402,
13,
19608,
292,
316,
13,
26791,
1330,
651,
62,
28764,
5344,
62,
22046,
628,
198
] | 3.3125 | 32 |
#!/usr/bin/env python
"""
This requires the python docutils library.
"""
from docutils.core import publish_cmdline
publish_cmdline(writer_name='html')
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
1212,
4433,
262,
21015,
2205,
26791,
5888,
13,
198,
37811,
198,
198,
6738,
2205,
26791,
13,
7295,
1330,
7715,
62,
28758,
1370,
198,
198,
12984,
1836,
62,
28758,
1370,
... | 3.142857 | 49 |
import glob
import json
import os
import platform
import re
import subprocess
from typing import Any
import webbrowser
import shlex
import locale
import numpy as np
import bpy
import arm.lib.armpack
from arm.lib.lz4 import LZ4
import arm.log as log
import arm.make_state as state
import arm.props_renderpath
from enum... | [
11748,
15095,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
3859,
198,
11748,
302,
198,
11748,
850,
14681,
198,
6738,
19720,
1330,
4377,
198,
11748,
3992,
40259,
198,
11748,
427,
2588,
198,
11748,
36693,
198,
198,
11748,
299,
32152,
3... | 2.429688 | 1,664 |
#
# Sample Todo module
#
"""
Your license message ...
"""
import os, bottle, json, datetime
from appmodule import AppModule
from .modeldb import setupDB, Todo, MyS
app = MyAppModule()
@app.get('/static/<path:path>')
@app.route('/')
@app.auth('access module')
@app.view('index.tpl')
def _():
'''
D... | [
2,
198,
2,
27565,
309,
24313,
8265,
198,
2,
198,
198,
37811,
198,
198,
7120,
5964,
3275,
2644,
198,
198,
37811,
198,
198,
11748,
28686,
11,
9294,
11,
33918,
11,
4818,
8079,
198,
6738,
598,
21412,
1330,
2034,
26796,
198,
6738,
764,
1... | 2.432787 | 305 |
import feedparser
import pandas
import django
django.setup()
from activitypub.models import Account, Note
| [
11748,
3745,
48610,
198,
11748,
19798,
292,
198,
11748,
42625,
14208,
198,
28241,
14208,
13,
40406,
3419,
198,
6738,
3842,
12984,
13,
27530,
1330,
10781,
11,
5740,
198
] | 3.785714 | 28 |
from textwrap import dedent
from tests import check_as_expected
ROOT = 'superhelp.helpers.for_help.'
# test_misc()
| [
6738,
2420,
37150,
1330,
4648,
298,
198,
198,
6738,
5254,
1330,
2198,
62,
292,
62,
40319,
198,
198,
13252,
2394,
796,
705,
16668,
16794,
13,
16794,
364,
13,
1640,
62,
16794,
2637,
198,
198,
2,
1332,
62,
44374,
3419,
198
] | 2.95 | 40 |
from blitzcrank import Blitzcrank
import responses
import json
| [
6738,
32528,
6098,
962,
1330,
29299,
6098,
962,
198,
11748,
9109,
198,
11748,
33918,
628
] | 4.266667 | 15 |
if __name__ == '__main__':
main() | [
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419
] | 2.3125 | 16 |
from getpass import getpass
from mysql.connector import connect, Error
try:
with connect(
host="localhost",
#user=input("Enter username: "),
user = 'acm',
password=getpass("Enter password: "),
database = 'online_movie_rating'
) as connection:
show_db_qu... | [
6738,
651,
6603,
1330,
651,
6603,
198,
6738,
48761,
13,
8443,
273,
1330,
2018,
11,
13047,
198,
198,
28311,
25,
198,
220,
220,
220,
351,
2018,
7,
198,
220,
220,
220,
220,
220,
220,
220,
2583,
2625,
36750,
1600,
198,
220,
220,
220,
... | 2.113178 | 5,699 |
# -*- coding: utf-8 -*-
"""
General description:
---------------------
Example that illustrates how to use custom component `GenericCHP` can be used.
In this case it is used to model a combined cycle extraction turbine.
Installation requirements:
---------------------------
This example requires the latest version of ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
12218,
6764,
25,
198,
19351,
12,
198,
16281,
326,
21290,
703,
284,
779,
2183,
7515,
4600,
46189,
3398,
47,
63,
460,
307,
973,
13,
198,
818,
428,
1339,
340,... | 2.515021 | 1,165 |
#!/usr/bin/env python
from __future__ import print_function
import subprocess
import re
from getters import *
DEVEL_VM = "Development VM"
APPLIANCE = "Appliance (Full deployment on single machine)"
CLUSTER = "Cluster (High volume production deployment)"
DEPLOYMENT_TYPES = [DEVEL_VM, APPLIANCE, CLUSTER]
# noinspecti... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
850,
14681,
198,
11748,
302,
198,
6738,
651,
1010,
1330,
1635,
198,
198,
7206,
18697,
62,
15996,
796,
366,
41206,
16990,
... | 2.544776 | 268 |
# Copyright 2021 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 agreed to in writing, ... | [
2,
15069,
33448,
3012,
11,
11419,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
... | 3.62069 | 203 |
from PyQt5.QtWidgets import QScrollArea
class SMSScrollArea(QScrollArea):
'''
自定义滚动控件
'''
| [
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
29261,
30547,
198,
198,
4871,
29287,
29261,
30547,
7,
48,
29261,
30547,
2599,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
5525,
229,
103,
22522,
248,
20046,
231,... | 1.716667 | 60 |
import json
import os
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad, unpad
from .config import DEFAULT_VAULT_FILE, DEFAULT_GROUP_KEY_BITS, DEFAULT_PAD_BYTES, DEFAULT_IV_BITS, \
DEFAULT_KEY_ENCODING, HASH_SECRETS
from .he... | [
11748,
33918,
198,
11748,
28686,
198,
198,
6738,
36579,
13,
34,
10803,
1330,
34329,
198,
6738,
36579,
13,
26257,
1330,
25630,
11645,
198,
6738,
36579,
13,
29531,
1330,
651,
62,
25120,
62,
33661,
198,
6738,
36579,
13,
18274,
346,
13,
47,... | 2.822581 | 186 |
# Generated by Django 2.2.21 on 2021-05-28 00:44
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
2481,
319,
33448,
12,
2713,
12,
2078,
3571,
25,
2598,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
# coding=utf-8
"""scikit-surgerytorch"""
| [
2,
19617,
28,
40477,
12,
23,
198,
198,
37811,
36216,
15813,
12,
11793,
7076,
13165,
354,
37811,
198
] | 2.333333 | 18 |
# site, moving dimension, direction, index of site representation
| [
198,
198,
2,
2524,
11,
3867,
15793,
11,
4571,
11,
6376,
286,
2524,
10552,
628
] | 4.6 | 15 |
import tensorflow as tf
import pickle
from LstmUnit import LstmUnit
from OutputUnit import OutputUnit
model = Model()
import numpy as np
with tf.Session() as sess:
for i in range(10):
sess.run(tf.global_variables_initializer())
_1, _2 = sess.run([model.train_op, model.mean_loss], feed_dict={
... | [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
2298,
293,
198,
6738,
406,
301,
76,
26453,
1330,
406,
301,
76,
26453,
198,
6738,
25235,
26453,
1330,
25235,
26453,
628,
628,
198,
19849,
796,
9104,
3419,
198,
11748,
299,
32152,
355,
459... | 2.176271 | 295 |
"""
Input/Output routines for XDS and file conversion utilities
"""
import os
import numpy
import multiprocessing
from autoprocess.utils import misc
DEFAULT_DELPHI = 8
if os.environ.get('DPS_NODES'):
HOSTS = {
x.split(':')[0]: int(x.split(':')[1]) for x in os.environ['DPS_NODES'].split()
}
else:
... | [
37811,
198,
20560,
14,
26410,
31878,
329,
1395,
5258,
290,
2393,
11315,
20081,
198,
198,
37811,
198,
198,
11748,
28686,
198,
198,
11748,
299,
32152,
198,
11748,
18540,
305,
919,
278,
198,
6738,
22320,
305,
919,
13,
26791,
1330,
12747,
1... | 2.08741 | 5,846 |
import os
from pyabf import ABF
from analyze_abf import VCTestData
import numpy as np
ABF_LOCATION = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test'
VC_TEST_OUTPUT_FILE = r'C:\Users\mattisj\Desktop\9-Patching\GC juvenile Scn1a\VC test GC juvenile Scn1a.csv'
if os.path.isdir(ABF_LOCATION):
abf_fil... | [
11748,
28686,
198,
6738,
12972,
397,
69,
1330,
9564,
37,
198,
6738,
16602,
62,
397,
69,
1330,
569,
4177,
395,
6601,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6242,
37,
62,
29701,
6234,
796,
374,
6,
34,
7479,
14490,
59,
76,
1078,... | 2.634783 | 460 |
"""Map Filter Zip """ | [
37811,
13912,
25853,
38636,
37227
] | 4.2 | 5 |
# coding: utf-8
from Arknights.click_location.click_location import *
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
9128,
77,
2337,
13,
12976,
62,
24886,
13,
12976,
62,
24886,
1330,
1635,
198
] | 2.958333 | 24 |
import argparse
import json
import os
import time
import numpy as np
import jax.numpy as jnp
from jax import jit
from jax.lax import cond, fori_loop
if __name__ == "__main__":
main()
| [
11748,
1822,
29572,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
474,
897,
13,
77,
32152,
355,
474,
37659,
198,
6738,
474,
897,
1330,
474,
270,
198,
6738,
474,
897,
13,
75... | 2.742857 | 70 |
# Copyright (c) 2018 PaddlePaddle 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 app... | [
2,
220,
220,
15069,
357,
66,
8,
2864,
350,
37382,
47,
37382,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
... | 3.467213 | 366 |
"""
Developed by : Adem Boussetha
Email : ademboussetha@gmail.com
"""
#!/usr/bin/python
# -*- coding: utf-8 -*-
import cv2
from color_recognition_api import color_histogram_feature_extraction
from color_recognition_api import knn_classifier
import os
import os.path
import sys
global color | [
37811,
220,
198,
19246,
276,
416,
1058,
1215,
368,
347,
516,
2617,
3099,
198,
15333,
1058,
512,
24419,
516,
2617,
3099,
31,
14816,
13,
785,
198,
37811,
198,
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
... | 2.862745 | 102 |
# Generated by Django 3.0.3 on 2020-05-19 15:34
import datetime
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
18,
319,
12131,
12,
2713,
12,
1129,
1315,
25,
2682,
198,
198,
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.972222 | 36 |
from setuptools import setup, find_packages
from os import path
from cli import __version__
# https://packaging.python.org/guides/making-a-pypi-friendly-readme/
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md')) as f:
long_description = f.read()
setup(
nam... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
6738,
28686,
1330,
3108,
198,
198,
6738,
537,
72,
1330,
11593,
9641,
834,
198,
198,
2,
3740,
1378,
8002,
3039,
13,
29412,
13,
2398,
14,
5162,
1460,
14,
8601,
12,
64,
12,... | 2.583554 | 377 |
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
from .load import get_beer2vec
from .access_ext import beer_emb, word_weighter
if __name__ == "__main__":
run_demo()
| [
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
4164,
10466,
13,
24874,
3083,
1330,
8615,
500,
62,
38610,
414,
198,
198,
6738,
764,
2220,
1330,
651,
62,
42428,
17,
35138,
198,
6738,
764,
15526,
62,
2302,
1330,
6099,
62,
244... | 2.911765 | 68 |
import pytest
from k8s_snapshots.logconf import configure_logging
@pytest.fixture(scope='session', autouse=True)
from .fixtures import * # noqa
from .fixtures.kube import * # noqa
| [
11748,
12972,
9288,
198,
198,
6738,
479,
23,
82,
62,
45380,
20910,
13,
6404,
10414,
1330,
17425,
62,
6404,
2667,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
11639,
29891,
3256,
1960,
1076,
28,
17821,
8,
198,
198,
6738,
764,
69... | 2.861538 | 65 |
"""Arch's package."""
from .arch import Arch
| [
37811,
19895,
338,
5301,
526,
15931,
198,
6738,
764,
998,
1330,
5579,
198
] | 3.461538 | 13 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-30 20:11
from __future__ import unicode_literals
import django.contrib.gis.db.models.fields
import django.contrib.sites.managers
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
import filebrowser.f... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
19,
319,
1584,
12,
1065,
12,
1270,
1160,
25,
1157,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.916667 | 120 |
#!/usr/bin/env python
"""Tests for `evolutionary_forest` package."""
from numpy.testing import assert_almost_equal
from sklearn.datasets import make_regression
from sklearn.metrics import mean_squared_error
from evolutionary_forest.forest import EvolutionaryForestRegressor
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
51,
3558,
329,
4600,
1990,
2122,
560,
62,
29623,
63,
5301,
526,
15931,
198,
198,
6738,
299,
32152,
13,
33407,
1330,
6818,
62,
28177,
62,
40496,
198,
6738,
1341,
35720,
13,
... | 3.518987 | 79 |
#!/usr/bin/env python3
import numpy as np
np.random.seed(1)
import random
random.seed(1)
import os
import glob
import re
import skimage.io as io
import tensorflow as tf
from tensorflow.keras.losses import binary_crossentropy
tf.set_random_seed(1)
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
299,
32152,
355,
45941,
198,
37659,
13,
25120,
13,
28826,
7,
16,
8,
198,
11748,
4738,
198,
25120,
13,
28826,
7,
16,
8,
198,
11748,
28686,
198,
11748,
15095,
198,
1174... | 2.318748 | 2,651 |
"""Support for Ombi."""
import logging
import pyombi
import voluptuous as vol
from homeassistant.const import (
CONF_API_KEY,
CONF_HOST,
CONF_PORT,
CONF_SSL,
CONF_USERNAME,
)
import homeassistant.helpers.config_validation as cv
from .const import (
ATTR_NAME,
ATTR_SEASON,
CONF_URLBASE... | [
37811,
15514,
329,
440,
2022,
72,
526,
15931,
198,
11748,
18931,
198,
198,
11748,
12972,
2381,
72,
198,
11748,
2322,
37623,
5623,
355,
2322,
198,
198,
6738,
1363,
562,
10167,
13,
9979,
1330,
357,
198,
220,
220,
220,
7102,
37,
62,
1761... | 2.028127 | 1,991 |
from graphs.synonyms import *
| [
6738,
28770,
13,
28869,
43612,
1330,
1635,
201,
198,
201,
198
] | 3 | 11 |
# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
from aiven_mysql_migrate import config
from aiven_mysql_migrate.migration import MySQLMigrateMethod, MySQLMigration
import logging
LOGGER = logging.getLogger(__name__)
def main(args=None, *, app="mysql_migrate"):
"""Migrate MySQL database from so... | [
2,
15069,
357,
66,
8,
12131,
317,
1469,
11,
47688,
11,
17837,
13,
3740,
1378,
64,
1469,
13,
952,
14,
198,
6738,
257,
1469,
62,
28744,
13976,
62,
76,
42175,
1330,
4566,
198,
6738,
257,
1469,
62,
28744,
13976,
62,
76,
42175,
13,
76,... | 2.793201 | 1,059 |
##################################################
# Basic HTML fetching and parsing for SMH.com.au #
##################################################
import urllib2
from bs4 import BeautifulSoup
| [
29113,
14468,
2235,
198,
2,
14392,
11532,
21207,
278,
290,
32096,
329,
9447,
39,
13,
785,
13,
559,
1303,
198,
29113,
14468,
2235,
198,
198,
11748,
2956,
297,
571,
17,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
628,
628
] | 4.926829 | 41 |
# -*- coding: utf-8 -*-
if __name__ == '__main__':
main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
1388,
3419,
201,
198
] | 1.775 | 40 |
#Crie um programa que leia varios numerios inteiros
#so ira parar quando digitar o valor 999, que é a condição final
#mostre quantos numeros foram digitados, e qual foi a soma entre eles.
soma = quantidade = 0
while True:
n1 = int(input('Digite um número: [999] PARA PARAR'))
if n1 != 999:
soma = soma + ... | [
2,
34,
5034,
23781,
1430,
64,
8358,
443,
544,
1401,
4267,
5470,
4267,
493,
20295,
4951,
198,
2,
568,
4173,
64,
1582,
283,
627,
25440,
3100,
7940,
267,
1188,
273,
36006,
11,
8358,
38251,
257,
1779,
72,
16175,
28749,
2457,
198,
2,
171... | 2.358586 | 198 |
#!/usr/bin/env python
from distutils.core import setup
setup(
name="objection",
version="1.0",
description="AndroidAPS preference editor",
author="Dave Carlson",
author_email="thecubic@thecubic.net",
url="https://github.com/thecubic/objection/",
packages=["objection"],
scripts=["object... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
15252,
295,
1600,
198,
220,
220,
220,
2196,
2625,
16,
13,
15,
1600,
198,
220,
220,
... | 2.673203 | 153 |
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the countingValleys function below.
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
n = int(input())
s = input()
result = countingValleys(n, s)
fptr.write(str(result) + '\n')
fptr.c... | [
2,
48443,
8800,
14,
29412,
18,
198,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
25064,
198,
198,
2,
13248,
262,
14143,
53,
6765,
893,
2163,
2174,
13,
628,
198,
361,
11593,
3672,
834,
6624,
705,... | 2.496183 | 131 |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import plotly
import plotly.offline as offline
from plotly.graph_objs import *
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
7110,
306,
198,
11748,
7110,
306,
13,
2364,
1370,
355,
18043,
198,
6738,
7110,
306,
13,
349... | 3.123288 | 73 |
import os
import sys
sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common")))
from env_indigo import *
indigo = Indigo()
loadSMILES('O[C@H](N)C |&1:0|')
loadSMILES('O[C@H](N)C |o1:0|')
loadSMILES('O[C@H](N)C |a:3|')
| [
11748,
28686,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
27237,
6978,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
828,
705,
492,
3256,
705,
492,
3256,
705,
... | 1.929577 | 142 |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | [
2,
28373,
2393,
329,
262,
45368,
28413,
10314,
27098,
13,
198,
2,
198,
2,
770,
2393,
691,
4909,
257,
6356,
286,
262,
749,
2219,
3689,
13,
1114,
257,
1336,
198,
2,
1351,
766,
262,
10314,
25,
198,
2,
3740,
1378,
2503,
13,
82,
746,
... | 3.455032 | 934 |
from __future__ import absolute_import, division, print_function
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import (Imputer, LabelEncoder,StandardScaler)
from sklearn import metrics
from sklearn.feature_selection import RFE
from sklearn.ensemb... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
9288,
62,
35312... | 2.837109 | 927 |
#!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
1946,
12,
23344,
383,
9485,
6173,
37,
34152,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,... | 2.054148 | 1,145 |
###
# Copyright 2019 Hewlett Packard Enterprise, 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 ... | [
21017,
201,
198,
2,
15069,
13130,
30446,
15503,
6400,
446,
14973,
11,
3457,
13,
1439,
2489,
10395,
13,
201,
198,
2,
201,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
201,
198,
2,
345,
... | 2.136474 | 28,467 |
__source__ = 'https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/'
# Time: O(N)
# Space: O(N)
#
# Description: Leetcode # 865. Smallest Subtree with all the Deepest Nodes
#
# Given a binary tree rooted at root, the depth of each node is the shortest distance to the root.
#
# A node is deepest if... | [
834,
10459,
834,
796,
705,
5450,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
17470,
395,
12,
7266,
21048,
12,
4480,
12,
439,
12,
1169,
12,
22089,
395,
12,
77,
4147,
14,
6,
198,
2,
3862,
25,
220,
440,
7,
45,
8,
198,
2,
... | 2.481601 | 1,549 |
# This file implements a MultiIsoVisual class that can be used to show
# multiple layers of isosurface simultaneously. It is derived from the original
# VolumeVisual class in vispy.visuals.volume, which is releaed under a BSD license
# included here:
#
# =================================================================... | [
2,
770,
2393,
23986,
257,
15237,
40,
568,
36259,
1398,
326,
460,
307,
973,
284,
905,
198,
2,
3294,
11685,
286,
318,
418,
333,
2550,
11640,
13,
632,
318,
10944,
422,
262,
2656,
198,
2,
14701,
36259,
1398,
287,
1490,
9078,
13,
41464,
... | 2.510066 | 4,421 |
from textwrap import dedent
from rest_framework.schemas.openapi import AutoSchema
| [
6738,
2420,
37150,
1330,
4648,
298,
198,
198,
6738,
1334,
62,
30604,
13,
1416,
4411,
292,
13,
9654,
15042,
1330,
11160,
27054,
2611,
628
] | 3.5 | 24 |
import json
import logging
import os
import shutil
import socket
from os.path import join
from hacksport.operations import execute
from shell_manager.bundle import get_bundle, get_bundle_root
from shell_manager.util import (BUNDLE_ROOT, DEPLOYED_ROOT, get_problem,
get_problem_root, HACK... | [
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
17802,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
198,
6738,
30445,
634,
13,
3575,
602,
1330,
12260,
198,
6738,
7582,
62,
37153,
13,
65,
31249,
133... | 2.164808 | 2,421 |
from django.shortcuts import render
# Create your views here.
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
198,
2,
13610,
534,
5009,
994,
13,
198
] | 3.705882 | 17 |
#encoding=utf-8
import pymysql
from time import sleep
import datetime
import tkinter.messagebox
| [
2,
12685,
7656,
28,
40477,
12,
23,
201,
198,
11748,
279,
4948,
893,
13976,
201,
198,
6738,
640,
1330,
3993,
201,
198,
11748,
4818,
8079,
201,
198,
11748,
256,
74,
3849,
13,
20500,
3524,
201
] | 2.857143 | 35 |
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def plot_points_regression(x,
y,
title,
xlabel,
ylabel,
prediction=None,
... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
285,
489,
62,
25981,
74,
896,
13,
76,
29487,
18,
67,
1330,
12176,
274,
18,
35,
628,
198,
4299,
7110,
62,
13033,
62,
2301,
2234,
... | 1.849579 | 3,324 |
from __future__ import annotations
from .abc import StorerFormatter
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
764,
39305,
1330,
9363,
81,
8479,
1436,
628
] | 4.117647 | 17 |
from .views import crud_bp
from .models import db, ShanghaiPersonInfo
__all__ = ['crud_bp', 'db', 'ShanghaiPersonInfo']
LOGO = """
▄▄▄▄▄
▀▀▀██████▄▄▄ _______________
▄▄▄▄▄ █████████▄ / \\
▀▀▀▀█████▌ ▀▐▄ ▀▐█ | Gotta go fast! |
▀▀███... | [
6738,
764,
33571,
1330,
1067,
463,
62,
46583,
198,
6738,
764,
27530,
1330,
20613,
11,
21865,
15439,
12360,
628,
198,
834,
439,
834,
796,
37250,
6098,
463,
62,
46583,
3256,
705,
9945,
3256,
705,
2484,
272,
20380,
15439,
12360,
20520,
628... | 1.30777 | 991 |
import sentencepiece as spm
from gtts import gTTS
sp = spm.SentencePieceProcessor()
sp.Load("./dataset/sp.et.model")
message = open("pred.txt", "r", encoding="utf8").read()
message_decoded = sp.DecodePieces(message.split())
print(message_decoded)
tts = gTTS(message_decoded, lang='et')
tts.save('et.mp3')
| [
11748,
6827,
12239,
355,
599,
76,
198,
6738,
308,
83,
912,
1330,
308,
51,
4694,
198,
198,
2777,
796,
599,
76,
13,
31837,
594,
47,
8535,
18709,
273,
3419,
198,
2777,
13,
8912,
7,
1911,
14,
19608,
292,
316,
14,
2777,
13,
316,
13,
... | 2.566667 | 120 |
#!/usr/bin/env python3
#
# Copyright (c) 2016-2017 Nest Labs, 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/lice... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
198,
2,
220,
220,
220,
15069,
357,
66,
8,
1584,
12,
5539,
21420,
23500,
11,
3457,
13,
198,
2,
220,
220,
220,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
220,
220,
4... | 2.692308 | 611 |
"""
Utils
"""
from ios_device.util.service_info import MyServiceInfo
__all__ = ['DictAttrProperty', 'DictAttrFieldNotFoundError']
import socket
import struct
import threading
from zeroconf import Zeroconf, ServiceBrowser, ServiceInfo
_NotSet = object()
| [
37811,
198,
18274,
4487,
198,
37811,
198,
6738,
1312,
418,
62,
25202,
13,
22602,
13,
15271,
62,
10951,
1330,
2011,
16177,
12360,
198,
198,
834,
439,
834,
796,
37250,
35,
713,
8086,
81,
21746,
3256,
705,
35,
713,
8086,
81,
15878,
3673,... | 3.119048 | 84 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import mailing.models
import ckeditor_uploader.fields
from django.conf import settings
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
21898,
13,
27530,
198,
11748,
... | 3.233333 | 60 |
#!/usr/bin/env python3
#####################################
#
# Filename : test_Distructure.py
#
# Projectname : diSTruct
#
# Author : Oskar Taubert
#
# Creation Date : Mon 11 Jun 2018 04:04:59 PM CEST
#
# Last Modified : Thu 28 Mar 2019 11:14:02 AM CET
#
#####################################
from Bio import SeqIO
fr... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
29113,
4242,
2,
198,
2,
198,
2,
7066,
12453,
1058,
1332,
62,
20344,
5620,
13,
9078,
198,
2,
198,
2,
4935,
3672,
1058,
2566,
2257,
1356,
198,
2,
198,
2,
6434,
1058,
440,
8135,
... | 3.171779 | 163 |
from Dataset import Datasets
import numpy as np
import csv, sys, glob, os
import pandas as pd
from enum import Enum
from Dataset.Ucihar import UCIHAR,SignalsUCIHAR
from Dataset.Dsads import DSADS ,SignalsDsads
from Dataset.Uschad import USCHAD,SignalsUschad
from Dataset.Pamap2 import PAMAP2,SignalsPAMAP2
from Process... | [
6738,
16092,
292,
316,
1330,
16092,
292,
1039,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
21370,
11,
25064,
11,
15095,
11,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
33829,
1330,
2039,
388,
198,
198,
6738,
16092,
... | 2.55 | 380 |
import os, json, argparse, sys, datetime, time
import pronto, six
"""
Check all existing ChEBI items have their InChi keys and the current ChEBI
release as source.
"""
script = os.path.basename(sys.argv[0])[:-3]
write_line_to._hdl = {}
# Initiate the parser
parser = argparse.ArgumentParser()
parser.add_argument("-r... | [
198,
11748,
28686,
11,
33918,
11,
1822,
29572,
11,
25064,
11,
4818,
8079,
11,
640,
198,
11748,
778,
5957,
11,
2237,
198,
198,
37811,
198,
9787,
477,
4683,
609,
36,
3483,
3709,
423,
511,
554,
1925,
72,
8251,
290,
262,
1459,
609,
36,
... | 2.060159 | 1,762 |
#Sanitize HTML output
#Example: htmlspecialchars('I love the <b> tag') == 'I love the <b> tag'
| [
2,
15017,
270,
1096,
11532,
5072,
198,
2,
16281,
25,
27711,
20887,
354,
945,
10786,
40,
1842,
262,
1279,
65,
29,
7621,
11537,
6624,
705,
40,
1842,
262,
1222,
2528,
26,
65,
5,
13655,
26,
7621,
6,
198
] | 2.657895 | 38 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a copy of ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
220,
15069,
10897,
1574,
3457,
13,
198,
2,
198,
2,
220,
49962,
739,
262... | 3.178333 | 600 |
""" Define the abstract class for Search Index"""
class SearchIndex:
"""Search Index handles creation of various search index, getting values, destroying search index"""
| [
37811,
2896,
500,
262,
12531,
1398,
329,
11140,
12901,
37811,
628,
198,
4871,
11140,
15732,
25,
198,
220,
220,
220,
37227,
18243,
12901,
17105,
6282,
286,
2972,
2989,
6376,
11,
1972,
3815,
11,
13897,
2989,
6376,
37811,
198
] | 4.631579 | 38 |
import csv
import random
import re
import sys
import tqdm
import numpy as np
import torch
from torch.utils.data import TensorDataset
from transformers.tokenization_bert import BertTokenizer
def _convert_examples_to_features(examples, label_list, max_seq_length,
tokenizer,... | [
11748,
269,
21370,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
256,
80,
36020,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
309,
22854,
27354,
292,
316,
198,
6... | 2.154639 | 4,559 |
import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
import pandas as pd
import os
from MyModule import MyModel
from MyDataset import MyDataset
lr = 0.001
batch_size = 10
epochs = 30
device = "cpu"
result = pd.read_csv("covid.train.csv"... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
11,
6060,
17401,
... | 2.291782 | 1,083 |
# -*- coding: utf-8 -*-
import os
import unittest
from types import FunctionType
import webtest
from paste.deploy.loadwsgi import loadapp
from openprocurement.audit.api.constants import VERSION
from openprocurement.audit.api.design import sync_design
COUCHBD_NAME_SETTING = 'couchdb.db_name'
def snitch(func):
"... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
6738,
3858,
1330,
15553,
6030,
198,
198,
11748,
3992,
9288,
198,
6738,
17008,
13,
2934,
1420,
13,
2220,
18504,
12397,
1330,
... | 2.843182 | 440 |
# -*- coding: utf8 -*-
"""
This is part of shot detector.
Produced by w495 at 2017.05.04 04:18:27
"""
from __future__ import absolute_import, division, print_function
from .filter_operator import FilterOperator
class FilterTuple(FilterOperator):
"""
...
"""
def reduce_with_op_func(self,... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
770,
318,
636,
286,
2823,
31029,
13,
198,
220,
220,
220,
21522,
771,
416,
266,
33781,
379,
2177,
13,
2713,
13,
3023,
8702,
25,
1507,
25,
1983,
... | 2.294355 | 248 |
import jax
import jax.numpy as jnp
import pytest
from e3nn_jax import (FunctionalFullyConnectedTensorProduct,
FunctionalTensorProduct, FunctionalTensorSquare, Irreps)
from e3nn_jax.util import prod
@pytest.mark.parametrize('connection_mode', ['uvw', 'uvu', 'uvv'])
@pytest.mark.parametrize('jitte... | [
11748,
474,
897,
198,
11748,
474,
897,
13,
77,
32152,
355,
474,
37659,
198,
11748,
12972,
9288,
198,
6738,
304,
18,
20471,
62,
73,
897,
1330,
357,
22203,
282,
37,
2132,
13313,
276,
51,
22854,
15667,
11,
198,
220,
220,
220,
220,
220,... | 2.610039 | 259 |
import urllib2
import pandas as pd
from bs4 import BeautifulSoup, element
if __name__ == "__main__":
pathname = "cogsci_proceedings_raw.csv"
papers = get_papers()
papers.to_csv(pathname, encoding='utf-8')
| [
11748,
2956,
297,
571,
17,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
11,
5002,
628,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
3108,
3672,
... | 2.563218 | 87 |
import django_tables2 as tables
from django_tables2.utils import Accessor
from tenancy.tables import COL_TENANT
from utilities.tables import BaseTable, ToggleColumn
from .models import Circuit, CircuitType, Provider
CIRCUITTYPE_ACTIONS = """
<a href="{% url 'circuits:circuittype_changelog' slug=record.slug %}" class=... | [
11748,
42625,
14208,
62,
83,
2977,
17,
355,
8893,
198,
6738,
42625,
14208,
62,
83,
2977,
17,
13,
26791,
1330,
8798,
273,
198,
198,
6738,
46543,
13,
83,
2977,
1330,
20444,
62,
51,
1677,
8643,
198,
6738,
20081,
13,
83,
2977,
1330,
730... | 2.675159 | 314 |
# The Nexus software is licensed under the BSD 2-Clause license.
#
# You should have recieved a copy of this license with the software.
# If you did not, you can find one at the following link.
#
# http://opensource.org/licenses/bsd-license.php
if world.blockstore.raw_blocks[world.blockstore.get_offset(x,y+1,z)] != '... | [
2,
383,
16756,
3788,
318,
11971,
739,
262,
347,
10305,
362,
12,
2601,
682,
5964,
13,
198,
2,
198,
2,
921,
815,
423,
664,
39591,
257,
4866,
286,
428,
5964,
351,
262,
3788,
13,
198,
2,
1002,
345,
750,
407,
11,
345,
460,
1064,
530,... | 2.110236 | 762 |
# -*- coding: utf-8 -*-
'''
File name: code\sets_with_a_given_least_common_multiple\sol_590.py
Author: Vaidic Joshi
Date created: Oct 20, 2018
Python Version: 3.x
'''
# Solution to Project Euler Problem #590 :: Sets with a given Least Common Multiple
#
# For more information see:
# https://projecteul... | [
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
220,
220,
220,
9220,
1438,
25,
2438,
59,
28709,
62,
4480,
62,
64,
62,
35569,
62,
293,
459,
62,
11321,
62,
48101,
59,
34453,
62,
36993,
13,
9078,
... | 2.63369 | 374 |
from .vehicle_controller_interface import VehicleControllerI
class ControllerSimulator(VehicleControllerI):
"""
Controller implementation with
"""
| [
6738,
764,
33892,
1548,
62,
36500,
62,
39994,
1330,
21501,
22130,
40,
628,
198,
4871,
22741,
8890,
8927,
7,
37870,
1548,
22130,
40,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
22741,
7822,
351,
198,
220,
220,
220,
37227,
198
... | 3.833333 | 42 |
"""
test_ext_duration
~~~~~~~~~~~~~~~~~
Test sphinx.ext.duration extension.
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import pytest
@pytest.mark.sphinx('dummy', testroot='basic',
confoverrides={'ex... | [
37811,
198,
220,
220,
220,
1332,
62,
2302,
62,
32257,
198,
220,
220,
220,
220,
27156,
93,
628,
220,
220,
220,
6208,
599,
20079,
87,
13,
2302,
13,
32257,
7552,
13,
628,
220,
220,
220,
1058,
22163,
4766,
25,
15069,
4343,
12,
1238,
1... | 2.531915 | 141 |
import argparse
import logging
import gym
import universe
import numpy as np
from itertools import count
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.autograd as autograd
from torch.autograd import Variable
from reframe import resize_frame
parser = arg... | [
11748,
1822,
29572,
198,
11748,
18931,
198,
198,
11748,
11550,
198,
11748,
6881,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
340,
861,
10141,
1330,
954,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11... | 2.563739 | 706 |
# Copyright 2020 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | [
2,
15069,
12131,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
13789,
1776,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257... | 3.829932 | 294 |
#!/usr/bin/env python
# The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License). You may not copy or use this file, in either
# source code or executable form, except in compliance with the License. You
# may obtain a copy of the License at http://www.bittorrent.com/li... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
383,
10154,
286,
428,
2393,
389,
2426,
284,
262,
4722,
39286,
4946,
8090,
13789,
198,
2,
10628,
352,
13,
16,
357,
1169,
13789,
737,
220,
921,
743,
407,
4866,
393,
779,
428,
... | 2.175706 | 2,231 |
# Generated by Django 2.2.1 on 2021-10-24 19:38
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
16,
319,
33448,
12,
940,
12,
1731,
678,
25,
2548,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
from __future__ import absolute_import
from celery import shared_task
from actstream import action
import core.models as cm
import time
@shared_task
@shared_task
import boto
import logging
logging.basicConfig()
from boto.elastictranscoder.exceptions import (
InternalServiceException,
LimitExceededException,... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
6738,
18725,
1924,
1330,
4888,
62,
35943,
198,
6738,
719,
5532,
1330,
2223,
198,
11748,
4755,
13,
27530,
355,
12067,
198,
11748,
640,
198,
198,
31,
28710,
62,
35943,
198,
198,
... | 3.389381 | 113 |
import numpy as np
import pylab as pl
times=np.arange(3,6,0.01) #times为x的值,0为起点,5为终点,0,01为步长
fun=lambda x:(x-5.4)**2+24.24#np.cos(20*x)*np.exp(-pl.absolute(x)) #fun为关于x的函数,也就是对应于x的y的值
pl.plot(times,fun(times)) #画图
pl.xlabel("time period length") #x轴的标记
pl.ylabel("evacuation time") #y轴的标记
#pl.title("damped oscill... | [
11748,
299,
32152,
355,
45941,
198,
11748,
279,
2645,
397,
355,
458,
198,
22355,
28,
37659,
13,
283,
858,
7,
18,
11,
21,
11,
15,
13,
486,
8,
220,
1303,
22355,
10310,
118,
87,
21410,
161,
222,
120,
171,
120,
234,
15,
10310,
118,
... | 1.413655 | 249 |
"""
osgameclones has the following fields:
'updated', 'video', 'repo', 'license', 'originals', 'status', 'multiplayer', 'info', 'lang', 'feed', 'content', 'images', 'url', 'name', 'framework', 'type', 'development'
mandatory fields are: 'name', 'license', 'type', 'originals'
possible values:
osgc-development: activ... | [
171,
119,
123,
37811,
198,
198,
418,
6057,
565,
1952,
468,
262,
1708,
7032,
25,
198,
6,
43162,
3256,
705,
15588,
3256,
705,
260,
7501,
3256,
705,
43085,
3256,
705,
11612,
6897,
3256,
705,
13376,
3256,
705,
41684,
7829,
3256,
705,
1095... | 2.124575 | 14,128 |
from connection import com
h = com()
print h.open()
print h.sensor.compressor_motor_temperature()
print h.sensor.compressor_supply_temperature() | [
6738,
4637,
1330,
220,
401,
628,
198,
71,
796,
401,
3419,
198,
198,
4798,
289,
13,
9654,
3419,
628,
198,
4798,
289,
13,
82,
22854,
13,
5589,
44292,
62,
76,
20965,
62,
11498,
21069,
3419,
628,
198,
4798,
289,
13,
82,
22854,
13,
558... | 2.923077 | 52 |
import operator
import warnings
from copy import deepcopy
from functools import reduce
from typing import Any, Dict, Tuple
from django.http.response import JsonResponse
from django.shortcuts import render
from .exceptions import RequestValidationError
from .extras import merge_openapi_info
from .schema import schema_... | [
11748,
10088,
198,
11748,
14601,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
309,
29291,
198,
198,
6738,
42625,
14208,
13,
4023,
13,
26209,
1330,
449,
1559... | 3.675439 | 114 |
"""getters functions"""
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from improved_permissions.exceptions import NotAllowed
from improved_permissions.models import UserRole
from improved_permissions.utils import check_my_model, get_roleclass
def get_user(r... | [
37811,
1136,
1010,
5499,
37811,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
11299,
19199,
13,
27530,
1330,
14041,
6030,
198,
198,
6738,
6596,
62,
525,
... | 2.601471 | 1,631 |
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
scale = 1
transx = transy = 1
rota = 1
if __name__ == "__main__":
glutInit()
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
glutInitWindowSize(800, 600)
glutCreateWindow('Window')
glClearColor(0.2,0.2,0.2,0)
glutKeyboardFunc... | [
6738,
30672,
13,
8763,
1330,
1635,
198,
6738,
30672,
13,
8763,
52,
1330,
1635,
198,
6738,
30672,
13,
8763,
3843,
1330,
1635,
198,
9888,
796,
352,
198,
7645,
87,
796,
1007,
88,
796,
352,
198,
305,
8326,
796,
352,
198,
361,
11593,
367... | 2.401274 | 157 |
from django.test import TestCase
from django.contrib.auth import get_user_model
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
628
] | 3.375 | 24 |
#------------
# Web request
import requests
#------------
# Html parser
from bs4 import BeautifulSoup
import lxml
#-----------------
# Standard library
import json
import re
"""--------+---------+---------+---------+---------+---------+---------+---------+---------|
| M A I N C L A... | [
2,
10541,
198,
2,
5313,
2581,
198,
11748,
7007,
198,
2,
10541,
198,
2,
367,
20369,
30751,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
300,
19875,
198,
2,
1783,
12,
198,
2,
8997,
5888,
198,
11748,
33918,
198,
11748,
... | 2.461266 | 1,975 |
"Unit tests for starlark API of ts_project with custom transpiler"
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
load("@rules_nodejs//nodejs:providers.bzl", "DeclarationInfo", "JSModuleInfo")
transitive_declarations_test = unittest.make(_impl0, attrs = {
"lib": attr.label(default = "transpile_wit... | [
1,
26453,
5254,
329,
3491,
75,
668,
7824,
286,
40379,
62,
16302,
351,
2183,
1007,
79,
5329,
1,
198,
198,
2220,
7203,
31,
65,
41319,
62,
15688,
8019,
1003,
8019,
25,
403,
715,
395,
13,
65,
48274,
1600,
366,
30493,
82,
1600,
366,
40... | 2.535604 | 323 |
import threading
import numpy as np
from PIL import ImageFont, ImageDraw, Image
class ThreadsafeIter:
"""
Takes an iterator/generator and makes it thread-safe by
serializing call to the `next` method of given iterator/generator.
"""
def threadsafe_generator(f):
"""
A decorator that takes a ... | [
11748,
4704,
278,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
23252,
11,
7412,
25302,
11,
7412,
628,
198,
4871,
14122,
21230,
29993,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
33687,
281,
41313,
... | 2.313029 | 591 |
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import argparse
import logging as log
from typing import List
from mo.moc_frontend.extractor import fe_user_data_repack
from mo.middle.passes.infer import validate_batch_in_shape
from openvino.runtime import Dimension, PartialShape ... | [
2,
15069,
357,
34,
8,
2864,
12,
1238,
2481,
8180,
10501,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
198,
11748,
1822,
29572,
198,
11748,
18931,
355,
2604,
198,
6738,
19720,
1330,
7343,
198,
198,
... | 2.455253 | 1,799 |
import re
# RegEx search strings for certain software vendors
oauth_sn = re.compile(r'\b(\d{3}-\d{8}\b)')
oauth_key = re.compile(r'\b([a-zA-Z]|\d)\d([a-zA-Z]|\d)[a-zA-Z]\d\b')
abalo_sn = re.compile(r'(\b(\d{4}-){5}\d{4}\b)')
serial_number_restrictions = {'OAuthDex': oauth_sn, 'Abalobadiah': abalo_sn}
product_key_res... | [
11748,
302,
198,
198,
2,
220,
3310,
3109,
2989,
13042,
329,
1728,
3788,
17192,
198,
12162,
1071,
62,
16184,
796,
302,
13,
5589,
576,
7,
81,
6,
59,
65,
38016,
67,
90,
18,
92,
12,
59,
67,
90,
23,
32239,
65,
8,
11537,
198,
12162,
... | 1.977901 | 181 |
from setuptools import find_packages, setup
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
# pylint: disable=line-too-long
setup(
name="rl_algorithms",
version="0.0.1",
author="medipixel",
author_email="kh.kim@medipixel.io",
description="RL algorithms which a... | [
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
1600,
21004,
2625,
40477,
12,
23,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,... | 2.754386 | 342 |