content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# Copyright 2020 The MACE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | [
2,
15069,
12131,
383,
337,
11598,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
... | 3.790179 | 224 |
"""
This request calculates the total balances issued by a given account, optionally
excluding amounts held by operational addresses.
`See gateway_balances <https://xrpl.org/gateway_balances.html>`_
"""
from dataclasses import dataclass, field
from typing import List, Optional, Union
from xrpl.models.requests.request... | [
37811,
198,
1212,
2581,
43707,
262,
2472,
25223,
4884,
416,
257,
1813,
1848,
11,
42976,
198,
42218,
6867,
2714,
416,
13919,
9405,
13,
198,
198,
63,
6214,
24308,
62,
6893,
1817,
1279,
5450,
1378,
87,
81,
489,
13,
2398,
14,
10494,
1014,... | 3.220238 | 336 |
import random
class ConstantBackoff(BackoffPolicy):
"""
Backoff policy which always returns the message back to the queue
immediately on failure
"""
class ExponentialBackoff(BackoffPolicy):
"""
Backoff policy which keeps the message hidden from the queue
with an exponential backoff
... | [
11748,
4738,
628,
198,
198,
4871,
20217,
7282,
2364,
7,
7282,
2364,
36727,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5157,
2364,
2450,
543,
1464,
5860,
262,
3275,
736,
284,
262,
16834,
198,
220,
220,
220,
3393,
319,
5287,
... | 3.35 | 120 |
from npipes.utils.iteratorextras import *
from npipes.utils.fp import *
| [
6738,
45941,
18636,
13,
26791,
13,
2676,
265,
382,
742,
8847,
1330,
1635,
198,
6738,
45941,
18636,
13,
26791,
13,
46428,
1330,
1635,
198
] | 3 | 24 |
import datetime
import time
import matplotlib.pyplot as plt
import numpy as np
import pyautogui
import Calvar as var
import Methods as met
open_IQ()
bet_done = False
while True:
screen = pyautogui.screenshot()
seconds = datetime.datetime.now().second
if var.timelower <= seconds < var.timeupper:
... | [
11748,
4818,
8079,
198,
11748,
640,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
2306,
519,
9019,
198,
11748,
2199,
7785,
355,
1401,
198,
11748,
25458,
355,
1138,
6... | 2.318841 | 207 |
# Create by Packetsss
# Personal use is allowed
# Commercial use is prohibited
import math
import random
import numpy as np
import pygame
pygame.font.init()
# fonts need to be initialised before using
# window settings
fullscreen = False
# fullscreen resolution can only be known after initializing the screen
if not... | [
2,
13610,
416,
6400,
316,
824,
82,
198,
2,
15644,
779,
318,
3142,
198,
2,
22724,
779,
318,
12244,
198,
198,
11748,
10688,
198,
11748,
4738,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
6057,
198,
198,
9078,
6057,
13,
10331,
... | 2.375743 | 1,682 |
import os
import sys
if sys.version_info[0] == 2:
_ENCODE = sys.getfilesystemencoding()
logfile_open = open
else:
path_join = os.path.join
str_join = str.join
| [
11748,
28686,
198,
11748,
25064,
198,
198,
361,
25064,
13,
9641,
62,
10951,
58,
15,
60,
6624,
362,
25,
198,
220,
4808,
24181,
16820,
796,
25064,
13,
1136,
16624,
6781,
12685,
7656,
3419,
628,
220,
2604,
7753,
62,
9654,
796,
1280,
198,... | 2.590909 | 66 |
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import scoring_pb2 as scoring__pb2
| [
2,
2980,
515,
416,
262,
308,
49,
5662,
11361,
8435,
17050,
13877,
13,
8410,
5626,
48483,
0,
198,
11748,
1036,
14751,
198,
198,
11748,
9689,
62,
40842,
17,
355,
9689,
834,
40842,
17,
628,
628,
198
] | 3.388889 | 36 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from django import template
from floreal import models as m
register = template.Library()
@register.filter
@register.filter
@register.filter
@register.filter
@register.filter
@register.filter
@register.filter
@register.filter
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
42625,
14208,
1330,
11055,
198,
198,
6738,
781,
39396,
1330,
4981,
355,
285,
628,
198,
30238,
796,
11055,
13,
23377... | 3.042553 | 94 |
from django.http import HttpResponse
from django.http import JsonResponse
from django.shortcuts import render
from django.template import loader
import json
from performance_parameters_form import PerformanceParametersForm
from identify_project_form import IdentifyProjectForm
from peerpace import PeerPace
| [
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
42625,
14208,
13,
4023,
1330,
449,
1559,
31077,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
28243,
1330,
40213,
198,
198,
11748,
339... | 4.219178 | 73 |
from __future__ import print_function
import asapo_producer
import time
import threading
lock = threading.Lock()
producer = asapo_producer.create_producer("google.com:8700",'processed', "beamtime", 'auto', "data_source", "token", 4, 5000)
for i in range(1, 20):
print ("sending ",i)
producer.send_file(i, lo... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
355,
41817,
62,
18230,
2189,
198,
11748,
640,
198,
11748,
4704,
278,
198,
198,
5354,
796,
4704,
278,
13,
25392,
3419,
198,
198,
18230,
2189,
796,
355,
41817,
62,
18230,
2... | 2.551546 | 194 |
#!/usr/bin/env python
#
# Copyrite (c) 2014 SecurityKISS Ltd (http://www.securitykiss.com)
#
# This file is part of rfw
#
# The MIT License (MIT)
#
# Yes, Mr patent attorney, you have nothing to do here. Find a decent job instead.
# Fight intellectual "property".
#
# Permission is hereby granted, free of charge, to ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
6955,
2417,
578,
357,
66,
8,
1946,
4765,
42,
16744,
12052,
357,
4023,
1378,
2503,
13,
12961,
41304,
13,
785,
8,
220,
220,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
374... | 2.904245 | 1,013 |
from .seed_command import SeedCommand # noqa: F401
| [
6738,
764,
28826,
62,
21812,
1330,
23262,
21575,
220,
1303,
645,
20402,
25,
376,
21844,
198
] | 3.25 | 16 |
from __future__ import print_function
import logging
import Pyro4
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("Pyro4").setLevel(logging.DEBUG)
Pyro4.config.COMMTIMEOUT = 5.0
Pyro4.config.POLLTIMEOUT = 5.0 # only used for multiplexing server
Pyro4.Daemon.serveSimple({
TestDiscon... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
201,
198,
11748,
18931,
201,
198,
201,
198,
11748,
44954,
19,
201,
198,
201,
198,
201,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
30531,
8,
201,
198,
6404,
2667,
13... | 2.496552 | 145 |
"""Job focused Context classes for discord.py"""
# MIT License
# Copyright (c) 2020-present WizzyGeek
# 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... | [
37811,
33308,
5670,
30532,
6097,
329,
36446,
13,
9078,
37811,
198,
198,
2,
17168,
13789,
198,
198,
2,
15069,
357,
66,
8,
12131,
12,
25579,
370,
40593,
10082,
988,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
2... | 2.625048 | 2,579 |
import re;
from mWindowsSDK import *;
from .cVirtualAllocation import cVirtualAllocation;
from .fbIsRunningForThreadHandle import fbIsRunningForThreadHandle;
from .fbResumeForThreadHandle import fbResumeForThreadHandle;
from .fbTerminateForThreadHandle import fbTerminateForThreadHandle;
from .fbWaitForTerminationForThr... | [
11748,
302,
26,
198,
6738,
285,
11209,
10305,
42,
1330,
1635,
26,
198,
6738,
764,
66,
37725,
3237,
5040,
1330,
269,
37725,
3237,
5040,
26,
198,
6738,
764,
21855,
3792,
28768,
1890,
16818,
37508,
1330,
277,
65,
3792,
28768,
1890,
16818,
... | 1.901363 | 4,329 |
import os
import png
import numpy as np
import tensorflow as tf
from models.particular_mnist import dense_4_layers
from models.particular_mnist import MODEL_FILE
from mnist import test_batcher as batcher
| [
11748,
28686,
198,
11748,
279,
782,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
4981,
13,
3911,
13174,
62,
10295,
396,
1330,
15715,
62,
19,
62,
75,
6962,
198,
6738,
4981,
13,
3911,
13174,
... | 3.21875 | 64 |
# coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ValueData:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attri... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
302,
198,
11748,
2237,
628,
198,
198,
6738,
289,
84,
707,
68,
291,
75,
2778,
21282,
74,
7295,
13,
26791,
13,
4023,
62,
26791,
1330,
5336,
270,
1096,
62,
1640,
62,
46911,
1634,
628,
... | 1.918485 | 2,429 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 18 12:14:40 2021
@author: maryam sabzevari
"""
import sys
import numpy as np
from numpy import linalg as LA
from sklearn.preprocessing import Normalizer
import random
from sklearn.metrics.pairwise import rbf_kernel
from sklearn.metrics.pairwise imp... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
26223,
1526,
1248,
1105,
25,
1415,
25,
1821,
33448,
198,
198,
31,
9800,
25,
285,
560,
321... | 2.340122 | 491 |
import json
import os
import MySQLdb
from functools import wraps
from datetime import datetime
from flask import request, Response, g
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
IMAGE_ENDPOINT = os.environ['IMAGE_ENDPOINT']
THUMBNAIL_ENDPOINT = os.environ['THUMBNAIL_ENDPOINT']
# dec... | [
11748,
33918,
198,
11748,
28686,
198,
11748,
33476,
9945,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
42903,
1330,
2581,
11,
18261,
11,
308,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,... | 2.788136 | 118 |
import re
import math
import torch
import torchaudio
import numpy as np
import argparse
import librosa
import warnings
import itertools as it
from jiwer import wer
from tqdm import tqdm
import pandas as pd
import os
try:
from flashlight.lib.sequence.criterion import CpuViterbiPath, get_data_ptr_as_bytes
from f... | [
11748,
302,
198,
11748,
10688,
198,
11748,
28034,
198,
11748,
28034,
24051,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1822,
29572,
198,
11748,
9195,
4951,
64,
198,
11748,
14601,
198,
11748,
340,
861,
10141,
355,
340,
198,
6738,
474,... | 2.438026 | 2,493 |
# Crie um programa que leia o nome de uma pessoa e diga se ela tem
# "Silva" no nome#
# Minha resolução
"""nome = str(input('Digite seu nome Completo: '))
nome = nome.title()
teste = 'Silva' in nome
if (teste == True):
print('Achei o nome Silva')
else:
print('Não achei o nome Silva')"""
# Resolução do profess... | [
2,
327,
5034,
23781,
1430,
64,
8358,
443,
544,
267,
299,
462,
390,
334,
2611,
279,
408,
12162,
304,
3100,
64,
384,
1288,
64,
2169,
198,
2,
366,
15086,
6862,
1,
645,
299,
462,
2,
198,
198,
2,
1855,
3099,
581,
349,
84,
16175,
2874... | 2.424084 | 191 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic.base import RedirectView
from wiki.urls import get_pattern as get_wiki_patter... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
... | 2.601329 | 602 |
import numpy as np
from desdeo_tools.scalarization import Scalarizer
from desdeo_tools.solver.ScalarSolver import ScalarMinimizer
from typing import Optional, Callable, Union
class ECMError(Exception):
"""Raised when an error related to the Epsilon Constraint Method is encountered.
"""
class EpsilonConstr... | [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
748,
2934,
78,
62,
31391,
13,
1416,
282,
283,
1634,
1330,
34529,
283,
7509,
198,
6738,
748,
2934,
78,
62,
31391,
13,
82,
14375,
13,
3351,
282,
283,
50,
14375,
1330,
34529,
283,
9452,
32... | 2.483236 | 1,879 |
import unittest
from dday_moon import main, get_dday_sunset_sunrise, get_moon_position
from dday_moon import normandy, ts
sunset_degrees_USNO = -0.8333
sunset_degrees_simplified = -1.1
| [
11748,
555,
715,
395,
198,
6738,
288,
820,
62,
22977,
1330,
1388,
11,
651,
62,
67,
820,
62,
19155,
2617,
62,
19155,
17163,
11,
651,
62,
22977,
62,
9150,
198,
6738,
288,
820,
62,
22977,
1330,
2593,
10757,
11,
40379,
198,
198,
19155,
... | 2.583333 | 72 |
# take in a dummy shipment
# add it to the warehouse
# another file test tower shipment will test taking it to towr
| [
198,
2,
1011,
287,
257,
31548,
28652,
198,
2,
751,
340,
284,
262,
20933,
220,
198,
2,
1194,
2393,
1332,
10580,
28652,
481,
1332,
2263,
340,
284,
6094,
81,
220,
198
] | 3.83871 | 31 |
# util/packages/progress/progress.py - Progress class, displays a simple progress bar
#
# This file is part of the juice open source project
#
# Copyright (c) 2019 - 2021 juice project authors
# Licensed under MIT License
#
# See https://github.com/juice-lang/juice/blob/master/LICENSE for license information
# See http... | [
2,
7736,
14,
43789,
14,
33723,
14,
33723,
13,
9078,
532,
18387,
1398,
11,
11298,
257,
2829,
4371,
2318,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
262,
13135,
1280,
2723,
1628,
198,
2,
198,
2,
15069,
357,
66,
8,
13130,
532,
33448,
... | 3.420765 | 183 |
from abc import ABC, abstractmethod
import pandas as pd
import numpy as np
from sklearn.feature_selection import RFECV
from sklearn.svm import SVC
from sklearn.decomposition import KernelPCA, PCA
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import StratifiedKFold
| [
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
1341,
35720,
13,
30053,
62,
49283,
1330,
20445,
2943,
53,
198,
6738,
1341,
35720,
13,
82,
14761,
13... | 3.45977 | 87 |
#!/usr/bin/env python
import json
import os
import types
import sys
import transform2
import utilities
import time
def print_config(config, configFile):
'''
f = open(configFile, 'w+')
f.write("{\n")
changeList = config["config"]
for change in changeList:
f.write("\t\"" + change.keys()[0] +... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
3858,
198,
11748,
25064,
198,
11748,
6121,
17,
198,
11748,
20081,
198,
11748,
640,
198,
198,
4299,
3601,
62,
11250,
7,
11250,
11,
4566,
... | 2.293742 | 783 |
import unittest
import util
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
11748,
7736,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
628,
198
] | 2.516129 | 31 |
"""
Copyright 2016 Stephen Boyd, Enzo Busseti, Steven Diamond, BlackRock Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... | [
37811,
198,
15269,
1584,
7970,
29897,
11,
2039,
10872,
347,
1046,
316,
72,
11,
8239,
13566,
11,
2619,
19665,
3457,
13,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
74... | 3.143275 | 342 |
from getratings.models.ratings import Ratings
| [
6738,
651,
10366,
654,
13,
27530,
13,
10366,
654,
1330,
36826,
201,
198,
201,
198
] | 3.266667 | 15 |
#!/usr/bin/env python3
# Functions
# Main execution
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
40480,
198,
198,
2,
8774,
9706,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.513514 | 37 |
# -- coding: utf-8
""" Base classes for EIII web crawler defining the Crawling API and
the crawling workflow """
import threading
import uuid
import utils
import urlhelper
import random
import urlparse
import time
import collections
import datetime
import json
import os
from eiii_crawler.crawlerscoping import CrawlP... | [
2,
1377,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
7308,
6097,
329,
412,
10855,
3992,
27784,
1754,
16215,
262,
327,
18771,
7824,
290,
198,
1169,
34499,
30798,
37227,
198,
198,
11748,
4704,
278,
198,
11748,
334,
27112,
198,
11748,
... | 2.583333 | 2,460 |
# Generated by Django 3.2 on 2021-04-11 16:57
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
319,
33448,
12,
3023,
12,
1157,
1467,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.966667 | 30 |
from collections import defaultdict
config = defaultdict(lambda *_: DatasetConfig())
config['tless'] = tless = DatasetConfig()
tless.model_folder = 'models_cad'
tless.test_folder = 'test_primesense'
tless.train_folder = 'train_primesense'
config['hb'] = hb = DatasetConfig()
hb.test_folder = 'test_primesense'
conf... | [
6738,
17268,
1330,
4277,
11600,
628,
198,
198,
11250,
796,
4277,
11600,
7,
50033,
1635,
62,
25,
16092,
292,
316,
16934,
28955,
198,
198,
11250,
17816,
83,
1203,
20520,
796,
256,
1203,
796,
16092,
292,
316,
16934,
3419,
198,
83,
1203,
... | 2.638037 | 163 |
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import math
from fairseq import u... | [
2,
15069,
357,
66,
8,
2177,
12,
25579,
11,
3203,
11,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
5964,
1043,
287,
262,
38559,
24290,
2393,
287,
198,
2,
262,
6808,
8619,
286,
42... | 3.74359 | 117 |
# Copyright 2014 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | [
2,
220,
220,
220,
220,
15069,
1946,
12074,
11,
3457,
13,
198,
2,
198,
2,
220,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
220,
220,
220,
345,
743,
407,
779,
42... | 3.519355 | 310 |
from scrapy import Spider
from scrapy.http import Request
import json
| [
6738,
15881,
88,
1330,
12648,
198,
6738,
15881,
88,
13,
4023,
1330,
19390,
198,
11748,
33918,
628
] | 4.176471 | 17 |
import sounddevice as sd
import numpy as np
import scipy.io.wavfile as wav
import soundfile
#THIS USES SOUNDDEVICE LIBRARY
#CONTRATY TO SPEECH RECOGNITION, WHICH USES pyAudio
###This file here only handles simple recordings on demand###
sd.default.samplerate = 44100
sd.default.channels = 2
def record_for_time(seco... | [
11748,
2128,
25202,
355,
45647,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
952,
13,
45137,
7753,
355,
266,
615,
198,
11748,
2128,
7753,
198,
198,
2,
43559,
1294,
1546,
311,
15919,
7206,
27389,
45651,
49,
13153,
... | 2.803704 | 270 |
"""Implementations of authorization abstract base class rules."""
# pylint: disable=invalid-name
# Method names comply with OSID specification.
# pylint: disable=no-init
# Abstract classes do not define __init__.
# pylint: disable=too-few-public-methods
# Some interfaces are specified as 'markers' and inclu... | [
37811,
3546,
26908,
602,
286,
19601,
12531,
2779,
1398,
3173,
526,
15931,
198,
2,
279,
2645,
600,
25,
15560,
28,
259,
12102,
12,
3672,
198,
2,
220,
220,
220,
220,
11789,
3891,
11997,
351,
7294,
2389,
20855,
13,
198,
2,
279,
2645,
60... | 3.168405 | 671 |
"""Tests for the Types module."""
import datetime
import doctest
import functools
import random
import unittest
from hypothesis import given, example, settings, assume, HealthCheck
from hypothesis.strategies import integers, sampled_from
from cascada.bitvector.core import Constant, Variable
from cascada.bitvector.ssa... | [
37811,
51,
3558,
329,
262,
24897,
8265,
526,
15931,
198,
11748,
4818,
8079,
198,
11748,
10412,
395,
198,
11748,
1257,
310,
10141,
198,
11748,
4738,
198,
11748,
555,
715,
395,
198,
198,
6738,
14078,
1330,
1813,
11,
1672,
11,
6460,
11,
... | 2.549372 | 557 |
'''
IoT Bootcamp
Trainer: Eng. Meqdad A. Darwish
Phase 4 - Part 2: Building Web App for Home Automation
Code Sample: Controlling LED using an HTML page
'''
from flask import Flask, render_template, request
from gpiozero import LED
from time import sleep
app = Flask(__name__)
# Default: GPIO4
led = LED(4)
@app.route... | [
7061,
6,
198,
40,
78,
51,
18892,
16544,
198,
2898,
10613,
25,
1985,
13,
2185,
80,
47984,
317,
13,
7491,
86,
680,
198,
35645,
604,
532,
2142,
362,
25,
11819,
5313,
2034,
329,
5995,
17406,
341,
198,
10669,
27565,
25,
2345,
18886,
1236... | 2.832168 | 143 |
'''
Theorem 3 & Proposition 5
this script is a brute-force verification that the max pooling local Lipschitz
result is true
'''
import numpy as np
import torch
import torch.nn as nn
mode = 'paper' # example in figure from paper
mode = 'small' # small example that can be more densely sampled
# x and y dimensions of i... | [
7061,
6,
198,
464,
29625,
513,
1222,
44056,
642,
198,
198,
5661,
4226,
318,
257,
33908,
12,
3174,
19637,
326,
262,
3509,
5933,
278,
1957,
406,
2419,
354,
4224,
198,
20274,
318,
2081,
198,
7061,
6,
198,
11748,
299,
32152,
355,
45941,
... | 2.219373 | 702 |
from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
# Create your models here.
post_save.connect(receiver=save_profile, sender=User)
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
12683,
874,
1330,
1281,
62,
21928,
628,
198,
2,
13610,
534,
4981,
9... | 3.234375 | 64 |
#Indentation Problems
foo = long_function_name(var_one, var_two,
var_three, var_four)
#should be: Aligned with opening delimiter.
foo = long_function_name(var_one, var_two,
var_three, var_four)
#should be: More indentation included to distinguish this from the rest.
#Operations Problems... | [
2,
5497,
298,
341,
32093,
198,
198,
21943,
796,
890,
62,
8818,
62,
3672,
7,
7785,
62,
505,
11,
1401,
62,
11545,
11,
198,
220,
220,
220,
1401,
62,
15542,
11,
1401,
62,
14337,
8,
198,
198,
2,
21754,
307,
25,
978,
3916,
351,
4756,
... | 2.433846 | 325 |
# **********************************************************************************************************************
#
# brief: simple script to plot the intensity change histogram
#
# author: Lukas Reithmeier
# date: 25.08.2020
#
# **************************************************************************... | [
2,
41906,
17174,
17174,
8412,
2466,
1174,
198,
2,
198,
2,
4506,
25,
220,
220,
220,
2829,
4226,
284,
7110,
262,
12245,
1487,
1554,
21857,
198,
2,
198,
2,
1772,
25,
220,
220,
28102,
292,
797,
342,
49468,
198,
2,
3128,
25,
220,
220,
... | 2.775168 | 596 |
import configparser
from os import path
| [
198,
11748,
4566,
48610,
198,
6738,
28686,
1330,
3108,
628
] | 4.2 | 10 |
import torch
from torch import nn
import numpy as np | [
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
11748,
299,
32152,
355,
45941
] | 3.714286 | 14 |
import functools
| [
11748,
1257,
310,
10141,
198
] | 3.4 | 5 |
s1,s2 = input(">>").split(',')
print (s2.find(s1)) | [
82,
16,
11,
82,
17,
796,
5128,
7203,
4211,
11074,
35312,
7,
3256,
11537,
201,
198,
4798,
357,
82,
17,
13,
19796,
7,
82,
16,
4008
] | 1.961538 | 26 |
import requests
from bs4 import BeautifulSoup, SoupStrainer
with open("vessels.txt") as file:
while url := file.readline():
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
page = requests.get(url, ... | [
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
11,
34011,
1273,
3201,
263,
198,
198,
4480,
1280,
7203,
1158,
14002,
13,
14116,
4943,
355,
2393,
25,
198,
220,
220,
220,
981,
19016,
19039,
2393,
13,
961,
1370,
33529,
198,
... | 2.248609 | 539 |
"""
test_json_mutant.py
Copyright 2006 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af 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 version 2 of the License.
w3af is distributed in the hope... | [
37811,
198,
9288,
62,
17752,
62,
21973,
415,
13,
9078,
198,
198,
15269,
4793,
843,
411,
371,
666,
6679,
198,
198,
1212,
2393,
318,
636,
286,
266,
18,
1878,
11,
2638,
1378,
86,
18,
1878,
13,
2398,
14,
764,
198,
198,
86,
18,
1878,
... | 3.321981 | 323 |
# coding=utf-8
# Copyright 2019 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
13130,
383,
309,
22854,
17,
51,
22854,
46665,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
... | 3.075658 | 608 |
import os
from configurations.importer import install
from mypy.version import __version__ # noqa: F401
from mypy_django_plugin import main
| [
11748,
28686,
198,
198,
6738,
25412,
13,
320,
26634,
1330,
2721,
198,
6738,
616,
9078,
13,
9641,
1330,
11593,
9641,
834,
220,
1303,
645,
20402,
25,
376,
21844,
198,
6738,
616,
9078,
62,
28241,
14208,
62,
33803,
1330,
1388,
628
] | 3.575 | 40 |
from django.conf.urls import include, url
from broadcast import views
app_name = 'broadcast'
urlpatterns = [
url(r'^upload/text/$', views.upload_text, name='upload_text'),
url(r'^upload/image/$', views.upload_image, name='upload_image'),
# url(r'^upload/ride/$', views.upload_ride, name='upload_ride'),
... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
2291,
11,
19016,
198,
6738,
7025,
1330,
5009,
198,
198,
1324,
62,
3672,
796,
705,
36654,
2701,
6,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
25850,
1... | 2.458128 | 406 |
from functools import partial
import unittest
from test import test_support
if __name__ == "__main__":
test_main()
| [
6738,
1257,
310,
10141,
1330,
13027,
198,
11748,
555,
715,
395,
198,
198,
6738,
1332,
1330,
1332,
62,
11284,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1332,
62,
12417,
3419,
198
] | 3 | 41 |
# -*- coding: utf-8 -*-
"""Observer mixin class."""
from ._observers import ActionObserver, ActionObserverExceptionData, ActionObserverToken
__all__ = ["ActionObserver", "ActionObserverToken", "ActionObserverExceptionData"]
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
31310,
18497,
5022,
259,
1398,
526,
15931,
198,
198,
6738,
47540,
672,
2655,
690,
1330,
7561,
31310,
18497,
11,
7561,
31310,
18497,
16922,
6601,
11,
7561,
31310,
18... | 3.275362 | 69 |
import pytest
import numpy as np
import torch
import torch.nn as nn
from collections import OrderedDict
from torchmeta.modules import MetaSequential, MetaModule, MetaLinear
| [
11748,
12972,
9288,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
6738,
28034,
28961,
13,
18170,
1330,
30277,
44015,
1843,
... | 3.612245 | 49 |
#!/usr/bin/python
# 0.0
# export .dsp from .chd/.cbd (Star Fox Assault)
from sys import argv
from struct import unpack, pack
from io import open
infile_data = open(argv[2], "rb")
infile = open(argv[1], "rb")
infile.seek(0, 2) # end
infile_size = infile.tell()
infile.seek(0)
infile_data.seek(0, 2) # end
infile_d... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
2,
657,
13,
15,
198,
2,
10784,
764,
67,
2777,
422,
764,
354,
67,
11757,
66,
17457,
357,
8248,
5426,
15590,
8,
198,
198,
6738,
25064,
1330,
1822,
85,
198,
6738,
2878,
1330,
555,
8002,... | 2.327623 | 467 |
import multiprocessing
capture_output = True
loglevel = "info"
accesslog = "/var/log/gunicorn.access.log"
errorlog = "/var/log/gunicorn.error.log"
proc_name = "name here"
worker_tmp_dir = "/dev/shm"
bind = "[::]:8000"
workers = multiprocessing.cpu_count() * 2 + 1
| [
11748,
18540,
305,
919,
278,
198,
198,
27144,
495,
62,
22915,
796,
6407,
198,
75,
2467,
626,
796,
366,
10951,
1,
198,
198,
15526,
6404,
796,
12813,
7785,
14,
6404,
14,
7145,
291,
1211,
13,
15526,
13,
6404,
1,
198,
18224,
6404,
796,
... | 2.537736 | 106 |
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='bigquery',
version='0.0.20',
description='Easily send data to Big Query',
long_description=readme,
author='Dacker',
author_email='hello@dacker.co',
url='https://github.com/dacker-te... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
4480,
1280,
10786,
15675,
11682,
13,
81,
301,
11537,
355,
277,
25,
198,
220,
220,
220,
1100,
1326,
796,
277,
13,
961,
3419,
198,
198,
40406,
7,
198,
220,
220,
220,
... | 2.268421 | 380 |
# Authors:
# Trevor Perrin
# Moxie Marlinspike
#
# See the LICENSE file for legal information regarding use of this file.
from tack.crypto.openssl.OpenSSL_ECPublicKey import OpenSSL_ECPublicKey
from tack.crypto.openssl.OpenSSL_ECPrivateKey import OpenSSL_ECPrivateKey
from tack.crypto.openssl.OpenSSL import openss... | [
2,
46665,
25,
220,
198,
2,
220,
220,
25389,
2448,
12769,
198,
2,
220,
220,
337,
1140,
494,
38134,
79,
522,
198,
2,
198,
2,
4091,
262,
38559,
24290,
2393,
329,
2742,
1321,
5115,
779,
286,
428,
2393,
13,
198,
198,
6738,
6331,
13,
... | 3.112903 | 124 |
# Copyright (c) 2018-2020, Vanessa Sochat All rights reserved.
# See the LICENSE in the main repository at:
# https://www.github.com/openbases/openbases-python
def get_client(quiet=False, debug=False):
'''return the helper function client for OpenBases.
This is a client that spans the different modules (... | [
2,
15069,
357,
66,
8,
2864,
12,
42334,
11,
42100,
1406,
17006,
1439,
2489,
10395,
13,
198,
2,
4091,
262,
38559,
24290,
287,
262,
1388,
16099,
379,
25,
198,
2,
220,
220,
220,
3740,
1378,
2503,
13,
12567,
13,
785,
14,
9654,
65,
1386... | 2.983051 | 354 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-03-04 22:40
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
319,
2864,
12,
3070,
12,
3023,
2534,
25,
1821,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738... | 2.8 | 55 |
#!/usr/bin/python3
from brownie import Token, accounts
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
6738,
7586,
494,
1330,
29130,
11,
5504,
628,
628
] | 3.105263 | 19 |
import sys
import logging
import brb_commands
try:
import brb_custom_commands
except:
pass
if __name__ == '__main__':
try:
token_file = open('token.txt', 'r')
except:
logging.error('token.txt 파일을 열 수 없습니다.')
sys.exit()
token = token_file.readline().rstrip()
token_file.... | [
11748,
25064,
198,
11748,
18931,
198,
198,
11748,
865,
65,
62,
9503,
1746,
198,
28311,
25,
198,
220,
220,
220,
1330,
865,
65,
62,
23144,
62,
9503,
1746,
198,
16341,
25,
198,
220,
220,
220,
1208,
198,
198,
361,
11593,
3672,
834,
6624... | 1.952191 | 251 |
import subprocess
import os
import sys
sys.path.append('/CPR/app')
from concolic import generate_ktest, run_concolic_execution
from synthesis import load_components, load_specification, synthesize, Program, program_to_formula
from utilities import build_program
from pathlib import Path
from typing import List, Dict, Tu... | [
11748,
850,
14681,
198,
11748,
28686,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
14,
34,
4805,
14,
1324,
11537,
198,
6738,
1673,
4160,
1330,
7716,
62,
74,
9288,
11,
1057,
62,
1102,
4033,
291,
62,
18558,
1009,
198,
6738... | 2.636106 | 1,058 |
from kivy.app import App
from kivy.uix.widget import Widget
OxApp().run()
| [
6738,
479,
452,
88,
13,
1324,
1330,
2034,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
42655,
1330,
370,
17484,
628,
628,
198,
198,
38208,
4677,
22446,
5143,
3419,
198
] | 2.548387 | 31 |
from django.core.management.base import BaseCommand
from unifier.apps.core.models import Platform
| [
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
198,
6738,
555,
7483,
13,
18211,
13,
7295,
13,
27530,
1330,
19193,
628
] | 3.96 | 25 |
#!/usr/bin/env python
import sys
from src.bot import Bot
import logging
from src.botfactory import BotFactory
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
25064,
198,
198,
6738,
12351,
13,
13645,
1330,
18579,
198,
198,
11748,
18931,
198,
198,
6738,
12351,
13,
13645,
69,
9548,
1330,
18579,
22810,
628,
198,
361,
11593,
3672,
834,
6624... | 2.886792 | 53 |
from EpiasApi.EndPoint import _EpiasApi
class EpiasApi(_EpiasApi):
""" Transparency API
"""
def Market(self, date, type):
"""Karşılaştırma Rest Servisi
Arguments:
date {string} -- Başlangıç tarih bilgisi. Örn:2016-01-01
type {string} -- Karşılaştırma yapılacak... | [
198,
6738,
4551,
4448,
32,
14415,
13,
12915,
12727,
1330,
4808,
13807,
4448,
32,
14415,
198,
198,
4871,
4551,
4448,
32,
14415,
28264,
13807,
4448,
32,
14415,
2599,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
49165,
7824,
198,
220,
... | 1.848148 | 540 |
message ="Hello World"
n=17
pi=3.1415926535897932
print (type(message))
print (type(n))
print (type(pi))
| [
198,
198,
20500,
796,
1,
15496,
2159,
1,
198,
198,
77,
28,
1558,
198,
198,
14415,
28,
18,
13,
1415,
19707,
22980,
2327,
4531,
3720,
2624,
198,
198,
4798,
357,
4906,
7,
20500,
4008,
198,
4798,
357,
4906,
7,
77,
4008,
198,
4798,
357... | 2.235294 | 51 |
# Original version: https://github.com/bitcoin-core/HWI/blob/3fe369d0379212fae1c72729a179d133b0adc872/hwilib/key.py
# Distributed under the MIT License.
"""
PSBT Classes and Utilities
**************************
"""
import base64
import struct
from io import BytesIO, BufferedReader
from typing import (
Dict,
... | [
2,
13745,
2196,
25,
3740,
1378,
12567,
13,
785,
14,
35395,
12,
7295,
14,
39,
36326,
14,
2436,
672,
14,
18,
5036,
30803,
67,
15,
2718,
5892,
1065,
69,
3609,
16,
66,
47760,
1959,
64,
21738,
67,
16945,
65,
15,
324,
66,
23,
4761,
14... | 2.04659 | 22,065 |
#!/usr/bin/python -tt
# -*- coding: utf-8 -*-
LICENSE = """
Copyright 2009-2014 Michal Sadowski (sq6jnx at hamradio dot pl)
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.o... | [
2,
48443,
14629,
14,
8800,
14,
29412,
532,
926,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
43,
2149,
24290,
796,
37227,
198,
198,
15269,
3717,
12,
4967,
2843,
282,
311,
9797,
4106,
357,
31166,
21,
73,... | 2.439834 | 1,446 |
"""Tests for custom CMS templatetags"""
from urllib.parse import urljoin
import pytest
from wagtail.images.views.serve import generate_signature
from wagtail_factories import ImageFactory
from cms.templatetags.image_version_url import image_version_url
BASE_URL = "http://localhost"
@pytest.mark.parametrize("full_u... | [
37811,
51,
3558,
329,
2183,
40773,
2169,
489,
265,
316,
3775,
37811,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
22179,
198,
198,
11748,
12972,
9288,
198,
6738,
266,
363,
13199,
13,
17566,
13,
33571,
13,
2655,
303,
1330,
7716,
... | 2.676538 | 439 |
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Jun 17 2015)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################
impo... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
220,
198,
198,
29113,
29113,
7804,
21017,
198,
2235,
11361,
2438,
7560,
351,
266,
87,
8479,
32875,
357,
9641,
7653,
1596,
1853,
8,
198,
2235,
2638,
1378,
2503,
13,
49345,
687... | 4.924528 | 159 |
import ast
import logging
from typing import Dict, List
import include_def
import repository
class GlobalUsageVisitor(ast.NodeVisitor):
"""
Visitor that records all global symbol definitions - functions,
classes and variables.
In order to do this, when AST is traversed, as soon as any definition
... | [
11748,
6468,
198,
11748,
18931,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
198,
198,
11748,
2291,
62,
4299,
198,
11748,
16099,
628,
198,
4871,
8060,
28350,
15854,
2072,
7,
459,
13,
19667,
15854,
2072,
2599,
198,
220,
220,
220,
37227,
... | 2.145154 | 2,301 |
import logging
import os
import shutil
import socket
import threading
import time
from time import sleep
from uuid import uuid4
import numpy as np
import pandas as pd
import pytest
import redis
from parquery.write import df_to_parquet
import parqueryd.config
from parqueryd.worker import MoveparquetNode
TEST_REDIS = ... | [
11748,
18931,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
17802,
198,
11748,
4704,
278,
198,
11748,
640,
198,
6738,
640,
1330,
3993,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11... | 2.68543 | 302 |
from ..parameter import Parameter
Cookie = CookieType()
__all__ = ["Cookie"]
| [
6738,
11485,
17143,
2357,
1330,
25139,
2357,
628,
198,
198,
34,
18055,
796,
39606,
6030,
3419,
628,
198,
834,
439,
834,
796,
14631,
34,
18055,
8973,
198
] | 3.037037 | 27 |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
| [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
2603,
29487,
8019,
13,
8071,
2052,
1330,
7122,
541,
325,
628,
628,
198
] | 3.032258 | 31 |
""" The analyze module uses the Flesch-Kincaid readability test to analyze text and
produce a readability score. This score is then converted into a grade-based readability category.
"""
def count_syllables_in_word(word):
"""This function takes a word in the form of a string
and returns the number of syll... | [
198,
37811,
383,
16602,
8265,
3544,
262,
376,
829,
354,
12,
42,
1939,
1698,
1100,
1799,
1332,
284,
16602,
2420,
290,
198,
18230,
344,
257,
1100,
1799,
4776,
13,
770,
4776,
318,
788,
11513,
656,
257,
9559,
12,
3106,
1100,
1799,
6536,
... | 2.401138 | 1,406 |
#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2019 Arkadiusz Netczuk <dev.arnet@gmail.com>
#
# 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... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
13130,
9128,
324,
3754,
89,
3433,
26691,
2724,
1279,
7959,
13,
1501,
316,
31,
14816,
13,
785,
29,
198,
2,
198,
2,
244... | 3.198251 | 686 |
# https://codeforces.com/problemset/problem/208/A
remix = input()
print(" ".join([word for word in remix.split("WUB") if word != ""]))
| [
2,
3740,
1378,
19815,
891,
273,
728,
13,
785,
14,
1676,
22143,
316,
14,
45573,
14,
21315,
14,
32,
198,
2787,
844,
796,
5128,
3419,
198,
4798,
7203,
27071,
22179,
26933,
4775,
329,
1573,
287,
34471,
13,
35312,
7203,
54,
10526,
4943,
... | 2.755102 | 49 |
#!/usr/bin/env python
# -*- coding: us-ascii -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
#
import os
import sys
if __name__ == "__main__":
if sys.version_info < (2, 6, 5):
# Avoid unhelpful errors https://code.djangoproject.com/ticket/18961
raise NotImplementedError('Python version is too... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
514,
12,
292,
979,
72,
532,
9,
12,
198,
2,
43907,
25,
912,
28,
19,
25,
2032,
28,
19,
25,
4215,
8658,
11338,
28,
19,
25,
27004,
8658,
25,
11201,
392,
... | 2.475962 | 208 |
import matplotlib.pyplot
import cv2
import numpy as np
from . import finddaytime
| [
11748,
2603,
29487,
8019,
13,
9078,
29487,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
764,
1330,
1064,
820,
2435,
198
] | 3.115385 | 26 |
# -*- coding: utf-8 -*-
import inspect
from django.core.management import BaseCommand
from elasticsearch import Elasticsearch
from elasticsearch_dsl import DocType
from search import indexes
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
10104,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
1330,
7308,
21575,
198,
6738,
27468,
12947,
1330,
48567,
12947,
198,
6738,
27468,
12947,
62,
67,
6649,
133... | 3.730769 | 52 |
""""
1 Data Structure: Dictionary, Tuple , Set
Assignment
1 create dictionary of user data
2 create list of user data dictionary with min of 10 user data
3 create dictionary which have list values
"""
# []= list
# {}= dictionary
# ()= tuple
dictionary_variable = {"name":"Pallavi"
,"address":"tansidh_samruddhi"
... | [
15931,
15931,
198,
16,
6060,
32522,
25,
28261,
11,
309,
29291,
837,
5345,
198,
198,
8021,
16747,
198,
16,
2251,
22155,
286,
2836,
1366,
198,
17,
2251,
1351,
286,
2836,
1366,
22155,
351,
949,
286,
838,
2836,
1366,
198,
18,
2251,
22155,... | 2.475465 | 591 |
from custom_components.script_engine.decorator.to_state import ToState
import datetime
from custom_components.script_engine.type.script_datetime import ScriptDateTime
# from custom_components.script_engine.decorator.if_state import IfState
class Delay(ToState):
'''
Adds a start delay after home assi... | [
201,
198,
6738,
2183,
62,
5589,
3906,
13,
12048,
62,
18392,
13,
12501,
273,
1352,
13,
1462,
62,
5219,
1330,
1675,
9012,
201,
198,
11748,
4818,
8079,
201,
198,
201,
198,
6738,
2183,
62,
5589,
3906,
13,
12048,
62,
18392,
13,
4906,
13,... | 2.967742 | 124 |
#-------------------------------------------------------------------------------
# Name: AMQP API
# Purpose: Simplify pika usage
#
# Author: kristjan.vilgo
#
# Created: 09.10.2019
# Copyright: (c) kristjan.vilgo 2019
# Licence: <your licence>
#--------------------------------------------------... | [
2,
10097,
24305,
198,
2,
6530,
25,
220,
220,
220,
220,
220,
220,
220,
3001,
48,
47,
7824,
198,
2,
32039,
25,
220,
220,
220,
220,
45157,
1958,
279,
9232,
8748,
198,
2,
198,
2,
6434,
25,
220,
220,
220,
220,
220,
479,
1585,
13881,
... | 2.550395 | 2,024 |
import os.path
import subprocess
import sys
import tempfile
import venv
from whyis.test.temporary_app import TemporaryApp
from whyis.test.temporary_venv import TemporaryVenv
from whyis.test.unit_test_case import UnitTestCase
| [
11748,
28686,
13,
6978,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
11748,
20218,
7753,
198,
11748,
8710,
85,
198,
198,
6738,
1521,
271,
13,
9288,
13,
11498,
5551,
62,
1324,
1330,
46042,
4677,
198,
6738,
1521,
271,
13,
9288,
13,
1... | 3.367647 | 68 |
from .grid import Grid
from .pipe import Pipe
from .player import Player
from . import logging
| [
6738,
764,
25928,
1330,
24846,
198,
6738,
764,
34360,
1330,
36039,
198,
6738,
764,
7829,
1330,
7853,
198,
198,
6738,
764,
1330,
18931,
198
] | 4 | 24 |
path = 'C:\\Users\\akash\\Pictures\\Sign-Language-Digits-Dataset-master\\Dataset\\'
import os
from PIL import Image
for i in range(3):
for filename in os.listdir(path + str(i)):
if filename != "":
image_obj = Image.open(path + str(i) + "\\" + filename).convert('L')
rotated_image = i... | [
6978,
796,
705,
34,
25,
6852,
14490,
6852,
461,
1077,
6852,
21300,
942,
6852,
11712,
12,
32065,
12,
19511,
896,
12,
27354,
292,
316,
12,
9866,
6852,
27354,
292,
316,
6852,
6,
198,
11748,
28686,
198,
6738,
350,
4146,
1330,
7412,
198,
... | 2.213592 | 412 |
"""
2018 (c) piteren
PaSpa - Parameters Space
PaSpa is build from PSDD, it has:
- dim - dimensionality (= number of axes)
- rdim - reduced dimensionality (rdim<=dim - since some axes are simpler(tuples, lists of ints))
each axis of space has:
- type (list - ... | [
37811,
628,
2864,
357,
66,
8,
6028,
14226,
628,
220,
220,
220,
11243,
4561,
64,
532,
40117,
4687,
628,
220,
220,
220,
220,
220,
220,
220,
11243,
4561,
64,
318,
1382,
422,
6599,
16458,
11,
340,
468,
25,
198,
220,
220,
220,
220,
220... | 2.664234 | 274 |
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
"""
Implementation of attachment flags-related commands
"""
import os
from .base import Base
from ..context import bugzilla_instance
from ..bugzilla import BugzillaError
from .. import ui
class Command(Base):
"""Attachment flags operations: add/remove/set"""... | [
2,
43907,
25,
7400,
11338,
28,
19,
4292,
8658,
6482,
10394,
28,
19,
2705,
8658,
11338,
28,
19,
198,
198,
37811,
198,
3546,
32851,
286,
18231,
9701,
12,
5363,
9729,
198,
37811,
198,
198,
11748,
28686,
198,
198,
6738,
764,
8692,
1330,
... | 2.248734 | 1,580 |
# TODO Holidays: https://m3o.com/holidays/overview
| [
2,
16926,
46,
6479,
13842,
25,
3740,
1378,
76,
18,
78,
13,
785,
14,
3937,
13842,
14,
2502,
1177,
198
] | 2.55 | 20 |
#***********************************************************
#Copyright 2018 eBay Inc.
#Use of this source code is governed by a MIT-style
#license that can be found in the LICENSE file or at
#https://opensource.org/licenses/MIT.
#***********************************************************
# -*- coding:utf-8 -*-
import... | [
2,
17174,
8412,
4557,
8162,
198,
2,
15269,
2864,
21698,
3457,
13,
198,
2,
11041,
286,
428,
2723,
2438,
318,
21825,
416,
257,
17168,
12,
7635,
198,
2,
43085,
326,
460,
307,
1043,
287,
262,
38559,
24290,
2393,
393,
379,
198,
2,
5450,
... | 2.36435 | 892 |
from filecmp import cmp
import json
from tokenize import TokenInfo
from behave import *
from nose.tools.trivial import ok_
from plugins.optimalbpm.broker.translation.python.translator import ProcessTokens, core_language
from of.common.cumulative_dict import CumulativeDict
use_step_matcher("re")
import os
script_dir ... | [
6738,
2393,
48991,
1330,
269,
3149,
198,
11748,
33918,
198,
6738,
11241,
1096,
1330,
29130,
12360,
198,
6738,
17438,
1330,
1635,
198,
6738,
9686,
13,
31391,
13,
83,
15104,
498,
1330,
12876,
62,
198,
6738,
20652,
13,
8738,
4402,
65,
4426... | 2.814771 | 853 |
## @defgroup Methods-Power-Fuel_Cell-Sizing Sizing
# Fuel_Cell methods contain the functions for the fuel cell analyses.
# @ingroup Methods-Power-Fuel_Cell
from .initialize_from_power import initialize_from_power
from .initialize_larminie_from_power import initialize_larminie_from_power | [
2235,
2488,
4299,
8094,
25458,
12,
13434,
12,
42663,
62,
28780,
12,
50,
2890,
311,
2890,
198,
2,
25483,
62,
28780,
5050,
3994,
262,
5499,
329,
262,
5252,
2685,
13523,
13,
198,
2,
2488,
278,
3233,
25458,
12,
13434,
12,
42663,
62,
287... | 3.481928 | 83 |
"""
Python3 websocket client for MarianNMT server
"""
import json
import sys
from time import sleep
from websocket import create_connection
from websocket._exceptions import (
WebSocketTimeoutException,
WebSocketPayloadException,
WebSocketConnectionClosedException,
WebSocketAddressException,
)
from ... | [
37811,
198,
37906,
18,
2639,
5459,
5456,
329,
37919,
45,
13752,
4382,
198,
37811,
198,
198,
11748,
33918,
198,
11748,
25064,
198,
198,
6738,
640,
1330,
3993,
198,
198,
6738,
2639,
5459,
1330,
2251,
62,
38659,
198,
6738,
2639,
5459,
1355... | 3.333333 | 120 |