content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import os
from config import Package
from .StGermain import StGermain
| [
11748,
28686,
198,
6738,
4566,
1330,
15717,
198,
6738,
764,
1273,
38,
7780,
391,
1330,
520,
38,
7780,
391,
198
] | 3.5 | 20 |
# -*- coding: utf-8 -*-
"""DINO 2.1 calendar data"""
from __future__ import annotations
from calendar import monthrange, month_abbr
from collections import UserString
from datetime import date, timedelta
from sqlalchemy import Column, String, Integer, ForeignKey, ForeignKeyConstraint, and_
from sqlalchemy.ext.hybrid ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
35,
46016,
362,
13,
16,
11845,
1366,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
11845,
1330,
1227,
9521,
11,
1227,
62,
397,
1671,
198,... | 2.785573 | 3,535 |
""" Cisco_IOS_XE_efp_oper
This module contains a collection of YANG definitions
for service instance (efp) stats.
Copyright (c) 2016\-2017 by Cisco Systems, Inc.
All rights reserved.
"""
from collections import OrderedDict
from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, Lea... | [
37811,
28289,
62,
40,
2640,
62,
55,
36,
62,
891,
79,
62,
3575,
220,
198,
198,
1212,
8265,
4909,
257,
4947,
286,
575,
15567,
17336,
198,
1640,
2139,
4554,
357,
891,
79,
8,
9756,
13,
198,
15269,
357,
66,
8,
1584,
41441,
5539,
416,
... | 1.952183 | 962 |
# -*-coding:utf-8-*-
# Copyright (c) 2020 DJI.
#
# 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 in the file LICENSE.txt or at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | [
2,
532,
9,
12,
66,
7656,
25,
40477,
12,
23,
12,
9,
12,
198,
2,
15069,
357,
66,
8,
12131,
13004,
40,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
4... | 2.242718 | 618 |
import os
import random
import ConfigParser
from pipes import quote as q
from ephemvpn.vpntypes import VPNConfig, names, human_readble_pass
| [
11748,
28686,
198,
11748,
4738,
198,
11748,
17056,
46677,
198,
6738,
19860,
1330,
9577,
355,
10662,
198,
6738,
2462,
4411,
85,
21999,
13,
36133,
429,
9497,
1330,
21669,
16934,
11,
3891,
11,
1692,
62,
961,
903,
62,
6603,
628,
198
] | 3.55 | 40 |
from utils import *
row_units = [cross(r, cols) for r in rows]
column_units = [cross(rows, c) for c in cols]
square_units = [cross(rs, cs) for rs in ('ABC','DEF','GHI') for cs in ('123','456','789')]
diagonal_units = []
unitlist = row_units + column_units + square_units
# TODO: Update the unit list to add the new d... | [
198,
6738,
3384,
4487,
1330,
1635,
628,
198,
808,
62,
41667,
796,
685,
19692,
7,
81,
11,
951,
82,
8,
329,
374,
287,
15274,
60,
198,
28665,
62,
41667,
796,
685,
19692,
7,
8516,
11,
269,
8,
329,
269,
287,
951,
82,
60,
198,
23415,
... | 2.611329 | 4,078 |
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import re
import subprocess
import sys
from openvino.tools.mo.utils.utils import get_mo_root_dir
mo_major_and_minor_version = 2022.1
def generate_mo_version():
"""
Function generates version like in cmake
custo... | [
2,
15069,
357,
34,
8,
2864,
12,
1238,
1828,
8180,
10501,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
198,
6738,
... | 2.571895 | 306 |
import pandas as pd
import altair as alt
from altair import Chart
from typing import List
| [
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
5988,
958,
355,
5988,
201,
198,
6738,
5988,
958,
1330,
22086,
201,
198,
6738,
19720,
1330,
7343,
201,
198,
201
] | 3.275862 | 29 |
"""
load_model.py is written for loading the model
"""
import pickle
from sklearn.linear_model import LinearRegression
from ..utils import make_directory
__author__ = "Amir Mousavi"
__license__ = "Public Domain"
__version__ = "1.0.0"
__maintainer__ = "Amir Mousavi"
__email__ = "azmusavi19@gmail.com"
__st... | [
37811,
201,
198,
2220,
62,
19849,
13,
9078,
318,
3194,
329,
11046,
262,
2746,
201,
198,
37811,
201,
198,
201,
198,
11748,
2298,
293,
201,
198,
6738,
1341,
35720,
13,
29127,
62,
19849,
1330,
44800,
8081,
2234,
201,
198,
6738,
11485,
26... | 2.305164 | 639 |
import json
import sys
import click
import requests
@click.command()
@click.option('--apikey', help='api key [mandatory].')
@click.option('--url', help='software manager url [mandatory].')
@click.option('--name', help='software name [mandatory].')
@click.option('--desc', help='software description.', default="")
@c... | [
11748,
33918,
198,
11748,
25064,
198,
198,
11748,
3904,
198,
198,
11748,
7007,
628,
198,
31,
12976,
13,
21812,
3419,
198,
31,
12976,
13,
18076,
10786,
438,
499,
522,
88,
3256,
1037,
11639,
15042,
1994,
685,
22249,
2870,
60,
2637,
8,
1... | 3.197719 | 263 |
import os
import sys
import time
import numpy as np
from datetime import timedelta
from tensorboardX import SummaryWriter
from tqdm import tqdm
import torch
from torch.utils.data import DataLoader
class Logger(object):
"""
generate logger files(train.log and tensorboard log file) in experiment root
"""
... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
6738,
11192,
273,
3526,
55,
1330,
21293,
34379,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
... | 3.230769 | 117 |
"""
Shim to maintain backwards compatibility with old IPython.config imports.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
from warnings import warn
from .utils.shimmodule import ShimModule, ShimWarning
warn("The `IPython.config` package has been... | [
37811,
198,
2484,
320,
284,
5529,
16196,
17764,
351,
1468,
6101,
7535,
13,
11250,
17944,
13,
198,
37811,
198,
2,
15069,
357,
66,
8,
6101,
7535,
7712,
4816,
13,
198,
2,
4307,
6169,
739,
262,
2846,
286,
262,
40499,
347,
10305,
13789,
... | 3.821429 | 168 |
import os
from build import make_path
from build.generators import EnumGenerator, TransformType
from build.generators.transformers import case, space
| [
11748,
28686,
198,
6738,
1382,
1330,
787,
62,
6978,
198,
6738,
1382,
13,
8612,
2024,
1330,
2039,
388,
8645,
1352,
11,
26981,
6030,
198,
6738,
1382,
13,
8612,
2024,
13,
35636,
364,
1330,
1339,
11,
2272,
628,
198
] | 4 | 38 |
STARTING_ENERGY = 20
SCATTERED_ENERGY = 10
#Plant energy output. Remember, this should always be less
#than ATTACK_POWER, because otherwise cells sitting on the plant edge
#might become invincible.
PLANT_MAX_OUTPUT = 20
PLANT_MIN_OUTPUT = 5
#BODY_ENERGY is the amount of energy that a cells body contains
#It can not ... | [
2257,
7227,
2751,
62,
1677,
1137,
31212,
796,
1160,
198,
6173,
1404,
5781,
1961,
62,
1677,
1137,
31212,
796,
838,
220,
198,
198,
2,
3646,
415,
2568,
5072,
13,
11436,
11,
428,
815,
1464,
307,
1342,
198,
2,
14813,
26195,
8120,
62,
47,... | 2.659955 | 447 |
from package.query_db import query
from package.lambda_exception import LambdaException | [
6738,
5301,
13,
22766,
62,
9945,
1330,
12405,
198,
6738,
5301,
13,
50033,
62,
1069,
4516,
1330,
21114,
6814,
16922
] | 4.35 | 20 |
import matplotlib.dates
import numpy as np
| [
11748,
2603,
29487,
8019,
13,
19581,
198,
11748,
299,
32152,
355,
45941,
628
] | 3.384615 | 13 |
from .hexcolor import HexColor
__red_end_user_data_statement__ = 'This cog does not store user data.' | [
6738,
764,
33095,
8043,
1330,
22212,
10258,
198,
198,
834,
445,
62,
437,
62,
7220,
62,
7890,
62,
26090,
834,
796,
705,
1212,
43072,
857,
407,
3650,
2836,
1366,
2637
] | 3.4 | 30 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of OTC Tool released under MIT
# Copyright (C) 2016 T-systems Kurt Garloff, Zsolt Nagy
import json
import prettytable
import jmespath
x=defaultprettytable({"name", "value"})
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
770,
2393,
318,
636,
286,
440,
4825,
16984,
2716,
739,
17168,
198,
2,
15069,
357,
34,
8,
1584,
309,
12,
10057,
8... | 2.663158 | 95 |
{
"aaaaa" : 1,
"bbb aaaaaaa": 2
}
| [
90,
198,
220,
220,
220,
366,
24794,
64,
1,
220,
220,
220,
220,
220,
1058,
352,
11,
198,
220,
220,
220,
366,
11848,
65,
257,
24794,
7252,
1298,
362,
198,
92,
198
] | 1.46875 | 32 |
# This file is part of Indico.
# Copyright (C) 2002 - 2022 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from indico.modules.admin.views import WPAdmin
from indico.modules.users.views import WPUser
from indico.w... | [
2,
770,
2393,
318,
636,
286,
1423,
3713,
13,
198,
2,
15069,
357,
34,
8,
6244,
532,
33160,
327,
28778,
198,
2,
198,
2,
1423,
3713,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
290,
14,
273,
198,
2,
13096,
340,
739,
262,
2846,... | 3.320755 | 106 |
from django.template.loader import render_to_string
| [
6738,
42625,
14208,
13,
28243,
13,
29356,
1330,
8543,
62,
1462,
62,
8841,
628
] | 3.785714 | 14 |
from sklearn import svm
from sklearn.model_selection import train_test_split
import csv
import sys
import numpy as np
import socket
import re
f = open('information.csv','r')
reader = csv.reader(f)
Statement = []
for row in reader:
wordAscii = ""
conArray = []
word = ''.join(row)
wordAr... | [
6738,
1341,
35720,
1330,
264,
14761,
201,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
9288,
62,
35312,
201,
198,
11748,
269,
21370,
201,
198,
11748,
25064,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
1780... | 2.222222 | 765 |
import torch
| [
11748,
28034,
628,
628,
628
] | 3.6 | 5 |
from tests.conftest import write_results
from wolfbot import const, one_night
from wolfbot.enums import Role
class TestMultistatement:
"""Tests for the play_one_night_werewolf function."""
@staticmethod
def test_random_wolf(standard_game_roles: tuple[Role, ...]) -> None:
"""Correctly play one rou... | [
6738,
5254,
13,
1102,
701,
395,
1330,
3551,
62,
43420,
198,
6738,
17481,
13645,
1330,
1500,
11,
530,
62,
3847,
198,
6738,
17481,
13645,
13,
268,
5700,
1330,
20934,
628,
198,
4871,
6208,
15205,
396,
265,
972,
25,
198,
220,
220,
220,
... | 2.429119 | 783 |
#########################################################################
## This file is part of the alpha-beta-CROWN verifier ##
## ##
## Copyright (C) 2021, Huan Zhang <huan@huan-zhang.com> ##
## K... | [
29113,
29113,
7804,
2,
198,
2235,
220,
220,
220,
220,
220,
220,
220,
220,
770,
2393,
318,
636,
286,
262,
17130,
12,
31361,
12,
9419,
14165,
3326,
7483,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
198,
2235,
220,
220,
220,
... | 2.355744 | 1,889 |
import gym
import tensorflow as tf
import numpy as np
import utils
class PPO:
"""
Paper: https://arxiv.org/abs/1707.06347
"""
# def build_datasets(self, sess, trajectories):
# if type(trajectories) is not np.ndarray:
# trajectories = np.array(trajectories)
#
# # Get A... | [
11748,
11550,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
3384,
4487,
628,
198,
4871,
350,
16402,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
14962,
25,
3740,
1378,
283,
87,
452,
1... | 1.881978 | 1,254 |
import aperturefit as af
import numpy as np
import matplotlib.pyplot as pl
import psffit as pf
import simulateK2
from datetime import datetime
from tqdm import tqdm
from everest import detrender
from everest.math import SavGol, Scatter, Downbin
from astropy.stats import median_absolute_deviation as mad
class MotionNoi... | [
11748,
32729,
11147,
355,
6580,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
198,
11748,
26692,
487,
270,
355,
279,
69,
198,
11748,
29308,
42,
17,
198,
6738,
4818,
8079,
1330,
4818,
8079,... | 2.008294 | 1,929 |
import time
import analysis.event
import analysis.beamline
import analysis.background
import analysis.pixel_detector
import ipc
import random
import numpy
numpy.random.seed()
state = {
'Facility': 'dummy',
'squareImage' : True,
'Dummy': {
'Repetition Rate' : 10,
'Data Sources': {
... | [
11748,
640,
198,
11748,
3781,
13,
15596,
198,
11748,
3781,
13,
40045,
1370,
198,
11748,
3781,
13,
25249,
198,
11748,
3781,
13,
32515,
62,
15255,
9250,
198,
11748,
20966,
66,
198,
11748,
4738,
198,
11748,
299,
32152,
198,
198,
77,
32152,... | 1.736752 | 585 |
import os
import time
from anduin.Scheduler import time_to_str
SETUP_PATH = './setup.py'
INIT_PATH = './anduin/__init__.py'
COPY_RIGHT_FILE = './COPYING.txt'
ANDUIN_VER = '7.0.29'
# 6.x :正式版
# 7.x :异步框架测试
if __name__ == "__main__":
clean_package()
add_copy_right_and_version()
packageandupload()
| [
11748,
28686,
198,
11748,
640,
198,
198,
6738,
290,
48441,
13,
50,
1740,
18173,
1330,
640,
62,
1462,
62,
2536,
198,
198,
28480,
8577,
62,
34219,
796,
705,
19571,
40406,
13,
9078,
6,
198,
1268,
2043,
62,
34219,
796,
705,
19571,
392,
... | 2 | 157 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | [
2,
16529,
1783,
10541,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
5964,
1321,
13,
198,
2,
16529,
1783,
10541,
198,... | 4.813008 | 123 |
# ==============================================================================
# Copyright 2018-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | [
2,
38093,
25609,
28,
198,
2,
220,
15069,
2864,
12,
42334,
8180,
10501,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
345,
743,
407,
779,
428,
2393,
2845,
287... | 4.302326 | 215 |
# Generated by Django 2.1.7 on 2019-04-03 06:05
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
22,
319,
13130,
12,
3023,
12,
3070,
9130,
25,
2713,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
import os
import torch
import torch.utils.data as data
import natsort
import cv2
import numpy as np
from tqdm import tqdm
| [
198,
11748,
28686,
198,
11748,
28034,
198,
11748,
28034,
13,
26791,
13,
7890,
355,
1366,
198,
11748,
299,
1381,
419,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
628,
19... | 2.97619 | 42 |
import inspect
from types import ModuleType
import io
import pickle
from dumpster import utils
import re
| [
11748,
10104,
198,
6738,
3858,
1330,
19937,
6030,
198,
11748,
33245,
198,
11748,
2298,
293,
198,
6738,
10285,
1706,
1330,
3384,
4487,
198,
11748,
302,
628
] | 4.076923 | 26 |
import I2CMultiplexer
import VL53L1X
import cv2
import time
from __future__ import print_function
import time
import math
from dronekit import connect, VehicleMode, LocationGlobal, LocationGlobalRelative
connection_string = '/dev/ttyUSB0'
sitl = None
# Global variables for distance:
distance_in_mm_N = 0
distance_in... | [
11748,
314,
17,
34,
31217,
87,
263,
198,
11748,
569,
43,
4310,
43,
16,
55,
198,
11748,
269,
85,
17,
198,
11748,
640,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
640,
198,
11748,
10688,
198,
6738,
12170,
1581... | 2.627756 | 3,992 |
from uuoskit import _uuoskit
from .common import check_result
| [
6738,
334,
84,
418,
15813,
1330,
4808,
12303,
418,
15813,
198,
6738,
764,
11321,
1330,
2198,
62,
20274,
198
] | 3.263158 | 19 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
import json
import time
import requests
import tornado.ioloop
from tornado.httpclient import AsyncHTTPClient
from tornado.httputil import url_concat
testurls = ['https://t.co/gFVKpELNO0',
'https://docs.python.org/2/library/configpar... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
1822,
29572,
198,
11748,
25064,
198,
11748,
33918,
198,
11748,
640,
198,
11748,
7007,
198,
11748,
33718,
13,
... | 2.212264 | 424 |
from flask import render_template, request, redirect, url_for, abort, session, Response
from paste.encrypt import encryptContent
from hashids import Hashids
from datetime import datetime
from paste import app, db
from paste.forms import languageBox, expirationDate, expiryDateAndType
from paste.models import Post
has... | [
6738,
42903,
1330,
8543,
62,
28243,
11,
2581,
11,
18941,
11,
19016,
62,
1640,
11,
15614,
11,
6246,
11,
18261,
198,
198,
6738,
17008,
13,
12685,
6012,
1330,
34117,
19746,
198,
6738,
12234,
2340,
1330,
21059,
2340,
198,
6738,
4818,
8079,
... | 3.154286 | 175 |
import json
import unittest
import datetime
from ... import create_app
class QuestionTestCase(unittest.TestCase):
"""
This class represents the question test cases
"""
def test_post_blog(self):
"""method to test post a blog endpoint"""
response = self.app.post("/api/v1/questions",
... | [
198,
11748,
33918,
198,
11748,
555,
715,
395,
198,
11748,
4818,
8079,
198,
6738,
2644,
1330,
2251,
62,
1324,
628,
198,
4871,
18233,
14402,
20448,
7,
403,
715,
395,
13,
14402,
20448,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,... | 2.187206 | 2,126 |
from sys import stdin, stdout
if __name__ == "__main__":
main()
| [
6738,
25064,
1330,
14367,
259,
11,
14367,
448,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.535714 | 28 |
# encoding=utf8
# 三种创建方式
dic1 = {"sex": 1}
dic2 = dict([('name', 'simuty'), ("age", 1)])
dic3 = dict(age=2, name='python', sex=1)
print(dic1)
print(dic2)
print(dic3)
'''
{'sex': 1}
{'name': 'simuty'}
{'age': 2}
'''
# 删除指定元素
del dic3['age']
dic3.pop('name')
print(dic3)
# 清空字典
dic3.clear()
print(dic3)
del dic3
# pri... | [
2,
21004,
28,
40477,
23,
198,
198,
2,
220,
49011,
163,
100,
235,
26344,
249,
161,
119,
118,
43095,
28156,
237,
198,
198,
67,
291,
16,
796,
19779,
8044,
1298,
352,
92,
198,
67,
291,
17,
796,
8633,
26933,
10786,
3672,
3256,
705,
143... | 1.606135 | 815 |
#!/usr/bin/env python
import io
import os
import unittest
import json
import numpy
from qe_tools.parsers import PwInputFile, CpInputFile
from qe_tools.exceptions import InputValidationError
# Folder with input file examples
data_folder = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'data')
# Folder wit... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
33245,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
11748,
33918,
198,
198,
11748,
299,
32152,
198,
198,
6738,
10662,
68,
62,
31391,
13,
79,
945,
364,
1330,
350,
86,
... | 1.905655 | 3,837 |
import jsonpickle
import json
import pickle
with open('generations.pickle', 'wb') as f:
pickle.dump(generations, f)
with open('generations.pickle') as f:
loaded_obj = pickle.load(f)
jsonpickle.encode(generations, unpicklable=False)
text_file = open("generations.json", "w")
n = text_file.write(jsonpickle.en... | [
11748,
33918,
27729,
293,
198,
11748,
33918,
198,
11748,
2298,
293,
198,
198,
4480,
1280,
10786,
8612,
602,
13,
27729,
293,
3256,
705,
39346,
11537,
355,
277,
25,
198,
220,
220,
220,
2298,
293,
13,
39455,
7,
8612,
602,
11,
277,
8,
1... | 2.699552 | 223 |
import json
# import pickle
load()
| [
11748,
33918,
628,
198,
2,
1330,
2298,
293,
628,
628,
198,
2220,
3419,
198
] | 2.928571 | 14 |
"""
Homework4.
Replace 'pass' by your implementation.
"""
# Insert your package here
import sys
import numpy as np
import helper as hp
import findM2 as fm
from mpl_toolkits import mplot3d
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
from scipy.optimize import least_squares
'''
Q2.1: Eight Point Al... | [
37811,
198,
28718,
6433,
19,
13,
198,
3041,
5372,
705,
6603,
6,
416,
534,
7822,
13,
198,
37811,
198,
198,
2,
35835,
534,
5301,
994,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
31904,
355,
27673,
198,
11748,
1064... | 2.169385 | 1,901 |
# Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Info widgets."""
# pylint: disable=useless-super-delegation
from lib import base
from lib.constants import locator, objects, element, roles
from lib.constants.locator import WidgetInfoAssessment
from lib.... | [
2,
15069,
357,
34,
8,
2177,
3012,
3457,
13,
198,
2,
49962,
739,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
1279,
3826,
38559,
24290,
2393,
29,
198,
37811,
12360,
40803,
526,
15931,
1... | 2.732865 | 4,844 |
"""
A module to determine the algebraic structure of an array or array class.
"""
import numpy as np
from .array import GroupArrayBase, FieldArrayBase
__all__ = ["is_group", "is_field", "is_prime_field", "is_extension_field"]
###############################################################################
# Groups
#... | [
37811,
198,
32,
8265,
284,
5004,
262,
37139,
291,
4645,
286,
281,
7177,
393,
7177,
1398,
13,
198,
37811,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
764,
18747,
1330,
4912,
19182,
14881,
11,
7663,
19182,
14881,
198,
198,
834,
... | 2.822222 | 1,035 |
# Author: Tillmann Falck <tf-raman@lucidus.de>
#
# License: BSD 3 clause
#
# SPDX-License-Identifier: BSD-3-Clause
import functools
import xarray as xr
from . import utils
from . import preprocessing
from . import baseline
class XArrayHelper:
"""Helper class to turn module functions into xarray methods"""
... | [
2,
6434,
25,
17888,
9038,
9596,
694,
1279,
27110,
12,
859,
272,
31,
75,
1229,
312,
385,
13,
2934,
29,
198,
2,
198,
2,
13789,
25,
347,
10305,
513,
13444,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
347,
10305,
12,
... | 2.731343 | 268 |
import logging
import datetime as dt
import re
import json
import http_request
import dbio
| [
11748,
18931,
198,
11748,
4818,
8079,
355,
288,
83,
198,
11748,
302,
198,
11748,
33918,
198,
198,
11748,
2638,
62,
25927,
198,
11748,
20613,
952,
628,
628,
628,
198
] | 3.37931 | 29 |
import turtle
turtle.bgcolor("black")
turtle.pensize(2)
turtle.speed(0)
turtle.color("red","pink")
turtle.begin_fill()
turtle.left(140)
turtle.forward(111.65)
curve()
turtle.left(120)
curve()
turtle.forward(111.65)
turtle.end_fill()
turtle.hideturtle() | [
11748,
28699,
201,
198,
83,
17964,
13,
35904,
8043,
7203,
13424,
4943,
201,
198,
83,
17964,
13,
79,
641,
1096,
7,
17,
8,
201,
198,
83,
17964,
13,
12287,
7,
15,
8,
201,
198,
83,
17964,
13,
8043,
7203,
445,
2430,
79,
676,
4943,
20... | 2.170732 | 123 |
import sys
import math
sys.stdin = open('input.txt')
while True:
n = int(input())
if not n:
break
l = math.log(n)
print '%d %.8f' % (int(l) + 1, 1 - n / math.exp(int(l) + 1))
| [
11748,
25064,
198,
11748,
10688,
198,
198,
17597,
13,
19282,
259,
796,
1280,
10786,
15414,
13,
14116,
11537,
198,
4514,
6407,
25,
198,
220,
220,
220,
299,
796,
493,
7,
15414,
28955,
198,
220,
220,
220,
611,
407,
299,
25,
198,
220,
2... | 2.020202 | 99 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import enumfields.fields
import donation.models
| [
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,
33829,
25747,
13,
25747,
198,
... | 3.229167 | 48 |
from marshmallow import fields, Schema
import pytest
from flask_resty import RelatedItem
# -----------------------------------------------------------------------------
@pytest.fixture
@pytest.fixture
@pytest.fixture
@pytest.fixture
# -------------------------------------------------------------------------... | [
6738,
22397,
42725,
1330,
7032,
11,
10011,
2611,
198,
11748,
12972,
9288,
198,
198,
6738,
42903,
62,
2118,
88,
1330,
19809,
7449,
198,
198,
2,
16529,
32501,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
198,
31,
9078,
9288,
13,
69,
9... | 5.608108 | 74 |
import time
import requests
# Uses the wonderful https://jikan.moe/ to cache info about MAL Scores
class JikanException(Exception):
"""General exception for Jikan requests"""
pass
if __name__ == "__main__":
# Basic Tests
j = Jikan()
cowboy_bebop = j.get(1, Jikan.ANIME)
print(cowboy_bebop["sc... | [
11748,
640,
198,
11748,
7007,
198,
198,
2,
36965,
262,
7932,
3740,
1378,
73,
49894,
13,
76,
2577,
14,
284,
12940,
7508,
546,
337,
1847,
44654,
198,
198,
4871,
449,
49894,
16922,
7,
16922,
2599,
198,
220,
220,
220,
37227,
12218,
6631,
... | 2.620915 | 153 |
from __future__ import division
from __future__ import print_function
import numpy as np
from io import BytesIO
from tensorflow.python.lib.io import file_io
NUM_LABELS = 3
IMAGE_SHAPE = [81] | [
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
628,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
8019,
13,
952,
1330... | 3.129032 | 62 |
# This file was *autogenerated* from the file FFTpreproc.sage
from sage.all_cmdline import * # import sage library
_sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0)#!/usr/bin/env sage
#Computes a list data with the following structure: i-th component is [G,D] where G and D are the ... | [
198,
2,
770,
2393,
373,
1635,
2306,
519,
877,
515,
9,
422,
262,
2393,
376,
9792,
3866,
36942,
13,
82,
496,
198,
6738,
35021,
13,
439,
62,
28758,
1370,
1330,
1635,
220,
220,
1303,
1330,
35021,
5888,
198,
198,
62,
82,
496,
62,
9979,... | 2.789157 | 166 |
from support import *
from stratx.featimp import *
figsize = (3.5, 3.0)
use_oob=False
metric = mean_absolute_error
n = 25000
import pickle
np.set_printoptions(precision=2, suppress=True, linewidth=150)
def toy_weather_data(n = 1000, p=50):
"""
For each state, create a (fictional) ramp of data from day 1 to ... | [
6738,
1104,
1330,
1635,
198,
6738,
25369,
87,
13,
27594,
11011,
1330,
1635,
198,
198,
5647,
7857,
796,
357,
18,
13,
20,
11,
513,
13,
15,
8,
198,
1904,
62,
78,
672,
28,
25101,
198,
4164,
1173,
796,
1612,
62,
48546,
62,
18224,
198,
... | 2.080569 | 1,688 |
#!/usr/bin/env python
"""
This tests VTK's use of Piston's threshold operator.
"""
import sys
import vtk
from vtk.test import Testing
from PistonTestCommon import *
if __name__ == "__main__":
global args
args = parseArgs()
Testing.main([(TestThreshold, 'test')])
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
1212,
5254,
32751,
42,
338,
779,
286,
18667,
261,
338,
11387,
10088,
13,
198,
198,
37811,
198,
198,
11748,
25064,
198,
11748,
410,
30488,
198,
198,
6738,
410,
30488,
13,
92... | 2.876289 | 97 |
from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
from core.models import Tag
from core.models import Ingredient
from core.models import Recipe
| [
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
198,
6738,
4755,
1330,
4981,
198,
6738,
4755,
... | 3.575758 | 66 |
from .config import add_dctmask_config
from .dct_mask_head import MaskRCNNDCTHead
from .mask_encoding import DctMaskEncoding
| [
6738,
764,
11250,
1330,
751,
62,
67,
310,
27932,
62,
11250,
198,
6738,
764,
67,
310,
62,
27932,
62,
2256,
1330,
18007,
7397,
6144,
35,
4177,
13847,
198,
6738,
764,
27932,
62,
12685,
7656,
1330,
360,
310,
45195,
27195,
7656,
198
] | 3.04878 | 41 |
import torch
| [
11748,
28034,
628
] | 4.666667 | 3 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 3.75 | 8 |
import os
from typing import Callable, Dict, Optional
import numpy as np
import torch as th
from imageai.Detection import ObjectDetection
from PIL import Image
from torch.utils.data import Dataset
from torch.utils.data.dataset import T_co
| [
11748,
28686,
198,
6738,
19720,
1330,
4889,
540,
11,
360,
713,
11,
32233,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
355,
294,
198,
6738,
2939,
1872,
13,
11242,
3213,
1330,
9515,
11242,
3213,
198,
6738,
350,
4146,
1330,... | 3.457143 | 70 |
from pandas import DataFrame
from sklearn.compose import ColumnTransformer
from sklearn.impute import SimpleImputer
from sklearn.pipeline import Pipeline
from sklearn.pipeline import make_pipeline, make_union
from sklearn.preprocessing import StandardScaler, OneHotEncoder
def _create_num_pipeline(num_imputing_strateg... | [
6738,
19798,
292,
1330,
6060,
19778,
198,
6738,
1341,
35720,
13,
785,
3455,
1330,
29201,
8291,
16354,
198,
6738,
1341,
35720,
13,
11011,
1133,
1330,
17427,
3546,
10549,
198,
6738,
1341,
35720,
13,
79,
541,
4470,
1330,
37709,
198,
6738,
... | 2.555061 | 899 |
import argparse
import torch
import torch.optim as optim
import os.path as osp
from module.Deeplabv2_MMD import Deeplabv2_MMD
from data.loveda import LoveDALoader
from utils.tools import *
from ever.core.iterator import Iterator
from eval import evaluate
from tqdm import tqdm
from torch.nn.utils import clip_grad
import... | [
11748,
1822,
29572,
198,
11748,
28034,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
11748,
28686,
13,
6978,
355,
267,
2777,
198,
6738,
8265,
13,
35,
1453,
489,
397,
85,
17,
62,
12038,
35,
1330,
29195,
489,
397,
85,
17,
62,
12038,
3... | 2.175383 | 1,568 |
import logging
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.DEBUG)
import requests
OUTLINE_REFERER = 'https://outline.com/'
OUTLINE_API = 'https://api.outline.com/v3/parse_article'
TIMEOUT = 20
name = 'Outline' | [
11748,
18931,
198,
6404,
2667,
13,
35487,
16934,
7,
198,
220,
220,
220,
220,
220,
220,
220,
5794,
11639,
4,
7,
292,
310,
524,
8,
82,
532,
4064,
7,
3672,
8,
82,
532,
4064,
7,
5715,
3672,
8,
82,
532,
4064,
7,
20500,
8,
82,
3256,... | 2.381356 | 118 |
"""
Django settings for labmine project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
fr... | [
37811,
198,
35,
73,
14208,
6460,
329,
2248,
3810,
1628,
13,
198,
198,
8645,
515,
416,
705,
28241,
14208,
12,
28482,
923,
16302,
6,
1262,
37770,
362,
13,
17,
13,
16,
13,
198,
198,
1890,
517,
1321,
319,
428,
2393,
11,
766,
198,
5450... | 2.249883 | 2,133 |
import numpy as np
import pandas as pd
import os
print(os.getcwd())
print(os.listdir('data'))
sales_data = pd.read_csv('data/sales_train.csv.gz')
item_cat = pd.read_csv('data/item_categories.csv')
items = pd.read_csv('data/items.csv')
shops = pd.read_csv('data/shops.csv')
sample_submission = pd.read_csv('data/sample_s... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
220,
198,
11748,
28686,
198,
4798,
7,
418,
13,
1136,
66,
16993,
28955,
198,
4798,
7,
418,
13,
4868,
15908,
10786,
7890,
6,
4008,
198,
82,
2040,
62,
7890,
796,
279,... | 3.443662 | 284 |
import pyparsing as pp
from dockermake.dockerfile.instructions.instruction_base import InstructionBase
| [
11748,
279,
4464,
945,
278,
355,
9788,
198,
198,
6738,
23423,
7780,
539,
13,
45986,
7753,
13,
259,
7249,
507,
13,
8625,
2762,
62,
8692,
1330,
46486,
14881,
628
] | 3.62069 | 29 |
import numpy as np
import tensorflow as tf
import utils
import config
import batch_generate
def roi_proposal(rpn_cls_prob_reshape, rpn_bbox_pred, H, W, ANCHOR_PER_GRID, ANCHOR_BOX, TOP_N_DETECTION, NMS_THRESH, IM_H, IM_W):
"""
clip the predict results fron rpn output
appply nms
proposal topN results as... | [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
3384,
4487,
198,
11748,
4566,
198,
11748,
15458,
62,
8612,
378,
198,
198,
4299,
686,
72,
62,
1676,
40007,
7,
81,
21999,
62,
565,
82,
62,
1676,
65,
... | 2.310734 | 531 |
from mode import Mode
| [
6738,
4235,
1330,
10363,
198
] | 4.4 | 5 |
"""Proportional-derivative controller for PD outputs."""
from numpy import dot
from .controller import Controller
class PDController(Controller):
"""Proportional-derivative controller for PD outputs.
Let n be the number of states, m be the number of inputs, k be the number of
outputs.
Attributes:
... | [
37811,
2964,
634,
1538,
12,
1082,
452,
876,
10444,
329,
14340,
23862,
526,
15931,
198,
198,
6738,
299,
32152,
1330,
16605,
198,
198,
6738,
764,
36500,
1330,
22741,
198,
198,
4871,
14340,
22130,
7,
22130,
2599,
198,
220,
220,
220,
37227,... | 2.519288 | 337 |
import logging
import os
from gpac_worker import GPAC_worker
from parameters import get_parameter
| [
198,
11748,
18931,
198,
11748,
28686,
198,
198,
6738,
27809,
330,
62,
28816,
1330,
14714,
2246,
62,
28816,
198,
6738,
10007,
1330,
651,
62,
17143,
2357,
198
] | 3.703704 | 27 |
from django.urls import path
from . import views
urlpatterns = [
path('home', views.home, name = 'home'),
path('',views.profile, name = 'profile'),
# path('post', views.comment, name= 'postComment')
] | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
11195,
3256,
5009,
13,
11195,
11,
1438,
796,
705,
11195,
33809,
198,
220,
220,
220,
3108,
... | 2.878378 | 74 |
__all__ = ["manager", "actor"] | [
834,
439,
834,
796,
14631,
37153,
1600,
366,
11218,
8973
] | 3 | 10 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-09-05 04:25
from __future__ import unicode_literals
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
23,
319,
2864,
12,
2931,
12,
2713,
8702,
25,
1495,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.690909 | 55 |
import os
import sys
import connexion
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
basedir = os.path.abspath(os.path.dirname(__file__))
#print("basedir: {}".format(basedir))
# Create the connexion application instance
connex_app = connexion.App(__name__, specification_dir=basedir ... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
369,
12413,
295,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
42903,
62,
76,
5406,
42725,
1330,
9786,
42725,
198,
198,
3106,
343,
796,
28686,
13,
6978,
13,
39... | 2.55042 | 476 |
from .externalplugin import ExternalPluginModelView, LoadedPluginView
from .log import LogModelView
from .permission import PermissionModelView
from .plugin import PluginBaseListView, PluginModelView
from .scheduler import ScheduleModelView
from .simpleadmin import (
ShowAdminUrlsView,
SimpleAdminPluginModelVie... | [
6738,
764,
22615,
33803,
1330,
34579,
37233,
17633,
7680,
11,
42485,
37233,
7680,
198,
6738,
764,
6404,
1330,
5972,
17633,
7680,
198,
6738,
764,
525,
3411,
1330,
2448,
3411,
17633,
7680,
198,
6738,
764,
33803,
1330,
42636,
14881,
8053,
76... | 3.158371 | 221 |
from plyer import notification
import time
while(True):
message()
time.sleep(1800) | [
6738,
35960,
263,
1330,
14483,
201,
198,
11748,
640,
201,
198,
201,
198,
4514,
7,
17821,
2599,
201,
198,
220,
220,
220,
3275,
3419,
201,
198,
220,
220,
220,
640,
13,
42832,
7,
39188,
8
] | 2.742857 | 35 |
import asyncio
import time
from pytheater.actor import Actor
from pytheater.core.actor_system import ActorSystem
N = 100
system = ActorSystem()
actor = system.create_actor(PiMaster)
result = actor.ask('Calculate PI')
print("FUTURE", result)
print("RESULT", result.result())
print("RESULT**2", result.result().res... | [
11748,
30351,
952,
198,
11748,
640,
198,
198,
6738,
12972,
1169,
729,
13,
11218,
1330,
27274,
198,
6738,
12972,
1169,
729,
13,
7295,
13,
11218,
62,
10057,
1330,
27274,
11964,
198,
198,
45,
796,
1802,
628,
628,
198,
10057,
796,
27274,
... | 3.174757 | 103 |
from boa3.builtin import public
from boa3.builtin.nativecontract.contractmanagement import ContractManagement
@public
| [
6738,
1489,
64,
18,
13,
18780,
259,
1330,
1171,
198,
6738,
1489,
64,
18,
13,
18780,
259,
13,
30191,
28484,
13,
28484,
27604,
1330,
17453,
48032,
628,
198,
31,
11377,
198
] | 3.870968 | 31 |
#!/usr/bin/env python
"""
CREATED AT: 2021/9/8
Des:
https://leetcode.com/problems/shifting-letters
https://leetcode.com/explore/item/3968
GITHUB: https://github.com/Jiezhi/myleetcode
Difficulty: Medium
"""
from typing import List
if __name__ == '__main__':
test()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
43387,
11617,
5161,
25,
33448,
14,
24,
14,
23,
198,
5960,
25,
198,
5450,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
1477,
13309,
12,
15653,
198,
5450,
1378,
293,... | 2.527778 | 108 |
from PIL import Image, ImageDraw
import sys
RAD = 5
xy = [float(sys.argv[1]), float(sys.argv[2])]
imageFile = "code.jpg"
im = Image.open(imageFile)
draw = ImageDraw.Draw(im)
x = translate(xy[1], 0, 11.31, 0, im.size[0])
y = translate(xy[0], 0, 9.4, 0, im.size[1])
draw.ellipse([x-RAD, y-RAD, x+RAD, y+RAD], fill =128)
d... | [
6738,
350,
4146,
1330,
7412,
11,
7412,
25302,
198,
11748,
25064,
198,
49,
2885,
796,
642,
198,
198,
5431,
796,
685,
22468,
7,
17597,
13,
853,
85,
58,
16,
46570,
12178,
7,
17597,
13,
853,
85,
58,
17,
12962,
60,
198,
9060,
8979,
796... | 2.207317 | 164 |
import sys
import torch
import gym
import numpy as np
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
import matplotlib.pyplot as plt
import pandas as pd
import os
import time
# hyperparameters
hidden_size = 10
learning_rate = 1e-3
random_seed = ... | [
11748,
25064,
198,
11748,
28034,
220,
220,
198,
11748,
11550,
198,
11748,
299,
32152,
355,
45941,
220,
220,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
11748,
28034,
13,
20471,
13,
45124,
35... | 2.858537 | 205 |
import os
import json
import shutil
from .sys_ops import get_config_path, create_custom_path, get_models_path
from .request_util import get_mode, get_cy_model, get_data, get_loss, get_model_name
| [
11748,
28686,
198,
11748,
33918,
198,
11748,
4423,
346,
198,
6738,
764,
17597,
62,
2840,
1330,
651,
62,
11250,
62,
6978,
11,
2251,
62,
23144,
62,
6978,
11,
651,
62,
27530,
62,
6978,
198,
6738,
764,
25927,
62,
22602,
1330,
651,
62,
1... | 3.046154 | 65 |
from unittest import TestCase
from gdacs.api import GDACSAPIReader, GDACSAPIError
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
308,
67,
16436,
13,
15042,
1330,
27044,
2246,
50,
2969,
4663,
1329,
263,
11,
27044,
2246,
50,
17614,
12331,
198
] | 2.766667 | 30 |
import unittest
from blackjack3 import Hand, Strategy
if __name__ == "__main__":
unittest.main()
| [
11748,
555,
715,
395,
198,
6738,
2042,
19650,
18,
1330,
7157,
11,
20561,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.833333 | 36 |
##############################################################################
#
# Copyright (C) BBC 2018
#
##############################################################################
events = [
{
"prodState": "Maintenance",
"firstTime": 1494707632.238,
"device_uuid": "3cb330f3-afb0-4e25... | [
29113,
29113,
7804,
4242,
2235,
198,
2,
198,
2,
15069,
357,
34,
8,
7823,
2864,
198,
2,
198,
29113,
29113,
7804,
4242,
2235,
198,
198,
31534,
796,
685,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
1676,
67... | 1.70426 | 6,854 |
r"""Decorator interface"""
from typing import Callable, Any
import time
from functools import wraps
import numpy as np
class Decimals:
"""Round decorator."""
class RunTime:
"""Run time decorator."""
| [
81,
37811,
10707,
273,
1352,
7071,
37811,
198,
6738,
19720,
1330,
4889,
540,
11,
4377,
198,
11748,
640,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4871,
4280,
320,
874,
25,
198,
220,
220,
2... | 3.19697 | 66 |
import os
import sys
import pytest
from janitor.utils import import_message
@pytest.mark.utils
| [
11748,
28686,
198,
11748,
25064,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
42897,
2072,
13,
26791,
1330,
1330,
62,
20500,
628,
198,
31,
9078,
9288,
13,
4102,
13,
26791,
198
] | 3.193548 | 31 |
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render
from .models import Post | [
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
651,
62,
15252,
62,
273,
62,
26429,
11,
8543,
198,
198,
6738,
764,
27530,
1330,
2947
] | 3.545455 | 33 |
import os
import re
import json
def collect_folders(root_folder):
""" Collect folders to check into a list"""
return [os.path.join(root_folder, o) for o in os.listdir(root_folder)
if os.path.isdir(os.path.join(root_folder,o))]
def collect_files_from_folder(folder_name... | [
11748,
28686,
198,
11748,
302,
198,
11748,
33918,
198,
198,
4299,
2824,
62,
11379,
364,
7,
15763,
62,
43551,
2599,
198,
220,
220,
220,
37227,
9745,
24512,
284,
2198,
656,
257,
1351,
37811,
198,
220,
220,
220,
1441,
685,
418,
13,
6978,... | 2.4941 | 678 |
import django.dispatch
page_view = django.dispatch.Signal(providing_args=['path','primary_obj','secondary_obj']) | [
11748,
42625,
14208,
13,
6381,
17147,
198,
198,
7700,
62,
1177,
796,
42625,
14208,
13,
6381,
17147,
13,
11712,
282,
7,
15234,
2530,
62,
22046,
28,
17816,
6978,
41707,
39754,
62,
26801,
41707,
38238,
62,
26801,
6,
12962
] | 2.973684 | 38 |
#
# Copyright (c) 2021 Dell EMC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | [
2,
198,
2,
15069,
357,
66,
8,
33448,
23617,
412,
9655,
10501,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
... | 2.593952 | 2,480 |
import itertools
import random
NDICE = 6
DICEMAX = 6
@memoize | [
11748,
340,
861,
10141,
198,
11748,
4738,
198,
198,
8575,
8476,
796,
718,
198,
35,
2149,
3620,
25922,
796,
718,
198,
198,
31,
11883,
78,
1096
] | 2.423077 | 26 |
import importlib
from grongier.pex._business_host import _BusinessHost
class _BusinessOperation(_BusinessHost):
""" This class corresponds to the PEX framework EnsLib.PEX.BusinessOperation class.
The EnsLib.PEX.BusinessOperation RemoteClassName property identifies the Python class with the business operat... | [
11748,
1330,
8019,
201,
198,
6738,
1036,
506,
959,
13,
24900,
13557,
22680,
62,
4774,
1330,
4808,
24749,
17932,
201,
198,
201,
198,
4871,
4808,
24749,
32180,
28264,
24749,
17932,
2599,
201,
198,
220,
220,
220,
37227,
770,
1398,
24866,
2... | 3.089898 | 1,079 |
{ 'arity': 1,
'dptch': ['real_', 'unsigned_', 'signed_'],
'incld': [],
'norst': False,
'rnges': { 'default': [['nt2::Valmin<T>()', 'nt2::Valmax<T>()']],
'double': [['-10.0', '10.0']],
'float': [['-10.0f', '10.0f']]},
'rturn': { 'default': 'typename boost::result_of<nt2::meta::floatin... | [
90,
705,
6806,
10354,
352,
11,
198,
220,
705,
67,
457,
354,
10354,
37250,
5305,
62,
3256,
705,
43375,
62,
3256,
705,
32696,
62,
6,
4357,
198,
220,
705,
1939,
335,
10354,
685,
4357,
198,
220,
705,
13099,
301,
10354,
10352,
11,
198,
... | 1.573624 | 781 |
from . import base, articles, langs
# Views
| [
6738,
764,
1330,
2779,
11,
6685,
11,
300,
27725,
198,
198,
2,
29978,
628,
198
] | 3.133333 | 15 |
import psi4
import XC_Inversion
import matplotlib.pyplot as plt
import libcubeprop
import numpy as np
if __name__ == "__main__":
psi4.set_num_threads(2)
separation = 1.415*2.0
functional = 'svwn'
basis = 'sto-3g'
basis = 'aug-pcsseg-3'
basis = 'cc-pvtz'
# basis = 'aug-cc-pvqz'
vp_basis = None
ortho_basis = Fals... | [
11748,
46231,
19,
198,
11748,
1395,
34,
62,
818,
9641,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
9195,
66,
549,
538,
1773,
198,
11748,
299,
32152,
355,
45941,
198,
198,
361,
11593,
3672,
834,
6624,
366,... | 2.014308 | 1,258 |
#!/usr/bin/env python
from inputs import get_gamepad
import socket, struct
import time
# Remote control for the robot, using an Xbox controller.
# Communicate with an UDP server running on the robot.
CMD_MOVE = 1
CMD_ROTATE = 2
CMD_STOP = 3
CMD_JOG = 4
CMD_CRANE = 5
ROBOT_ADDRESS = '192.168.43.123'
ROBOT_PORT... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
628,
198,
198,
6738,
17311,
1330,
651,
62,
6057,
15636,
198,
198,
11748,
17802,
11,
2878,
198,
198,
11748,
640,
198,
198,
2,
21520,
1630,
329,
262,
9379,
11,
1262,
281,
9445,
10444,
13,
1... | 2.161465 | 737 |