content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from ..utils import ApiUtil
from ..utils import StringUtil
from ..utils import BlueprintUtil
from ..utils.ApiUtil import Url
from functools import reduce
| [
6738,
11485,
26791,
1330,
5949,
72,
18274,
346,
198,
6738,
11485,
26791,
1330,
10903,
18274,
346,
198,
6738,
11485,
26791,
1330,
39932,
18274,
346,
198,
6738,
11485,
26791,
13,
32,
14415,
18274,
346,
1330,
8799,
75,
198,
6738,
1257,
310,
... | 3.395833 | 48 |
#
# scikit-rf (aka skrf) documentation build configuration file
#
# -- Project information -----------------------------------------------------
project = 'scikit-rf'
copyright = '2021, scikit-rf team'
author = 'scikit-rf team'
# -- General configuration ---------------------------------------------------
import sy... | [
2,
198,
2,
629,
1134,
270,
12,
41871,
357,
8130,
1341,
41871,
8,
10314,
1382,
8398,
2393,
198,
2,
198,
198,
2,
1377,
4935,
1321,
20368,
19351,
12,
198,
198,
16302,
796,
705,
36216,
15813,
12,
41871,
6,
198,
22163,
4766,
796,
705,
... | 3.107143 | 1,988 |
"""Contains all the server values to ensure communication"""
# GAE Project
project_id_us = "[PROJECT_NAME_US]"
project_id_eu = "[PROJECT_NAME_EU]"
cloud_region_us = "us"
cloud_region_eu = "eu"
cloud_regions = {cloud_region_us:"[US_SERVER_ID]", cloud_region_eu:"[EU_SERVER_NAME]"}
#service
service_name_us = "[US_SERVI... | [
37811,
4264,
1299,
477,
262,
4382,
3815,
284,
4155,
6946,
37811,
198,
198,
2,
402,
14242,
4935,
198,
16302,
62,
312,
62,
385,
796,
12878,
31190,
23680,
62,
20608,
62,
2937,
30866,
198,
16302,
62,
312,
62,
12496,
796,
12878,
31190,
236... | 2.615385 | 182 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-06 19:38
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,
13,
20,
319,
2177,
12,
940,
12,
3312,
678,
25,
2548,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
1... | 2.736842 | 57 |
#!/usr/bin/env python3
# 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.
import click
from click_default_group import DefaultGroup
from omegaconf import MISSING
# @click.group(cls=DefaultGro... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
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,... | 2.593359 | 2,078 |
#!/usr/bin/env python
"""Glassdoor Python API"""
__version__ = "0.0.8"
__author__ = [
"Mek <michael.karpeles@gmail.com>"
]
__license__ = "public domain"
__contributors__ = "see AUTHORS"
from glassdoor.gd import get, parse
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
47698,
9424,
11361,
7824,
37811,
198,
198,
834,
9641,
834,
796,
366,
15,
13,
15,
13,
23,
1,
198,
834,
9800,
834,
796,
685,
198,
220,
220,
220,
366,
44,
988,
1279,
76,
... | 2.544444 | 90 |
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# SAMMON Perform Sammon mapping on a dataset, with weighted map axises.
#
# x = sammon(p) applies the Sammon nonlinear mapping algorithm on
# multivariate data p, where each row represents a pattern and each
# column rep... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
554,
58,
2361,
25,
628,
198,
2,
220,
220,
28844,
27857,
220,
35006,
3409,
2144,
16855,
319,
257,
27039,
11,
351,
26356,
3975,
7877,
269... | 2.166426 | 2,079 |
# This script is the model definitioimportn
# Copyright 2020 Masao Someki
# MIT License (https://opensource.org/licenses/MIT)
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from net import ConvRNN
| [
2,
770,
4226,
318,
262,
2746,
2730,
270,
952,
11748,
77,
198,
198,
2,
15069,
12131,
11066,
5488,
2773,
4106,
198,
2,
220,
17168,
13789,
357,
5450,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
36393,
8,
198,
11748,
28034,
198,
117... | 3.243243 | 74 |
from .TaskFactory import TaskFactory
from .AnaplanConnection import AnaplanConnection
from .Action import Action
from .Parser import Parser
from .ActionParser import ActionParser
from .util.Util import TaskParameterError
class ActionTask(TaskFactory):
"""
Factory to generate an Anaplan action task and corresponding... | [
6738,
764,
25714,
22810,
1330,
15941,
22810,
198,
6738,
764,
2025,
64,
11578,
32048,
1330,
17639,
11578,
32048,
198,
6738,
764,
12502,
1330,
7561,
198,
6738,
764,
46677,
1330,
23042,
263,
198,
6738,
764,
12502,
46677,
1330,
7561,
46677,
1... | 3.551985 | 529 |
# Generated by Django 2.1.7 on 2019-03-01 07:19
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
22,
319,
13130,
12,
3070,
12,
486,
8753,
25,
1129,
198,
198,
11748,
42625,
14208,
13,
3642,
822,
13,
7353,
34239,
13,
25747,
13,
17752,
65,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
... | 2.897059 | 68 |
''' draft script for removing bands 11 and 13
these band indices (from 1) refer to the indexing used,
in the output from sentinel2 superresolution utility http://nicolas.brodu.net/recherche/sen2res/
'''
import os
import sys
a = os.system("mkdir new")
files = os.popen("ls -1 *.bin").readlines()
files = [f.strip() fo... | [
7061,
6,
4538,
4226,
329,
10829,
11760,
1367,
290,
1511,
198,
777,
4097,
36525,
357,
6738,
352,
8,
3522,
284,
262,
6376,
278,
973,
11,
198,
287,
262,
5072,
422,
1908,
20538,
17,
2208,
29268,
10361,
2638,
1378,
6988,
12456,
13,
65,
2... | 2.272201 | 518 |
__________________________________________________________________________________________________
sample 20 ms submission
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
___________________________________... | [
27193,
10221,
834,
198,
39873,
1160,
13845,
14498,
198,
2,
30396,
329,
257,
13934,
5509,
10139,
13,
198,
2,
1398,
12200,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2124,
2599,
198,
2,
220,
220,
220,
... | 3.884393 | 173 |
import unittest
import demon as d
import os
import networkx as nx
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
11748,
3222,
355,
288,
198,
11748,
28686,
198,
11748,
3127,
87,
355,
299,
87,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.738095 | 42 |
#!/usr/bin/env python2
from ConfigParser import ConfigParser
import os
import re
import subprocess
import sys
from termcolor import colored
config = ConfigParser()
ANSI_ESCAPE_RE = re.compile(r'\x1b[^m]*m')
RANGE_RE = re.compile(r'(\d+)-(\d+)')
ID_FILE = 'hgnids.txt'
CONFIG_FILE = '.hgnrc'
if __nam... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
198,
6738,
17056,
46677,
1330,
17056,
46677,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
6738,
3381,
8043,
1330,
16396,
628,
198,
11250,
796,
... | 2.447552 | 143 |
import torch
import itertools
import pytest
from data.complex import ComplexBatch
from data.dummy_complexes import get_testing_complex_list
from mp.molec_models import EmbedSparseCIN, OGBEmbedSparseCIN, EmbedSparseCINNoRings, EmbedGIN
from data.data_loading import DataLoader, load_dataset
def test_zinc_sparse_cin0_m... | [
11748,
28034,
198,
11748,
340,
861,
10141,
198,
11748,
12972,
9288,
198,
198,
6738,
1366,
13,
41887,
1330,
19157,
33,
963,
198,
6738,
1366,
13,
67,
13513,
62,
41887,
274,
1330,
651,
62,
33407,
62,
41887,
62,
4868,
198,
6738,
29034,
13... | 2.148584 | 5,189 |
'''
A container class for CSC sparse matrices. Note that sparse matrices can only
hold floats or integers; string and datetime data will need to be cleaned.
Currently, the class accounts for a datetime hours column.
Constructor is called with an exclude_before (int), which tells
the class to move columns before exclud... | [
7061,
6,
198,
32,
9290,
1398,
329,
327,
6173,
29877,
2603,
45977,
13,
5740,
326,
29877,
2603,
45977,
460,
691,
198,
2946,
36016,
393,
37014,
26,
4731,
290,
4818,
8079,
1366,
481,
761,
284,
307,
20750,
13,
198,
21327,
11,
262,
1398,
... | 3.832298 | 161 |
# https://leetcode.com/problems/divide-two-integers/
import unittest
MINIMUM_NUMBER_VALUE = -2**31
MAXIMUM_NUMBER_VALUE = 2**31 - 1
MAXIMUM_POWER_NUMBER = 31
if __name__ == "__main__":
main() | [
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
7146,
485,
12,
11545,
12,
18908,
364,
14,
198,
198,
11748,
555,
715,
395,
198,
198,
23678,
3955,
5883,
62,
41359,
13246,
62,
39488,
796,
532,
17,
1174,
3132,
198,
22921,
... | 2.298851 | 87 |
import sys
from colt import Colt
import numpy as np
from ase.units import Hartree, mol, kJ
#
from .qm_base import WriteABC, ReadABC
from ..elements import ATOM_SYM
| [
11748,
25064,
198,
6738,
951,
83,
1330,
37360,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
257,
325,
13,
41667,
1330,
11345,
631,
11,
18605,
11,
479,
41,
198,
2,
198,
6738,
764,
80,
76,
62,
8692,
1330,
19430,
24694,
11,
4149,
246... | 2.982143 | 56 |
############################################################################
# This Python file is part of PyFEM, the code that accompanies the book: #
# #
# 'Non-Linear Finite Element Analysis of Solids and Structures' #
# R. ... | [
29113,
29113,
7804,
4242,
201,
198,
2,
220,
770,
11361,
2393,
318,
636,
286,
9485,
37,
3620,
11,
262,
2438,
326,
48159,
262,
1492,
25,
220,
1303,
201,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.338735 | 1,296 |
s = """
.a.fy
integer: a=1, b=1, c=1, n=1, m=1
"""
from fython.test import *
writer(s)
w = load('.a', force=1, release=1, verbose=0, run_main=0)
# print(open(w.module.url.fortran_path, 'r').read())
| [
82,
796,
37227,
198,
13,
64,
13,
24928,
198,
197,
41433,
25,
257,
28,
16,
11,
275,
28,
16,
11,
269,
28,
16,
11,
299,
28,
16,
11,
285,
28,
16,
198,
37811,
198,
198,
6738,
277,
7535,
13,
9288,
1330,
1635,
198,
198,
16002,
7,
8... | 2.050505 | 99 |
from src import common
required_parameter_list = ["name", "number"]
| [
6738,
12351,
1330,
2219,
198,
198,
35827,
62,
17143,
2357,
62,
4868,
796,
14631,
3672,
1600,
366,
17618,
8973,
628,
628,
628,
628,
628,
628,
628,
198
] | 3.074074 | 27 |
import pandas as pd
import numpy as np
import lightgbm as lgb
from sklearn.metrics import mean_squared_error
from defaults_2 import default_config
import os | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1657,
70,
20475,
355,
300,
22296,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
1612,
62,
16485,
1144,
62,
18224,
198,
6738,
26235,
62,
17,
1330,
4277,
... | 3.391304 | 46 |
from taskmanager import TaskManager
#from playsound import playsound
t = TaskManager()
# youtube : Passed
"""
t.get_youtube_audio("https://www.youtube.com/watch?v=svT7uKdNphU")
t.play("play")"""
# google/wikipedia api : Passed
query = "do you know who is donald trump"
if 'who' in query:
gr =... | [
6738,
4876,
37153,
1330,
15941,
13511,
201,
198,
201,
198,
2,
6738,
5341,
633,
1330,
5341,
633,
201,
198,
201,
198,
83,
796,
15941,
13511,
3419,
201,
198,
201,
198,
2,
35116,
1058,
23228,
201,
198,
37811,
201,
198,
83,
13,
1136,
62,... | 2.323529 | 510 |
"""Unicycle go-to-pose (Hybrid) Example.
TODO: UPDATE DESCRIPTION
Written by: The Robotarium Team
Modified by: Zahi Kakish (zmk5)
"""
import time
import numpy as np
from robotarium_node.robotarium import Robotarium
from robotarium_node.utilities.transformations import *
from robotarium_node.utilities.barrier_certi... | [
37811,
3118,
35298,
467,
12,
1462,
12,
3455,
357,
21217,
10236,
8,
17934,
13,
198,
198,
51,
3727,
46,
25,
35717,
22196,
40165,
198,
198,
25354,
416,
25,
383,
16071,
17756,
4816,
198,
5841,
1431,
416,
25,
1168,
32810,
31250,
680,
357,
... | 2.651494 | 703 |
import logging
from .. import *
from ..i2c_master import I2CMasterApplet
| [
11748,
18931,
198,
198,
6738,
11485,
1330,
1635,
198,
6738,
11485,
72,
17,
66,
62,
9866,
1330,
314,
17,
34,
18254,
4677,
1616,
628,
198
] | 3.04 | 25 |
import os
import nimp.sys.platform
class XboxOne(nimp.sys.platform.Platform):
''' XboxOne platform description '''
| [
198,
11748,
28686,
198,
11748,
299,
11011,
13,
17597,
13,
24254,
198,
198,
4871,
9445,
3198,
7,
77,
11011,
13,
17597,
13,
24254,
13,
37148,
2599,
198,
220,
220,
220,
705,
7061,
9445,
3198,
3859,
6764,
705,
7061,
198
] | 3.102564 | 39 |
NEWS_API_TOP_HEADLINES_SOURCES = 'https://newsapi.org/v2/top-headlines/sources?apiKey={}'
NEWS_API_TOP_HEADLINES_SOURCE = 'https://newsapi.org/v2/top-headlines/sources={}?apiKey={}'
NEWS_API_EVERYTHING = 'https://newsapi.org/v2/everything?q={}&apiKey={}'
NEWS_API_KEY = 'e4886eff42244ffaabebbfb0a9bbd892' | [
49597,
62,
17614,
62,
35222,
62,
37682,
34509,
1546,
62,
50,
2606,
7397,
1546,
796,
705,
5450,
1378,
10827,
15042,
13,
2398,
14,
85,
17,
14,
4852,
12,
2256,
6615,
14,
82,
2203,
30,
15042,
9218,
34758,
92,
6,
198,
49597,
62,
17614,
... | 2.202899 | 138 |
x = (C(), D(), E())
a, b, c = x
x[0].bar() # NO bar
x[1].baz() # NO baz
x[2].foo() # baz
a.bar() # NO bar
b.baz() # NO baz
c.foo() # NO foo
| [
628,
628,
198,
198,
87,
796,
357,
34,
22784,
360,
22784,
412,
28955,
198,
198,
64,
11,
275,
11,
269,
796,
2124,
198,
198,
87,
58,
15,
4083,
5657,
3419,
220,
1303,
8005,
2318,
198,
87,
58,
16,
4083,
65,
1031,
3419,
220,
1303,
800... | 1.741573 | 89 |
from logger_builder import LoggerBuilder
from logger_builder.formatter import create_basic_formatter
from logger_builder.handler import StreamHandler
import pandas as pd
from sklearn.datasets import load_diabetes
from features_fixer import FeaturesFixer
from features_fixer.reducer import PCA
from features_fixer.scaler... | [
6738,
49706,
62,
38272,
1330,
5972,
1362,
32875,
198,
6738,
49706,
62,
38272,
13,
687,
1436,
1330,
2251,
62,
35487,
62,
687,
1436,
198,
6738,
49706,
62,
38272,
13,
30281,
1330,
13860,
25060,
198,
11748,
19798,
292,
355,
279,
67,
198,
... | 3.108108 | 333 |
import tensorflow as tf
def get_activation_fn(type='relu'):
"""
Return tensorflow activation function given string name.
Args:
type:
Returns:
"""
if type == 'relu':
return tf.nn.relu
elif type == 'elu':
return tf.nn.elu
elif type == 'tanh':
return tf.n... | [
11748,
11192,
273,
11125,
355,
48700,
198,
198,
4299,
651,
62,
48545,
62,
22184,
7,
4906,
11639,
260,
2290,
6,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8229,
11192,
273,
11125,
14916,
2163,
1813,
4731,
1438,
13,
628,
220,
... | 2.12555 | 2,955 |
if __name__ == '__main__':
T = int(input())
for x in range(1, T + 1):
l1 = input().split()
l2 = input().split()
N = int(l1[0])
K = int(l1[1])
V = []
for v in l2:
V.append(int(v))
print('Case #', x, ':', ' ', '{0:.6f}'.format(E(K, V)), sep='')... | [
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
309,
796,
493,
7,
15414,
28955,
198,
220,
220,
220,
329,
2124,
287,
2837,
7,
16,
11,
309,
1343,
352,
2599,
198,
220,
220,
220,
220,
220,
220,
... | 1.707447 | 188 |
#Copyright 2007-2009 WebDriver committers
#Copyright 2007-2009 Google 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 b... | [
2,
15269,
4343,
12,
10531,
5313,
32103,
4589,
1010,
198,
2,
15269,
4343,
12,
10531,
3012,
3457,
13,
198,
2,
198,
2,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
5832,
743,
407,
... | 3.698324 | 179 |
# (c) Shrimadhav U K
#
# This file is part of @UniBorg
#
# @UniBorg is free software; you cannot 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 version.
#
# @UniBorg is ... | [
2,
357,
66,
8,
911,
3036,
24411,
615,
471,
509,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
2488,
3118,
72,
33,
2398,
198,
2,
198,
2,
2488,
3118,
72,
33,
2398,
318,
1479,
3788,
26,
345,
2314,
17678,
4163,
340,
290,
14,
273,
1309... | 3.094891 | 274 |
import numpy as np
import pytest
from sktime.datasets import load_gunpoint
from sktime.transformers.matrix_profile import MatrixProfile
| [
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
6738,
1341,
2435,
13,
19608,
292,
1039,
1330,
3440,
62,
7145,
4122,
198,
6738,
1341,
2435,
13,
35636,
364,
13,
6759,
8609,
62,
13317,
1330,
24936,
37046,
198
] | 3.578947 | 38 |
import csv
import sys
import re
sys.path.append('/Users/jkc023/Documents/homecode/fantasycalc-utils')
from services.MongoDB import MongoDB
import numpy as np
# if player has increased or decreased in value over both of the last weeks, return that value
# if player went up and down return 0
season_rankings = l... | [
11748,
269,
21370,
198,
11748,
25064,
198,
11748,
302,
198,
17597,
13,
6978,
13,
33295,
10786,
14,
14490,
14,
73,
74,
66,
45310,
14,
38354,
14,
11195,
8189,
14,
69,
34921,
9948,
66,
12,
26791,
11537,
198,
6738,
2594,
13,
44,
25162,
... | 3.375758 | 165 |
input = """
p(X) :- q(Y), r(Z), X=Y+Z.
q(X) :- p(X).
q(0).
r(5).
"""
output = """
p(X) :- q(Y), r(Z), X=Y+Z.
q(X) :- p(X).
q(0).
r(5).
"""
| [
15414,
796,
37227,
198,
79,
7,
55,
8,
1058,
12,
10662,
7,
56,
828,
374,
7,
57,
828,
1395,
28,
56,
10,
57,
13,
201,
198,
80,
7,
55,
8,
1058,
12,
279,
7,
55,
737,
201,
198,
80,
7,
15,
737,
201,
198,
81,
7,
20,
737,
201,
... | 1.413462 | 104 |
# Copyright DST Group. Licensed under the MIT license.
from CybORG.Simulator.Entity import Entity
# __init__(): Constructor for local user groups, assigns group name, group ID(gid) and lists of users within group
# get_state(self): returns dictionary of the group and group id
# remove_user(self, user): if user is foun... | [
2,
15069,
360,
2257,
4912,
13,
49962,
739,
262,
17168,
5964,
13,
198,
6738,
5934,
65,
1581,
38,
13,
8890,
8927,
13,
32398,
1330,
20885,
198,
198,
2,
11593,
15003,
834,
33529,
28407,
273,
329,
1957,
2836,
2628,
11,
46974,
1448,
1438,
... | 3.845361 | 97 |
# Copyright 2016-2017 Workonline Communications (Pty) Ltd. All rights reserved.
#
# The contents of this file are 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/license... | [
2,
15069,
1584,
12,
5539,
5521,
25119,
14620,
357,
47,
774,
8,
12052,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
383,
10154,
286,
428,
2393,
389,
11971,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
198,
2,
357,
1169,
366,
34156... | 2.338501 | 774 |
#coding=utf-8
from sampler import outputSource
from sampler_uniq_with_md5 import preprocess_with_uniq_test
class unic_diff(object):
"""docstring for unic_diff"""
if __name__ == '__main__':
unic_differ = unic_diff()
outputSource(*preprocess_with_uniq_test('example.gif', unic_differ.check_img)) | [
2,
66,
7656,
28,
40477,
12,
23,
198,
198,
6738,
6072,
20053,
1330,
5072,
7416,
198,
6738,
6072,
20053,
62,
403,
25011,
62,
4480,
62,
9132,
20,
1330,
662,
14681,
62,
4480,
62,
403,
25011,
62,
9288,
198,
198,
4871,
28000,
62,
26069,
... | 2.82243 | 107 |
# Useful doc on Python magic methods:
# https://rszalski.github.io/magicmethods/
| [
2,
49511,
2205,
319,
11361,
5536,
5050,
25,
198,
2,
3740,
1378,
3808,
89,
874,
4106,
13,
12567,
13,
952,
14,
32707,
24396,
82,
14,
628
] | 3.153846 | 26 |
# Specialization: Google IT Automation with Python
# Course 02: Using Python to Interact with the Operating System
# Week 2 Module Part 2 - Practice Quiz
# Student: Shawn Solomon
# Learning Platform: Coursera.org
# Scripting examples encountered during the Module Part 2 Practice Quiz:
# 01. The create_python_... | [
2,
6093,
1634,
25,
3012,
7283,
17406,
341,
351,
11361,
201,
198,
2,
20537,
7816,
25,
8554,
11361,
284,
4225,
529,
351,
262,
24850,
4482,
201,
198,
2,
6119,
362,
19937,
2142,
362,
532,
19939,
2264,
528,
201,
198,
2,
13613,
25,
25225,... | 3.149239 | 985 |
import dxrip
import sqlite3
| [
11748,
44332,
5528,
198,
11748,
44161,
578,
18,
198
] | 3.111111 | 9 |
from django.contrib import admin
from django.urls import reverse
from django.utils.safestring import mark_safe
from .models import Message
@admin.register(Message) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
42625,
14208,
13,
26791,
13,
49585,
395,
1806,
1330,
1317,
62,
21230,
198,
198,
6738,
764,
27530,
1330,
16000,
198,
198,
31,
... | 3.510638 | 47 |
# Copyright 2018 The TensorFlow 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 applica... | [
2,
15069,
2864,
383,
309,
22854,
37535,
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,
... | 2.526401 | 32,878 |
def generate_module_cmd(module, input_json, output_json):
"""Generates a command string to use for subprocess calling
Parameters
----------
module: str
The current module being run
input_json: str
The path of the input for the module
output_json: str
The path of the output for the m... | [
4299,
7716,
62,
21412,
62,
28758,
7,
21412,
11,
5128,
62,
17752,
11,
5072,
62,
17752,
2599,
198,
220,
220,
220,
37227,
8645,
689,
257,
3141,
4731,
284,
779,
329,
850,
14681,
4585,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200... | 2.718615 | 231 |
#!/usr/bin/env python
import argparse, sys, os, gzip
from shutil import rmtree
from multiprocessing import cpu_count
from tempfile import mkdtemp, gettempdir
if __name__=="__main__":
#do our inputs
args = do_inputs()
main(args)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
1822,
29572,
11,
25064,
11,
28686,
11,
308,
13344,
198,
6738,
4423,
346,
1330,
374,
16762,
631,
198,
6738,
18540,
305,
919,
278,
1330,
42804,
62,
9127,
198,
6738,
20218,
7753,
1... | 2.831325 | 83 |
from django.test import TestCase
from company.models import Company, Employee
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
1664,
13,
27530,
1330,
5834,
11,
36824,
628
] | 4.210526 | 19 |
import sys
import json
from collections import OrderedDict
outf = open(snakemake.output[0],'w')
fusions = loadJSON(snakemake.input[0])
outputGeneTable(fusions, outf)
outf.close() | [
11748,
25064,
198,
11748,
33918,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
448,
69,
796,
1280,
7,
16184,
539,
15883,
13,
22915,
58,
15,
60,
4032,
86,
11537,
198,
69,
15880,
796,
3440,
40386,
7,
16184,
539,
15883,
13,
1... | 2.84127 | 63 |
"""Http transport class with CRUDX implementations of Transport methods
"""
import sys
import json
from requests import Session, Response
from openhltest_client.transport import Transport
from openhltest_client.mockserver import MockServer
from openhltest_client.base import Base
from openhltest_client.errors im... | [
37811,
43481,
4839,
1398,
351,
8740,
8322,
55,
25504,
286,
19940,
5050,
201,
198,
37811,
201,
198,
11748,
25064,
201,
198,
11748,
33918,
201,
198,
6738,
7007,
1330,
23575,
11,
18261,
201,
198,
6738,
1280,
71,
2528,
395,
62,
16366,
13,
... | 3.626374 | 91 |
from source.exceptions.not_found import NotFoundException
from source.repositories.player_game import PlayerGameRepository
import source.commons.message as message
from source.utils.utils import remove_duplicated_data_from_array
| [
6738,
2723,
13,
1069,
11755,
13,
1662,
62,
9275,
1330,
1892,
21077,
16922,
198,
6738,
2723,
13,
260,
1930,
270,
1749,
13,
7829,
62,
6057,
1330,
7853,
8777,
6207,
13264,
198,
11748,
2723,
13,
9503,
684,
13,
20500,
355,
3275,
198,
6738,... | 3.833333 | 60 |
""" Ejercicio 1 """
def isSquare(num):
"""" Devuelve verdadero si el número es un cuadrado, caso contrario devuelve falso """
start = 1
end = num
while start <= end:
mid = int(start + (end - start) / 2)
square = mid * mid
if square == num:
return True
if square > num:
en... | [
37811,
412,
73,
2798,
46441,
352,
37227,
201,
198,
201,
198,
4299,
318,
48011,
7,
22510,
2599,
201,
198,
220,
13538,
15931,
6245,
2731,
303,
3326,
47984,
3529,
33721,
1288,
299,
21356,
647,
78,
1658,
555,
18912,
41909,
4533,
11,
6124,
... | 2.271357 | 199 |
# retired.py
def objectid2name(self, objid, **kwargs):
''' function takes in a protocol instance (self) and an objid. If the objid is not in the protocol instance, a False is returned.
if the objid is in the protocol it returns a list:
nodetype = True : step action or reagent
name... | [
2,
9880,
13,
9078,
198,
198,
4299,
2134,
312,
17,
3672,
7,
944,
11,
26181,
312,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
705,
7061,
2163,
2753,
287,
257,
8435,
4554,
357,
944,... | 1.957704 | 4,303 |
# Copyright 2009 Wayne See
#
# 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 wri... | [
2,
15069,
3717,
13329,
4091,
201,
198,
2,
201,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
201,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
201,
19... | 2.629779 | 497 |
import random
import itertools
| [
11748,
4738,
198,
11748,
340,
861,
10141,
628
] | 4 | 8 |
from flask_restx import Api
from flask import Blueprint
from .main.controller.fileController import api as file_ns
from .main.controller.deepLearningController import api as dl_ns
from .main.controller.user_controller import api as user_ns
from .main.controller.auth_controller import api as auth_ns
from .main.controll... | [
6738,
42903,
62,
2118,
87,
1330,
5949,
72,
198,
6738,
42903,
1330,
39932,
198,
198,
6738,
764,
12417,
13,
36500,
13,
7753,
22130,
1330,
40391,
355,
2393,
62,
5907,
198,
6738,
764,
12417,
13,
36500,
13,
22089,
41730,
22130,
1330,
40391,
... | 2.247839 | 347 |
# Author: Gustavo Martin Morcuende
#
# Copyright 2020 Gustavo Martin Morcuende
#
# 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 requi... | [
2,
6434,
25,
43715,
78,
5780,
3461,
27399,
38396,
198,
198,
2,
198,
2,
15069,
12131,
43715,
78,
5780,
3461,
27399,
38396,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
... | 3.81768 | 181 |
import datetime
import calendar
# name
name = raw_input("enter your name: ")
# date
date_string = datetime.datetime.now().strftime("%a %m/%d/%Y %H:%M:%S")
print('Hello, ' + str(name) + '!' + ' Today is ' + date_string)
| [
11748,
4818,
8079,
198,
11748,
11845,
198,
198,
2,
1438,
198,
3672,
796,
8246,
62,
15414,
7203,
9255,
534,
1438,
25,
366,
8,
198,
198,
2,
3128,
198,
4475,
62,
8841,
796,
4818,
8079,
13,
19608,
8079,
13,
2197,
22446,
2536,
31387,
720... | 2.534091 | 88 |
from flask_example.app import create_app
__all__ = ["create_app"]
| [
6738,
42903,
62,
20688,
13,
1324,
1330,
2251,
62,
1324,
628,
198,
834,
439,
834,
796,
14631,
17953,
62,
1324,
8973,
198
] | 3.090909 | 22 |
--- serial/tools/list_ports_posix.py.orig 2017-03-16 22:59:33 UTC
+++ serial/tools/list_ports_posix.py
@@ -47,7 +47,7 @@ elif plat[:7] == 'openbsd': # OpenBSD
devices.extend(list_ports_common.list_links(devices))
return [list_ports_common.ListPortInfo(d) for d in devices]
-elif plat[:3] == 'b... | [
6329,
11389,
14,
31391,
14,
4868,
62,
3742,
62,
1930,
844,
13,
9078,
13,
11612,
197,
5539,
12,
3070,
12,
1433,
2534,
25,
3270,
25,
2091,
18119,
198,
45340,
11389,
14,
31391,
14,
4868,
62,
3742,
62,
1930,
844,
13,
9078,
198,
12404,
... | 2.189744 | 195 |
from django.db import models
#------------------------------------------------------------------------------
class Product(models.Model):
""" One record per product. All product details held here. """
title = models.CharField(max_length=200)
price = models.FloatField()
discount_price = models.FloatFie... | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
10097,
26171,
198,
4871,
8721,
7,
27530,
13,
17633,
2599,
198,
220,
220,
220,
37227,
1881,
1700,
583,
1720,
13,
1439,
1720,
3307,
2714,
994,
13,
37227,
628,
220,
220,
220,
3670,
... | 3.853226 | 620 |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
# In[2]:
joint_hier = [
('head', 'neck', 'blue'),
('neck', 'root', 'darkred'),
('root', 'clavicle', 'brown'),
('neck', 'leftShoulder', 'red'),
('leftShoulder'... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
554,
58,
16,
5974,
628,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
26... | 2.301676 | 358 |
""" nftfw pattern_reader
Used by the blacklist operation
Patterns are text files specifying rules to be applied to log files.
Main idea is to create a data structure indexed by filename of log
file, which has list of regexes to be applied to each line and other
information to process the pattern generating firewall ... | [
37811,
299,
701,
44482,
3912,
62,
46862,
198,
198,
38052,
416,
262,
38810,
4905,
198,
198,
47546,
82,
389,
2420,
3696,
31577,
3173,
284,
307,
5625,
284,
2604,
3696,
13,
198,
198,
13383,
2126,
318,
284,
2251,
257,
1366,
4645,
41497,
41... | 2.351705 | 4,046 |
#!/usr/bin/env python3
# https://stackoverflow.com/questions/34461987/python3-importerror-no-module-named-xxxx
from .config_src import *
from .yaml2json import load_yaml
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
3740,
1378,
25558,
2502,
11125,
13,
785,
14,
6138,
507,
14,
18,
27260,
27301,
14,
29412,
18,
12,
320,
1819,
14007,
12,
3919,
12,
21412,
12,
13190,
12,
12343,
198,
6738,
... | 2.758065 | 62 |
""" Solução
A solução se baseia em achar a posição dos caracteres '+' e '=', e então a partir destas posições, achar os valores relacionados às incógnitas R, L e J. E após descobrir qual dos 3 é a incógnita da equação e tendo os outros 2 valores, resolvemos de forma simples e trivial o problema.
"""
# Loop para os cas... | [
37811,
4294,
84,
16175,
28749,
198,
32,
1540,
84,
16175,
28749,
384,
2779,
544,
795,
257,
10641,
257,
1426,
72,
16175,
28749,
23430,
1097,
529,
68,
411,
705,
10,
6,
304,
705,
28,
3256,
304,
920,
28749,
257,
636,
343,
2244,
292,
1426... | 1.917355 | 726 |
import collections
import difflib
from functools import lru_cache
import tvdb_api
SearchResult = collections.namedtuple("SearchResult", "show_title id search_difference")
class TVDB:
"""Handles all TVDB queries for the module."""
def get_ep_tvdb_info(self, file_info: dict) -> "obj, obj":
"""Returns... | [
11748,
17268,
198,
11748,
814,
8019,
198,
6738,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
198,
11748,
31557,
9945,
62,
15042,
628,
198,
18243,
23004,
796,
17268,
13,
13190,
83,
29291,
7203,
18243,
23004,
1600,
366,
12860,
62,
7839,
4... | 2.020833 | 864 |
import socket, os
from cryptography.fernet import Fernet
if __name__ == "__main__":
custom_config = input("custom config? (s/n) >> ")[0] == "s"
client = Client() if custom_config == False else Client(input("enter server hostname >> "), input("enter server port >> "))
client.start() | [
11748,
17802,
11,
28686,
198,
6738,
45898,
13,
69,
1142,
316,
1330,
38982,
316,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
2183,
62,
11250,
796,
5128,
7203,
23144,
4566,
30,
357,
82,
14,
77,
8,
9609... | 3.247191 | 89 |
#!/usr/bin/env python
#
# aria2 - The high speed download utility
#
# Copyright (C) 2013 Tatsuhiro Tsujikawa
#
# This program 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 2 of the License, or... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
257,
7496,
17,
532,
383,
1029,
2866,
4321,
10361,
198,
2,
198,
2,
15069,
357,
34,
8,
2211,
309,
19231,
49907,
23459,
73,
40398,
198,
2,
198,
2,
770,
1430,
318,
1479,
3... | 3.437803 | 619 |
#! /usr/bin/env python
# Copyright (c) 2017 Martin Rosellen
# 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 limitation the
# rights to use, copy, modify... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
15069,
357,
66,
8,
2177,
5780,
8049,
297,
268,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
286,
428,
3788,
290,
... | 3.717262 | 336 |
# run once to create table
# CREATE table
import sqlite3
conn = sqlite3.connect('jobslist.db')
cursor = conn.cursor()
sql="""CREATE TABLE jobslist (
date_pulled DATE,
job_post TEXT,
description TEXT,
link TEXT
)"""
cursor.execute(sql)
cursor.commit()
cursor.close()
| [
2,
1057,
1752,
284,
2251,
3084,
198,
198,
2,
29244,
6158,
3084,
198,
11748,
44161,
578,
18,
198,
198,
37043,
796,
44161,
578,
18,
13,
8443,
10786,
43863,
4868,
13,
9945,
11537,
198,
198,
66,
21471,
796,
48260,
13,
66,
21471,
3419,
1... | 2.396825 | 126 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
if __name__ == '__main__':
from dummy import *
audit(assign('wizbank', 'http://60.247.86.31/')[1])
audit(assign('wizbank', 'http://demo.cyberwisdom.net.cn/')[1]) | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
220,
220,
220,
220,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,... | 2.035088 | 114 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Tests for export converters."""
from absl import app
from absl.testing import absltest
from grr_response_core.lib.rdfvalues import osquery as rdf_osquery
from grr_response_server.export_converters import base
from grr_response_server.export_converters import osquery
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
51,
3558,
329,
10784,
6718,
1010,
526,
15931,
198,
198,
6738,
2352,
75,
1330,
598,
198,
6738,
2352,
75,
13,
33... | 2.823944 | 142 |
import os
import sys
import pytest
import pickle
import numpy as np
import datetime as dt
from attrdict import AttrDict
from .pytest_utils import fp, assert_objects_equal, call_with_legacy_params
from SEIRcity import model, utils
HERE = os.path.dirname(os.path.abspath(__file__))
def test_model_can_import():
"""C... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
12972,
9288,
198,
11748,
2298,
293,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4818,
8079,
355,
288,
83,
198,
6738,
708,
4372,
713,
1330,
3460,
81,
35,
713,
198,
6738,
764,
9078,
9288,
... | 2.512924 | 1,238 |
from flask_wtf import FlaskForm
| [
6738,
42903,
62,
86,
27110,
1330,
46947,
8479,
628
] | 3.666667 | 9 |
# Summarize text passages and extract keywords
from summa.keywords import keywords
from summa.summarizer import summarize
import re
| [
2,
5060,
3876,
1096,
2420,
22674,
290,
7925,
26286,
198,
198,
6738,
2160,
2611,
13,
2539,
10879,
1330,
26286,
198,
6738,
2160,
2611,
13,
16345,
3876,
7509,
1330,
35743,
198,
11748,
302,
198
] | 4.030303 | 33 |
#coding:utf8
"""
author: yqq
date: 2019-05-11 20:26
descriptions: USDP处理
"""
import logging
import json
from base_handler import BaseHandler
from utils import decimal_default,get_linenumber
from .proxy import USDPProxy
from constants import USDP_IP_ADDR, USDP_RPC_PORT
import sql
from decimal import Decimal
g_IP, g_PO... | [
2,
66,
7656,
25,
40477,
23,
198,
37811,
198,
9800,
25,
331,
38227,
198,
4475,
25,
13130,
12,
2713,
12,
1157,
1160,
25,
2075,
198,
20147,
1968,
507,
25,
1294,
6322,
13783,
226,
49426,
228,
198,
37811,
198,
11748,
18931,
198,
11748,
3... | 1.484414 | 1,187 |
import tweepy
__author__ = 'pvandepavoordt'
| [
11748,
4184,
538,
88,
198,
198,
834,
9800,
834,
796,
705,
79,
85,
392,
538,
615,
78,
585,
83,
6,
198
] | 2.142857 | 21 |
import visualization.panda.world as wd
import modeling.geometric_model as gm
import modeling.collision_model as cm
import grasping.planning.antipodal as gpa
import math
import numpy as np
import basis.robot_math as rm
import robot_sim.robots.cobotta.cobotta as cbt
import manipulation.pick_place_planner as ppp
import mo... | [
11748,
32704,
13,
79,
5282,
13,
6894,
355,
266,
67,
198,
11748,
21128,
13,
469,
16996,
62,
19849,
355,
308,
76,
198,
11748,
21128,
13,
26000,
1166,
62,
19849,
355,
12067,
198,
11748,
44787,
13,
11578,
768,
13,
415,
541,
375,
282,
35... | 2.284351 | 524 |
from pathlib import Path
import typing as t
import sqlalchemy
import psycopg2.extensions as pg2ext
def truncate_table(db_engine: sqlalchemy.engine.Engine, table: str, schema: str = 'public', cascade: bool = False) -> None:
"""Truncate given table"""
db_engine.execute(f"TRUNCATE TABLE {schema + '.' + table} {'... | [
6738,
3108,
8019,
1330,
10644,
198,
11748,
19720,
355,
256,
198,
11748,
44161,
282,
26599,
198,
11748,
17331,
22163,
70,
17,
13,
2302,
5736,
355,
23241,
17,
2302,
628,
198,
4299,
40122,
378,
62,
11487,
7,
9945,
62,
18392,
25,
44161,
2... | 2.54733 | 824 |
import sys
import os
import time
from src import mnlp, ca, gtps, dspl
| [
11748,
25064,
201,
198,
11748,
28686,
201,
198,
11748,
640,
201,
198,
6738,
12351,
1330,
285,
21283,
79,
11,
1275,
11,
308,
83,
862,
11,
288,
22018,
201,
198,
201,
198
] | 2.451613 | 31 |
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 1 20:58:36 2019
@author: Sneha
"""
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 26 13:26:27 2019
@author: Sneha
"""
import tkinter as tk
from tkinter import *
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import numpy as np
import matplotlib.pyplot... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
2758,
220,
352,
1160,
25,
3365,
25,
2623,
13130,
198,
198,
31,
9800,
25,
27065,
3099,
198,
37811,
198,
198,
2,
532,
9,
12,
19617,
25,
3... | 1.899443 | 3,948 |
# Copyright 2016 The Cebes Authors. All Rights Reserved.
#
# Licensed under the Apache License, version 2.0 (the "License").
# You may not use this work except in compliance with the License,
# which is available at www.apache.org/licenses/LICENSE-2.0
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRAN... | [
2,
15069,
1584,
383,
327,
1765,
274,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
2196,
362,
13,
15,
357,
1169,
366,
34156,
11074,
198,
2,
921,
743,
407,
779,
428,
670,
2845,
287,
11846,
351... | 3.523677 | 359 |
# -*- coding: utf-8 -*-
# Copyright (c) 2004-2014 Alterra, Wageningen-UR
# Allard de Wit (allard.dewit@wur.nl), April 2014
"""Tools for reading weather and parameter files.
For reading files in the CABO formats used by crop simulation models in FORTRAN and FST:
- CABOWeatherDataProvider reads CABOWE weather files for... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
5472,
12,
4967,
32770,
430,
11,
21309,
3101,
268,
12,
4261,
198,
2,
1439,
446,
390,
40648,
357,
439,
446,
13,
67,
413,
270,
31,
86,
333,
13,
... | 3.335968 | 253 |
#
# Copyright 2021 Red Hat Inc.
# SPDX-License-Identifier: Apache-2.0
#
"""Test the AWSAccountAlias object."""
from unittest.mock import patch
from masu.database.account_alias_accessor import AccountAliasAccessor
from masu.external.accounts.labels.aws.aws_account_alias import AWSAccountAlias
from masu.test import Masu... | [
2,
198,
2,
15069,
33448,
2297,
10983,
3457,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
2,
198,
37811,
14402,
262,
14356,
4090,
535,
608,
40489,
2134,
526,
15931,
198,
6738,
555,
715,
395,
13... | 2.450606 | 2,146 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2018 Alibaba Group Holding 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,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
7358,
12,
7908,
41992,
4912,
31703,
12052,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
36... | 3.089102 | 1,459 |
from . import envs
from gym.envs.registration import register
__version__ = "0.0.1"
register(
id='snake-v0',
entry_point='gym_snake.envs:SnakeEnv'
)
| [
6738,
764,
1330,
551,
14259,
198,
6738,
11550,
13,
268,
14259,
13,
2301,
33397,
1330,
7881,
198,
198,
834,
9641,
834,
796,
366,
15,
13,
15,
13,
16,
1,
198,
198,
30238,
7,
198,
220,
220,
220,
4686,
11639,
16184,
539,
12,
85,
15,
... | 2.304348 | 69 |
import datetime
import os
import plistlib
import subprocess
import time
from distutils.version import LooseVersion
factoid = 'gatekeeper_date'
def fact():
'''Returns the modification date of the gatekeeper package'''
result = 'None'
try:
gkpkgs = subprocess.check_output(['/usr/sbin/pkgutil',
... | [
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
458,
396,
8019,
198,
11748,
850,
14681,
198,
11748,
640,
198,
6738,
1233,
26791,
13,
9641,
1330,
6706,
577,
14815,
198,
198,
22584,
1868,
796,
705,
10494,
13884,
62,
4475,
6,
198,
198,
... | 2.065126 | 476 |
# -*- coding: utf-8 -*-
"""ThreatConnect Playbook App"""
from langdetect import detect_langs
# Import default Playbook Class (Required)
from playbook_app import PlaybookApp
class App(PlaybookApp):
"""Playbook App"""
def run(self):
"""Run the App main logic.
This method should contain the c... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
817,
630,
13313,
3811,
2070,
2034,
37811,
198,
198,
6738,
42392,
15255,
478,
1330,
4886,
62,
17204,
82,
198,
198,
2,
17267,
4277,
3811,
2070,
5016,
357,
37374,
8,... | 2.785714 | 322 |
from .consola import Consola
from .uiscreen import UIScreen
import datetime
| [
6738,
764,
5936,
5708,
1330,
3515,
5708,
198,
6738,
764,
84,
2304,
1361,
1330,
471,
1797,
32060,
198,
11748,
4818,
8079,
628
] | 3.5 | 22 |
from setuptools import setup, find_packages
setup(
name="discorddump",
packages=find_packages(),
zip_safe=False,
) | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
15410,
585,
39455,
1600,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
22784,
198,
220,
220,
220,
19974,
62,
21230,
28,
... | 2.76087 | 46 |
import typing # noqa: F401
import datetime as _datetime # noqa: F401
from kubernetes import client # noqa: F401
from kuber import kube_api as _kube_api # noqa: F401
from kuber import definitions as _kuber_definitions # noqa: F401
from kuber import _types # noqa: F401
from kuber.v1_18.meta_v1 import ListMeta # ... | [
11748,
19720,
220,
1303,
645,
20402,
25,
376,
21844,
198,
11748,
4818,
8079,
355,
4808,
19608,
8079,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
479,
18478,
3262,
274,
1330,
5456,
220,
1303,
645,
20402,
25,
376,
21844,
198,
... | 2.280867 | 11,995 |
#!/usr/bin/env python
"""
_GetFilesForParentlessMerge_
MySQL implementation of Subscription.GetFilesForParentlessMerge
"""
from WMCore.Database.DBFormatter import DBFormatter
class GetFilesForParentlessMerge(DBFormatter):
"""
This query needs to return the following for any files that is deemed
mergeabl... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
62,
3855,
25876,
1890,
24546,
1203,
13102,
469,
62,
198,
198,
3666,
17861,
7822,
286,
3834,
33584,
13,
3855,
25876,
1890,
24546,
1203,
13102,
469,
198,
37811,
198,
198,
6738,... | 1.829339 | 1,377 |
# Generated by Django 2.2.2 on 2019-11-07 12:49
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
17,
319,
13130,
12,
1157,
12,
2998,
1105,
25,
2920,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import json
import time
from p415_customerializer import to_json
from file_path_collect import output_json_path_dir as json_output
entry = {'title': 'Divve into history, 2009 edition',
'article_link': 'http://diveintomark.org/archives/2009/03/27/dive‐into‐history‐2009‐edition',
'comments_link': None... | [
11748,
33918,
198,
11748,
640,
198,
198,
6738,
279,
35038,
62,
23144,
48499,
7509,
1330,
284,
62,
17752,
198,
6738,
2393,
62,
6978,
62,
33327,
1330,
5072,
62,
17752,
62,
6978,
62,
15908,
355,
33918,
62,
22915,
198,
198,
13000,
796,
13... | 2.268657 | 469 |
import socket
import threading
import socketserver
import logging
import Authorization
import Decoder as Decoder_File
import Localdatabase
import MongoDatabase_Global
import ServerDataOffer
import ServerDataReceiver
from Decoder import Decoder
from MongoDatabase_Global import MongoTB_Global
from ServerDataReceiver ... | [
11748,
17802,
198,
11748,
4704,
278,
198,
11748,
37037,
18497,
198,
198,
11748,
18931,
198,
198,
11748,
35263,
198,
11748,
34580,
355,
34580,
62,
8979,
198,
11748,
15181,
1940,
265,
5754,
198,
11748,
42591,
38105,
62,
22289,
198,
11748,
9... | 3.092593 | 594 |
import cv2
import os
import urllib.request
import numpy as np
from config import *
from lxml import etree
from random import randint
from telethon import TelegramClient, events, sync
from telethon.tl.functions.photos import UploadProfilePhotoRequest
### Log in Telegram
try:
proxy
except NameError:
proxy = Non... | [
11748,
269,
85,
17,
198,
11748,
28686,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
4566,
1330,
1635,
198,
6738,
300,
19875,
1330,
2123,
631,
198,
6738,
4738,
1330,
43720,
600,
198,
6738,
5735,
... | 2.546584 | 966 |
# -*- coding: utf-8 -*-
import os
from pathlib import Path
import pytest
from brainhacker.utils.download import _url_to_local_path, _fetch_file, mne_data_path
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
12972,
9288,
198,
198,
6738,
3632,
71,
10735,
13,
26791,
13,
15002,
1330,
4808,
6371,
62,
1462,
62,
12001,
... | 2.405405 | 74 |
from . import good, fail, semantic_fail
# Basic comparisons, unitary syntax
good('=0', 0)
good('==0', 0)
fail('=0', 1)
fail('==0', 1)
good('!=0', 1)
fail('!=0', 0)
good('>0', 1)
fail('>0', 0)
fail('>0', -1)
good('>=0', 1)
good('>=0', 0)
fail('>=0', -1)
good('<0', -1)
fail('<0', 0)
fail('<0', +1)
good('<=0', -1)
good('... | [
6738,
764,
1330,
922,
11,
2038,
11,
37865,
62,
32165,
198,
198,
2,
14392,
17909,
11,
4326,
560,
15582,
198,
11274,
10786,
28,
15,
3256,
657,
8,
198,
11274,
10786,
855,
15,
3256,
657,
8,
198,
32165,
10786,
28,
15,
3256,
352,
8,
198... | 1.93038 | 474 |
import requests
import urllib2
import os, sys
import json
import anyjson
import traceback
from sh import git
from peyotl import convert_nexson_format, \
concatenate_collections, \
tree_is_in_collection
from peyotl.phylesystem.git_workflows import GitWorkflowError, \
... | [
11748,
7007,
198,
11748,
2956,
297,
571,
17,
198,
11748,
28686,
11,
25064,
198,
198,
11748,
33918,
198,
11748,
597,
17752,
198,
11748,
12854,
1891,
198,
6738,
427,
1330,
17606,
198,
6738,
613,
88,
313,
75,
1330,
10385,
62,
12413,
1559,
... | 2.111899 | 32,431 |
from blacksheep.contents import FormContent, JSONContent, TextContent
from blacksheep.testing.client import TestClient
from blacksheep.testing.messages import MockReceive, MockSend
from blacksheep.testing.simulator import AbstractTestSimulator
__all__ = [
"TestClient",
"AbstractTestSimulator",
"JSONContent... | [
6738,
2042,
7091,
538,
13,
3642,
658,
1330,
5178,
19746,
11,
19449,
19746,
11,
8255,
19746,
198,
6738,
2042,
7091,
538,
13,
33407,
13,
16366,
1330,
6208,
11792,
198,
6738,
2042,
7091,
538,
13,
33407,
13,
37348,
1095,
1330,
44123,
3041,
... | 3.038168 | 131 |
from pathlib import Path
import lingpy as lp
from clldutils.misc import slug
from pylexibank import Dataset as BaseDataset
from pylexibank.util import getEvoBibAsBibtex
from pylexibank import progressbar
from pylexibank import Concept, Language
import attr
@attr.s
| [
6738,
3108,
8019,
1330,
10644,
198,
11748,
18459,
9078,
355,
300,
79,
198,
198,
6738,
269,
297,
67,
26791,
13,
44374,
1330,
31065,
198,
6738,
279,
2349,
87,
571,
962,
1330,
16092,
292,
316,
355,
7308,
27354,
292,
316,
198,
6738,
279,
... | 2.966667 | 90 |