content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import operator
from enum import Enum
from functools import reduce
from typing import *
import numpy as np
from .stage import StageType
from .utils import ALL, NOT_SET
__all__ = [
'BatchAggregationMode',
'BatchAggregator', 'BatchAggregatorDict',
]
class BatchAggregator(object):
"""
Class to aggreg... | [
11748,
10088,
198,
6738,
33829,
1330,
2039,
388,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
6738,
19720,
1330,
1635,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
764,
14247,
1330,
15371,
6030,
198,
6738,
764,
26791,
1330,
... | 2.101618 | 4,822 |
# Ex. 001
print("Olá, Mundo!")
| [
2,
1475,
13,
3571,
16,
198,
198,
4798,
7203,
30098,
6557,
11,
33324,
78,
2474,
8,
198
] | 1.882353 | 17 |
from django.contrib import admin
from symposion_project.proposals.models import TalkProposal, TutorialProposal, LightningProposal
admin.site.register(TalkProposal)
admin.site.register(TutorialProposal)
admin.site.register(LightningProposal)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
5659,
1930,
295,
62,
16302,
13,
1676,
1930,
874,
13,
27530,
1330,
12167,
24331,
40725,
11,
36361,
24331,
40725,
11,
12469,
24331,
40725,
628,
198,
28482,
13,
15654,
13,
302... | 3.43662 | 71 |
from django import forms
| [
6738,
42625,
14208,
1330,
5107,
628,
198
] | 3.857143 | 7 |
#!/usr/bin/env python
from api.messaging.sms.sms_message_request import SMSMessageRequest
__author__ = "Likhit Jain and Yashita P Jain"
__copyright__ = "Copyright 2019, Kaleyra"
__license__ = "MIT"
__version__ = "1.0"
__email__ = "support@kaleyra.com"
__status__ = "Production"
# User will be able to check account us... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
40391,
13,
37348,
3039,
13,
82,
907,
13,
82,
907,
62,
20500,
62,
25927,
1330,
29287,
12837,
18453,
198,
198,
834,
9800,
834,
796,
366,
43,
13848,
270,
449,
391,
290,
575,
... | 3.022305 | 269 |
import ast
import json
import os
import re
import subprocess
import time
from multiprocessing.pool import ThreadPool
from Postgres_connection.connection import get_postgres_connection
from bigdata_logs.logger import getLoggingInstance
log = getLoggingInstance()
hadoop_bin=os.getenv("hadoop_bin_dir")
get_yarn_cmd = ... | [
11748,
6468,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
850,
14681,
198,
11748,
640,
198,
6738,
18540,
305,
919,
278,
13,
7742,
1330,
14122,
27201,
198,
198,
6738,
2947,
34239,
62,
38659,
13,
38659,
1330,
651,
62... | 2.779592 | 245 |
from rest_framework.parsers import DataAndFiles, MultiPartParser
class MultiPartParser(MultiPartParser):
"""
Parser for multipart form data, which may include file data.
Lifted from https://github.com/tomchristie/django-rest-framework/pull/4026/
to work around request.data being empty when multipart/... | [
6738,
1334,
62,
30604,
13,
79,
945,
364,
1330,
6060,
1870,
25876,
11,
15237,
7841,
46677,
628,
198,
4871,
15237,
7841,
46677,
7,
29800,
7841,
46677,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
23042,
263,
329,
18540,
433,
129... | 2.74186 | 430 |
import dill as pickle
from typing import Optional, Union
from sklearn.base import ClassifierMixin, RegressorMixin
from sklearn.metrics import log_loss, accuracy_score, mean_squared_error, r2_score
from rule_surrogate import Config
from rule_surrogate.utils.io_utils import get_path, obj2pkl, assert_file_exists
from ru... | [
11748,
288,
359,
355,
2298,
293,
198,
6738,
19720,
1330,
32233,
11,
4479,
198,
198,
6738,
1341,
35720,
13,
8692,
1330,
5016,
7483,
35608,
259,
11,
3310,
44292,
35608,
259,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
2604,
62,
22462,
... | 2.995633 | 229 |
"""
KeyGenerator uses the RSA keys to encrypt the email
"""
import os
import re
import rsa
import pickle
from base64 import b64encode, b64decode
| [
37811,
198,
9218,
8645,
1352,
3544,
262,
42319,
8251,
284,
34117,
262,
3053,
198,
37811,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
374,
11400,
198,
11748,
2298,
293,
198,
6738,
2779,
2414,
1330,
275,
2414,
268,
8189,
11,
275,
2414... | 3.318182 | 44 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | [
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
198,
2,
257,
4866,
286,
262,
13789,
379,
198,
2,... | 3.361991 | 221 |
#!/usr/bin/env python
from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
from os.path import splitext
from re import findall
from random ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
2003,
13,
20307,
62,
32016,
1330,
2721,
62,
7344,
1386,
198,
17350,
62,
7344,
1386,
3419,
198,
198,
6738,
2956,
297,
571,... | 3.202765 | 217 |
import random
from engine import Scalar
class Module:
''' base class'''
def zero_grad(self):
'''Zero out all the gradients to clear out accumulated gradients from previous loss. (before backprop)'''
class Neuron(Module):
''' A single node of computation '''
def __init__(self, n_in, non_line... | [
11748,
4738,
198,
6738,
3113,
1330,
34529,
283,
628,
198,
4871,
19937,
25,
198,
220,
220,
220,
705,
7061,
2779,
1398,
7061,
6,
198,
220,
220,
220,
825,
6632,
62,
9744,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
705,
706... | 2.627027 | 370 |
import sys
sys.path.append("../")
import random
import training.next_util_functions as func
random_state = 42
random.seed(random_state)
# assert ['not'] == func.extract_queries_from_explanations(text)
# text = "Finally we also handle `backticks as quotes`"
# assert ["backticks as quotes"] == func.extrac... | [
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7203,
40720,
4943,
198,
11748,
4738,
198,
11748,
3047,
13,
19545,
62,
22602,
62,
12543,
2733,
355,
25439,
198,
198,
25120,
62,
5219,
796,
5433,
198,
25120,
13,
28826,
7,
25120,
62,
5219,
... | 2.8 | 170 |
import time
import pytest
from mrq.job import Job
from mrq.queue import Queue
@pytest.mark.parametrize(["queues", "enqueue_on"], [
[["main/", "second/"], ["main/", "main/sub", "main/sub/nested", "second/x"]],
[["prefix/main/"], ["prefix/main/", "prefix/main/sub", "prefix/main/sub/nested"]],
])
@pytest.mark.... | [
11748,
640,
198,
11748,
12972,
9288,
198,
6738,
285,
81,
80,
13,
21858,
1330,
15768,
198,
6738,
285,
81,
80,
13,
36560,
1330,
4670,
518,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7,
14692,
4188,
947,
1600,
366,
... | 2.468983 | 403 |
import sys
num_words = 0
count = {}
for word in sys.stdin:
num_words += 1
count[word] = count.get(word, 0) + 1
for word in count:
print('{} {}', word, count[word])
with open('logfile.csv', 'a') as logger:
logger.write('word_count.py,num_words,{}\n'.format(num_words))
logger.write('word_count.py,num... | [
11748,
25064,
198,
198,
22510,
62,
10879,
796,
657,
198,
9127,
796,
23884,
198,
1640,
1573,
287,
25064,
13,
19282,
259,
25,
198,
220,
220,
220,
997,
62,
10879,
15853,
352,
198,
220,
220,
220,
954,
58,
4775,
60,
796,
954,
13,
1136,
... | 2.455172 | 145 |
from pendulum import Identifier
num_links = 1
sample_rate = 100.0
init_type = 'random'
sensor_noise = True
duration = 10.0
for i in range(20):
identifier = Identifier(num_links, duration, sample_rate, init_type,
sensor_noise, False, False)
identifier.identify()
| [
6738,
44017,
14452,
1330,
11440,
7483,
198,
198,
22510,
62,
28751,
796,
352,
198,
39873,
62,
4873,
796,
1802,
13,
15,
198,
15003,
62,
4906,
796,
705,
25120,
6,
198,
82,
22854,
62,
3919,
786,
796,
6407,
198,
32257,
796,
838,
13,
15,
... | 2.459016 | 122 |
import numpy as np
import os
import pickle
from models.ResNet_cifar import ResNet
from utils.load_cifar import load_train
if __name__ == '__main__':
nnum_classes = 10
batch_size = 128
epochs = 100
train_x, train_y = load_train(nnum_classes)
net = ResNet(True)
train_set_len = t... | [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
28686,
201,
198,
11748,
2298,
293,
201,
198,
6738,
4981,
13,
4965,
7934,
62,
66,
361,
283,
1330,
1874,
7934,
201,
198,
6738,
3384,
4487,
13,
2220,
62,
66,
361,
283,
1330,
3440,
62,
274... | 1.91199 | 784 |
#
# Copyright (c) 2020, NVIDIA 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,
12131,
11,
15127,
23929,
44680,
6234,
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,
... | 1.869353 | 5,534 |
"""bill-versions-enacted
Revision ID: 825d555af49
Revises: 3101ec185bdf
Create Date: 2015-12-08 08:35:52.703472
"""
# revision identifiers, used by Alembic.
revision = '825d555af49'
down_revision = '3101ec185bdf'
from alembic import op
import sqlalchemy as sa
| [
37811,
35546,
12,
47178,
12,
268,
23800,
198,
198,
18009,
1166,
4522,
25,
807,
1495,
67,
31046,
1878,
2920,
198,
18009,
2696,
25,
3261,
486,
721,
21652,
65,
7568,
198,
16447,
7536,
25,
1853,
12,
1065,
12,
2919,
8487,
25,
2327,
25,
4... | 2.557692 | 104 |
import smtplib
from email.mime.text import MIMEText
'''
이거 버리고 django.core.mail 사용하기
from django.core.mail import send_mail
send_mail(
'Subject here',
'Here is the message.',
'from@example.com',
['to@example.com'],
fail_silently=False,
)
[ settings.py 설정값들 ]
EMAIL_BACKEND
EMAIL_FILE_PATH
EMAIL_... | [
11748,
895,
83,
489,
571,
198,
6738,
3053,
13,
76,
524,
13,
5239,
1330,
337,
3955,
2767,
2302,
628,
198,
7061,
6,
198,
35975,
112,
166,
109,
108,
31619,
110,
226,
167,
99,
105,
166,
111,
254,
42625,
14208,
13,
7295,
13,
4529,
2382... | 1.987234 | 235 |
"""
Main configurations of the application, this file needed to be loaded initially.
"""
import configparser
import os
from . import ROOT, CONNECTION_STRING, LOG_SUNDAY, MIN_PRODUCTION, PRODUCTION_START_HOUR
from .log_me import logMessage
if not os.path.exists(ROOT):
os.makedirs(ROOT)
SLACK_WH = None
DISCORD_W... | [
37811,
198,
13383,
25412,
286,
262,
3586,
11,
428,
2393,
2622,
284,
307,
9639,
7317,
13,
198,
198,
37811,
198,
198,
11748,
4566,
48610,
198,
11748,
28686,
198,
198,
6738,
764,
1330,
15107,
2394,
11,
7102,
45,
24565,
62,
18601,
2751,
1... | 2.086908 | 1,795 |
# Generated by Django 3.0.7 on 2020-06-21 15:53
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
22,
319,
12131,
12,
3312,
12,
2481,
1315,
25,
4310,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import numpy as np
import pytest
from snc.agents.hedgehog.asymptotic_workload_cov.\
compute_asymptotic_cov_bernoulli_service_and_arrivals \
import ComputeAsymptoticCovBernoulliServiceAndArrivals
from snc.agents.hedgehog.asymptotic_workload_cov.\
compute_asymptotic_cov_bernoulli_service_poisson_arrivals \
... | [
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
198,
6738,
3013,
66,
13,
49638,
13,
704,
469,
31897,
13,
4107,
76,
457,
6210,
62,
1818,
2220,
62,
66,
709,
13,
59,
198,
220,
220,
220,
24061,
62,
4107,
76,
457,
6210,
62... | 2.515873 | 252 |
from typing import *
with open("i") as f:
data = f.read().splitlines()
print(simplify_data(data)["z"])
| [
6738,
19720,
1330,
1635,
628,
628,
198,
4480,
1280,
7203,
72,
4943,
355,
277,
25,
198,
220,
220,
220,
1366,
796,
277,
13,
961,
22446,
35312,
6615,
3419,
628,
198,
198,
4798,
7,
14323,
489,
1958,
62,
7890,
7,
7890,
8,
14692,
89,
89... | 2.478261 | 46 |
from django.urls import path
from .views import *
app_name = 'home'
urlpatterns = [
path('<slug>', index, name='home'),
]
| [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
33571,
1330,
1635,
198,
1324,
62,
3672,
796,
705,
11195,
6,
220,
198,
6371,
33279,
82,
796,
685,
220,
198,
3108,
10786,
27,
6649,
1018,
29,
3256,
6376,
11,
1438,
11639,
1... | 2.659574 | 47 |
# Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
| [
2,
15069,
376,
1904,
2396,
34,
20420,
198,
2,
49962,
739,
262,
362,
12,
2601,
682,
347,
10305,
13789,
11,
766,
38559,
24290,
329,
3307,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
347,
10305,
12,
17,
12,
2601,
682,
198
... | 3.204545 | 44 |
import asyncio
import time
import trio
import pyinstrument
trio.run(task)
| [
11748,
30351,
952,
198,
11748,
640,
198,
198,
11748,
19886,
198,
198,
11748,
12972,
259,
43872,
628,
628,
628,
198,
83,
27250,
13,
5143,
7,
35943,
8,
198
] | 2.928571 | 28 |
from fnmatch import fnmatch
import warnings
def prepare_command(command, project):
'''
Preprocesses a command by expanding variables like {project}.
For example, used in the test_command option, to specify the path to the
tests directory.
'''
return command.format(python='python', pip='pip', ... | [
6738,
24714,
15699,
1330,
24714,
15699,
198,
11748,
14601,
628,
198,
4299,
8335,
62,
21812,
7,
21812,
11,
1628,
2599,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
3771,
14681,
274,
257,
3141,
416,
11581,
9633,
588,
1391,
16302,
... | 3.29661 | 118 |
# models.py
# Michael Huang (mh999), Jeffrey Tsang (jet253)
# December 3rd, 2016
"""Models module for Breakout
This module contains the model classes for the Breakout game. That is anything that you
interact with on the screen is model: the paddle, the ball, and any of the bricks.
Technically, just because something ... | [
2,
4981,
13,
9078,
198,
2,
3899,
31663,
357,
76,
71,
17032,
828,
19627,
13146,
648,
357,
31173,
28592,
8,
198,
2,
3426,
513,
4372,
11,
1584,
198,
37811,
5841,
1424,
8265,
329,
12243,
448,
198,
198,
1212,
8265,
4909,
262,
2746,
6097,... | 2.525176 | 3,694 |
from wtforms import Form, TextAreaField, validators
| [
6738,
266,
83,
23914,
1330,
5178,
11,
8255,
30547,
15878,
11,
4938,
2024,
628
] | 3.785714 | 14 |
""" super simple tests """
import os
import mail_script
import requests
from jinja2 import Template, Environment, FileSystemLoader
jinja_environment = Environment(autoescape=True,loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
test_filing = {
'date': 'today',
'committees': [
... | [
37811,
2208,
2829,
5254,
37227,
198,
11748,
28686,
198,
198,
11748,
6920,
62,
12048,
198,
198,
11748,
7007,
198,
6738,
474,
259,
6592,
17,
1330,
37350,
11,
9344,
11,
9220,
11964,
17401,
198,
198,
18594,
6592,
62,
38986,
796,
9344,
7,
... | 1.761388 | 1,383 |
# Copyright 2018 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | [
2,
15069,
2864,
19507,
605,
12052,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,... | 2.315763 | 3,984 |
from tkinter import *
from core.helpers.os_helpers import platform_is_windows, platform_is_linux, platform_is_darwin
from core.highlight.highlight_circle import HighlightCircle
from core.highlight.highlight_rectangle import HighlightRectangle
| [
6738,
256,
74,
3849,
1330,
1635,
198,
198,
6738,
4755,
13,
16794,
364,
13,
418,
62,
16794,
364,
1330,
3859,
62,
271,
62,
28457,
11,
3859,
62,
271,
62,
23289,
11,
3859,
62,
271,
62,
27455,
5404,
198,
6738,
4755,
13,
8929,
2971,
13,... | 3.430556 | 72 |
from collections import deque
| [
6738,
17268,
1330,
390,
4188,
198
] | 5 | 6 |
# Owner(s): ["oncall: gpu_enablement"]
import functools
from unittest import TestCase
import torch_tensorrt.fx.observer as ob
from test_observer import execution_verifier, set_observer_callback_rethrow
from torch_tensorrt.fx.passes.lower_basic_pass import fuse_permute_linear
| [
2,
23853,
7,
82,
2599,
14631,
261,
13345,
25,
308,
19944,
62,
21633,
434,
8973,
198,
11748,
1257,
310,
10141,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
11748,
28034,
62,
83,
22854,
17034,
13,
21373,
13,
672,
15388,
355,
... | 3.088889 | 90 |
#!/usr/bin/env python3
""" "Fixes" the output of bcl2fastq to meet our requirements.
Files are renamed, grouped by pool, and shifted out of the demultiplexing directory.
projects_ready.txt is added listing the projects found
projects_pending.txt is deleted if it exists
"""
# I guess we could go back to kee... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
366,
22743,
274,
1,
262,
5072,
286,
275,
565,
17,
7217,
80,
284,
1826,
674,
5359,
13,
198,
220,
220,
220,
13283,
389,
25121,
11,
32824,
416,
5933,
11,
290,
14869,
5... | 2.25751 | 5,526 |
import io
import base64
import requests
from .base import ViDeployedModel
from typing import List
| [
11748,
33245,
198,
11748,
2779,
2414,
198,
11748,
7007,
198,
6738,
764,
8692,
1330,
16049,
49322,
276,
17633,
198,
6738,
19720,
1330,
7343,
628
] | 4.125 | 24 |
#!/usr/bin/python
import re
import os
import sys
from bs4 import BeautifulSoup
if __name__ == '__main__':
try:
labContent = driveContentScrappers()
serializeLabContent(labContent)
except Exception, e:
print 'Exception! ', e
#raise
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
302,
198,
11748,
28686,
198,
11748,
25064,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
197,
28311,
25,... | 2.804598 | 87 |
#!/usr/bin/env python3
import sys
import re
arg_re = re.compile(r'--\S+')
if __name__ == '__main__':
if len(sys.argv) != 2:
sys.exit("Usage: {} tests.sh\n".format(sys.argv[0]))
main(sys.argv[1])
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
25064,
198,
11748,
302,
628,
198,
853,
62,
260,
796,
302,
13,
5589,
576,
7,
81,
6,
438,
59,
50,
10,
11537,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
... | 2.04717 | 106 |
import numpy as np
from optimizer import StochasticOptimizer
class Svrg(StochasticOptimizer):
"""
Stochastic variance-reduced gradient descent with constant stepsize.
Reference:
https://papers.nips.cc/paper/4937-accelerating-stochastic-gradient-descent-using-predictive-variance-reduction.pdf
... | [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
6436,
7509,
1330,
520,
5374,
3477,
27871,
320,
7509,
628,
198,
4871,
311,
37020,
70,
7,
1273,
5374,
3477,
27871,
320,
7509,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
520,
5374,... | 2.875862 | 145 |
# ------------------------------------------------------------------------------------------------ #
# MIT License #
# #
# Copyright (c) 2... | [
2,
16529,
3880,
1303,
198,
2,
17168,
13789,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,... | 2.09802 | 1,010 |
import pandas as pd
import math
import numpy as np
from web_scraping.scraping import *
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
3992,
62,
1416,
2416,
278,
13,
1416,
2416,
278,
1330,
1635,
198
] | 3 | 29 |
"""
main.admin
==========
"""
from django.contrib import admin
from .models import InternetConsumption
admin.site.register(InternetConsumption)
| [
37811,
198,
12417,
13,
28482,
198,
2559,
855,
198,
37811,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
764,
27530,
1330,
4455,
9444,
24098,
628,
198,
28482,
13,
15654,
13,
30238,
7,
28566,
9444,
24098,
8,
... | 3.52381 | 42 |
#!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
15069,
357,
66,
8,
1853,
30446,
15503,
12,
11869,
446,
7712,
5834,
11,
406,
13,
47,
13,
198,
2,
198,
2,
770,
8265,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
1309... | 2.641379 | 1,595 |
"""正規表現モジュール re の使い方
オプション:空行/コメントを付与して正規表現を見やすくする (VERBOSE)
[説明ページ]
https://tech.nkhn37.net/python-re-options/#VERBOSE
"""
import re
text = '私のメールアドレスは、user_01@test.comです。'
ptrn = re.compile(r'''([a-z0-9_.+-]+) #local
@ #delimiter
([a-z0-9][a-z0-9-]*[a-z0-9]*\.)+[a-z]{2,}... | [
37811,
29826,
96,
17358,
237,
26193,
101,
163,
237,
122,
40361,
21091,
24440,
43353,
302,
220,
5641,
45635,
18566,
43095,
198,
20513,
30965,
15661,
1209,
100,
6527,
171,
120,
248,
163,
102,
118,
26193,
234,
171,
120,
237,
24679,
26998,
... | 1.39604 | 303 |
#!/usr/bin/env python3
"""
The mol-mod data importer takes an Excel or Tar file stream, then rearranges
and inserts the data into the database. The script is executed inside a running
container using the import_excel.py wrapper.
"""
import hashlib
import json
import logging
import os
import re
import select
import sys... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
464,
18605,
12,
4666,
1366,
848,
4337,
2753,
281,
24134,
393,
14110,
2393,
4269,
11,
788,
37825,
6231,
198,
392,
42220,
262,
1366,
656,
262,
6831,
13,
383,
4226,
318,
... | 2.329487 | 10,747 |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView, \
ArchiveIndexView, DateDetailView, \
DayArchiveView, MonthArchiveView, \
TodayArchiveView, Wee... | [
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
7343,
7680,
11,
42585,
7680,
11,
13610,
7680,
11,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2... | 1.789474 | 247 |
import urllib3
import subprocess
import requests
import time
import os
import sys
import sqlite3
import platform
#top
try:
input = raw_input
except NameError:
pass
global favtv
global favmve
global tvgenres
global moviegenres
favtv = []
favmve = []
tvgenres = []
moviegenres = []
MYDB = homedir + "myplex.db"
http ... | [
11748,
2956,
297,
571,
18,
198,
11748,
850,
14681,
198,
11748,
7007,
198,
11748,
640,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
44161,
578,
18,
198,
11748,
3859,
198,
2,
4852,
198,
198,
28311,
25,
198,
197,
15414,
796,
8246,
6... | 2.803891 | 1,285 |
from django.shortcuts import render, redirect, reverse
from django.views import View
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.humanize.templatetags.humanize import naturaltime
from django.http import JsonResponse, HttpResponse
from chat.models import Message
from datetime import dat... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
11,
9575,
198,
6738,
42625,
14208,
13,
33571,
1330,
3582,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
19816,
1040,
1330,
23093,
37374,
35608,
259,
198,
6738,
42625,
... | 3.477612 | 134 |
"""
sentry.web.frontend.accounts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import itertools
from django.contrib import messages
from django.contrib.auth import login as lo... | [
37811,
198,
82,
13000,
13,
12384,
13,
8534,
437,
13,
23317,
82,
198,
27156,
15116,
8728,
198,
198,
25,
22163,
4766,
25,
357,
66,
8,
2321,
416,
262,
11352,
563,
4816,
11,
766,
37195,
20673,
329,
517,
3307,
13,
198,
25,
43085,
25,
3... | 3.327314 | 443 |
# -*- Mode: Python; tab-width: 2; indent-tabs-mode:nil; -*-
# vim: set ts=2 et sw=2 tw=80:
#
# Copyright (c) 2013 MathJax Project
#
# 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,
532,
9,
12,
10363,
25,
11361,
26,
7400,
12,
10394,
25,
362,
26,
33793,
12,
8658,
82,
12,
14171,
25,
45991,
26,
532,
9,
12,
198,
2,
43907,
25,
900,
40379,
28,
17,
2123,
1509,
28,
17,
665,
28,
1795,
25,
198,
2,
198,
2,
1506... | 1.777233 | 4,893 |
from pyspark import SparkContext, SparkConf
from pyspark.sql import SparkSession
# set conf
conf = (
SparkConf()
.set("spark.hadoop.fs.s3a.fast.upload", True)
.set("spark.hadoop.fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem")
.set('spark.hadoop.fs.s3a.aws.credentials.provider', 'com.amazonaws.auth.... | [
6738,
279,
893,
20928,
1330,
17732,
21947,
11,
17732,
18546,
198,
6738,
279,
893,
20928,
13,
25410,
1330,
17732,
36044,
198,
198,
2,
900,
1013,
198,
10414,
796,
357,
198,
4561,
668,
18546,
3419,
198,
220,
220,
220,
764,
2617,
7203,
27... | 2.08 | 825 |
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Fix the Flores description."""
from yoyo import step
__depends__ = {"20210503_01_xxxx-add-flores-task"}
fix_desc = """Machine Translatio... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
198,
198,
37811... | 3.401361 | 147 |
import pytest
import sys
import numpy as np
import mbuild
from dropletbuilder.utils.io_tools import get_fn
"""
Unit Tests for Droplet class.
"""
| [
11748,
12972,
9288,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
285,
11249,
198,
198,
6738,
3102,
37069,
38272,
13,
26791,
13,
952,
62,
31391,
1330,
651,
62,
22184,
628,
198,
198,
37811,
198,
26453,
30307,
329,
21... | 3.170213 | 47 |
import xml.etree.cElementTree as ET
import pprint
from collections import defaultdict
import re
'''
The code below is to find out how many types of tags are there and the number of each tag.
'''
if __name__ == "__main__":
test() | [
11748,
35555,
13,
316,
631,
13,
66,
20180,
27660,
355,
12152,
201,
198,
11748,
279,
4798,
201,
198,
6738,
17268,
1330,
4277,
11600,
201,
198,
11748,
302,
201,
198,
201,
198,
7061,
6,
201,
198,
464,
2438,
2174,
318,
284,
1064,
503,
7... | 3.012346 | 81 |
from validation import vworkspace
#import os
with vworkspace() as w:
#os.environ['PROPER_EFFECTS_DEBUG_LEVEL'] = '8'
w.all_functions.display(activate="print_code_proper_effects")
| [
6738,
21201,
1330,
410,
5225,
10223,
198,
2,
11748,
28686,
198,
198,
4480,
410,
5225,
10223,
3419,
355,
266,
25,
198,
220,
220,
220,
1303,
418,
13,
268,
2268,
17816,
4805,
31054,
62,
37267,
2943,
4694,
62,
30531,
62,
2538,
18697,
2052... | 2.647887 | 71 |
frase = 'Curso em Vídeo Python'
print(frase.upper().count('O')) # Antes não tinha nenhum O maiúsculo, mas com a combinação feita, tem!
print(len(frase))
print(frase[0])
print(frase.replace('Python', 'Daniel'))
print(frase) # Não contou o 'Daniel' da linha anterior!
frase = frase.replace('Python', 'Daniel')
... | [
8310,
589,
796,
705,
26628,
568,
795,
569,
8836,
2934,
78,
11361,
6,
201,
198,
4798,
7,
8310,
589,
13,
45828,
22446,
9127,
10786,
46,
6,
4008,
220,
220,
220,
220,
1303,
3738,
274,
299,
28749,
19783,
3099,
299,
16550,
388,
440,
285,
... | 2.337793 | 299 |
'''
* @Author: csy
* @Date: 2019-04-28 13:55:42
* @Last Modified by: csy
* @Last Modified time: 2019-04-28 13:55:42
'''
users = {
'aeinstein': {
'first': 'albert',
'last': 'einstein',
'location': 'princeton',
},
'mcurie': {
'first': 'marie',
'last': 'curie',
... | [
7061,
6,
198,
9,
2488,
13838,
25,
269,
1837,
220,
198,
9,
2488,
10430,
25,
13130,
12,
3023,
12,
2078,
1511,
25,
2816,
25,
3682,
220,
198,
9,
2488,
5956,
40499,
416,
25,
220,
220,
269,
1837,
220,
198,
9,
2488,
5956,
40499,
640,
2... | 2.121673 | 263 |
__all__ = ['aesECB',
'aesCBC',
'aesCFB',
'aesOFB',
'aesCTR',
'padding',
'xor',
'chunk']
from blocks import aesECB
from blocks import aesCBC
from blocks import aesCFB
from blocks import aesOFB
from blocks import aesCTR
from blocks import... | [
834,
439,
834,
796,
37250,
64,
274,
2943,
33,
3256,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
64,
274,
29208,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
64,
274,
22495,
33,
3256,
220... | 2.054348 | 184 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
35937,
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,
198,
2,
5964,
1321... | 2.87376 | 1,109 |
# coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
15069,
357,
66,
8,
1584,
11,
33160,
11,
18650,
290,
14,
273,
663,
29116,
13,
220,
1439,
2489,
10395,
13,
198,
2,
770,
3788,
318,
10668,
12,
36612,
284,
345,
739,
262,
14499,
2448,
33532,
1... | 2.660742 | 1,913 |
#/usr/bin/env python3
if __name__ == "__main__":
print(max(factorize(int(input("Enter a number: ")))))
| [
2,
14,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
3601,
7,
9806,
7,
31412,
1096,
7,
600,
7,
15414,
7203,
17469,
257,
1271,
25,
366,
4008,
22305,
19... | 2.454545 | 44 |
import pytest
from cisa.cisa import get_ics_threats, get_vulnerability_reports
from config.config import get_software_list, config_parser, config_parser_section
| [
11748,
12972,
9288,
198,
6738,
269,
9160,
13,
66,
9160,
1330,
651,
62,
873,
62,
19971,
82,
11,
651,
62,
85,
40920,
62,
48922,
198,
6738,
4566,
13,
11250,
1330,
651,
62,
43776,
62,
4868,
11,
4566,
62,
48610,
11,
4566,
62,
48610,
62... | 3.458333 | 48 |
from django.contrib import admin
from .models import Homework, Done
@admin.register(Homework)
@admin.register(Done)
# Register your models here.
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
8074,
6433,
11,
24429,
198,
198,
31,
28482,
13,
30238,
7,
28718,
6433,
8,
198,
198,
31,
28482,
13,
30238,
7,
45677,
8,
628,
198,
2,
17296,
534,
4981,
994,
... | 3.311111 | 45 |
import argparse
import os
import random
import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
from gym_dataset import GymDataset
from gym_canvas import CanvasEnv
from model import FCN
if __name__ == "__main__":
main()
| [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
4738,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
198,
67... | 3.125 | 88 |
#encoding utf-8
#__author__ = Jonas Duarte, duarte.jsystem@gmail.com
#Python3
__author__ = 'Jonas Duarte'
| [
2,
12685,
7656,
3384,
69,
12,
23,
198,
198,
2,
834,
9800,
834,
796,
40458,
10343,
32074,
11,
7043,
32074,
13,
73,
10057,
31,
14816,
13,
785,
198,
2,
37906,
18,
198,
834,
9800,
834,
796,
705,
18219,
292,
10343,
32074,
6,
628,
628
] | 2.5 | 44 |
"""
Usage:
Create ~/.pypirc with info:
[distutils]
index-servers =
pypi
[pypi]
repository: https://upload.pypi.org/legacy/
username: ...
password: ...
(Not needed anymore) Registering the project: python3 setup.py register
New release: python3 setup.py sdist upload
I had some troub... | [
198,
37811,
198,
28350,
25,
198,
198,
16447,
39763,
79,
4464,
1980,
351,
7508,
25,
628,
220,
220,
220,
685,
17080,
26791,
60,
198,
220,
220,
220,
6376,
12,
2655,
690,
796,
198,
220,
220,
220,
220,
220,
220,
220,
279,
4464,
72,
628... | 2.547684 | 1,101 |
import os
app_config = dict(
development = DevelopmentConfig,
testing = TestingConfig,
production = ProductionConfig
) | [
11748,
28686,
628,
198,
198,
1324,
62,
11250,
796,
8633,
7,
198,
220,
220,
220,
2478,
796,
7712,
16934,
11,
198,
220,
220,
220,
4856,
796,
23983,
16934,
11,
198,
220,
220,
220,
3227,
796,
19174,
16934,
198,
8
] | 3.410256 | 39 |
#!/usr/bin/env python3
"""
wautils
A set of web-based tools for Wild Apricot Integration
o Accepts your Wild Apricot Credentials via Wild Apricot OAuth
o Determines if you are have Wild Apricot admin credentials
o Give you further access only if you have admin credentials
"""
usage_mesg = "... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
198,
86,
2306,
4487,
220,
628,
220,
220,
220,
317,
900,
286,
3992,
12,
3106,
4899,
329,
6183,
2758,
291,
313,
38410,
220,
220,
198,
220,
220,
220,
220,
198,
22... | 2.427368 | 3,442 |
#!/usr/bin/env python3
import time
import unicornhat as uh
import requests
import signal
import buttonshim
import subprocess
# Import the library
import pihole as ph
#from blinkt import set_pixel, set_brightness, show, clear
uh.set_layout(uh.PHAT)
#blinkt.set_clear_on_exit()
import subprocess, platform
Cr,Cg,Cb =... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
640,
198,
11748,
44986,
5183,
355,
21480,
198,
11748,
7007,
198,
11748,
6737,
198,
11748,
12163,
38400,
198,
11748,
850,
14681,
198,
198,
2,
17267,
262,
5888,
198,
11748,... | 1.711416 | 2,987 |
"""
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without l... | [
37811,
201,
198,
15269,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
201,
198,
4303,
36227,
12,
34156,
12,
33234,
7483,
25,
17168,
12,
15,
201,
198,
201,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
... | 3.464088 | 362 |
n1 = int(input('digite um numero: '))
r = n1 % 2
if r == 1:
print('O numero {} é IMPAR!'.format(n1))
else:
print('O numero {} é PAR'.format(n1)) | [
77,
16,
796,
493,
7,
15414,
10786,
12894,
578,
23781,
997,
3529,
25,
705,
4008,
198,
81,
796,
299,
16,
4064,
362,
198,
361,
374,
6624,
352,
25,
198,
220,
220,
220,
3601,
10786,
46,
997,
3529,
23884,
38251,
30023,
1503,
0,
4458,
18... | 2.202899 | 69 |
"""A sample test."""
class TestSample:
"""A sample unit test class."""
def test_setup(self) -> None:
"""Test setup."""
return None
def test_one(self) -> None:
"""Assert something."""
assert True
| [
37811,
32,
6291,
1332,
526,
15931,
628,
198,
4871,
6208,
36674,
25,
198,
220,
220,
220,
37227,
32,
6291,
4326,
1332,
1398,
526,
15931,
628,
220,
220,
220,
825,
1332,
62,
40406,
7,
944,
8,
4613,
6045,
25,
198,
220,
220,
220,
220,
2... | 2.43 | 100 |
import os
import platform
import time
| [
11748,
28686,
198,
11748,
3859,
198,
11748,
640,
628
] | 4.333333 | 9 |
"""
A few utility bobs and bits.
"""
import re
from pathlib import Path, PurePath
from typing import Optional, Tuple, Union
import bs4
import requests
from .progress import ProgressSettings, progress_for, size_from_headers
PathLike = Union[PurePath, str, Tuple[str, ...]]
def to_path(pathlike: PathLike) -> Path:
... | [
37811,
198,
32,
1178,
10361,
275,
8158,
290,
10340,
13,
198,
37811,
198,
198,
11748,
302,
198,
6738,
3108,
8019,
1330,
10644,
11,
17129,
15235,
198,
6738,
19720,
1330,
32233,
11,
309,
29291,
11,
4479,
198,
198,
11748,
275,
82,
19,
198... | 2.544669 | 1,041 |
from .tickers import get_tickers
| [
6738,
764,
83,
21630,
1330,
651,
62,
83,
21630,
198
] | 3.3 | 10 |
msg = "hello"
target = "world"
print("{0} {1} !".format(msg, target)) | [
19662,
796,
366,
31373,
1,
198,
16793,
796,
366,
6894,
1,
198,
4798,
7203,
90,
15,
92,
1391,
16,
92,
5145,
1911,
18982,
7,
19662,
11,
2496,
4008
] | 2.464286 | 28 |
from __future__ import absolute_import, division, print_function
import six
import sys
import mmtbx.model
import iotbx.pdb
import boost_adaptbx.boost.python as bp
from libtbx.utils import null_out
from libtbx import group_args
from cctbx.array_family import flex
from collections import OrderedDict
#
from cctbx.maptbx.b... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
11748,
2237,
198,
11748,
25064,
198,
11748,
8085,
83,
65,
87,
13,
19849,
198,
11748,
1312,
313,
65,
87,
13,
79,
9945,
198,
11748,
5750,
62,
42552,
65... | 2.557344 | 3,479 |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render_to_response
from django.template import RequestContext
from history.models import Teamindex
#from history.models import Seasonindex
from history.models import Seasondata
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
198,
2,
13610,
534,
5009,
994,
13,
198,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
62,
1462,
62,
26209,
198,
6738,
42625,
14208,
13,
28243,
1330,
19390,
21947,
198,
198,... | 4.044776 | 67 |
# -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
2177,
12,
7908,
2320,
43,
317,
1959,
15302,
11,
257,
9368,
1087,
1664,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11... | 1.476582 | 33,778 |
# https://www.hackerrank.com/challenges/count-triplets-1/problem
# This solution works but will time out
#!/bin/python3
import math
import os
import random
import re
import sys
from collections import defaultdict
# Complete the countTriplets function below.
if __name__ == '__main__':
fptr = open(os.environ['OUT... | [
2,
3740,
1378,
2503,
13,
31153,
8056,
962,
13,
785,
14,
36747,
34120,
14,
9127,
12,
28461,
46916,
12,
16,
14,
45573,
198,
2,
770,
4610,
2499,
475,
481,
640,
503,
198,
198,
2,
48443,
8800,
14,
29412,
18,
198,
198,
11748,
10688,
198... | 2.639423 | 208 |
default_app_config = "kitsune.wiki.apps.WikiConfig"
| [
12286,
62,
1324,
62,
11250,
796,
366,
74,
896,
1726,
13,
15466,
13,
18211,
13,
32603,
16934,
1,
198
] | 2.736842 | 19 |
# Generated by Django 2.2.14 on 2021-01-11 23:18
from django.db import migrations, models
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1415,
319,
33448,
12,
486,
12,
1157,
2242,
25,
1507,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
26791,
13,
2435,
11340,
628
] | 2.95122 | 41 |
#! /usr/bin/env python3
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
# SPDX-License-Identifier: MIT
import sys
import os
import json
import yaml
import build_board_info
workflow_file = '.github/workflows/build.yml'
# Get b... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
30628,
55,
12,
8979,
15269,
8206,
25,
1946,
4527,
37906,
1222,
13588,
37906,
20420,
357,
5450,
1378,
12567,
13,
785,
14,
324,
1878,
4872,
14,
21170,
5013,
29412,
14,
34... | 2.663866 | 595 |
#! /usr/bin/env python
from setuptools import setup, find_packages
setup(
name = 'pyspatialite',
version = '0.2',
packages=['pyspatialite'],
description = 'DB-API 2.0 interface for SQLite 3.x with Spatialite',
author = 'Lokkju Brennr',
author_email = 'lokkju@lokkju.com',
license = 'zlib/libp... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
40406,
7,
198,
220,
220,
220,
1438,
796,
705,
79,
893,
8071,
498,
578,
3256,
198,
220,
220,
220,
2196,
796,
705,
15... | 2.330739 | 257 |
"""
Python package which is intended to gather all kinds of MPEG-1 Audio related
meta information from file. Such as duration of MPEGAudio file, average bitrate
for variable bitrate (VBR) MPEGAudio files, etc.
Most of the information about MPEGAudio Headers is from excellent article
`MPEGAudio Audio Frame Header By Ko... | [
37811,
198,
37906,
5301,
543,
318,
5292,
284,
6431,
477,
6982,
286,
41203,
12,
16,
13491,
3519,
198,
28961,
1321,
422,
2393,
13,
8013,
355,
9478,
286,
41203,
21206,
2393,
11,
2811,
1643,
4873,
198,
1640,
7885,
1643,
4873,
357,
53,
114... | 2.133281 | 16,679 |
all = [
' hydrogen',
' helium',
' lithium',
' beryllium',
' boron',
' carbon',
' nitrogen',
' oxygen',
' fluorine',
' neon',
' sodium',
' magnesium',
' aluminum',
' silicon',
' phosphorus',
' sulfur',
' chlorine',
' argon',
' potassium',
' calcium',
' scandium',
' titanium',
... | [
439,
796,
685,
198,
220,
705,
17669,
3256,
198,
220,
705,
43142,
3256,
198,
220,
705,
28444,
3256,
198,
220,
705,
275,
1924,
297,
1505,
3256,
198,
220,
705,
275,
273,
261,
3256,
198,
220,
705,
6588,
3256,
198,
220,
705,
23417,
3256,... | 2.273548 | 775 |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="EEG/GSR Wellness Tracker",
version="0.0.1",
author="Bar Lehmann",
author_email="bar.lehmann@gmail.com",
description="A package to help explore connections between EEG/GSR with self repo... | [
198,
11748,
900,
37623,
10141,
628,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
... | 3.197297 | 370 |
input = [4, 6, 2, 9, 1]
print(selection_sort(input))
# print(input) # [1, 2, 4, 6, 9] 가 되어야 합니다!
| [
15414,
796,
685,
19,
11,
718,
11,
362,
11,
860,
11,
352,
60,
628,
198,
198,
4798,
7,
49283,
62,
30619,
7,
15414,
4008,
198,
2,
3601,
7,
15414,
8,
1303,
685,
16,
11,
362,
11,
604,
11,
718,
11,
860,
60,
220,
166,
108,
222,
316... | 1.578125 | 64 |
carro = Carro("Chevrolet", "Tracker", "Branco")
carro.ligar()
carro.desligar()
carro.exibirInformacoes()
| [
197,
198,
7718,
305,
796,
1879,
305,
7203,
7376,
85,
33087,
1600,
366,
35694,
1600,
366,
33,
2596,
1073,
4943,
198,
7718,
305,
13,
4604,
283,
3419,
198,
7718,
305,
13,
8906,
4604,
283,
3419,
198,
7718,
305,
13,
1069,
571,
343,
818,
... | 2.229167 | 48 |
from pathlib import Path
import sqlite3
from matplotlib import pyplot as plt
from process_meteo_data import setup_db_connection, EXPORTS_FOLDER
connection, cursor = setup_db_connection()
data = cursor.execute(f'SELECT * FROM temperatures LIMIT 100;').fetchall()
_, date, temp = list(zip(*data))
plt.plot(temp)
plt... | [
6738,
3108,
8019,
1330,
10644,
198,
11748,
44161,
578,
18,
198,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
198,
6738,
1429,
62,
4164,
68,
78,
62,
7890,
1330,
9058,
62,
9945,
62,
38659,
11,
25703,
33002,
62,
... | 2.80597 | 134 |
from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *
from xpybuild.targets.java import *
import logging
Javac('${OUTPUT_DIR}/test-source-target/', ['./Simple.java'], []).option('javac.source', '7').option('javac.target', '8')
| [
6738,
2124,
9078,
11249,
13,
26745,
11284,
1330,
1635,
198,
6738,
2124,
9078,
11249,
13,
11249,
11321,
1330,
1635,
198,
6738,
2124,
9078,
11249,
13,
6978,
28709,
1330,
1635,
198,
198,
6738,
2124,
9078,
11249,
13,
83,
853,
1039,
13,
1235... | 2.81 | 100 |
"""Test the gopkg module."""
from ghmonitor.gopkg.translate import get_repo_from_random_urn, translate, GITHUB_REPO_RE
def test_get_repo_urn():
"""Test the function. Be careful though, it requires an Internet access."""
assert 'kubernetes/metrics' == get_repo_from_random_urn('k8s.io/metrics')
assert get_... | [
37811,
14402,
262,
308,
404,
10025,
8265,
526,
15931,
198,
198,
6738,
24997,
41143,
13,
70,
404,
10025,
13,
7645,
17660,
1330,
651,
62,
260,
7501,
62,
6738,
62,
25120,
62,
700,
11,
15772,
11,
402,
10554,
10526,
62,
2200,
16402,
62,
... | 2.685714 | 385 |
import mailer as m
import consoleLogger as cl
import fileLogger as fl
'''
Created by: Richard Payne
Created on: 05/08/17
Desc: Takes string from connection and extracts username, password
and IP address of the attempted login.
'''
| [
11748,
6920,
263,
355,
285,
201,
198,
11748,
8624,
11187,
1362,
355,
537,
201,
198,
11748,
2393,
11187,
1362,
355,
781,
201,
198,
201,
198,
201,
198,
7061,
6,
201,
198,
41972,
416,
25,
6219,
32788,
201,
198,
41972,
319,
25,
8870,
14... | 2.847826 | 92 |
from django.urls import path
from . import views
from .views import (
SearchsProductView
)
app_name = 'shop'
urlpatterns = [
#path('', views.index, name='index'),
path('', views.product_list, name='product_list'),
path('shop/', views.product_list, name='product_list'),
path('addtocartform/', vi... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
1330,
5009,
198,
6738,
764,
33571,
1330,
357,
198,
220,
220,
220,
11140,
82,
15667,
7680,
198,
8,
628,
198,
1324,
62,
3672,
796,
705,
24643,
6,
198,
198,
6371,
33279,
82,... | 2.723982 | 221 |
from planner import *
from othertools import *
import matplotlib.pyplot as plt
if __name__ == "__main__":
main()
| [
6738,
42351,
1330,
1635,
198,
6738,
584,
31391,
1330,
1635,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.926829 | 41 |
#pylint: disable=C0114
from livechat.customer.rtm.client import CustomerRTM
from livechat.customer.web.client import CustomerWeb
| [
2,
79,
2645,
600,
25,
15560,
28,
34,
486,
1415,
198,
6738,
2107,
17006,
13,
23144,
263,
13,
17034,
76,
13,
16366,
1330,
22092,
14181,
44,
198,
6738,
2107,
17006,
13,
23144,
263,
13,
12384,
13,
16366,
1330,
22092,
13908,
198
] | 3.146341 | 41 |
import os
import shutil
from logging import getLogger
from pathlib import Path
from shutil import copyfile
import git
import requests
from ogr.services.pagure import PagureService
logger = getLogger(__name__)
work_dir = Path("/tmp/playground")
readme_path = Path(__file__).parent / "README.md"
service = PagureServic... | [
11748,
28686,
198,
11748,
4423,
346,
198,
6738,
18931,
1330,
651,
11187,
1362,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
4423,
346,
1330,
4866,
7753,
198,
198,
11748,
17606,
198,
11748,
7007,
198,
198,
6738,
267,
2164,
13,
30416,
1... | 2.368564 | 369 |
"""
86. Binary Search Tree Iterator
https://www.lintcode.com/problem/binary-search-tree-iterator/description
the difference between this method and the standard method is:
if one has right subtree, it no longer keep itself in the stack.
so when taken out of the stack, it does not need to make extra step to remove itse... | [
37811,
198,
4521,
13,
45755,
11140,
12200,
40806,
1352,
198,
5450,
1378,
2503,
13,
75,
600,
8189,
13,
785,
14,
45573,
14,
39491,
12,
12947,
12,
21048,
12,
48727,
14,
11213,
198,
198,
1169,
3580,
1022,
428,
2446,
290,
262,
3210,
2446,
... | 3.143836 | 292 |
"""切り替え用 settings ファイル
base.py をベースに上書きする.
"""
from .base import *
DEBUG = False
ALLOWED_HOSTS = ['*']
STATIC_URL = '/apis-service-center/app/static/'
| [
37811,
26344,
229,
28255,
162,
249,
123,
2515,
230,
18796,
101,
6460,
14524,
243,
25362,
11482,
9202,
198,
198,
8692,
13,
9078,
17433,
240,
35604,
6312,
8943,
28618,
41468,
162,
249,
116,
33778,
33623,
25748,
13,
198,
37811,
198,
6738,
... | 1.888889 | 81 |