content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import Sniper
Sniper.loadDll("/junofs/users/huanggh/EnergyRec/GhRec/GenQPDF/amd64_linux26/libOMILREC.so")
| [
11748,
24146,
198,
50,
45554,
13,
2220,
35,
297,
7203,
14,
29741,
1659,
82,
14,
18417,
14,
13415,
648,
456,
14,
28925,
6690,
14,
41126,
6690,
14,
13746,
48,
20456,
14,
28745,
2414,
62,
23289,
2075,
14,
8019,
2662,
4146,
38827,
13,
5... | 2.355556 | 45 |
# Copyright (c) 2017 Mirantis, 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 requir... | [
2,
15069,
357,
66,
8,
2177,
7381,
20836,
11,
3457,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220... | 3.293651 | 252 |
# Copyright (c) 2015 Tanium Inc
#
# Generated from console.wsdl version 0.0.1
#
#
from .base import BaseType
from .question import Question
from .package_spec_list import PackageSpecList
from .user import User
from .user import User
from .user import User
from .metadata_list import MetadataList
| [
198,
2,
15069,
357,
66,
8,
1853,
11818,
1505,
3457,
198,
2,
198,
2,
2980,
515,
422,
8624,
13,
18504,
25404,
2196,
657,
13,
15,
13,
16,
220,
220,
220,
220,
220,
198,
2,
198,
2,
198,
198,
6738,
764,
8692,
1330,
31783,
628,
220,
... | 3.15 | 100 |
# Copyright (C) 2018 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | [
2,
15069,
357,
34,
8,
2864,
4196,
3457,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
389,
10431,
2810,
326,
262,
1708,
3403,
198,
2,
38... | 3.14771 | 677 |
from chapter.chapter1 import image2points
from chapter.chapter1 import rotate
from chapter.chapter1 import plot_with_pause
if __name__ == "__main__":
plot_with_pause(rotate(image2points()), 200)
| [
6738,
6843,
13,
43582,
16,
1330,
2939,
17,
13033,
198,
6738,
6843,
13,
43582,
16,
1330,
23064,
198,
6738,
6843,
13,
43582,
16,
1330,
7110,
62,
4480,
62,
32125,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
... | 3.225806 | 62 |
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
2,
15069,
33448,
10766,
28478,
21852,
15302,
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,... | 3.616822 | 214 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2018-05-04 09:35
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
24,
13,
940,
319,
2864,
12,
2713,
12,
3023,
7769,
25,
2327,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.876712 | 73 |
from werkzeug.datastructures import FileStorage
from wtforms import fields
from wtforms import widgets
from wtforms.compat import text_type
from wtforms.validators import StopValidation
from .widgets import CheckboxGroup
__all__ = (
'CheckboxGroupField', 'RadioBoxField',
'FileField', 'ValueListField',
)
cla... | [
6738,
266,
9587,
2736,
1018,
13,
19608,
459,
1356,
942,
1330,
9220,
31425,
198,
6738,
266,
83,
23914,
1330,
7032,
198,
6738,
266,
83,
23914,
1330,
40803,
198,
6738,
266,
83,
23914,
13,
5589,
265,
1330,
2420,
62,
4906,
198,
6738,
266,
... | 3.165631 | 483 |
from django.contrib import admin
from .models import Owner, Aircraft
# Register your models here.
admin.site.register(Owner)
admin.site.register(Aircraft) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
23853,
11,
30767,
198,
198,
2,
17296,
534,
4981,
994,
13,
198,
28482,
13,
15654,
13,
30238,
7,
42419,
8,
198,
28482,
13,
15654,
13,
30238,
7,
32,
27002,
8
... | 3.604651 | 43 |
#!/usr/bin/python
# Copyright (C) 2018-2021 aitos.io
#
# 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 ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
2,
15069,
357,
34,
8,
2864,
12,
1238,
2481,
257,
270,
418,
13,
952,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345... | 2.50628 | 2,070 |
import csv
import os
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
| [
11748,
269,
21370,
198,
11748,
28686,
198,
6738,
15881,
88,
13,
2777,
4157,
1330,
327,
13132,
41294,
11,
14330,
198,
6738,
15881,
88,
13,
2815,
365,
742,
974,
669,
1330,
7502,
11627,
40450,
628,
628,
628,
198
] | 3.243243 | 37 |
"""
run macros:
The l11 macros to create various performance plots for the L1 trigger.
Usage:
run macros [macro name]
"""
import logging
import os
from hepshell import HEP_PROJECT_ROOT
import hepshell
from l1t_cli.setup import WORKSPACE, CMSSW_BASE, CMSSW_SRC
LOG = logging.getLogger(_... | [
37811,
198,
220,
220,
220,
1057,
34749,
25,
198,
220,
220,
220,
220,
220,
220,
220,
383,
300,
1157,
34749,
284,
2251,
2972,
2854,
21528,
329,
262,
406,
16,
7616,
13,
628,
220,
220,
220,
220,
220,
220,
220,
29566,
25,
198,
220,
220... | 2.333333 | 189 |
"""Cobertura coverage report source up-to-dateness collector."""
from datetime import datetime
from base_collectors import SourceUpToDatenessCollector, XMLFileSourceCollector
from collector_utilities.functions import parse_source_response_xml
from collector_utilities.type import Response
class CoberturaSourceUpToDa... | [
37811,
34,
2023,
83,
5330,
5197,
989,
2723,
510,
12,
1462,
12,
19608,
9449,
22967,
526,
15931,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
2779,
62,
33327,
669,
1330,
8090,
4933,
2514,
27354,
9449,
31337,
273,
11,
23... | 3.324201 | 219 |
# -*- coding: utf-8 -*-
import logging
init_logging()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
18931,
628,
198,
198,
15003,
62,
6404,
2667,
3419,
628
] | 2.269231 | 26 |
##
##
#
# __init__.py for awips.dataaccess package
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 12/10/12 njensen Initial Creation.
# Feb 14, 2013 1614 ... | [
2235,
198,
2235,
628,
198,
2,
198,
2,
11593,
15003,
834,
13,
9078,
329,
3253,
2419,
13,
7890,
15526,
5301,
198,
2,
198,
2,
198,
2,
220,
220,
220,
220,
47466,
367,
42480,
198,
2,
198,
2,
220,
220,
220,
7536,
220,
220,
220,
220,
... | 2.19506 | 3,927 |
import numpy as np
from abc import abstractmethod, ABCMeta
from six import with_metaclass
class AbstractSortedArray(with_metaclass(ABCMeta, Array)):
'''
An abstract class for representing sorted array
'''
@abstractmethod
@staticmethod
class SortedArray(AbstractSortedArray):
'''
A clas... | [
11748,
299,
32152,
355,
45941,
198,
6738,
450,
66,
1330,
12531,
24396,
11,
9738,
48526,
198,
6738,
2237,
1330,
351,
62,
4164,
330,
31172,
628,
198,
198,
4871,
27741,
50,
9741,
19182,
7,
4480,
62,
4164,
330,
31172,
7,
24694,
48526,
11,... | 3 | 152 |
"""
ec2.helpers
~~~~~~~~~~~
:copyright: (c) 2014 by Matt Robenolt.
:license: BSD, see LICENSE for more details.
"""
import re
def make_compare(key, value, obj):
"Map a key name to a specific comparison function"
if '__' not in key:
# If no __ exists, default to doing an "exact" comparison
ke... | [
37811,
198,
721,
17,
13,
16794,
364,
198,
15116,
4907,
93,
198,
198,
25,
22163,
4766,
25,
357,
66,
8,
1946,
416,
4705,
3851,
268,
5978,
13,
198,
25,
43085,
25,
347,
10305,
11,
766,
38559,
24290,
329,
517,
3307,
13,
198,
37811,
198... | 2.658046 | 348 |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
24893,
1087,
318,
10607,
284,
1104,
262,
1280,
2723,
2055,
416,
1642,
5525,
241,
251,
165,
110,
116,
162,
247,
118,
12859,
239,
47,
7252,
50,
33176,
111,
2... | 3.954861 | 288 |
# Generated by Django 2.2.5 on 2019-09-10 17:25
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
20,
319,
13130,
12,
2931,
12,
940,
1596,
25,
1495,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import math
import numpy as np
import cupy
import chainer
from chainer import cuda
from chainer.functions.connection import convolution_2d
from chainer.utils import argument
from chainer import variable
from chainer import initializers
from chainer import link
from chainer.links.connection.convolution_2d import Convolu... | [
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
6508,
88,
198,
11748,
6333,
263,
198,
6738,
6333,
263,
1330,
269,
15339,
198,
6738,
6333,
263,
13,
12543,
2733,
13,
38659,
1330,
3063,
2122,
62,
17,
67,
198,
6738,
6333,
26... | 3.034351 | 262 |
#!/usr/bin/python3
ls = [l.strip().split(" ") for l in open("inputs/08.in", "r").readlines()]
print("Part 1:", run(-1))
print("Part 2:", brute()) | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
7278,
796,
685,
75,
13,
36311,
22446,
35312,
7203,
366,
8,
329,
300,
287,
1280,
7203,
15414,
82,
14,
2919,
13,
259,
1600,
366,
81,
11074,
961,
6615,
3419,
60,
198,
198,
4798,
7203,
78... | 2.433333 | 60 |
######################################################################
#
# File: src/config.py
#
# Cloudflare Worker CDN
#
# Copyright (c) 2020, Reef Technologies. All Rights Reserved.
#
######################################################################
# Below variables are fetched from the Wrangler variables
# Y... | [
29113,
29113,
4242,
2235,
198,
2,
198,
2,
9220,
25,
12351,
14,
11250,
13,
9078,
198,
2,
198,
2,
10130,
2704,
533,
35412,
6458,
45,
198,
2,
198,
2,
15069,
357,
66,
8,
12131,
11,
34151,
21852,
13,
1439,
6923,
33876,
13,
198,
2,
19... | 2.60479 | 334 |
# flake8: noqa
# from . import gp
# from GrandPrix import GrandPrix
# from . import utils
from . import GrandPrixModel, GrandPrix
| [
2,
781,
539,
23,
25,
645,
20402,
198,
2,
422,
764,
1330,
27809,
198,
2,
422,
5675,
47,
8609,
1330,
5675,
47,
8609,
198,
2,
422,
764,
1330,
3384,
4487,
198,
198,
6738,
764,
1330,
5675,
47,
8609,
17633,
11,
5675,
47,
8609,
198
] | 2.977273 | 44 |
from wtforms import (Form, TextField, validators, SubmitField)
| [
6738,
266,
83,
23914,
1330,
357,
8479,
11,
8255,
15878,
11,
4938,
2024,
11,
39900,
15878,
8,
628
] | 3.555556 | 18 |
import pytest
from app.integrations.dashamail import AppDashamail
pytestmark = [pytest.mark.django_db]
@pytest.fixture(autouse=True)
@pytest.fixture
@pytest.fixture
@pytest.fixture
@pytest.fixture
@pytest.fixture
| [
11748,
12972,
9288,
198,
198,
6738,
598,
13,
18908,
9143,
13,
42460,
321,
603,
1330,
2034,
43041,
321,
603,
198,
198,
9078,
9288,
4102,
796,
685,
9078,
9288,
13,
4102,
13,
28241,
14208,
62,
9945,
60,
628,
198,
31,
9078,
9288,
13,
69... | 2.494505 | 91 |
from typing import Iterator
import torch | [
6738,
19720,
1330,
40806,
1352,
198,
11748,
28034
] | 5 | 8 |
# -*- coding: utf-8 -*-
import json
import time
import io
"""
Created on Tue Jan 9 18:24:17 2018
@author: arj
<div class="flow plugin">
<div class="plugin-author">
***author***
</div>
<div class="plugin-note">
<div class="plugin-note-title">
***name***
</div>
<div class="plugin-pic">
<... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
33918,
198,
11748,
640,
198,
11748,
33245,
198,
37811,
198,
41972,
319,
30030,
2365,
220,
860,
1248,
25,
1731,
25,
1558,
2864,
198,
198,
31,
9800,
25,
610,
73,
... | 2.108291 | 1,182 |
"""
: NA module
: basic methods for neo alias manipulation
"""
from boa.blockchain.vm.Neo.Runtime import Notify, CheckWitness
from boa.blockchain.vm.Neo.Action import RegisterAction
from nas.configuration.Service import ServiceConfiguration
from nas.common.Alias import Alias, load_alias
from nas.core.util import call_s... | [
37811,
198,
25,
11746,
8265,
198,
25,
4096,
5050,
329,
19102,
16144,
17512,
198,
37811,
198,
6738,
1489,
64,
13,
9967,
7983,
13,
14761,
13,
8199,
78,
13,
41006,
1330,
1892,
1958,
11,
6822,
38670,
198,
6738,
1489,
64,
13,
9967,
7983,
... | 2.539484 | 5,344 |
"""
talking clock
returns word version of 24hour time
wisemonkey
oranbusiness@gmail.com
20181219
github.com/wisehackermonkey
run tests with command
python -m nose
"""
hour_names = ["twelve","one","two","three","four","five","six","seven",
"eight","nine","ten","eleven","twelve","thirteen","fourteen",
"fifteen","sixt... | [
37811,
198,
48186,
8801,
198,
7783,
82,
1573,
2196,
286,
1987,
9769,
640,
198,
198,
86,
271,
7966,
2539,
198,
31884,
22680,
31,
14816,
13,
785,
198,
7908,
1065,
1129,
198,
12567,
13,
785,
14,
3083,
71,
10735,
49572,
198,
198,
5143,
... | 2.613027 | 261 |
import csv
import numpy
CD = readFromFile('weather_data_miami.csv', 1514696400, 7) #current data from January 1 2018
PD = readFromFile('weather_data_miami.csv',1483160400,14) #past data from January 1 2017
W = makeSlidingWindow(PD, 7)
ED = []
for i in range(len(W)):
ED.append(calcEuclideanDist(W[i], CD))
Wi = W[ED... | [
11748,
269,
21370,
198,
11748,
299,
32152,
198,
198,
8610,
796,
1100,
4863,
8979,
10786,
23563,
62,
7890,
62,
76,
7871,
13,
40664,
3256,
1315,
1415,
3388,
2414,
405,
11,
767,
8,
1303,
14421,
1366,
422,
3269,
352,
2864,
198,
5760,
796,... | 2.002924 | 684 |
"""Testing basic pipeline stages."""
import pandas as pd
import pytest
from pdpipe.core import (
PdPipelineStage,
FailedPreconditionError
)
class SomeStage(PdPipelineStage):
"""A pipeline stage for testing"""
def test_basic_pipeline_stage():
"""Testing the col binner helper class."""
test_sta... | [
37811,
44154,
4096,
11523,
9539,
526,
15931,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
12972,
9288,
198,
198,
6738,
279,
26059,
3757,
13,
7295,
1330,
357,
198,
220,
220,
220,
350,
67,
47,
541,
4470,
29391,
11,
198,
220,
... | 2.485473 | 1,067 |
import torchvision
from cnn_gp import Conv2d, ReLU, Sequential, resnet_block
train_range = range(40000)
validation_range = range(40000, 50000)
test_range = range(50000, 60000)
kernel_batch_size = 350
dataset_name = "CIFAR10"
model_name = "ResNet"
in_channels = 3
dataset = torchvision.datasets.CIFAR10
transforms = []... | [
11748,
28034,
10178,
198,
6738,
269,
20471,
62,
31197,
1330,
34872,
17,
67,
11,
797,
41596,
11,
24604,
1843,
11,
581,
3262,
62,
9967,
198,
198,
27432,
62,
9521,
796,
2837,
7,
19,
2388,
8,
198,
12102,
341,
62,
9521,
796,
2837,
7,
1... | 2.604488 | 713 |
from .abstract_deployer import AbstractDeployer
# User should cherry pick deployers from the deployer files
# for example:
# from spark_etl.deployers.s3_deployer import S3Deployer
#
# Since different deployer probably depened on different
# vendor library, putting all those deployers here means if user import
# spark_... | [
6738,
764,
397,
8709,
62,
2934,
1420,
263,
1330,
27741,
49322,
263,
198,
198,
2,
11787,
815,
23612,
2298,
6061,
364,
422,
262,
6061,
263,
3696,
198,
2,
329,
1672,
25,
198,
2,
422,
9009,
62,
316,
75,
13,
2934,
1420,
364,
13,
82,
... | 3.569231 | 130 |
import argparse
from generators import DeterministicStateMachineGenerator
from glob import glob
import matplotlib.pyplot as plt
from network import Network
import numpy as np
import tensorflow as tf
import os
def generate_generators(n_vals, replicas, output_directory):
""" Generate generators and save them in `outpu... | [
11748,
1822,
29572,
198,
6738,
27298,
1330,
45559,
49228,
9012,
37573,
8645,
1352,
198,
6738,
15095,
1330,
15095,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
3127,
1330,
7311,
198,
11748,
299,
32152,
355,
4594... | 3.333333 | 231 |
from flask_restful import Api
from .routes import HeartbeatEvent
| [
6738,
42903,
62,
2118,
913,
1330,
5949,
72,
198,
198,
6738,
764,
81,
448,
274,
1330,
8894,
12945,
9237,
628
] | 3.35 | 20 |
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine, or_
from GearMess.client_src.client_models import *
from GearMess.JIM.jim_config import *
# пока выгружает всю историю - добавить выгрузку по дням/ часам
| [
6738,
44161,
282,
26599,
13,
579,
1330,
6246,
10297,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
11,
393,
62,
198,
198,
6738,
10740,
36479,
13,
16366,
62,
10677,
13,
16366,
62,
27530,
1330,
1635,
198,
6738,
10740,
36479,
13,
... | 1.92 | 125 |
import datetime
from typing import List
from typing import NamedTuple
from typing import Optional
| [
11748,
4818,
8079,
198,
6738,
19720,
1330,
7343,
198,
6738,
19720,
1330,
34441,
51,
29291,
198,
6738,
19720,
1330,
32233,
628
] | 4.714286 | 21 |
## Code to generate hex tile probability
## \date: 21-10-2017
## \author: Aritra Sarkar (prince-ph0en1x)
'''
Version Plan:
* Denote obstacles as place cell of type 0
* Seperate matrix representing annotations for place cells (objects of interest in specific context)
> Episodic memory where overlaps in place cells o... | [
2235,
6127,
284,
7716,
17910,
17763,
12867,
198,
198,
2235,
3467,
4475,
25,
2310,
12,
940,
12,
5539,
198,
2235,
3467,
9800,
25,
317,
799,
430,
36518,
283,
357,
1050,
924,
12,
746,
15,
268,
16,
87,
8,
198,
198,
7061,
6,
198,
198,
... | 5.362584 | 1,037 |
#
# @lc app=leetcode.cn id=127 lang=python3
#
# [127] 单词接龙
#
# https://leetcode-cn.com/problems/word-ladder/description/
#
# algorithms
# Medium (45.45%)
# Likes: 655
# Dislikes: 0
# Total Accepted: 89.4K
# Total Submissions: 196.7K
# Testcase Example: '"hit"\n"cog"\n["hot","dot","dog","lot","log","cog"]'
#
# 给定... | [
2,
198,
2,
2488,
44601,
598,
28,
293,
316,
8189,
13,
31522,
4686,
28,
16799,
42392,
28,
29412,
18,
198,
2,
198,
2,
685,
16799,
60,
10263,
235,
243,
46237,
235,
162,
236,
98,
11737,
247,
198,
2,
198,
2,
3740,
1378,
293,
316,
8189... | 1.532635 | 3,248 |
"""
Copyright (C) 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://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | [
37811,
198,
15069,
357,
34,
8,
2864,
12,
42334,
8180,
10501,
628,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
9... | 3.668653 | 839 |
#!/usr/bin/env python3
from pydriller import RepositoryMining
from datetime import datetime
import json
if __name__ == "__main__":
save_commits_to_file()
##[GDPR] Ability to remove a customer, author Marcin Gębala, date 2018-06-06 11:42:32+02:00
##https://github.com/freeCodeCamp/freeCodeCamp
##https://gith... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
279,
5173,
81,
4665,
1330,
1432,
13264,
44,
3191,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
33918,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
... | 2.660465 | 215 |
n1 = float(input('Digite a nota 01: '))
n2 = float(input('Digite a nota 02: '))
media = (n1+n2)/2
print(20 * '{}=--{}'.format('\033[35m', '\033[m'))
print('A média do aluno foi: {:.1f}'.format(media)) | [
77,
16,
796,
12178,
7,
15414,
10786,
19511,
578,
257,
407,
64,
5534,
25,
705,
4008,
198,
77,
17,
796,
12178,
7,
15414,
10786,
19511,
578,
257,
407,
64,
7816,
25,
705,
4008,
198,
11431,
796,
357,
77,
16,
10,
77,
17,
20679,
17,
19... | 2.083333 | 96 |
from actstream.actions import follow, unfollow
from actstream.signals import action as action_signal
from rest_framework import mixins, status, viewsets
from rest_framework.decorators import action
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.response import Response
from .model... | [
6738,
719,
5532,
13,
4658,
1330,
1061,
11,
3684,
950,
198,
6738,
719,
5532,
13,
12683,
874,
1330,
2223,
355,
2223,
62,
12683,
282,
198,
6738,
1334,
62,
30604,
1330,
5022,
1040,
11,
3722,
11,
5009,
1039,
198,
6738,
1334,
62,
30604,
1... | 4.213592 | 103 |
import json
from django.http import HttpResponse, JsonResponse
from django.shortcuts import render
from .models import FoodType, Goods
from django_redis import get_redis_connection
# Create your views here.
| [
11748,
33918,
198,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
11,
449,
1559,
31077,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
764,
27530,
1330,
7318,
6030,
11,
38360,
198,
6738,
42625,
14208,
62,
... | 3.62069 | 58 |
import hydra
from imitation.run.run_rl import main as run_rl_main
from imitation.run.run_irl import main as run_irl_main
@hydra.main(config_path="configs/", config_name="config.yaml")
if __name__ == "__main__":
main()
| [
11748,
25039,
198,
198,
6738,
40260,
13,
5143,
13,
5143,
62,
45895,
1330,
1388,
355,
1057,
62,
45895,
62,
12417,
198,
6738,
40260,
13,
5143,
13,
5143,
62,
1901,
1330,
1388,
355,
1057,
62,
1901,
62,
12417,
628,
198,
31,
15511,
430,
1... | 2.802469 | 81 |
#!/usr/bin/python3
import copy
import math
import random
from Helper import *
import functools
'''
Population is the object used to store all of the
data. It also tracks how many pos/negative vals there
are after parsing the file.
'''
class Population(object):
'''
create the attribute map dynamically from t... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
4866,
198,
11748,
10688,
198,
11748,
4738,
198,
6738,
5053,
525,
1330,
1635,
198,
11748,
1257,
310,
10141,
628,
198,
7061,
6,
198,
45251,
318,
262,
2134,
973,
284,
3650,
477,
286,
... | 3.619159 | 428 |
from engine.ecs.system import System
from engine.ecs.components.render import Render as CRender
from ..._settings.render import Setting
import layer
from ...core.application import app as Application
__all__ = ["Render"]
| [
6738,
3113,
13,
721,
82,
13,
10057,
1330,
4482,
198,
6738,
3113,
13,
721,
82,
13,
5589,
3906,
13,
13287,
1330,
46722,
355,
8740,
2194,
198,
6738,
2644,
62,
33692,
13,
13287,
1330,
25700,
198,
11748,
7679,
198,
6738,
2644,
7295,
13,
... | 3.894737 | 57 |
import pylons.wsgiapp
from ddtrace import Pin
from ddtrace import config
from ddtrace import tracer
from ddtrace.vendor import wrapt
from ...utils.formats import asbool
from ...utils.formats import get_env
from ...utils.wrappers import unwrap as _u
from .middleware import PylonsTraceMiddleware
config._add(
"pyl... | [
11748,
279,
2645,
684,
13,
18504,
70,
544,
381,
198,
198,
6738,
49427,
40546,
1330,
13727,
198,
6738,
49427,
40546,
1330,
4566,
198,
6738,
49427,
40546,
1330,
491,
11736,
198,
6738,
49427,
40546,
13,
85,
18738,
1330,
7917,
457,
198,
198... | 2.516216 | 370 |
from .series import Series
from .frame import DataFrame
| [
6738,
764,
25076,
1330,
7171,
198,
6738,
764,
14535,
1330,
6060,
19778,
198
] | 4.307692 | 13 |
msg = "Hello"
print(msg)
| [
19662,
796,
366,
15496,
1,
198,
4798,
7,
19662,
8,
198
] | 2.272727 | 11 |
from datetime import date, time, datetime
from django.db import models
from django.db.models import query
from libs.cache import rds
from common.keys import MODEL_K
def get(self, *args, **kwargs):
"""
Performs the query and returns a single object matching the given
keyword arguments.
"""
cls_na... | [
6738,
4818,
8079,
1330,
3128,
11,
640,
11,
4818,
8079,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
12405,
198,
198,
6738,
9195,
82,
13,
23870,
1330,
374,
9310,
198,
6738,
221... | 1.898067 | 1,138 |
_author__ = 'anson'
import socket
import time
from utils.utils_cmd import execute_sys_cmd
from utils.utils_sys_config import utils_sys_config
# output to nagios
split_token = ':'
# nagios state number > Perspective state
nagios_to_event_state = {
0: 'normal',
1: 'abnormal',
2: 'failure',
3: 'abnormal'... | [
62,
9800,
834,
796,
705,
23103,
6,
198,
11748,
17802,
198,
11748,
640,
198,
6738,
3384,
4487,
13,
26791,
62,
28758,
1330,
12260,
62,
17597,
62,
28758,
198,
6738,
3384,
4487,
13,
26791,
62,
17597,
62,
11250,
1330,
3384,
4487,
62,
17597... | 2.265823 | 237 |
# -*- coding: utf-8 -*-
# Copyright (c) 2019, libracore and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, os, json
from frappe.model.document import Document
from frappe.utils.data import add_days, today, add_years
from spo.spo.doctype.mitgliedsch... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
13130,
11,
300,
2889,
330,
382,
290,
20420,
198,
2,
1114,
5964,
1321,
11,
3387,
766,
5964,
13,
14116,
198,
198,
6738,
11593,
37443,
834,
1330,
... | 3.25 | 164 |
'''
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.
Example 1:
Input: nums = [2,7,11,15], targ... | [
7061,
6,
198,
15056,
281,
7177,
286,
37014,
997,
82,
290,
281,
18253,
2496,
11,
1441,
36525,
286,
262,
734,
3146,
884,
326,
484,
751,
510,
284,
2496,
13,
198,
198,
1639,
743,
7048,
326,
1123,
5128,
561,
423,
3446,
530,
4610,
11,
2... | 2.772189 | 338 |
from invoke import task
from server import serve
@task
| [
6738,
26342,
1330,
4876,
198,
6738,
4382,
1330,
4691,
628,
198,
31,
35943,
628
] | 4.142857 | 14 |
# coding: utf-8
from __future__ import absolute_import
import requests
class HttpClientError(requests.exceptions.HTTPError):
"""The 4xx class of http status code.
"""
_http_errors = {}
class HttpBadRequest(HttpClientError):
"""400 Bad Request
"""
_http_errors[400] = HttpBadRequest
class HttpUnauth... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
11748,
7007,
198,
198,
4871,
367,
29281,
11792,
12331,
7,
8897,
3558,
13,
1069,
11755,
13,
40717,
12331,
2599,
198,
220,
220,
220,
37227,
... | 2.957168 | 1,144 |
import requests
import json
url = "https://awm16002.srv.wifi.arista.com/new/webservice/login/modScanWifi/86400"
payload = "{\n\"type\":\"apikeycredentials\",\n\"keyId\":\"KEY-ATN565039-674\",\n\"keyValue\":\"16d7b32456a7700568d359fa452818bd\"\n}"
headers1 = {
'Content-Type': "application/json",
'cache-control... | [
11748,
7007,
198,
11748,
33918,
198,
198,
6371,
796,
366,
5450,
1378,
707,
76,
1433,
21601,
13,
27891,
85,
13,
86,
22238,
13,
283,
12523,
13,
785,
14,
3605,
14,
732,
1443,
712,
501,
14,
38235,
14,
4666,
33351,
54,
22238,
14,
39570,
... | 2.375 | 864 |
import numpy
import csv
import datetime
from pprint import pprint
from pylab import *
intervals = []
samples = []
markers = []
last_trigger = None
with open("yorkshire-pig-trial1.log") as f:
reader = csv.reader(f, delimiter=' ')
reader.next()
for row in reader:
if row:
time = datetime.datetime.strptime(row[0... | [
11748,
299,
32152,
198,
11748,
269,
21370,
198,
11748,
4818,
8079,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
198,
6738,
279,
2645,
397,
1330,
1635,
198,
198,
3849,
12786,
796,
17635,
198,
82,
12629,
796,
17635,
198,
4102,
364,
796,
... | 2.451467 | 443 |
apiAttachAvailable = u'API dispon\xedvel'
apiAttachNotAvailable = u'N\xe3o dispon\xedvel'
apiAttachPendingAuthorization = u'Autoriza\xe7\xe3o pendente'
apiAttachRefused = u'Recusado'
apiAttachSuccess = u'Sucesso'
apiAttachUnknown = u'Desconhecido'
budDeletedFriend = u'Exclu\xeddo da lista de amigos'
budFriend = ... | [
15042,
33296,
10493,
796,
334,
6,
17614,
4596,
261,
59,
87,
276,
626,
6,
201,
198,
15042,
33296,
3673,
10493,
796,
334,
6,
45,
59,
27705,
18,
78,
4596,
261,
59,
87,
276,
626,
6,
201,
198,
15042,
33296,
47,
1571,
13838,
1634,
796,
... | 2.319182 | 3,227 |
import flask
from db import session
from views import home
from api import order_api
from pathlib import Path
app = flask.Flask(__name__)
if __name__ == '__main__':
configure()
app.run()
else:
configure()
| [
11748,
42903,
198,
198,
6738,
20613,
1330,
6246,
198,
6738,
5009,
1330,
1363,
198,
6738,
40391,
1330,
1502,
62,
15042,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
1324,
796,
42903,
13,
7414,
2093,
7,
834,
3672,
834,
8,
628,
628,
198... | 2.909091 | 77 |
'''
Emma is playing a new mobile game that starts with consecutively numbered clouds. Some of the clouds are thunderheads and others are cumulus. She can jump on any cumulus cloud having a number that is equal to the number of the current cloud plus or . She must avoid the thunderheads. Determine the minimum number of... | [
7061,
6,
198,
10161,
2611,
318,
2712,
257,
649,
5175,
983,
326,
4940,
351,
12358,
2280,
25840,
15114,
13,
2773,
286,
262,
15114,
389,
18355,
16600,
290,
1854,
389,
10973,
23515,
13,
1375,
460,
4391,
319,
597,
10973,
23515,
6279,
1719,
... | 3.557114 | 499 |
from dataclasses import dataclass, fields
from typing import Iterable
from requests import Session
from ..models.comments import Comment
from ..utils.response import verbose_raise_for_status
@dataclass
class CommentController:
"""Wraps a Comment with fields used for interacting directly with Doccano client"""
... | [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
7032,
198,
6738,
19720,
1330,
40806,
540,
198,
198,
6738,
7007,
1330,
23575,
198,
198,
6738,
11485,
27530,
13,
15944,
1330,
18957,
198,
6738,
11485,
26791,
13,
26209,
1330,
15942,
577,
... | 2.73058 | 1,017 |
import typing as t
import aiohttp_jinja2
from aiohttp import web
from aiohttp_admin2.views.aiohttp.views.base import BaseControllerView
from aiohttp_admin2.views.aiohttp.views.many_to_many_tab_view import ManyToManyTabView # noqa
from aiohttp_admin2.controllers.relations import ToManyRelation
from aiohttp_admin2.res... | [
11748,
19720,
355,
256,
198,
198,
11748,
257,
952,
4023,
62,
18594,
6592,
17,
198,
6738,
257,
952,
4023,
1330,
3992,
198,
198,
6738,
257,
952,
4023,
62,
28482,
17,
13,
33571,
13,
64,
952,
4023,
13,
33571,
13,
8692,
1330,
7308,
22130... | 2.730061 | 489 |
import re
str = "python java ruby python"
rs = re.match("python", str)
print(type(rs)) # <class '_sre.SRE_Match'>
print(rs) # <_sre.SRE_Match object; span=(0, 6), match='python'>
print(rs.group()) # python
# 1 单字符匹配
# . 匹配除 \n 之外的任意单个字符
# \d 匹配0到9之间的一个数字,等价于[0-9]
# \D 匹配一个非数字字符等价于[^0-9]
# \s 匹配任意空白字符,如空格,制表符,换行等
... | [
11748,
302,
198,
198,
2536,
796,
366,
29412,
20129,
43506,
21015,
1,
198,
3808,
796,
302,
13,
15699,
7203,
29412,
1600,
965,
8,
198,
4798,
7,
4906,
7,
3808,
4008,
220,
220,
1303,
1279,
4871,
705,
62,
82,
260,
13,
50,
2200,
62,
238... | 1.040919 | 2,786 |
from flask import Blueprint
register_bp = Blueprint('register_bp', __name__,
static_folder='static', template_folder='templates/register')
from frontstage.views.register import activate_account, check_email, confirm_organisation_survey # noqa
from frontstage.views.register import create_acco... | [
6738,
42903,
1330,
39932,
628,
198,
30238,
62,
46583,
796,
39932,
10786,
30238,
62,
46583,
3256,
11593,
3672,
834,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 3.198198 | 111 |
import ply.lex as lex
keywords = {
'if': "IF",
'else': 'ELSE',
'for': 'FOR',
'while': 'WHILE',
'break': 'BREAK',
'continue': 'CONTINUE',
'return': 'RETURN',
'eye': 'EYE',
'zeros': 'ZEROS',
'ones': 'ONES',
'print': 'PRINT'
}
tokens = [
'ADDASSIGN',
... | [
11748,
35960,
13,
2588,
355,
31191,
198,
198,
2539,
10879,
796,
1391,
198,
220,
220,
220,
705,
361,
10354,
366,
5064,
1600,
198,
220,
220,
220,
705,
17772,
10354,
705,
3698,
5188,
3256,
198,
220,
220,
220,
705,
1640,
10354,
705,
13775... | 1.631356 | 944 |
#
# The Python Imaging Library.
# $Id$
#
# IPTC/NAA file handling
#
# history:
# 1995-10-01 fl Created
# 1998-03-09 fl Cleaned up and added to PIL
# 2002-06-18 fl Added getiptcinfo helper
#
# Copyright (c) Secret Labs AB 1997-2002.
# Copyright (c) Fredrik Lundh 1995.
#
# See the README file for information on usa... | [
2,
198,
2,
383,
11361,
48656,
10074,
13,
198,
2,
720,
7390,
3,
198,
2,
198,
2,
6101,
4825,
14,
45,
3838,
2393,
9041,
198,
2,
198,
2,
2106,
25,
198,
2,
8735,
12,
940,
12,
486,
781,
220,
220,
15622,
198,
2,
7795,
12,
3070,
12,... | 2.551847 | 839 |
import numpy as np
from neuron_models.neuron import NeuronModel
class Izhikevich(NeuronModel):
'''...'''
class HodgkinHuxley(NeuronModel):
'''...'''
class FitzHughNagumo(NeuronModel):
'''...'''
class LeakyIntegrateAndFire(NeuronModel):
'''...'''
class IntegrateAndFire(NeuronModel):
'''...''... | [
11748,
299,
32152,
355,
45941,
198,
6738,
43164,
62,
27530,
13,
710,
44372,
1330,
3169,
44372,
17633,
198,
198,
4871,
314,
23548,
522,
49547,
7,
8199,
44372,
17633,
2599,
198,
220,
220,
220,
705,
7061,
986,
7061,
6,
628,
198,
4871,
37... | 2.49711 | 173 |
import unittest
import numpy as np
import generate_data
from sepia.SepiaData import SepiaData
from sepia.SepiaModel import SepiaModel
np.random.seed(42)
| [
11748,
555,
715,
395,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
7716,
62,
7890,
198,
6738,
41767,
544,
13,
19117,
544,
6601,
1330,
8621,
544,
6601,
198,
6738,
41767,
544,
13,
19117,
544,
17633,
1330,
8621,
544,
17633,
198,
... | 3.018868 | 53 |
"""
This package contains various modules that provide a drop-in substitute
for some of the built-in Python modules. These substitutes make better
use of Panda3D's :ref:`Virtual File System <virtual-file-system>` and
:ref:`threading` system.
"""
| [
37811,
198,
1212,
5301,
4909,
2972,
13103,
326,
2148,
257,
4268,
12,
259,
15373,
198,
1640,
617,
286,
262,
3170,
12,
259,
11361,
13103,
13,
220,
2312,
44234,
787,
1365,
198,
1904,
286,
41112,
18,
35,
338,
1058,
5420,
25,
63,
37725,
... | 3.742424 | 66 |
import numpy as np
from .analysis import SpectralAnalysis
| [
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
764,
20930,
1330,
13058,
1373,
32750,
628
] | 3.8125 | 16 |
import heapq
if __name__ == '__main__':
main()
| [
11748,
24575,
80,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.333333 | 24 |
r"""
Gases
=====
"""
from ._n2 import N2
from ._o2 import O2
from ._co2 import CO2
from ._h2 import H2
| [
81,
37811,
198,
38,
1386,
198,
1421,
28,
198,
198,
37811,
198,
6738,
47540,
77,
17,
1330,
399,
17,
198,
6738,
47540,
78,
17,
1330,
440,
17,
198,
6738,
47540,
1073,
17,
1330,
7375,
17,
198,
6738,
47540,
71,
17,
1330,
367,
17,
198
] | 2.363636 | 44 |
#! /usr/bin/env python3
# standard imports:
import datetime
import requests
from dateutil.parser import parse as parsedate
import os, sys
import glob
import re
import argparse
import pandas as pd
import time
import subprocess
import smtplib
# You'll want to run: pip install yagmail pydrive2
import yagmail
from pydriv... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
3210,
17944,
25,
198,
11748,
4818,
8079,
198,
11748,
7007,
198,
6738,
3128,
22602,
13,
48610,
1330,
21136,
355,
44267,
378,
198,
11748,
28686,
11,
25064,
198,
11748,
1509... | 2.552449 | 5,758 |
# -*- coding: utf-8 -*-
# Equalized Focal Loss: https://arxiv.org/abs/2201.02593
# reference: https://github.com/ModelTC/EOD/blob/main/eod/tasks/det/plugins/efl/models/losses/efl.py
# author: 徐文祥(tcmyxc)
import torch
import torch.nn.functional as F
Tensor = torch.Tensor
def equalized_focal_loss(logits: Tensor,
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
28701,
1143,
376,
4374,
22014,
25,
3740,
1378,
283,
87,
452,
13,
2398,
14,
8937,
14,
17,
1264,
13,
36629,
6052,
198,
2,
4941,
25,
3740,
1378,
12567,
13,
785,
14,
... | 1.789357 | 1,353 |
import socket
import netaddr
import collections
from terminaltables import SingleTable
import evillimiter.networking.utils as netutils
from .menu import CommandMenu
from evillimiter.console.io import IO
from evillimiter.console.banner import get_main_banner
from evillimiter.networking.host import Host
from evillimiter... | [
11748,
17802,
198,
11748,
2010,
29851,
198,
11748,
17268,
198,
6738,
5651,
2501,
2977,
1330,
14206,
10962,
198,
198,
11748,
819,
359,
320,
2676,
13,
3262,
16090,
13,
26791,
355,
2010,
26791,
198,
6738,
764,
26272,
1330,
9455,
23381,
198,
... | 3.530769 | 130 |
# pylint: disable=locally-disabled, multiple-statements, unexpected-keyword-arg, no-value-for-parameter, invalid-name, too-many-function-args, unused-import, missing-function-docstring
"""
TBD
"""
import json
from entangle.logging.debug import logging
from entangle.process import process
from entangle.http import requ... | [
2,
279,
2645,
600,
25,
15560,
28,
17946,
453,
12,
47730,
11,
3294,
12,
14269,
3196,
11,
220,
10059,
12,
2539,
4775,
12,
853,
11,
645,
12,
8367,
12,
1640,
12,
17143,
2357,
11,
12515,
12,
3672,
11,
1165,
12,
21834,
12,
8818,
12,
2... | 3.139665 | 179 |
#!/usr/bin/env python
__author__ = "bt3"
''' A class for a linked list that has the nodes in a FIFO order (such as a queue)'''
from node import Node
if __name__ == '__main__':
ll = LinkedListFIFO()
for i in range(1, 5):
ll.addNode(i)
print('The list is:')
ll._printList()
print('The lis... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
834,
9800,
834,
796,
366,
18347,
18,
1,
198,
198,
7061,
6,
317,
1398,
329,
257,
6692,
1351,
326,
468,
262,
13760,
287,
257,
376,
5064,
46,
1502,
357,
10508,
355,
257,
16834,
8... | 2.464567 | 254 |
from random import randint
from time import sleep
print('='*20)
print(' MEGA-SENA ')
print('='*20)
lista = [randint(1, 60), randint(1, 60), randint(1, 60), randint(1, 60), randint(1, 60), randint(1, 60)]
escolha = int(input('Quantos jogos você quer que eu sorteie? '))
print(f' SORTEANDO {escolha} JOGOS ')
f... | [
6738,
4738,
1330,
43720,
600,
198,
6738,
640,
1330,
3993,
198,
4798,
10786,
11639,
9,
1238,
8,
198,
4798,
10786,
220,
220,
220,
220,
337,
33146,
12,
50,
45510,
220,
220,
220,
220,
705,
8,
198,
4798,
10786,
11639,
9,
1238,
8,
198,
... | 2.152709 | 203 |
from django.urls import reverse_lazy
from django.views import generic
from django.contrib.auth import authenticate, login
from django.views.generic.edit import FormView
from django.contrib.auth.mixins import LoginRequiredMixin
from .forms import CourseEnrollForm
from accounts.forms import UserRegistrationForm
from cou... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
62,
75,
12582,
198,
6738,
42625,
14208,
13,
33571,
1330,
14276,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
8323,
5344,
11,
17594,
198,
6738,
42625,
14208,
13,
33571,
13,
... | 2.883041 | 513 |
from queue import queue
from pcb import PCB
import sys
| [
6738,
16834,
1330,
16834,
201,
198,
6738,
279,
21101,
1330,
28700,
201,
198,
11748,
25064,
201,
198
] | 3.411765 | 17 |
# init
a = int(input("Enter a two-digit number a> "))
b = int(input("Enter a two-digit number b> "))
# calc
a_first = a / 10
a_second = a % 10
b_first = b / 10
b_second = b % 10
# output
print("Result = %i%i" % (a_first + b_first, a_second + b_second))
| [
198,
198,
2,
2315,
198,
64,
796,
493,
7,
15414,
7203,
17469,
257,
734,
12,
27003,
1271,
257,
29,
366,
4008,
198,
65,
796,
493,
7,
15414,
7203,
17469,
257,
734,
12,
27003,
1271,
275,
29,
366,
4008,
198,
198,
2,
42302,
198,
64,
62... | 2.398148 | 108 |
from utime import sleep
from npxl import NeoPixel
from colors import *
strip = NeoPixel(4, 8)
strip.fill(BLACK)
while True:
strip[0] = YELLOW
strip.show()
sleep(1.0)
strip.fill(BLACK)
strip.show()
sleep(1.0)
| [
6738,
3384,
524,
1330,
3993,
198,
6738,
299,
8416,
75,
1330,
21227,
40809,
198,
6738,
7577,
1330,
1635,
198,
198,
36311,
796,
21227,
40809,
7,
19,
11,
807,
8,
198,
36311,
13,
20797,
7,
9148,
8120,
8,
198,
198,
4514,
6407,
25,
198,
... | 2.233645 | 107 |
version = "21.7b0"
| [
9641,
796,
366,
2481,
13,
22,
65,
15,
1,
198
] | 1.9 | 10 |
#!/usr/bin/env python
#
# Wrapper script for invoking the jar.
#
# This script is written for use with the Conda package manager and is ported
# from a bash script that does the same thing, adapting the style in
# the peptide-shaker wrapper
# (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-sha... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
27323,
2848,
4226,
329,
39744,
262,
17379,
13,
198,
2,
198,
2,
770,
4226,
318,
3194,
329,
779,
351,
262,
9724,
64,
5301,
4706,
290,
318,
49702,
198,
2,
422,
257,
27334,
... | 2.423898 | 703 |
from .agent_cmd import *
from .agent_baselines import *
from .agent_dqn import *
from .agent_dqn_keras import *
from .agent_dqn_botlzmann import *
from .agent_bbqn import *
from .agent_a2c import *
from .agent_a2c_adverserial import *
from .agent_recurrent import *
| [
6738,
764,
25781,
62,
28758,
1330,
1635,
201,
198,
6738,
764,
25781,
62,
12093,
20655,
1330,
1635,
201,
198,
6738,
764,
25781,
62,
49506,
77,
1330,
1635,
201,
198,
6738,
764,
25781,
62,
49506,
77,
62,
6122,
292,
1330,
1635,
201,
198,
... | 2.644231 | 104 |
import os
import sys
import argparse
import json
from collections import namedtuple
from time import time
import cv2
import numpy as np
import tensorflow
import csv
from PIL import Image, ImageOps
import utils.utils as utils
from detector import MTCNNDetector, RetinaFaceDetector
from sort import Sort
from scene impor... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
1822,
29572,
198,
11748,
33918,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
6738,
640,
1330,
640,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
1... | 2.318356 | 5,742 |
# Using the vrMessageService
# --------------------------------
# The vrMessageService provides callbacks for internal states of VRED. The message
# service can be used to listen for these states on manage your plugins resources,
# save data, clean he scene, etc. etc. pp.
# The vrMessageService is not documented (as o... | [
2,
8554,
262,
410,
81,
12837,
16177,
198,
2,
20368,
198,
198,
2,
383,
410,
81,
12837,
16177,
3769,
869,
10146,
329,
5387,
2585,
286,
6453,
1961,
13,
383,
3275,
198,
2,
2139,
460,
307,
973,
284,
6004,
329,
777,
2585,
319,
6687,
534... | 4.089286 | 224 |
import os
import pytest
from bumpkin import bumpkin as bump
WINDOWS_LINE_ENDING = R'\r\n'
UNIX_LINE_ENDING = R'\n'
@pytest.fixture
@pytest.fixture
######################
# todo/fred: more tests to add
| [
198,
11748,
28686,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
13852,
5116,
1330,
13852,
5116,
355,
13852,
628,
198,
33207,
62,
24027,
62,
10619,
2751,
796,
371,
6,
59,
81,
59,
77,
6,
198,
4944,
10426,
62,
24027,
62,
10619,
2751,
... | 2.546512 | 86 |
from chemprop.args import SklearnPredictArgs
from chemprop.sklearn_predict import predict_sklearn
if __name__ == '__main__':
predict_sklearn(SklearnPredictArgs().parse_args())
| [
6738,
4607,
22930,
13,
22046,
1330,
3661,
35720,
47,
17407,
42035,
198,
6738,
4607,
22930,
13,
8135,
35720,
62,
79,
17407,
1330,
4331,
62,
8135,
35720,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
... | 3.137931 | 58 |
import base64
import inspect
import json
import os
import re
import shlex
import shutil
import stat
import subprocess
import sys
from collections.abc import Mapping
from inspect import cleandoc
from os import getcwd as cwd
from os import readlink, remove
from os.path import (abspath, basename, dirname, expanduser, isab... | [
11748,
2779,
2414,
198,
11748,
10104,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
427,
2588,
198,
11748,
4423,
346,
198,
11748,
1185,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
6738,
17268,
13,
39305,
1330,
337... | 2.395488 | 6,693 |
from slistener import SListener
import twitterDevKeys
import time, tweepy, sys, getopt
## note that these access tokens and keys are for one app, the second set of
## keys will be shown below these
# stream.disconnect()
# sys.exit(1)
if __name__ == '__main__':
main(sys.argv[1:])
| [
6738,
1017,
396,
877,
1330,
311,
33252,
198,
11748,
17044,
13603,
40729,
198,
11748,
640,
11,
4184,
538,
88,
11,
25064,
11,
651,
8738,
198,
198,
2235,
3465,
326,
777,
1895,
16326,
290,
8251,
389,
329,
530,
598,
11,
262,
1218,
900,
2... | 2.678261 | 115 |
import datetime
from regional_poll_interpolator import RegionalPollInterpolator
interpolator = RegionalPollInterpolator()
interpolator.LoadFromCsv('regional_poll_averages.csv')
dates = ['2015-08-19', '2015-08-20', '2015-08-21', '2015-08-22',
'2015-08-23', '2015-08-24']
for date_string in dates:
date = da... | [
11748,
4818,
8079,
198,
198,
6738,
7915,
62,
30393,
62,
3849,
16104,
1352,
1330,
15994,
39176,
9492,
16104,
1352,
198,
198,
3849,
16104,
1352,
796,
15994,
39176,
9492,
16104,
1352,
3419,
198,
3849,
16104,
1352,
13,
8912,
4863,
34,
21370,
... | 2.612903 | 186 |
from marshmallow import fields, post_load
from portals.wwits.apis.rest import BaseSchemaExcludeFields as Schema
from .models import ParmModel, WOReOpenModel
| [
6738,
22397,
42725,
1330,
7032,
11,
1281,
62,
2220,
198,
6738,
42604,
13,
1383,
896,
13,
499,
271,
13,
2118,
1330,
7308,
27054,
2611,
3109,
9152,
15878,
82,
355,
10011,
2611,
198,
6738,
764,
27530,
1330,
47796,
17633,
11,
21881,
68,
1... | 3.533333 | 45 |
import asyncio
import unittest
from azure.storage.blob import BlockBlobService, BlobPermissions
from tests import ACCOUNT_KEY, ACCOUNT_NAME
import logging
logging.basicConfig(format='%(asctime)s %(name)-20s %(levelname)-5s %(message)s', level=logging.INFO)
TEST_CONTAINER_PREFIX = 'tests'
## Remove 'OFF_' comme... | [
11748,
30351,
952,
198,
11748,
555,
715,
395,
198,
6738,
35560,
495,
13,
35350,
13,
2436,
672,
1330,
9726,
3629,
672,
16177,
11,
1086,
672,
5990,
8481,
198,
6738,
5254,
1330,
15859,
28270,
62,
20373,
11,
15859,
28270,
62,
20608,
198,
... | 3.06875 | 160 |
#!/usr/bin/env python
from generator.actions import Actions
import random
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
17301,
13,
4658,
1330,
24439,
198,
11748,
4738,
628
] | 3.8 | 20 |
#
# Author : Manuel Bernal Llinares
# Project : trackhub-creator
# Timestamp : 28-06-2017 9:50
# ---
# © 2017 Manuel Bernal Llinares <mbdebian@gmail.com>
# All rights reserved.
#
"""
This module manages the configuration for the running pipeline
"""
import os
import uuid
import time
import logging
import impor... | [
2,
220,
198,
2,
6434,
220,
220,
220,
1058,
25995,
6206,
282,
18315,
1437,
411,
198,
2,
4935,
220,
220,
1058,
2610,
40140,
12,
45382,
198,
2,
5045,
27823,
1058,
2579,
12,
3312,
12,
5539,
860,
25,
1120,
198,
2,
11420,
198,
2,
10673,... | 2.889133 | 2,273 |
model = Sequential()
model.add(Conv2D(32, 3, 3, border_mode='same', input_shape=input_shape, activation='relu'))
model.add(Conv2D(32, 3, 3, border_mode='same', activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Conv2D(64, 3, 3, border_mode='same', activation='relu'))
model.add(Conv2D(64, 3, 3, bo... | [
19849,
796,
24604,
1843,
3419,
198,
198,
19849,
13,
2860,
7,
3103,
85,
17,
35,
7,
2624,
11,
513,
11,
513,
11,
4865,
62,
14171,
11639,
31642,
3256,
5128,
62,
43358,
28,
15414,
62,
43358,
11,
14916,
11639,
260,
2290,
6,
4008,
198,
1... | 2.312766 | 470 |
import run
import scipy.misc
import matplotlib.pyplot as plt
import numpy as np
import skimage.feature
import skimage.color
import learn
im = scipy.misc.imread("sampleData/images/ADE_val_00000003.jpg")
ima = scipy.misc.imread("sampleData/annotations/ADE_val_00000003.png")
imc = skimage.feature.canny(skimage.color.rgb... | [
198,
11748,
1057,
198,
11748,
629,
541,
88,
13,
44374,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1341,
9060,
13,
30053,
198,
11748,
1341,
9060,
13,
8043,
198,
11748,
... | 2.400576 | 347 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |