content string | input_ids list | ratio_char_token float64 | token_count int64 |
|---|---|---|---|
from __future__ import annotations
from typing import Iterable, Tuple, Mapping, Union
from collections import namedtuple
from .Base import Comparable, HasProperty, Stylable, ElementSet
from .Errors import GraphJsonFormatError
from .Node import Node
NodeTuple = namedtuple('Edge', ('u', 'v'))
EdgeIDTuple = namedtuple('... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
6738,
19720,
1330,
40806,
540,
11,
309,
29291,
11,
337,
5912,
11,
4479,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
198,
6738,
764,
14881,
1330,
22565,
540,
11,
7875,
21746,
11,
520,
2645,
... | 3.37931 | 116 |
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
from PIL import Image
import numpy as np
import math
w, h = 500, 600
data = np.zeros((h, w, 3), dtype=np.int8)
colCnt = 0
for i in range(h):
for j in range(w):
value = 125+125.0*math.sin(0.001*colCnt*j)#*colCnt*1.0)
data[i... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
4561,
88,
1082,
12058,
198,
198,
1212,
318,
257,
8584,
4226,
2393,
13,
198,
37811,
198,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
299,
32152,
355,
45941,... | 2.153465 | 202 |
#!/usr/bin/env python3
import os
import re
from datetime import datetime
from src.date import Date
os.chdir(os.path.dirname(__file__))
def test_parse_date_format_valid():
"""Test that parse_date_format returns a valid format for strftime"""
datetime.strftime(
datetime.now(),
Date().parse("YY... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
28686,
198,
11748,
302,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
12351,
13,
4475,
1330,
7536,
628,
198,
418,
13,
354,
15908,
7,
418,
13,
6978,
13,
15908,
3672,
... | 2.215909 | 880 |
# Copyright (c) 2017 Sony Corporation. 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 applicabl... | [
2,
15069,
357,
66,
8,
2177,
10184,
10501,
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... | 2.270033 | 911 |
from abc import ABCMeta
from hgicommon.models import Model
Model = Model
class NamedModel(Model, metaclass=ABCMeta):
"""
Model that has a name.
"""
class InternalIdModel(Model, metaclass=ABCMeta):
"""
Model that has an internal ID.
"""
class AccessionNumberModel(Model, metaclass=ABCMeta):... | [
6738,
450,
66,
1330,
9738,
48526,
198,
198,
6738,
289,
70,
291,
2002,
261,
13,
27530,
1330,
9104,
198,
198,
17633,
796,
9104,
198,
198,
4871,
34441,
17633,
7,
17633,
11,
1138,
330,
31172,
28,
24694,
48526,
2599,
198,
220,
220,
220,
... | 2.771704 | 311 |
# sample\helpers.py
| [
2,
6291,
59,
16794,
364,
13,
9078,
628
] | 2.625 | 8 |
from common import *
| [
6738,
2219,
1330,
1635,
628,
628,
628,
628,
628,
628
] | 3.2 | 10 |
from .common import DtoObject
| [
6738,
764,
11321,
1330,
360,
1462,
10267,
628
] | 3.875 | 8 |
NAME='transformation_gzip'
CFLAGS = []
LDFLAGS = []
LIBS = []
GCC_LIST = ['gzip']
| [
20608,
11639,
7645,
1161,
62,
70,
13344,
6,
198,
198,
34,
38948,
50,
796,
17635,
198,
11163,
38948,
50,
796,
17635,
198,
31271,
4462,
796,
17635,
198,
38,
4093,
62,
45849,
796,
37250,
70,
13344,
20520,
198
] | 2.243243 | 37 |
# Generated by Django 2.1 on 2018-09-23 13:07
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
319,
2864,
12,
2931,
12,
1954,
1511,
25,
2998,
201,
198,
201,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
201,
198,
201,
198
] | 2.657143 | 35 |
import numpy as np
from identpy.models import SpringMass, Pendulum, ZIM, DFIG, DFIG_improved
from identpy.models.implicit_methods import RK4
from identpy.methods import MVMO, PSO, TS
from identpy.objects import Estimator
if __name__ == '__main__':
populations = [5, 10, 20, 50, 100]
for p in populations:
... | [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
1852,
9078,
13,
27530,
1330,
8225,
20273,
11,
36865,
14452,
11,
1168,
3955,
11,
360,
16254,
11,
360,
16254,
62,
32077,
1079,
198,
6738,
1852,
9078,
13,
27530,
13,
23928,
3628,
62,
24396,
... | 2.5 | 184 |
# -*- coding: utf-8 -*-
#
# Copyright 2020 Evolent Health, 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 applicabl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
12131,
4319,
349,
298,
3893,
11,
3457,
13,
198,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2... | 3.71831 | 213 |
from scipy.stats import randint, uniform
import numpy as np
"""
Function that determines the maximum value of the maximum horizontal
stress allowed by fault strength
"""
"""
Function that determines the minimum value of the minimum horizontal
stress allowed by fault strength
"""
class RejectionSampler:
"""
... | [
6738,
629,
541,
88,
13,
34242,
1330,
43720,
600,
11,
8187,
198,
11748,
299,
32152,
355,
45941,
628,
198,
37811,
198,
22203,
326,
15947,
262,
5415,
1988,
286,
262,
5415,
16021,
198,
41494,
3142,
416,
8046,
4202,
198,
37811,
628,
198,
1... | 2.244313 | 1,187 |
# Copyright 2021, Guillermo Adrián Molina
#
# 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 ... | [
2,
15069,
33448,
11,
1962,
4665,
5908,
1215,
380,
21162,
17958,
1437,
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.756757 | 185 |
import re
File_names = ["gfg.html", "geeks.xml",
"computer.txt", "geeksforgeeks.jpg", "hey.png"]
Extension = input("Enter Extension: ")
Final = "\."+Extension+"$"
for file in File_names:
match = re.search(Final, file)
if match:
print("File is:", file)
| [
11748,
302,
201,
198,
8979,
62,
14933,
796,
14631,
70,
40616,
13,
6494,
1600,
366,
469,
2573,
13,
19875,
1600,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
33215,
13,
14116,
1600,
366,
469,
2573,
... | 2.255814 | 129 |
import json
from textwrap import dedent
| [
11748,
33918,
198,
6738,
2420,
37150,
1330,
4648,
298,
628
] | 4.1 | 10 |
#!/usr/bin/python
# Basic socket code taken from OSCP with credit,
# automation and other features added by James Hemmings.
# SMTP Enumeration Tool (Usernames)
import socket
import sys
# Open File
with open('/usr/share/wordlists/metasploit/unix_users.txt', 'r') as users:
data = users.read().splitlines()
try:
sys.a... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
14392,
17802,
2438,
2077,
422,
440,
48956,
351,
3884,
11,
220,
198,
2,
22771,
290,
584,
3033,
2087,
416,
3700,
15617,
76,
654,
13,
198,
2,
9447,
7250,
2039,
6975,
341,
16984,
357,
5842,
... | 2.72905 | 358 |
#!/usr/bin/env python
"""
Calls main method to build targeted vector with arguments from the command line.
# Usage:
# To run GeneTargeter as a command line application, use the following command:
#
# genetargeter PATH/TO/FILE.gb ParameterFile.txt PATH/TO/OUTPUTFOLDER NAME_OF_GENE
#
# The last parameter is optional; i... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
34,
5691,
1388,
2446,
284,
1382,
7977,
15879,
351,
7159,
422,
262,
3141,
1627,
13,
198,
198,
2,
29566,
25,
198,
2,
1675,
1057,
13005,
51,
853,
2357,
355,
257,
3141,
... | 3.548913 | 368 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 28 22:40:41 2017
@author: Aretas
"""
#The script outputs up to 3 PNG histograms and 3 TXT files with ligand
#affinity distribution
#Two types of normalisation are performed: top score division by the number of carbons;
#Division by the number top sc... | [
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,
30030,
1526,
2579,
2534,
25,
1821,
25,
3901,
2177,
198,
198,
31,
9800,
25,
317,
1186,
292... | 2.333013 | 3,120 |
# -*- coding: utf-8 -*-
"""Parallel workflow execution via LSF
"""
import os
import re
from time import sleep
from ... import logging
from ...interfaces.base import CommandLine
from .base import SGELikeBatchManagerBase, logger
iflogger = logging.getLogger('nipype.interface')
class LSFPlugin(SGELikeBatchManagerBase)... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
10044,
29363,
30798,
9706,
2884,
406,
20802,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
302,
198,
6738,
640,
1330,
3993,
198,
198,
6738,
2644,
1330,
18931,
198... | 2.656463 | 588 |
from django.shortcuts import render
from django.urls import reverse_lazy
from django.views.generic.edit import CreateView, FormView
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import authenticate, login
from braces.views import LoginRequiredMixin
from django.views.generic.list impor... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
62,
75,
12582,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
19312,
1330,
13610,
7680,
11,
5178,
7680,
198,
6738,
42625,
14208,
13... | 3.728682 | 129 |
# ========================= SymbolTable CLASS
class SymbolTable(object):
"""
Symbol table for the CompilationEngine of the Jack compiler.
"""
def reset(self, file_name):
"""
Resets both class and subroutine table, sets a new file name, and sets
counters to zero.
args:
... | [
2,
36658,
2559,
38357,
10962,
42715,
198,
198,
4871,
38357,
10962,
7,
15252,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
38357,
3084,
329,
262,
3082,
10520,
13798,
286,
262,
3619,
17050,
13,
198,
220,
220,
220,
37227,
628,
22... | 2.230835 | 2,348 |
"""First version of command line interface"""
import logging
import click
from .options import OPTIONS
from .actions import recompile
from .verify import verify_environments
@click.group(invoke_without_command=True)
@click.pass_context
@click.option('--compatible', '-c', multiple=True,
help='Glob exp... | [
37811,
5962,
2196,
286,
3141,
1627,
7071,
37811,
198,
198,
11748,
18931,
198,
198,
11748,
3904,
198,
198,
6738,
764,
25811,
1330,
39852,
11053,
198,
6738,
764,
4658,
1330,
48765,
576,
198,
6738,
764,
332,
1958,
1330,
11767,
62,
268,
121... | 2.467181 | 1,036 |
from settings import *
import numpy as np
import struct | [
6738,
6460,
1330,
1635,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2878
] | 4.230769 | 13 |
# below is User config
WINDOW_TITLE = "Plants vs. Zombies"
TRACK_TYPE = (32, )
ROW_GROUPS = ((1, ), (2, ), (3, ), (4, ), (5, ), (6, ), )
REFRESH_TIME = 1
REPLACE_X_WITH_COLUMN = True
SHOW_STATISTIC = False
STATISTIC_ROW_GROUPS = ROW_GROUPS
STATISTIC_TRACK_TYPE = (3, 8, 12, 14, 15, 17, 23, 32, )
# above is User config
... | [
2,
2174,
318,
11787,
4566,
198,
28929,
3913,
62,
49560,
2538,
796,
366,
3646,
1187,
3691,
13,
23274,
1,
198,
5446,
8120,
62,
25216,
796,
357,
2624,
11,
1267,
198,
49,
3913,
62,
10761,
2606,
3705,
796,
14808,
16,
11,
10612,
357,
17,
... | 1.898851 | 870 |
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView
import mitglieder.forms
from svpb.activeTest import active_and_login_required
import mitglieder.views
urlpatterns = patterns('',
url(r'^$',
active_and_login_r... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
19016,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
37350,
7680,
198,
... | 2.263584 | 865 |
"""Tests for compile action class."""
import os
from pathlib import Path
from astrality.actions import CompileAction
from astrality.persistence import CreatedFiles
def test_null_object_pattern():
"""Compilation action with no parameters should be a null object."""
compile_action = CompileAction(
opt... | [
37811,
51,
3558,
329,
17632,
2223,
1398,
526,
15931,
198,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
6468,
1373,
414,
13,
4658,
1330,
3082,
576,
12502,
198,
6738,
6468,
1373,
414,
13,
19276,
13274,
1330,
1562... | 2.650193 | 5,969 |
"""Tests for loading and accessing FreeType font faces."""
import pytest
from tests.annotations import Platform, require_platform
try:
from pyglet.font.freetype import FreeTypeFace, FreeTypeMemoryFace
from pyglet.font.fontconfig import get_fontconfig
except ImportError:
FreeTypeFace = None
FreeTypeMem... | [
37811,
51,
3558,
329,
11046,
290,
22534,
3232,
6030,
10369,
6698,
526,
15931,
198,
11748,
12972,
9288,
198,
198,
6738,
5254,
13,
34574,
602,
1330,
19193,
11,
2421,
62,
24254,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
12972,
70,
16... | 2.606629 | 1,599 |
from typing import Dict
import math
import tensorflow as tf
from tensorflow.python.keras.activations import softplus
if tf.__version__ >= '2.0':
tf = tf.compat.v1
from tensorflow.keras import backend as K
from tensorflow.keras.callbacks import TensorBoard
from tensorflow.keras.layers import Input, GRU, Conv2D, D... | [
6738,
19720,
1330,
360,
713,
198,
11748,
10688,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
6122,
292,
13,
15791,
602,
1330,
2705,
9541,
198,
198,
361,
48700,
13,
834,
9641,
834,
18189,
... | 2.938889 | 180 |
#!/usr/bin/python
"""
The output from ParallelBlast.py is a large numbers of files.
This is a convenience class for parsing these results as
we would normally with ParseBlast.py.
"""
import shutil,os,sys,re,csv
import numpy as np
from Bio import SeqIO
from htsint import __basedir__
from htsint.blast import ParseBlast
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
37811,
198,
464,
5072,
422,
42945,
3629,
459,
13,
9078,
318,
257,
1588,
3146,
286,
3696,
13,
198,
1212,
318,
257,
15607,
1398,
329,
32096,
777,
2482,
355,
220,
198,
732,
561,
7685,
351,
254... | 3.232323 | 99 |
from ete3 import NCBITaxa, is_taxadb_up_to_date
from ProfilesLayout import ProfilesLayout
from ete3 import Tree, faces, TreeStyle, COLOR_SCHEMES, CircleFace, TextFace, PhyloTree, NodeStyle
import argparse
import os
#os.environ['QT_QPA_PLATFORM']='offscreen'
import seaborn
import pandas as pd
import numpy as np
import m... | [
6738,
304,
660,
18,
1330,
8823,
26094,
897,
64,
11,
318,
62,
19290,
324,
65,
62,
929,
62,
1462,
62,
4475,
198,
6738,
4415,
2915,
32517,
1330,
4415,
2915,
32517,
198,
6738,
304,
660,
18,
1330,
12200,
11,
6698,
11,
12200,
21466,
11,
... | 2.763158 | 152 |
#!/usr/bin/env python3
#
# Copyright (c) 2021 Iliass Alami Qammouri
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
import conf.conf as conf
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
15069,
357,
66,
8,
33448,
314,
4528,
562,
978,
6277,
1195,
6475,
10300,
198,
2,
198,
2,
770,
318,
1479,
3788,
11,
11971,
739,
262,
17168,
13789,
13,
198,
2,
4091,
... | 3.063492 | 63 |
from ufdl.core_app.routers import UFDLRouter
from ..views.mixins import *
class UFDLImageClassificationRouter(UFDLRouter):
"""
Adds the route for adding/removing categories.
"""
routes = (
UFDLRouter.routes +
CategoriesViewSet.get_routes()
)
| [
6738,
334,
16344,
75,
13,
7295,
62,
1324,
13,
472,
1010,
1330,
471,
37,
19260,
49,
39605,
198,
198,
6738,
11485,
33571,
13,
19816,
1040,
1330,
1635,
628,
198,
4871,
471,
37,
19260,
5159,
9487,
2649,
49,
39605,
7,
36820,
19260,
49,
3... | 2.312 | 125 |
from .post_processing import *
from .predictor import Predictor
from .inferer import Inferer | [
6738,
764,
7353,
62,
36948,
1330,
1635,
198,
6738,
764,
79,
17407,
273,
1330,
49461,
273,
198,
6738,
764,
10745,
11882,
1330,
4806,
11882
] | 3.833333 | 24 |
#cities.urls
from django.urls import path
from introduction_to_django.cities.views import index, list_phones, phones_data, transaction_done_index, create_person, \
forms
urlpatterns = [
path('', index),
path('phones/', list_phones),
path('phones_shop/', phones_data),
path('transaction_done/', tran... | [
2,
66,
871,
13,
6371,
82,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
9793,
62,
1462,
62,
28241,
14208,
13,
66,
871,
13,
33571,
1330,
6376,
11,
1351,
62,
9708,
11,
9512,
62,
7890,
11,
8611,
62,
28060,
62,
... | 2.853333 | 150 |
from click.testing import CliRunner
from exasol_advanced_analytics_framework import deploy
from tests.utils.db_queries import DBQueries
from tests.utils.parameters import db_params
| [
6738,
3904,
13,
33407,
1330,
1012,
72,
49493,
198,
6738,
409,
292,
349,
62,
32225,
2903,
62,
38200,
14094,
62,
30604,
1330,
6061,
198,
6738,
5254,
13,
26791,
13,
9945,
62,
421,
10640,
1330,
20137,
4507,
10640,
198,
6738,
5254,
13,
267... | 3.557692 | 52 |
#!/usr/bin/env python
## ----------------------------------------------------------------------------
## Copyright 2016-2017 ARM Ltd.
##
## SPDX-License-Identifier: Apache-2.0
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## Yo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2235,
16529,
10541,
198,
2235,
15069,
1584,
12,
5539,
20359,
12052,
13,
198,
2235,
198,
2235,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
2235,
198,
2... | 2.330254 | 3,464 |
from django.forms import ModelForm
from django.contrib.auth.forms import UserCreationForm
from django import forms
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from .models import Tutor, PostAnAd
from .validators import validate_file_extension
| [
6738,
42625,
14208,
13,
23914,
1330,
9104,
8479,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
23914,
1330,
11787,
12443,
341,
8479,
198,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1... | 3.552941 | 85 |
from json import JSONEncoder
from regparser.notice.amdparser import Amendment
class AmendmentEncoder(JSONEncoder):
"""Custom JSON encoder to handle Amendment objects"""
| [
6738,
33918,
1330,
19449,
27195,
12342,
198,
198,
6738,
842,
48610,
13,
42138,
13,
321,
26059,
28198,
1330,
8441,
628,
198,
4871,
8441,
27195,
12342,
7,
40386,
27195,
12342,
2599,
198,
220,
220,
220,
37227,
15022,
19449,
2207,
12342,
284,... | 3.911111 | 45 |
from m5.SimObject import SimObject
from m5.params import *
# This was a helpful guide on how to call C++ from python in gem5:
# https://www.mail-archive.com/gem5-users@gem5.org/msg09060.html
# In particular, don't forget that:
# - the creation of the C++ objects is decoupled in time from the python ones,
# as C++ ... | [
220,
198,
6738,
285,
20,
13,
8890,
10267,
1330,
3184,
10267,
198,
6738,
285,
20,
13,
37266,
1330,
1635,
198,
198,
2,
770,
373,
257,
7613,
5698,
319,
703,
284,
869,
327,
4880,
422,
21015,
287,
16840,
20,
25,
198,
2,
3740,
1378,
250... | 3.080972 | 247 |
"""Module used to set, update and retrieve the global articles"""
ARTICLES = []
COVID_DATA_LIST = []
UPDATES = []
def init() -> None:
"""
Definition:
Initiates the global_vars module
"""
set_global_vars()
def set_global_vars() -> None:
"""
Defintion:
Sets the global variables... | [
37811,
26796,
973,
284,
900,
11,
4296,
290,
19818,
262,
3298,
6685,
37811,
198,
7227,
2149,
28378,
796,
17635,
198,
8220,
11008,
62,
26947,
62,
45849,
796,
17635,
198,
52,
5760,
29462,
796,
17635,
198,
198,
4299,
2315,
3419,
4613,
6045,... | 2.45977 | 870 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Calculates index of highways for usage openrouteservice as extended storage"""
__author__ = "Christina Ludwig, GIScience Research Group, Heidelberg University"
__email__ = "christina.ludwig@uni-heidelberg.de"
import os
import sys
import argparse
from modules.download i... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
9771,
3129,
689,
6376,
286,
27239,
329,
8748,
1280,
81,
448,
274,
712,
501,
355,
7083,
6143,
37811,
198,
198,
... | 2.317241 | 1,450 |
# pylint: skip-file
from core.log import LOG_PREFIX, logging
from core.rules import rule
from core.triggers import when
from personal.item import Group, Item
from personal.signalmessenger import SignalMessenger
logger = logging.getLogger('{}.CallMonitor'.format(LOG_PREFIX))
@rule('Call Monitor')
@when('Member of C... | [
2,
279,
2645,
600,
25,
14267,
12,
7753,
198,
6738,
4755,
13,
6404,
1330,
41605,
62,
47,
31688,
10426,
11,
18931,
198,
6738,
4755,
13,
38785,
1330,
3896,
198,
6738,
4755,
13,
2213,
328,
5355,
1330,
618,
198,
198,
6738,
2614,
13,
9186... | 3.323529 | 102 |
from django.contrib import admin
from .models import Product, ProductFile
class ProductFileInLine(admin.TabularInline):
"""
Inline classes do not have a separate section of their own in the admin section.
On viewing the product related to ProductFile model, it will contain a specific section related
... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
764,
27530,
1330,
8721,
11,
8721,
8979,
628,
198,
4871,
8721,
8979,
818,
13949,
7,
28482,
13,
33349,
934,
818,
1370,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
... | 3.696429 | 168 |
# -*- coding: utf-8 -*-
import bottle
import os
from os import path
import re
bottle.TEMPLATE_PATH.append(path.join(path.dirname(path.realpath(__file__)), "."))
app = bottle.Bottle()
State = enum(NONE=0, TITLE=1, ADDRESS=2, EXTRA=3)
patterns = [
{
"pattern": r'(0[0-9](\.| )?[0-9][0-9](\.| )?[0-9][0-9... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
9294,
198,
11748,
28686,
198,
6738,
28686,
1330,
3108,
198,
11748,
302,
628,
198,
10985,
293,
13,
51,
3620,
6489,
6158,
62,
34219,
13,
33295,
7,
6978,
13,
22179,
... | 1.884007 | 569 |
#python3
# import variables
import os, subprocess, time, json, logging
dockerPs = 'docker ps --format "{{ json .}}" | jq --slurp .'
# Vacuum cleaner for closed application and desktop containers
while True:
time.sleep(30)
X = subprocess.check_output(dockerPs, shell=True).decode('utf-8')
data = json.loa... | [
2,
29412,
18,
198,
198,
2,
1330,
9633,
198,
11748,
28686,
11,
850,
14681,
11,
640,
11,
33918,
11,
18931,
198,
198,
45986,
12016,
796,
705,
45986,
26692,
1377,
18982,
366,
27007,
33918,
764,
11709,
1,
930,
474,
80,
1377,
6649,
333,
7... | 2.837398 | 123 |
import collections
import os
import random
import sys
import hydra
import numpy as np
import omegaconf
import torch
import torchvision
import tqdm
base = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../")
sys.path.append(base)
from fbdb.utils import val_prep
from submodules.FourierHeatmap.fhmap import f... | [
11748,
17268,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
25064,
198,
198,
11748,
25039,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
267,
28917,
7807,
69,
198,
11748,
28034,
198,
11748,
28034,
10178,
198,
11748,
256,
80,
36020,
1... | 2.035651 | 2,272 |
from datetime import datetime
from decimal import Decimal
from gnucash_reports.configuration.current_date import get_today
from gnucash_reports.configuration.expense_categories import get_accounts_for_category
from gnucash_reports.utilities import clean_account_name
import enum
import piecash
import re
@enum.unique
... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
19967,
1229,
1077,
62,
48922,
13,
11250,
3924,
13,
14421,
62,
4475,
1330,
651,
62,
40838,
198,
6738,
19967,
1229,
1077,
62,
48922,
13,
11250,
3924,
13,
... | 2.653045 | 3,744 |
"""Process resource."""
import logging
from .base import BaseResolweResource
class DescriptorSchema(BaseResolweResource):
"""Resolwe DescriptorSchema resource.
:param resolwe: Resolwe instance
:type resolwe: Resolwe object
:param model_data: Resource model data
"""
endpoint = "descriptorsc... | [
37811,
18709,
8271,
526,
15931,
198,
11748,
18931,
198,
198,
6738,
764,
8692,
1330,
7308,
4965,
349,
732,
26198,
628,
198,
4871,
2935,
6519,
273,
27054,
2611,
7,
14881,
4965,
349,
732,
26198,
2599,
198,
220,
220,
220,
37227,
4965,
349,
... | 2.543333 | 300 |
import heapq
import sys
import time
from typing import Optional
# В этом файле активно используются type hints — возможность указать типы
# аргументов и возвращаемого результата у функций вот, например, так:
#
# def f(x: int, y: str) -> float:
#
# Первый аргумент функции f — это целое число, второй — строка, а возвращ... | [
11748,
24575,
80,
198,
11748,
25064,
198,
11748,
640,
198,
6738,
19720,
1330,
32233,
198,
198,
2,
12466,
240,
220,
141,
235,
20375,
25443,
120,
220,
141,
226,
16142,
140,
117,
30143,
16843,
12466,
108,
31583,
20375,
18849,
38857,
22177,
... | 1.354438 | 1,690 |
# _*_coding: UTF-8_*_
# 开发作者 :TXH
# 开发时间 :2020-09-08 10:20
# 文件名称 :Qt_Processbar.py
# 开发工具 :Python 3.7 + Pycharm IDE
import sys
from PyQt5.QtWidgets import QApplication, QDialog, QProgressBar
from PyQt5.QtCore import QRect
class pyqtbar():
'''
task_number和 total_task_number都为 0 时,不显示当前进行的任务情况
task_nu... | [
2,
4808,
9,
62,
66,
7656,
25,
41002,
12,
23,
62,
9,
62,
198,
2,
10263,
120,
222,
20998,
239,
43291,
38519,
27332,
120,
248,
29551,
39,
198,
2,
10263,
120,
222,
20998,
239,
33768,
114,
29785,
112,
27332,
120,
248,
42334,
12,
2931,
... | 1.530303 | 792 |
# pdf package
| [
2,
37124,
5301,
198
] | 3.5 | 4 |
import requests # pip install requests
import jwt # pip install pyjwt
from datetime import datetime as date
import os
from bs4 import BeautifulSoup
from config.settings import URL, GHOST_ADMIN_KEY
# Split the key into ID and SECRET
id, secret = GHOST_ADMIN_KEY.split(':')
| [
11748,
7007,
1303,
7347,
2721,
7007,
198,
11748,
474,
46569,
197,
2,
7347,
2721,
12972,
73,
46569,
198,
6738,
4818,
8079,
1330,
4818,
8079,
355,
3128,
198,
11748,
28686,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
4566,
... | 3.337349 | 83 |
import wikipedia
from itertools import count
from nlp_data_py.commons.bookdef import Book
from nlp_data_py.commons.splitter import Splitter
from nlp_data_py.dataset.dataset import Dataset
class WikiDataset(Dataset):
"""Create datasets such as train, test and val from wikipedia. This is an
implemention of Data... | [
11748,
47145,
11151,
198,
6738,
340,
861,
10141,
1330,
954,
198,
6738,
299,
34431,
62,
7890,
62,
9078,
13,
9503,
684,
13,
2070,
4299,
1330,
4897,
198,
6738,
299,
34431,
62,
7890,
62,
9078,
13,
9503,
684,
13,
22018,
1967,
1330,
13341,
... | 2.26366 | 3,459 |
import numpy as np
if __name__ == '__main__':
import time
t = time.time()
a = generate_anchors()
print time.time() - t
print a
from IPython import embed; embed()
| [
11748,
299,
32152,
355,
45941,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1330,
640,
198,
220,
220,
220,
256,
796,
640,
13,
2435,
3419,
198,
220,
220,
220,
257,
796,
7716,
62,
3702,
669,
... | 2.540541 | 74 |
import numpy as np
__all__ = [
'ensure_tuple',
'clip',
'compute_hidden_size',
]
| [
11748,
299,
32152,
355,
45941,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
705,
641,
495,
62,
83,
29291,
3256,
198,
220,
220,
220,
705,
15036,
3256,
198,
220,
220,
220,
705,
5589,
1133,
62,
30342,
62,
7857,
3256,
198,
6... | 2.086957 | 46 |
# -*- coding: utf-8 -*-
"""
jes.core.interpreter.exceptionrecord
====================================
This class holds information about exceptions.
(It's kinda twisty. It's been this way since '09, and I'm scared to change
it because it could subtly break the screenshots in the textbook.)
:copyright: (C) 2014 Matthe... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
73,
274,
13,
7295,
13,
3849,
3866,
353,
13,
1069,
4516,
22105,
198,
10052,
1421,
198,
1212,
1398,
6622,
1321,
546,
13269,
13,
198,
198,
7,
1026,
338,
17855... | 3.698266 | 1,730 |
# NeoPixel library strandtest example
# Author: Tony DiCola (tony@tonydicola.com)
#
# Direct port of the Arduino NeoPixel library strandtest example. Showcases
# various animations on a strip of NeoPixels.
import time
import math
from neopixel import *
import requests
import json
import time
#hue var
hue1 = "http:/... | [
2,
21227,
40809,
5888,
37923,
9288,
1672,
198,
2,
6434,
25,
8832,
6031,
28635,
357,
1122,
88,
31,
1122,
5173,
291,
5708,
13,
785,
8,
198,
2,
198,
2,
4128,
2493,
286,
262,
27634,
21227,
40809,
5888,
37923,
9288,
1672,
13,
220,
5438,
... | 2.53283 | 1,721 |
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
15069,
2864,
12,
42334,
12280,
897,
261,
11,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
... | 3.717391 | 184 |
# coding: utf-8
import numpy as np
import scipy.ndimage
import skimage.measure
import pydicom
import stl.mesh
import os, glob, argparse
def reset_orientation(voxels, slices, sample_idx=None):
"""
Reset the orientation to the LPH format.
That is:
X = Right -> Left
Y = Anterior -> Posterior
Z = inferior -> superi... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
358,
9060,
198,
11748,
1341,
9060,
13,
1326,
5015,
198,
11748,
279,
5173,
291,
296,
198,
11748,
336,
75,
13,
76,
5069,
198,
117... | 2.430556 | 1,008 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyDocutils(PythonPackage):
"""Docutils is an open-source text processing system for proces... | [
2,
15069,
2211,
12,
42334,
13914,
45036,
3549,
2351,
4765,
11,
11419,
290,
584,
198,
2,
1338,
441,
4935,
34152,
13,
4091,
262,
1353,
12,
5715,
27975,
38162,
9947,
2393,
329,
3307,
13,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,... | 2.169774 | 1,019 |
import random
IUPAC_RESOLVER = {
'R': ['A','G'],
'Y': ['C','T'],
'S': ['G','C'],
'W': ['A','T'],
'K': ['G','T'],
'M': ['A','C'],
'B': ['C','G','T'],
'D': ['A','G','T'],
'H': ['A','C','T'],
'V': ['A','C','G'],
'N': ['A','C','G','T'],
}
myseq = 'NNNNNNNNNNNNNNNNNNNNNNNNN'
mut... | [
11748,
4738,
198,
198,
40,
8577,
2246,
62,
19535,
3535,
5959,
796,
1391,
198,
220,
220,
220,
705,
49,
10354,
37250,
32,
41707,
38,
6,
4357,
198,
220,
220,
220,
705,
56,
10354,
37250,
34,
41707,
51,
6,
4357,
198,
220,
220,
220,
705... | 1.98722 | 313 |
import os
DB_HOST= os.getenv('DB_HOST')
| [
11748,
28686,
198,
198,
11012,
62,
39,
10892,
28,
28686,
13,
1136,
24330,
10786,
11012,
62,
39,
10892,
11537,
628
] | 2.1 | 20 |
""" Provide a consistent set of constants to use through CLMM """
from enum import Enum
import astropy.constants as astropyconst
import astropy.units as u
class Constants(Enum):
""" A set of constants for consistency throughout the
code and dependencies. """
CLIGHT = 299792458.0
""" Speed of light (m... | [
37811,
44290,
257,
6414,
900,
286,
38491,
284,
779,
832,
7852,
12038,
37227,
198,
6738,
33829,
1330,
2039,
388,
198,
11748,
6468,
28338,
13,
9979,
1187,
355,
6468,
28338,
9979,
198,
11748,
6468,
28338,
13,
41667,
355,
334,
628,
198,
487... | 2.359116 | 362 |
import numpy as np
y = np.random.poisson(lam=5, size=1000)
bins = np.bincount(y)
bins.argmax()
| [
11748,
299,
32152,
355,
45941,
198,
198,
88,
796,
45941,
13,
25120,
13,
7501,
30927,
7,
2543,
28,
20,
11,
2546,
28,
12825,
8,
198,
65,
1040,
796,
45941,
13,
65,
1939,
608,
7,
88,
8,
198,
65,
1040,
13,
853,
9806,
3419,
198
] | 2.181818 | 44 |
from typing import Any
from boa3.builtin import public
from boa3.builtin.interop.contract import call_contract
from boa3.builtin.type import UInt160
@public
| [
6738,
19720,
1330,
4377,
198,
198,
6738,
1489,
64,
18,
13,
18780,
259,
1330,
1171,
198,
6738,
1489,
64,
18,
13,
18780,
259,
13,
3849,
404,
13,
28484,
1330,
869,
62,
28484,
198,
6738,
1489,
64,
18,
13,
18780,
259,
13,
4906,
1330,
4... | 3.137255 | 51 |
"""
Custom integration to integrate pod_point with Home Assistant.
For more details about this integration, please refer to
https://github.com/mattrayner/pod-point-home-assistant-component
"""
import asyncio
from datetime import timedelta
import logging
from pathlib import Path
from typing import List, Dict
from home... | [
37811,
198,
15022,
11812,
284,
19386,
24573,
62,
4122,
351,
5995,
15286,
13,
198,
198,
1890,
517,
3307,
546,
428,
11812,
11,
3387,
3522,
284,
198,
5450,
1378,
12567,
13,
785,
14,
76,
1078,
2433,
1008,
14,
33320,
12,
4122,
12,
11195,
... | 2.733287 | 1,436 |
from NENV import *
import mailbox
class _Create_Carefully_Node(NodeBase):
"""
Create a file if it doesn't exist and open for reading and writing."""
title = '_create_carefully'
type_ = 'mailbox'
init_inputs = [
NodeInputBP(label='path'),
]
init_outputs = [
NodeOutpu... | [
198,
6738,
399,
1677,
53,
1330,
1635,
198,
198,
11748,
37282,
628,
198,
198,
4871,
4808,
16447,
62,
17784,
2759,
62,
19667,
7,
19667,
14881,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
13610,
257,
2393,
611,
340,
1595,
470,
... | 2.138067 | 1,014 |
n = int(input("Digite um numero: "))
frase = 'é par' if (n%2 == 0) else 'é impar'
print('O número testado é: ', frase) | [
77,
796,
493,
7,
15414,
7203,
19511,
578,
23781,
997,
3529,
25,
366,
4008,
198,
198,
8310,
589,
796,
705,
2634,
1582,
6,
611,
357,
77,
4,
17,
6624,
657,
8,
2073,
705,
2634,
848,
283,
6,
198,
198,
4798,
10786,
46,
299,
21356,
647... | 2.222222 | 54 |
raw_input = ""
test = False
def get(prompt=""):
"""Replaces the input function, to allow for input from a test file."""
if not test: # If this is the main program, just run the normal input
# function
return_value = str(input(prompt))
else: # If in testing mode, return the input from the... | [
1831,
62,
15414,
796,
13538,
198,
9288,
796,
10352,
628,
198,
4299,
651,
7,
16963,
457,
33151,
2599,
198,
220,
220,
220,
37227,
3041,
23625,
262,
5128,
2163,
11,
284,
1249,
329,
5128,
422,
257,
1332,
2393,
526,
15931,
198,
220,
220,
... | 2.794286 | 175 |
# -*- coding: utf-8 -*-
import logging
import sys
import click
import optuna
import plotly.io as pio
from src.models.train_model import optuna_objective, train_model
@click.command()
@click.argument("data_filepath", type=click.Path(), default="data")
@click.argument(
"trained_model_filepath", type=click.Path(),... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
11748,
25064,
198,
198,
11748,
3904,
198,
11748,
2172,
9613,
198,
11748,
7110,
306,
13,
952,
355,
279,
952,
198,
198,
6738,
12351,
13,
27530,
13,
2743... | 2.387315 | 1,624 |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
29113,
29113,
7804,
4242,
2235,
198,
2,
220,
220,
220,
220,
198,
2,
220,
220,
220,
4946,
1137,
47,
11,
4946,
8090,
8549,
28186,
198,
2,
220,
220,
220,
15069,
357,
34... | 3.775568 | 352 |
"""Vendor interface
"""
import abc
from typing import Dict, List
| [
37811,
53,
18738,
7071,
198,
220,
220,
220,
37227,
198,
198,
11748,
450,
66,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
628
] | 3.086957 | 23 |
from recombee_api_client.api_client import RecombeeClient
from recombee_api_client.api_requests import *
import json
import sys
print(sys.argv[1])
client = RecombeeClient('illinois-institue-of-tech-dev', 'igCzKWB3UwYFyn6B9NLalbywd9k9TmGOBiLtVZM3e80E0Djsmem55mt0kOYTiNPr')
#client = RecombeeClient('iitchicago-test4'... | [
198,
6738,
664,
296,
20963,
62,
15042,
62,
16366,
13,
15042,
62,
16366,
1330,
3311,
296,
20963,
11792,
198,
6738,
664,
296,
20963,
62,
15042,
62,
16366,
13,
15042,
62,
8897,
3558,
1330,
1635,
198,
11748,
33918,
198,
11748,
25064,
198,
... | 1.980952 | 315 |
# TODO : not ready
from collections import OrderedDict
# OUTDATED
if __name__ == '__main__':
instance = Problem()
| [
2,
16926,
46,
1058,
407,
3492,
198,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
2,
16289,
35,
11617,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
4554,
796,
20647,
3419,
198
] | 2.95122 | 41 |
import audiovisuaali
from random import randint
# Copied from somewhere
| [
11748,
2709,
16664,
271,
6413,
7344,
201,
198,
6738,
4738,
1330,
43720,
600,
201,
198,
201,
198,
2,
6955,
798,
422,
7382,
201,
198
] | 3.208333 | 24 |
import secrets
words = []
chars = 'abcdefghijklmnopqrstuvwxyz'
with open('eff_large_wordlist.txt') as wordlist:
for line in wordlist.readlines():
parts = line.split('\t')
if len(parts) > 1:
words.append(parts[1].strip())
if __name__ == '__main__':
import pyperclip
pyperclip.co... | [
11748,
13141,
198,
198,
10879,
796,
17635,
198,
354,
945,
796,
705,
39305,
4299,
456,
2926,
41582,
10295,
404,
80,
81,
301,
14795,
86,
5431,
89,
6,
198,
198,
4480,
1280,
10786,
14822,
62,
11664,
62,
4775,
4868,
13,
14116,
11537,
355,
... | 2.287671 | 146 |
pwd = 'postgres' | [
79,
16993,
796,
705,
7353,
34239,
6
] | 2.285714 | 7 |
"""Utility classes and methods for DB Adapters, Repositories and Query Constructors"""
# Standard Library Imports
import copy
import functools
import inspect
import logging
logger = logging.getLogger("protean.repository")
def subclasses(cls):
"""Iterator utilty to loop and clear registered Lookups against a clas... | [
37811,
18274,
879,
6097,
290,
5050,
329,
20137,
1215,
12126,
11,
1432,
35061,
290,
43301,
28407,
669,
37811,
198,
2,
8997,
10074,
1846,
3742,
198,
11748,
4866,
198,
11748,
1257,
310,
10141,
198,
11748,
10104,
198,
11748,
18931,
198,
198,
... | 2.444483 | 2,900 |
# Reference from https://learnxinyminutes.com/docs/python/
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # 6. Classes
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# We use the "class" statement to ... | [
2,
20984,
422,
3740,
1378,
35720,
87,
3541,
1084,
1769,
13,
785,
14,
31628,
14,
29412,
14,
198,
2,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
1303,
130... | 2.544601 | 639 |
import os
import re
import sys
import warnings
from datetime import timedelta
from runpy import run_path
from time import sleep
import click
import pandas as pd
from six import string_types
import catalyst
from catalyst.data.bundles import load
from catalyst.data.data_portal import DataPortal
from catalyst.exchange.e... | [
11748,
28686,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
14601,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
6738,
1057,
9078,
1330,
1057,
62,
6978,
198,
6738,
640,
1330,
3993,
198,
198,
11748,
3904,
198,
11748,
19798,
292,
355,
... | 2.262379 | 8,785 |
import unittest
from pathlib import Path
from unittest.mock import call
from unittest.mock import Mock
from unittest.mock import MagicMock
from unittest.mock import patch
from secbootctl.helpers.cli import CliPrintHelper
from tests import unittest_helper
# @todo install - add tests for errors if signing or verificat... | [
11748,
555,
715,
395,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
869,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
6139,
44,
735,
198,
6738,... | 3.211864 | 118 |
#!/usr/bin/env python
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
HERE = os.path.dirname(os.path.abspath(__file__))
setup(
name="django-json-rpc",
version="0.7.1",
description="A simple JSON-RPC implementation for Django",
long_description... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
900,
37623,
10141,
1330,
9058,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
1233,
26791,
13,
7295,
1330,
9058... | 2.635025 | 611 |
from __future__ import division
import inputs
import threading
mappings = {
'ABS_Z' :'left_trigger',
'ABS_RZ' :'right_trigger',
'BTN_TL' :'left_bumper',
'BTN_TR' :'right_bumper',
'ABS_X' :'left_stick_x',
'ABS_Y' :'left_stick_y',
'ABS_RX' :'right_stick_x',
... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
17311,
198,
11748,
4704,
278,
198,
198,
76,
39242,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
32,
4462,
62,
57,
6,
1058,
6,
9464,
62,
46284,
3256,
198,
220,
220,
220,
2... | 1.603774 | 636 |
#!/usr/bin/env python3
from __future__ import annotations
import torch
from ..utils.broadcasting import _pad_with_singletons
from ..utils.getitem import _noop_index
from .block_linear_operator import BlockLinearOperator
class SumBatchLinearOperator(BlockLinearOperator):
"""
Represents a linear operator tha... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
28034,
198,
198,
6738,
11485,
26791,
13,
36654,
19913,
1330,
4808,
15636,
62,
4480,
62,
12215,
1616,
684,
198,
6738,
11485... | 2.771513 | 337 |
import json
import uuid
import csv
import os
from datetime import datetime
from io import StringIO
from aiohttp import web
from aiohttp_jinja2 import template
from app.service.auth_svc import check_authorization
tactics = ['collection', 'command-and-control', 'credential-access', 'defense-evasion', 'discovery', 'exe... | [
11748,
33918,
198,
11748,
334,
27112,
198,
11748,
269,
21370,
198,
11748,
28686,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
33245,
1330,
10903,
9399,
198,
6738,
257,
952,
4023,
1330,
3992,
198,
6738,
257,
952,
4023,
62,
18... | 3.404255 | 141 |
import os
import re
import openpyxl
# Get current working directory
ROOT_DIR = os.getcwd()
# Change directory
RESULTS_TXT_PATH = os.path.join(ROOT_DIR, "assets/" "output_data_train.txt")
RESULTS_XLS_PATH = os.path.join(ROOT_DIR, "assets/" "visualize_data.xlsx")
# Create workbook
wb = openpyxl.Workbook()
wb.save(RESU... | [
11748,
28686,
198,
11748,
302,
198,
11748,
1280,
9078,
87,
75,
198,
198,
2,
3497,
1459,
1762,
8619,
198,
13252,
2394,
62,
34720,
796,
28686,
13,
1136,
66,
16993,
3419,
198,
198,
2,
9794,
8619,
198,
46274,
62,
51,
25010,
62,
34219,
7... | 2.209615 | 520 |
"""
WSGI config for caravaggio project.
It exposes the WSGI callable as a module-level variable named ``application``.
"""
import os
from configurations.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "caravaggio_rest_api.settings")
os.environ.setdefault("DJANGO_CONFIGURATION", "dev... | [
37811,
198,
19416,
18878,
4566,
329,
1097,
615,
9460,
952,
1628,
13,
198,
198,
1026,
32142,
262,
25290,
18878,
869,
540,
355,
257,
8265,
12,
5715,
7885,
3706,
7559,
31438,
15506,
13,
198,
37811,
198,
198,
11748,
28686,
198,
198,
6738,
... | 3.127119 | 118 |
import tensorflow as tf
from tensorflow import Tensor
| [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
1330,
309,
22854,
628
] | 3.666667 | 15 |
import discord
from discord.ext.commands import Greedy
from redbot.core import commands, checks
from redbot.core.utils.chat_formatting import box
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
from .constants import ACTION_CONFIRMATION
from .rules.config.models import BlackOrWhiteList
from .utils import (
... | [
11748,
36446,
198,
6738,
36446,
13,
2302,
13,
9503,
1746,
1330,
11955,
4716,
198,
6738,
2266,
13645,
13,
7295,
1330,
9729,
11,
8794,
198,
6738,
2266,
13645,
13,
7295,
13,
26791,
13,
17006,
62,
18982,
889,
1330,
3091,
198,
6738,
2266,
... | 2.307529 | 11,755 |
from reportlab.platypus import NextPageTemplate, PageBreak
from facturapdf.helper import chunks
| [
6738,
989,
23912,
13,
489,
265,
4464,
385,
1330,
7406,
9876,
30800,
11,
7873,
31737,
198,
6738,
1109,
333,
499,
7568,
13,
2978,
525,
1330,
22716,
198
] | 3.555556 | 27 |
#!/usr/bin/python3
import urllib.request
import urllib.parse
import json
import pprint
import os.path
k = open('apikeyfile', 'r')
apikey = k.read()
k.close()
base_url = 'https://na.api.pvp.net/api/lol/na/v2.2/match'
match_url = '{0}/1900737521?api_key={1}'.format(base_url, apikey)
req = urllib.request.urlopen(match_u... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
2956,
297,
571,
13,
29572,
198,
11748,
33918,
198,
11748,
279,
4798,
198,
11748,
28686,
13,
6978,
198,
198,
74,
796,
1280,
10786,
499,
522,
... | 2.37 | 200 |
from rest_framework import serializers
from .models import Task
class TaskSerializer(serializers.ModelSerializer):
"""
Serializer for task API endpoint data.
"""
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
764,
27530,
1330,
15941,
628,
198,
4871,
15941,
32634,
7509,
7,
46911,
11341,
13,
17633,
32634,
7509,
2599,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
23283,
7509,
329,
4876,
782... | 3.54 | 50 |
from django.conf.urls import patterns, include, url
import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^home', views.home, name='home'),
url(r'^export', views.export, name='export'),
url(r'^howitworks', views.how_it_works, name='how_it_works'),
... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
11748,
5009,
198,
198,
6371,
33279,
82,
796,
7572,
10786,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
19016,
7,
81,
6,
61,
3,
3256,
5009,
13,
963... | 2.330049 | 203 |
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name, protected-acess, bare-except
"""\
CML Simulation
--------------
This module defines :class:`CMLSimulation` that provides a pythonic interface
to detail with a CML case directory. In addition to implementing methods to
perform actions, it also tracks the state of... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
279,
2645,
600,
25,
15560,
28,
259,
12102,
12,
3672,
11,
6861,
12,
330,
408,
11,
6247,
12,
16341,
198,
198,
37811,
59,
198,
34,
5805,
41798,
198,
26171,
198,
198,... | 2.126313 | 13,047 |
# This file is part of Charlton
# Copyright (C) 2011 Nathaniel Smith <njs@pobox.com>
# See file COPYING for license information.
# The core 'origin' tracking system. This point of this is to have machinery
# so if some object is ultimately derived from some portion of a string (e.g.,
# a formula), then we can keep tra... | [
2,
770,
2393,
318,
636,
286,
6258,
1122,
198,
2,
15069,
357,
34,
8,
2813,
49536,
4176,
1279,
77,
8457,
31,
79,
672,
1140,
13,
785,
29,
198,
2,
4091,
2393,
27975,
45761,
329,
5964,
1321,
13,
198,
198,
2,
383,
4755,
705,
47103,
6,... | 3.634783 | 115 |
import os
import scrapy
from scrapy.http import Request
import re
import w3lib.url
import mimetypes
from urlparse import urlparse
from IITGSearch.items import IITGSearchItem
from scrapy.linkextractors import LinkExtractor
| [
11748,
28686,
198,
11748,
15881,
88,
198,
6738,
15881,
88,
13,
4023,
1330,
19390,
198,
11748,
302,
198,
11748,
266,
18,
8019,
13,
6371,
198,
11748,
17007,
2963,
12272,
198,
6738,
19016,
29572,
1330,
19016,
29572,
198,
6738,
314,
2043,
1... | 3.430769 | 65 |
import logging
import os
import sys
from typing import Any, Optional
import redis
from django.conf import settings
logger = logging.getLogger(__name__)
| [
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
6738,
19720,
1330,
4377,
11,
32233,
198,
198,
11748,
2266,
271,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
628,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
36... | 3.395833 | 48 |
# Copyright (c) 2001-2022 Aspose Pty Ltd. All Rights Reserved.
#
# This file is part of Aspose.Words. The source code in this file
# is only intended as a supplement to the documentation, and is provided
# "as is", without warranty of any kind, either expressed or implied.
import aspose.words as aw
from api_e... | [
2,
15069,
357,
66,
8,
5878,
12,
1238,
1828,
1081,
3455,
350,
774,
12052,
13,
1439,
6923,
33876,
13,
201,
198,
2,
201,
198,
2,
770,
2393,
318,
636,
286,
1081,
3455,
13,
37117,
13,
383,
2723,
2438,
287,
428,
2393,
201,
198,
2,
318... | 3.363636 | 110 |
#!/usr/bin/python
import sys
# Takes a list of PDBs generated by Rosetta and assembles them into a single file suitable for analysis by Gromacs programs or dm.py
# To run enter "run ./pdb_assembler.py output_file_name.pdb input_file_names_without_appended_number_*"
# To pull from set of folders run as "run ./pdb_assem... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
25064,
198,
2,
33687,
257,
1351,
286,
350,
11012,
82,
7560,
416,
10018,
15253,
290,
11156,
829,
606,
656,
257,
2060,
2393,
11080,
329,
3781,
416,
402,
398,
16436,
4056,
393,
288,
... | 2.572447 | 421 |