content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
listagem = ('lapis', 1.75,
'Borracha', 2,
'Caderno', 15.90,
'Estojo', 25,
'Trasferidor', 4.20,
'Compasso', 9.90,
'Mochila ', 120.30,
'Canetas', 22.90,
'Livros', 100)
print('Listagem de preços:')
print('--' * 17)
for pos in range(0, len(list... | [
4868,
363,
368,
796,
19203,
37796,
271,
3256,
352,
13,
2425,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
33,
38890,
34518,
3256,
362,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
34,
324,
24100,
3256,
... | 1.684211 | 266 |
from secrets import token_urlsafe
from floodsystem.utils import sorted_by_key, gt_with_none
'''
def stations_highest_rel_level(stations, N):
for station in stations:
x= sorted_by_key(stations,station.latest_level,True)
At_risk_stations=x[:N]
return At_risk_stations
'''
| [
6738,
13141,
1330,
11241,
62,
6371,
21230,
198,
6738,
6947,
10057,
13,
26791,
1330,
23243,
62,
1525,
62,
2539,
11,
308,
83,
62,
4480,
62,
23108,
220,
628,
198,
7061,
6,
198,
4299,
8985,
62,
35323,
62,
2411,
62,
5715,
7,
301,
602,
... | 2.533898 | 118 |
from app import create_app
from pathlib import Path
from app.seedDB import seed_database
from app.utils import migrate_database
config = Path("config/development.py")
application = create_app(config) # call from wsgi server
migrate_database(application)
seed_database(application)
if __name__ == "__main... | [
6738,
598,
1330,
2251,
62,
1324,
201,
198,
6738,
3108,
8019,
1330,
10644,
201,
198,
6738,
598,
13,
28826,
11012,
1330,
9403,
62,
48806,
201,
198,
6738,
598,
13,
26791,
1330,
32492,
62,
48806,
201,
198,
201,
198,
201,
198,
11250,
796,
... | 3.116071 | 112 |
from pathlib import Path
from tuulfile.directory import cd
| [
6738,
3108,
8019,
1330,
10644,
198,
6738,
12777,
4754,
576,
13,
34945,
1330,
22927,
628
] | 4 | 15 |
#!/usr/bin/env python3
__version__ = "2.1.4"
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
834,
9641,
834,
796,
366,
17,
13,
16,
13,
19,
1,
198
] | 2.045455 | 22 |
# pylint: disable=too-many-lines,invalid-name
import sqlite3
from parsimonious import Grammar, ParseError
from allennlp.common.testing import AllenNlpTestCase
from allennlp.semparse.worlds.text2sql_world import Text2SqlWorld
from allennlp.semparse.contexts.sql_context_utils import format_grammar_string
from allennlp... | [
2,
279,
2645,
600,
25,
15560,
28,
18820,
12,
21834,
12,
6615,
11,
259,
12102,
12,
3672,
198,
198,
11748,
44161,
578,
18,
198,
198,
6738,
13544,
20473,
699,
1330,
20159,
3876,
11,
2547,
325,
12331,
198,
198,
6738,
477,
1697,
34431,
1... | 3.081967 | 122 |
from .shortener import Shortener
| [
6738,
764,
19509,
877,
1330,
10073,
877,
628
] | 4.25 | 8 |
"""
Custom exceptions for geolocate.
Programmed by: Dante Signal31
email: dante.signal31@gmail.com
"""
# TODO: Find the way to take this code back to geowrapper module.
# This class shouldn't be here. Initially it was defined at geowrapper module.
# Problem is that when class is there, test_GeolocateInputParser_n... | [
37811,
198,
8562,
13269,
329,
4903,
349,
13369,
13,
628,
6118,
1150,
416,
25,
34898,
26484,
3132,
628,
3053,
25,
288,
12427,
13,
12683,
282,
3132,
31,
14816,
13,
785,
198,
37811,
198,
198,
2,
16926,
46,
25,
9938,
262,
835,
284,
1011... | 3.592784 | 194 |
import glob
import os
import sys
from argparse import ArgumentParser
from datetime import datetime
import numpy as np
import torch
import torch.utils.data as Data
import torch.nn.functional as F
from Functions import generate_grid, Dataset_epoch, Dataset_epoch_validation, transform_unit_flow_to_flow_cuda, \
gener... | [
11748,
15095,
198,
11748,
28686,
198,
11748,
25064,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
26791,
13,
7890,
3... | 2.249456 | 1,379 |
import subprocess
import logging
import git
# Installs a mutable grafana on the Kubernetes/OpenShift cluster and loads the performance dashboards
| [
11748,
850,
14681,
198,
11748,
18931,
198,
11748,
17606,
628,
198,
2,
2262,
5691,
257,
4517,
540,
7933,
69,
2271,
319,
262,
12554,
527,
3262,
274,
14,
11505,
33377,
13946,
290,
15989,
262,
2854,
14470,
12821,
198
] | 4 | 37 |
import ast
import base64
import inspect
import json
import logging
import os
import random
import re
import string
import sys
from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.validators import MinValueValidator, MaxValueValidator
from django.... | [
11748,
6468,
198,
11748,
2779,
2414,
198,
11748,
10104,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
4731,
198,
11748,
25064,
198,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
... | 2.494082 | 3,971 |
"""
Test get_Kozak_seq, get_consensus_Kozak_seq and get_line_Kozak_matrix
"""
from tests.transcript.config import genome, transcript2
import pandas as pd
import pandas.util.testing as pdt
| [
37811,
198,
14402,
651,
62,
42,
8590,
461,
62,
41068,
11,
651,
62,
5936,
7314,
62,
42,
8590,
461,
62,
41068,
290,
651,
62,
1370,
62,
42,
8590,
461,
62,
6759,
8609,
198,
37811,
198,
198,
6738,
5254,
13,
7645,
6519,
13,
11250,
1330,... | 2.771429 | 70 |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | [
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,... | 2.67076 | 1,303 |
import angr
from angr.sim_type import SimTypeString
import logging
l = logging.getLogger("angr.procedures.posix.strtok_r")
#pylint:disable=arguments-differ
| [
11748,
281,
2164,
198,
6738,
281,
2164,
13,
14323,
62,
4906,
1330,
3184,
6030,
10100,
198,
198,
11748,
18931,
198,
75,
796,
18931,
13,
1136,
11187,
1362,
7203,
648,
81,
13,
1676,
771,
942,
13,
1930,
844,
13,
2536,
83,
482,
62,
81,
... | 2.639344 | 61 |
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed
from flask_login import current_user
from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError
from project.models import kullanicilar, s... | [
6738,
42903,
62,
86,
27110,
1330,
46947,
8479,
198,
6738,
42903,
62,
86,
27110,
13,
7753,
1330,
9220,
15878,
11,
9220,
3237,
6972,
198,
6738,
42903,
62,
38235,
1330,
1459,
62,
7220,
198,
6738,
266,
83,
23914,
1330,
10903,
15878,
11,
3... | 2.945578 | 147 |
#!/usr/bin/env python
from setuptools import setup
setup(name='dq',
version='1.0',
description='Technical And Business Data Quality Framework',
author='Kanchan Tewary',
author_email='kanchan.tewary@gmail.com',
url='',
packages=['dq'],
)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
3672,
11639,
49506,
3256,
198,
220,
220,
220,
220,
220,
2196,
11639,
16,
13,
15,
3256,
198,
220,
220,
220,
220,
220,
676... | 2.434783 | 115 |
# Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | [
2,
15069,
383,
9485,
15884,
354,
12469,
1074,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
1... | 3.109792 | 337 |
# -*- test-case-name: go.apps.jsbox.tests.test_outbound -*-
# -*- coding: utf-8 -*-
"""Outbound message resource for JS Box sandboxes"""
from twisted.internet.defer import inlineCallbacks, returnValue, succeed
from vumi.application.sandbox import SandboxResource
from vumi.message import TransportUserMessage
from vum... | [
2,
532,
9,
12,
1332,
12,
7442,
12,
3672,
25,
467,
13,
18211,
13,
8457,
3524,
13,
41989,
13,
9288,
62,
448,
7784,
532,
9,
12,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
7975,
7784,
3275,
827... | 2.218128 | 3,718 |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# author:jingtongyu
# datetime:2020/6/19 3:25 下午
# software: PyCharm
from flask_restful import Resource, inputs
from flask_restful.reqparse import RequestParser
from common import code, pretty_result
from common.decorators import login_required
import json, os
class RouterR... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
12,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
2,
1772,
25,
49940,
83,
506,
24767,
198,
2,
4818,
8079,
25,
42334,
14,
21,
14,
1129,
513,
25,
1495,
220,
10310,
233,
39... | 2.18429 | 331 |
import h5py
import numpy as np
import os
def resolveFile(filename,path=None):
''' get a filename to a config file based the hardcoded path '''
if path is None:
path,theFile=os.path.split(__file__)
path=os.path.join(path,'data')
fullfile=os.path.join(path,filename)
return fullfile
... | [
11748,
289,
20,
9078,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
628,
198,
4299,
10568,
8979,
7,
34345,
11,
6978,
28,
14202,
2599,
198,
220,
220,
220,
705,
7061,
651,
257,
29472,
284,
257,
4566,
2393,
1912,
262,
1327,
4097... | 1.86261 | 1,019 |
from django.core.management.base import BaseCommand, CommandError
from datetime import date, timedelta
# from parse.models import *
| [
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
11,
9455,
12331,
198,
6738,
4818,
8079,
1330,
3128,
11,
28805,
12514,
198,
2,
422,
21136,
13,
27530,
1330,
1635,
198
] | 4 | 33 |
#!/usr/bin/env python
from ansible.module_utils.helpers import Helpers as helpers
argument_spec = {
'console_sock': {'required': True, 'type': 'str'},
'failover_params': {'required': False, 'type': 'raw'},
'netbox_call_timeout': {'required': False, 'type': 'int'},
'upload_config_timeout': {'required':... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
9093,
856,
13,
21412,
62,
26791,
13,
16794,
364,
1330,
10478,
364,
355,
49385,
198,
198,
49140,
62,
16684,
796,
1391,
198,
220,
220,
220,
705,
41947,
62,
82,
735,
10354,
1... | 2.59434 | 212 |
import sys
from camxes import parse, isgrammatical
print parse(sys.argv[1])
print
if not isgrammatical(sys.argv[1]):
print 'not',
print 'grammatical:', sys.argv[1]
| [
11748,
25064,
198,
6738,
12172,
48169,
1330,
21136,
11,
318,
4546,
44935,
198,
198,
4798,
21136,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
4798,
198,
361,
407,
318,
4546,
44935,
7,
17597,
13,
853,
85,
58,
16,
60,
2599,
198,
220,
... | 2.640625 | 64 |
from os.path import join
import nibabel as nib
import pickle
def make_path(fmri_dir, subject, ROI):
""" Create path to data file for given base dir, subject and ROI.
Parameters
----------
fmri_dir : str
path to fMRI data.
subject : int or str
subject number if int, 'sub#num' if str... | [
6738,
28686,
13,
6978,
1330,
4654,
198,
11748,
33272,
9608,
355,
33272,
198,
11748,
2298,
293,
198,
198,
4299,
787,
62,
6978,
7,
38353,
380,
62,
15908,
11,
2426,
11,
15107,
40,
2599,
198,
220,
220,
220,
37227,
13610,
3108,
284,
1366,
... | 2.424 | 250 |
# -*- coding: utf-8 -*-
"""
5.11 归并排序
"""
from __future__ import print_function
def merge_sort(alist):
"""
归并排序是一种递归算法,不断将列表拆分为一半。
如果列表为空或有一个项,则按定义(基本情况)进行排序。
如果列表有多个项,我们分割列表,并递归调用两个半部分的合并排序。
一旦对这两半排序完成,就执行合并操作。
合并是获取两个较小的排序列表并将它们组合成单个排序的新列表的过程。
O(nlog^n)
"""
print("Splitting ",... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
20,
13,
1157,
10263,
121,
240,
33176,
35050,
236,
240,
41753,
237,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
628,
198,
4299,
... | 1.239923 | 1,042 |
#!/bin/python3
import math
import os
import random
import re
import sys
import functools
from collections import Counter
if __name__ == '__main__':
n = int(input())
arr = list(map(int, input().rstrip().split()))
plusMinus(arr)
| [
2,
48443,
8800,
14,
29412,
18,
198,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
1257,
310,
10141,
198,
6738,
17268,
1330,
15034,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834... | 2.858824 | 85 |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function
import re
import os
import yaml
import json
import sys
OUTPUT_DIR = 'output'
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
302,
198,
11748,
28686,
198,
11748,
331,
43695,
198,
... | 2.671875 | 64 |
import mysql.connector as mysql
from mysql.connector import Error
import pandas as pd
arquivo = pd.read_csv(r'C:/Users/monitor/Downloads/teste/teste.csv', skiprows=6, sep=';')
df = pd.DataFrame(arquivo)
try:
conexao = mysql.connect(host='localhost', database='db_sm', user='root', password='douglas123')
if c... | [
11748,
48761,
13,
8443,
273,
355,
48761,
198,
6738,
48761,
13,
8443,
273,
1330,
13047,
198,
11748,
19798,
292,
355,
279,
67,
220,
198,
198,
283,
421,
23593,
796,
279,
67,
13,
961,
62,
40664,
7,
81,
6,
34,
14079,
14490,
14,
41143,
... | 2.267956 | 1,086 |
import pytest
from django.core.exceptions import MultipleObjectsReturned
from guardian.shortcuts import assign_perm
from grandchallenge.documentation.models import DocPage
from tests.documentation_tests.factories import DocPageFactory
from tests.factories import UserFactory
from tests.utils import get_view_for_... | [
11748,
12972,
9288,
201,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
20401,
10267,
82,
13615,
276,
201,
198,
6738,
21688,
13,
19509,
23779,
1330,
8333,
62,
16321,
201,
198,
201,
198,
6738,
4490,
36747,
3540,
13,
22897,
341... | 2.342618 | 359 |
"""
created by @mrconfused and @sandy1709
Idea by @BlazingRobonix
"""
# Copyright (C) 2020 sandeep.n(π.$)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 o... | [
198,
37811,
198,
25598,
416,
2488,
43395,
10414,
1484,
290,
2488,
82,
10757,
1558,
2931,
198,
41452,
64,
416,
2488,
3629,
4070,
14350,
261,
844,
198,
37811,
198,
2,
220,
220,
220,
15069,
357,
34,
8,
12131,
220,
6450,
68,
538,
13,
77... | 3.060325 | 431 |
import argparse
import os
from pathlib import Path
import warnings
warnings.filterwarnings('ignore', category=FutureWarning)
import joblib
from keras import backend as K
from keras.callbacks import CSVLogger, EarlyStopping
from sklearn.model_selection import train_test_split
import tensorflow as tf
tf.logging.set_verb... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
14601,
198,
40539,
654,
13,
24455,
40539,
654,
10786,
46430,
3256,
6536,
28,
29783,
20361,
8,
198,
198,
11748,
1693,
8019,
198,
6738,
41927,
292,
1330,... | 3.27027 | 148 |
import tensorflow as tf
| [
11748,
11192,
273,
11125,
355,
48700,
198
] | 3.428571 | 7 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-10-08 08:36
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
19,
319,
2177,
12,
940,
12,
2919,
8487,
25,
2623,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
1... | 2.883117 | 77 |
'''Views which are mapped from the URL objects in urls.py
.. moduleauthor:: Aaron France <aaron.france@hp.com>
:platform: All
:synopsis: Module which contains view functions that are mapped from urls
'''
import datetime
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.shor... | [
7061,
6,
7680,
82,
543,
389,
27661,
422,
262,
10289,
5563,
287,
2956,
7278,
13,
9078,
628,
220,
220,
220,
11485,
8265,
9800,
3712,
12139,
4881,
1279,
64,
8045,
13,
69,
8132,
31,
24831,
13,
785,
29,
628,
220,
220,
220,
1058,
24254,
... | 2.402466 | 8,192 |
"""
A collection of basic statistical functions for Python.
References
----------
.. [CRCProbStat2000] Zwillinger, D. and Kokoska, S. (2000). CRC Standard
Probability and Statistics Tables and Formulae. Chapman & Hall: New
York. 2000.
"""
import cupy as cp
def trim_mean(a, proportiontocut, axis=0):
"""Retu... | [
37811,
198,
32,
4947,
286,
4096,
13905,
5499,
329,
11361,
13,
198,
198,
19927,
198,
35937,
198,
492,
685,
34,
7397,
2964,
65,
17126,
11024,
60,
1168,
10594,
3889,
11,
360,
13,
290,
35020,
418,
4914,
11,
311,
13,
357,
11024,
737,
456... | 2.40226 | 885 |
"""
simple Go program RBH 2019
* generate legal moves and game score
* based on a subset of M Mueller's Go0 Go1 programs
* also allow rectangular boards, so with columns != rows
1 <= R <= 9 rows
1 <= C <= 9 columns
working features
* make legal moves (Tromp-Taylor, no suicide, po... | [
37811,
198,
36439,
1514,
1430,
220,
17986,
39,
13130,
220,
220,
220,
220,
198,
220,
1635,
7716,
2742,
6100,
290,
983,
4776,
198,
220,
1635,
1912,
319,
257,
24637,
286,
337,
17768,
338,
1514,
15,
1514,
16,
4056,
198,
220,
1635,
635,
... | 2.220503 | 517 |
import setup_path
import airsim
import drone_orbit
import os
import time
import math
from PIL import Image
client = airsim.MultirotorClient()
client.confirmConnection()
client.enableApiControl(True)
client.armDisarm(True)
landed = client.getMultirotorState().landed_state
if landed == airsim.LandedState.Landed:
... | [
11748,
9058,
62,
6978,
220,
198,
11748,
1633,
14323,
198,
198,
11748,
12170,
62,
42594,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
10688,
198,
6738,
350,
4146,
1330,
7412,
198,
198,
16366,
796,
1633,
14323,
13,
15205,
7058,
13165,
... | 2.706186 | 1,164 |
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | [
2,
15069,
2177,
12,
7908,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
921,
198,
2,
743,
407,
779,
... | 3.785714 | 168 |
# Created by MechAviv
# ID :: [101000010]
# Ellinia : Magic Library
if sm.hasQuest(25559):
sm.completeQuest(25559)
elif not "1" in sm.getQRValue(2790) and chr.getLevel() == 10:
sm.createQuestWithQRValue(2790, "1") | [
2,
15622,
416,
18202,
7355,
452,
198,
2,
4522,
7904,
685,
8784,
2388,
940,
60,
198,
2,
7122,
43168,
1058,
6139,
10074,
198,
361,
895,
13,
10134,
12166,
7,
1495,
38605,
2599,
198,
220,
220,
220,
895,
13,
20751,
12166,
7,
1495,
38605,... | 2.428571 | 91 |
from django.shortcuts import render
from django.http import HttpResponse
from django.views.decorators.http import require_POST
from django.views.decorators.csrf import csrf_exempt
import json
from .models import RequestDataJson, RequestDataText
@csrf_exempt
@require_POST
# Create your views here.
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
4023,
1330,
2421,
62,
32782,
198,
6738,
42625,
14208,
13,
33571,
... | 3.333333 | 90 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'designer/tab1.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
705,
26124,
263,
14,
8658,
16,
13,
9019,
6,
198,
2,
198,
2,
15622,
416,
25,
9485,
48,
83,
20,
12454,
2438,
1730... | 2.784091 | 88 |
"""Fix default for locale
Revision ID: 215dc3cce5c3
Revises: 294c1896fc24
Create Date: 2019-08-19 15:57:14.724883
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '215dc3cce5c3'
down_revision = '294c1896fc24'
branch_labels = None
depends_on = None
| [
37811,
22743,
4277,
329,
36693,
198,
198,
18009,
1166,
4522,
25,
22951,
17896,
18,
66,
344,
20,
66,
18,
198,
18009,
2696,
25,
41235,
66,
1507,
4846,
16072,
1731,
198,
16447,
7536,
25,
13130,
12,
2919,
12,
1129,
1315,
25,
3553,
25,
1... | 2.545455 | 121 |
from XXX_PROJECT_NAME_XXX.settings import * # noqa
# Override any settings required for tests here
| [
198,
6738,
27713,
62,
31190,
23680,
62,
20608,
62,
43145,
13,
33692,
1330,
1635,
220,
1303,
645,
20402,
198,
198,
2,
3827,
13154,
597,
6460,
2672,
329,
5254,
994,
198
] | 3.4 | 30 |
#!/usr/bin/env python
#coding:utf-8
#from __future__ import unicode_literals
from __future__ import division
"""
WordCloud Example
===============
Generating a wordcloud with given content & options
"""
import os
import sys
from os import path
from glob import glob
from time import time
import random
import getopt
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
66,
7656,
25,
40477,
12,
23,
198,
2,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
198,
37811,
198,
26449,
18839,
17934,... | 2.343594 | 1,202 |
from django.contrib import admin
from .models import Group, Entry
admin.site.register(Entry)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
4912,
11,
21617,
198,
198,
28482,
13,
15654,
13,
30238,
7,
30150,
8,
198
] | 3.481481 | 27 |
import pandas as pd
df = pd.read_excel("meta/micro_metadata_5.xlsx", index_col=0, engine='openpyxl', header=0)
print(df.shape)
df.drop(df.loc[df['primary_microconstituent'] == "figure"].index, inplace=True)
print(df.shape)
df.to_excel("meta/micro_metadata_6.xlsx")
| [
11748,
19798,
292,
355,
279,
67,
198,
198,
7568,
796,
279,
67,
13,
961,
62,
1069,
5276,
7203,
28961,
14,
24055,
62,
38993,
62,
20,
13,
87,
7278,
87,
1600,
6376,
62,
4033,
28,
15,
11,
3113,
11639,
9654,
9078,
87,
75,
3256,
13639,
... | 2.383929 | 112 |
#!/usr/bin/env python
"""
An alternative, more direct implementation of event handling using cffi
calls to SDL functions. The current code is incomplete, but can be
extended easily by following the official SDL documentation.
This module be run directly like any other event get example, but is meant
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
220,
220,
220,
1052,
5559,
11,
517,
1277,
7822,
286,
1785,
9041,
1262,
269,
487,
72,
198,
220,
220,
220,
3848,
284,
45417,
5499,
13,
220,
383,
1459,
2438,
318,
17503,
11,... | 2.332159 | 2,839 |
from django.contrib import admin
from .models import (
User,
Client,
)
@admin.register(User)
class UserAdmin(admin.ModelAdmin):
"""
Custom User Model Admin
"""
model = User
search_fields = ('first_name', 'last_name',)
list_filter = ('email', 'first_name', 'last_name', 'is_active',
'is_client', 'is_employ... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
357,
198,
197,
12982,
11,
198,
197,
11792,
11,
198,
8,
628,
198,
31,
28482,
13,
30238,
7,
12982,
8,
198,
4871,
11787,
46787,
7,
28482,
13,
17633,
46787,
25... | 2.672209 | 421 |
import numpy as np
import logging
logger = logging.getLogger(__name__)
| [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
18931,
201,
198,
201,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
201,
198,
201,
198
] | 2.6 | 30 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-04-04 19:56
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,
24,
319,
1584,
12,
3023,
12,
3023,
678,
25,
3980,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
... | 2.781818 | 55 |
import logging
import hashlib
from Pyro4.errors import *
from Backend.DHT.Settings import *
import Pyro4
import sys
import socket
import os
Pyro4.config.SERIALIZER = "pickle"
Pyro4.config.SERIALIZERS_ACCEPTED.add("pickle")
Pyro4.config.THREADPOOL_SIZE = THREADPOOL
sys.excepthook = Pyro4.util.excepthook
# get current ... | [
11748,
18931,
198,
11748,
12234,
8019,
198,
6738,
44954,
19,
13,
48277,
1330,
1635,
198,
6738,
5157,
437,
13,
35,
6535,
13,
26232,
1330,
1635,
198,
11748,
44954,
19,
198,
11748,
25064,
198,
11748,
17802,
198,
11748,
28686,
198,
198,
205... | 2.850649 | 154 |
from django.contrib import admin
# Register your models here.
from .models import Business, ContactMessage, Event, Executive, ExecutiveRole, Configuration, Image, Madarasah, MadarasahCategory, Product, Programme, Course, Book, Project, Scholarship, Slider
admin.site.site_header = "GMSA(UCC)"
admin.site.index_title = ... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
2,
17296,
534,
4981,
994,
13,
198,
6738,
764,
27530,
1330,
7320,
11,
14039,
12837,
11,
8558,
11,
10390,
11,
10390,
47445,
11,
28373,
11,
7412,
11,
4627,
283,
292,
993,
11,
46... | 3.310345 | 261 |
# -*- coding: UTF-8 -*-
"""
Image CAPTCHA
"""
import base64
import imghdr
import io
import pathlib
from dataclasses import dataclass
from typing import Union, Optional
from .base import BaseCaptcha, BaseCaptchaSolution
from ..common import CaptchaAlphabet, CaptchaCharType, WorkerLanguage
from ..exceptions import BadI... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
37811,
198,
5159,
20176,
51,
49285,
198,
37811,
198,
198,
11748,
2779,
2414,
198,
11748,
545,
456,
7109,
198,
11748,
33245,
198,
11748,
3108,
8019,
198,
6738,
4818,
330,
2895... | 2.537234 | 752 |
from spaceone.api.identity.v1 import service_account_pb2, service_account_pb2_grpc
from spaceone.core.pygrpc import BaseAPI
| [
6738,
2272,
505,
13,
15042,
13,
738,
414,
13,
85,
16,
1330,
2139,
62,
23317,
62,
40842,
17,
11,
2139,
62,
23317,
62,
40842,
17,
62,
2164,
14751,
198,
6738,
2272,
505,
13,
7295,
13,
9078,
2164,
14751,
1330,
7308,
17614,
628
] | 2.97619 | 42 |
from qtpy import QtWidgets as QW
from qtpy import QtGui as QG
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusData
from hydrus.core import HydrusGlobals as HG
from hydrus.core import HydrusText
from hydrus.client.gui import QtPorting as QP
| [
6738,
10662,
83,
9078,
1330,
33734,
54,
312,
11407,
355,
1195,
54,
198,
6738,
10662,
83,
9078,
1330,
33734,
8205,
72,
355,
1195,
38,
198,
198,
6738,
2537,
7109,
385,
13,
7295,
1330,
15084,
14932,
34184,
1187,
355,
27327,
198,
6738,
25... | 2.353846 | 130 |
# Generated by Django 2.1.7 on 2022-02-25 05:40
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
22,
319,
33160,
12,
2999,
12,
1495,
8870,
25,
1821,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
# -*- coding: utf-8 -*-
"""
easyimap
~~~~~~~~
Easy Imap wrapper.
:license: BSD, see LICENSE.txt for more details.
"""
__title__ = 'easyimap'
from .easyimap import connect,PARAMS
__all__ = ['connect',]
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
38171,
320,
499,
198,
15116,
198,
198,
28406,
1846,
499,
29908,
13,
198,
198,
25,
43085,
25,
347,
10305,
11,
766,
38559,
24290,
13,
14116,
329,
517,
3... | 2.52439 | 82 |
# This script contains results for the /tenders module
#
# Sample JSON output formats for the function returns
# Tender object return value: JSON formatted
# [
# {
# "tender_id": 0,
# "period": 0,
# "tick": 0,
# "expires": 0,
# "caption": "string",
# "quantity": 0,
# "action": "BUY",
# ... | [
2,
770,
4226,
4909,
2482,
329,
262,
1220,
83,
7338,
8265,
198,
2,
198,
2,
27565,
19449,
5072,
17519,
329,
262,
2163,
5860,
198,
2,
309,
2194,
2134,
1441,
1988,
25,
19449,
39559,
198,
2,
685,
198,
2,
220,
220,
1391,
198,
2,
220,
... | 2.680403 | 1,092 |
import os
import discord
from utils import checks
from bot import Roastinator
bot = Roastinator()
bot.remove_command('help')
cogs = [
'basic',
'developer',
'error_handler',
'events',
'fun',
'games',
'help',
'moderation',
'utility'
]
for cog in cogs:
bot.load_extension(f'cogs... | [
11748,
28686,
198,
11748,
36446,
198,
198,
6738,
3384,
4487,
1330,
8794,
198,
6738,
10214,
1330,
5564,
459,
20900,
628,
198,
13645,
796,
5564,
459,
20900,
3419,
198,
13645,
13,
28956,
62,
21812,
10786,
16794,
11537,
198,
198,
66,
18463,
... | 2.297753 | 178 |
#-*- coding: utf-8 -*-
from django import forms
| [
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
42625,
14208,
1330,
5107,
628
] | 2.380952 | 21 |
def func()
"""Docstring"""
def inner_func()
"""Docstring"""
def func()
"""A multi-line
docstring
"""
def inner_func()
"""A multi-line
docstring
"""
def func()
"""Summary
docstring
"""
def inner_func()
"""Summary
docstring
... | [
4299,
25439,
3419,
198,
220,
220,
220,
37227,
23579,
8841,
37811,
628,
220,
220,
220,
825,
8434,
62,
20786,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
23579,
8841,
37811,
628,
198,
4299,
25439,
3419,
198,
220,
220,
220,
3722... | 2.081761 | 159 |
# Generated by Django 2.0.1 on 2018-01-31 14:14
from django.db import migrations, models
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
16,
319,
2864,
12,
486,
12,
3132,
1478,
25,
1415,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
26791,
13,
2435,
11340,
628
] | 2.926829 | 41 |
from __future__ import division
from sensl import HRMTimeAPI
import wx
import matplotlib
matplotlib.use('WxAgg')
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg, NavigationToolbar2WxAgg
import matplotlib.pyplot as plt
import numpy as np
import threading
import time
import sys
import os
'''
Author - Da... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
3054,
75,
1330,
15172,
44,
7575,
17614,
198,
11748,
266,
87,
198,
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
10786,
54,
87,
46384,
11537,
198,
6738,
2603,
29487,
8019,
13,... | 2.773196 | 194 |
#!/home/loris/anaconda3/envs/py3/bin/python
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 30 15:41:33 2020
@author: marco
"""
import numpy as np
import sys
import rospy
from planner_online.msg import coord_to_reach
from std_msgs.msg import String
import re
from tkinter import filedialog
from tkinter import *
#CHAN... | [
2,
48443,
11195,
14,
4685,
271,
14,
272,
330,
13533,
18,
14,
268,
14259,
14,
9078,
18,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
8621,
1542,
1315,
25,
... | 2.078704 | 1,512 |
"""Code for sentences tokenization: Greek.
Sentence tokenization for Ancient Greek is available using a regular-expression based tokenizer.
>>> from cltkv1.sentence.grc import GreekRegexSentenceTokenizer
>>> from cltkv1.languages.example_texts import get_example_text
>>> splitter = GreekRegexSentenceTokenizer()
>>> s... | [
37811,
10669,
329,
13439,
11241,
1634,
25,
8312,
13,
198,
198,
31837,
594,
11241,
1634,
329,
13406,
8312,
318,
1695,
1262,
257,
3218,
12,
38011,
1912,
11241,
7509,
13,
198,
198,
33409,
422,
537,
30488,
85,
16,
13,
34086,
594,
13,
2164... | 1.86 | 500 |
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session
from sqlalchemy.orm import sessionmaker
session = None
session_obj = None
| [
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
629,
19458,
62,
29891,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
6246,
10297,
198,
198,
29891,
796,
6045,
198,
29891,
62,
26801,
796,
6045,
... | 3.627907 | 43 |
#!/usr/bin/python
#
# From diag_example.c - sybase example program
#
# Description:
# This program accepts a SQL statement from the user and uses
# ct_diag to report error messages. The routine 'call_diag' is
# called every time you make a call that could generate a error.
#
# Tests to try:
# (1) To test ser... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
3574,
2566,
363,
62,
20688,
13,
66,
532,
827,
8692,
1672,
1430,
198,
2,
198,
2,
12489,
25,
198,
2,
220,
220,
220,
770,
1430,
18178,
257,
16363,
2643,
422,
262,
2836,
290,
354... | 2.835669 | 785 |
import tensorflow as tf
import random
import numpy as np
import math
| [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
4738,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
628
] | 3.684211 | 19 |
import pandas as pd
from vispy.color import Colormap
| [
11748,
19798,
292,
355,
279,
67,
198,
6738,
1490,
9078,
13,
8043,
1330,
1623,
579,
499,
198,
220,
220,
220,
220
] | 2.714286 | 21 |
from rest_framework import viewsets
from ..models import Digit
from .serializers import DigitSerializer
| [
6738,
1334,
62,
30604,
1330,
5009,
1039,
198,
6738,
11485,
27530,
1330,
7367,
270,
198,
6738,
764,
46911,
11341,
1330,
7367,
270,
32634,
7509,
198,
220,
220,
220,
220,
198
] | 3.633333 | 30 |
from itertools import chain | [
6738,
340,
861,
10141,
1330,
6333
] | 4.5 | 6 |
import os
import sys
import json
from functools import wraps
try:
from shutil import which
except ImportError:
from distutils.spawn import find_executable
if sys.version_info > (3,):
unicode = str
json_encoder = json.JSONEncoder(
skipkeys=True,
ensure_ascii=False,
check_circular=True,
al... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
33918,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
4423,
346,
1330,
543,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
1233,
26791,
13,
... | 2.443089 | 246 |
from typing import Sequence
from visions.types.categorical import Categorical
@Categorical.contains_op.register
| [
6738,
19720,
1330,
45835,
198,
198,
6738,
26096,
13,
19199,
13,
66,
2397,
12409,
1330,
327,
2397,
12409,
628,
198,
31,
34,
2397,
12409,
13,
3642,
1299,
62,
404,
13,
30238,
198
] | 3.59375 | 32 |
import pytest
import pandas as pd
from shapely.geometry.point import Point
import pyramm
from pyramm.api import parse_filters
from pyramm.geometry import Centreline
| [
11748,
12972,
9288,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
5485,
306,
13,
469,
15748,
13,
4122,
1330,
6252,
198,
198,
11748,
12972,
859,
76,
198,
6738,
12972,
859,
76,
13,
15042,
1330,
21136,
62,
10379,
1010,
198,
6738,
1297... | 3.207547 | 53 |
#!/usr/bin/env python3
import re
from aoc_2019_06 import OrbitMap, parse_input_data
if __name__ == '__main__':
for symbol in dir():
if re.search('^test_', symbol):
print(f"Running {symbol}()")
globals()[symbol]()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
302,
198,
6738,
257,
420,
62,
23344,
62,
3312,
1330,
38161,
13912,
11,
21136,
62,
15414,
62,
7890,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
... | 2.201754 | 114 |
import os
import argparse
from runtime import RunTime, Helicopter, reprString
main()
| [
11748,
28686,
198,
11748,
1822,
29572,
198,
6738,
19124,
1330,
5660,
7575,
11,
48574,
32563,
11,
41575,
10100,
198,
198,
12417,
3419,
198
] | 3.73913 | 23 |
conversation=[
"hi",
"hello there"
]
conversation1=[
"good morning",
"how are you",
"i am great thanks",
"that great to hear"
]
conversation2=[
"thank you",
"you are welcome"
]
conversation3=[
"where do you live?",
"i live in your computer"
]
conversation4=[
"who are you",
... | [
1102,
690,
341,
41888,
198,
220,
220,
220,
366,
5303,
1600,
198,
220,
220,
220,
366,
31373,
612,
1,
198,
60,
198,
1102,
690,
341,
16,
41888,
198,
220,
220,
220,
366,
11274,
3329,
1600,
198,
220,
220,
220,
366,
4919,
389,
345,
1600... | 2.401316 | 304 |
from . import *
from ._macro_serializer import _MacroSerializer
| [
6738,
764,
1330,
1635,
198,
6738,
47540,
20285,
305,
62,
46911,
7509,
1330,
4808,
14155,
305,
32634,
7509,
198
] | 3.368421 | 19 |
import datetime
from datetime import timedelta
import pytest
from src.model.models import Blog, BlogParticipiation, Jam
@pytest.fixture
| [
11748,
4818,
8079,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
12351,
13,
19849,
13,
27530,
1330,
14001,
11,
14001,
34363,
3920,
11,
9986,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
628,
... | 3.428571 | 42 |
from app.utils import resolve_root
from app.bootstrap.configmanager import ConfigManager
SECRET_KEY = ConfigManager.get('main.secret_key')
ALLOWED_HOSTS = ['*']
ROOT_URLCONF = 'app.bootstrap.rooturls'
WSGI_APPLICATION = 'app.bootstrap.wsgi.application'
INSTALLED_APPS = [
'django.contrib.contenttypes',
'djang... | [
6738,
598,
13,
26791,
1330,
10568,
62,
15763,
198,
6738,
598,
13,
18769,
26418,
13,
11250,
37153,
1330,
17056,
13511,
198,
198,
23683,
26087,
62,
20373,
796,
17056,
13511,
13,
1136,
10786,
12417,
13,
21078,
62,
2539,
11537,
198,
7036,
3... | 2.700873 | 458 |
command = '/var/www/__APP_NAME__/venv/bin/gunicorn'
pythonpath = '/var/www/__APP_NAME__'
workers = 3
user = '__USER_NAME__'
bind = '127.0.0.1:8000'
pid = '/run/gunicorn/__APP_NAME__-pid'
errorlog = '/var/log/__APP_NAME__/error.log'
accesslog = '/var/log/__APP_NAME__/access.log'
access_log_format = '%({X-Real-IP}i)s %({... | [
21812,
796,
31051,
7785,
14,
2503,
14,
834,
24805,
62,
20608,
834,
14,
574,
85,
14,
8800,
14,
7145,
291,
1211,
6,
198,
29412,
6978,
796,
31051,
7785,
14,
2503,
14,
834,
24805,
62,
20608,
834,
6,
198,
22896,
796,
513,
198,
7220,
79... | 2.055556 | 216 |
import datetime
from operator import itemgetter
import numpy as np
import requests
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib.pyplot as plt
import matplotlib.patheffects as patheffects
import matplotlib.colors as colors
import matplotlib.cm as cm
import scipy.stats
from matplotlib.... | [
11748,
4818,
8079,
198,
6738,
10088,
1330,
2378,
1136,
353,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
7007,
198,
11748,
6383,
11081,
13,
66,
3808,
355,
36624,
3808,
198,
11748,
6383,
11081,
13,
30053,
355,
269,
30053,
198,
11... | 2.14908 | 3,099 |
from django.db import models
from django.urls import reverse
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
628,
628
] | 3.555556 | 18 |
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
import struct
from typing import Tuple, Optional
from volatility.framework import constants, exceptions, interfaces
from volatility... | [
2,
770,
2393,
318,
15069,
13130,
4709,
18486,
5693,
290,
11971,
739,
262,
4709,
18486,
10442,
13789,
352,
13,
15,
198,
2,
543,
318,
1695,
379,
3740,
1378,
2503,
13,
10396,
18486,
42526,
13,
2398,
14,
43085,
14,
85,
6649,
12,
85,
16,... | 2.712627 | 689 |
import numpy as np
import torch
from mapcalc import calculate_map, calculate_map_range
from typing import Dict, Union
def compute_map(detected_bbox: torch.Tensor, gt_bbox: torch.Tensor, gt_batch: torch.LongTensor,
iou_threshold: Union[float, np.ndarray] = 0.5) -> float:
"""Computes the mean avera... | [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
198,
6738,
3975,
9948,
66,
1330,
15284,
62,
8899,
11,
15284,
62,
8899,
62,
9521,
198,
6738,
19720,
1330,
360,
713,
11,
4479,
628,
198,
4299,
24061,
62,
8899,
7,
15255,
11197,
62,
... | 2.480183 | 656 |
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class IdentifierGroup:
"""
:ivar eff_date:
"""
eff_date: Optional[str] = field(
default=None,
metadata=dict(
name="effDate",
type="Attribute"
)
)
| [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
198,
6738,
19720,
1330,
32233,
628,
198,
31,
19608,
330,
31172,
198,
4871,
11440,
7483,
13247,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
452,
283,
914,
62,
4475,... | 2.192593 | 135 |
COLORS = COLORS()
| [
198,
198,
25154,
20673,
796,
20444,
20673,
3419,
628
] | 2.333333 | 9 |
"""
Unit tests of the StoreOptions class used to control custom options on
Store as used by the %opts magic.
"""
import numpy as np
from holoviews import Overlay, Curve, Image, HoloMap
from holoviews.core.options import Store, StoreOptions
from holoviews.element.comparison import ComparisonTestCase
from holoviews impor... | [
37811,
198,
26453,
5254,
286,
262,
9363,
29046,
1398,
973,
284,
1630,
2183,
3689,
319,
198,
22658,
355,
973,
416,
262,
4064,
404,
912,
5536,
13,
198,
37811,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
6039,
709,
769,
82,
1330,
3827... | 2.213313 | 1,322 |
titulo = '\033[01;33m'
txt = '\033[37m'
nada = '\033[m'
lista = list()
par = list()
impar = list()
resposta = 'S'
print(f'\n{titulo:-<20} Lista Par e Impar {nada:->14}')
while True:
if resposta == 'S':
lista.append(int(input(f'\n{txt}Digite um número: {nada}')))
resposta = ' '
while not respos... | [
83,
270,
43348,
796,
705,
59,
44427,
58,
486,
26,
2091,
76,
6,
198,
14116,
796,
705,
59,
44427,
58,
2718,
76,
6,
198,
77,
4763,
796,
705,
59,
44427,
58,
76,
6,
198,
4868,
64,
796,
1351,
3419,
198,
1845,
796,
1351,
3419,
198,
3... | 1.814679 | 545 |
import os
os.system('bash inference.sh') | [
11748,
28686,
198,
198,
418,
13,
10057,
10786,
41757,
32278,
13,
1477,
11537
] | 3.153846 | 13 |
import sys
import os
sys.path.append(os.getcwd())
import torch
from training_structures.Simple_Early_Fusion import train, test
from fusions.common_fusions import ConcatEarly
from get_data import get_dataloader
from unimodals.common_models import GRU, MLP
# Support mosi/mosi_unaligned/mosei/mosei_unaligned
traindata,... | [
11748,
25064,
198,
11748,
28686,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
1136,
66,
16993,
28955,
198,
198,
11748,
28034,
198,
198,
6738,
3047,
62,
7249,
942,
13,
26437,
62,
20457,
62,
37,
4241,
1330,
4512,
11,
1332,
198,
6738,
... | 2.363889 | 720 |
"""create_database controller."""
import os
import shutil
import json
from vehicle import Car
import driving_inputs
from PIL import Image
import utils
from pathlib import Path
# @utils.profile
if __name__ == "__main__":
main()
| [
37811,
17953,
62,
48806,
10444,
526,
15931,
198,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
33918,
198,
6738,
4038,
1330,
1879,
198,
11748,
5059,
62,
15414,
82,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
3384,
4487,
198,
6... | 3.323944 | 71 |
import time
| [
11748,
640,
198
] | 4 | 3 |
import typing
from ..base import BaseModel
| [
11748,
19720,
198,
6738,
11485,
8692,
1330,
7308,
17633,
628,
198
] | 4.090909 | 11 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from photoCoordinates import photoCoordinates
from PIL import Image, ImageFont, ImageDraw
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
4590,
7222,
585,
17540,
1330,
4590,
7222,
585,
17540,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
23252,... | 2.895833 | 48 |
"""
Module for testing api.py
"""
import pytest
import uuid
from ticktick.managers.projects import ProjectManager
from ticktick.managers.tasks import TaskManager
from ticktick.managers.focus import FocusTimeManager
from ticktick.managers.habits import HabitManager
from ticktick.managers.pomo import PomoManager
from t... | [
37811,
198,
26796,
329,
4856,
40391,
13,
9078,
198,
37811,
198,
198,
11748,
12972,
9288,
198,
11748,
334,
27112,
198,
198,
6738,
4378,
42298,
13,
805,
10321,
13,
42068,
1330,
4935,
13511,
198,
6738,
4378,
42298,
13,
805,
10321,
13,
83,
... | 3.198068 | 207 |
# This source code is part of the Biotite package and is distributed
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
# information.
__name__ = "biotite.structure.io.mol"
__author__ = "Patrick Kunzmann"
__all__ = ["MOLFile"]
import datetime
from warnings import warn
import numpy as np
from ...at... | [
2,
770,
2723,
2438,
318,
636,
286,
262,
347,
5151,
578,
5301,
290,
318,
9387,
198,
2,
739,
262,
513,
12,
2601,
682,
347,
10305,
13789,
13,
4222,
766,
705,
43,
2149,
24290,
13,
81,
301,
6,
329,
2252,
198,
2,
1321,
13,
198,
198,
... | 1.873762 | 3,636 |
"""
Plug-in for creating a Google cloud firewall.
"""
from __future__ import unicode_literals
from googleapiclient.discovery import build
from oauth2client.service_account import ServiceAccountCredentials
from infrastructure.models import CustomField, Environment
from common.methods import set_progress
import time, jso... | [
37811,
198,
23257,
12,
259,
329,
4441,
257,
3012,
6279,
32928,
13,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
23645,
499,
291,
75,
1153,
13,
67,
40821,
1330,
1382,
198,
6738,
267,
18439,
17... | 4.075949 | 79 |
arr = [9, 11, 3, 4, 5, 2, 4, 4, 5, 0, 9]
# arr = [1, 2, 3, 4]
print(wave_form_array_sort(arr))
| [
628,
198,
3258,
796,
685,
24,
11,
1367,
11,
513,
11,
604,
11,
642,
11,
362,
11,
604,
11,
604,
11,
642,
11,
657,
11,
860,
60,
198,
2,
5240,
796,
685,
16,
11,
362,
11,
513,
11,
604,
60,
198,
4798,
7,
19204,
62,
687,
62,
1874... | 1.814815 | 54 |
import numpy as np
import tensorflow as tf
from typing import Callable, Mapping, Dict
from ..emulation.layers.normalization import standard_deviation_all_features
ModelType = Callable[[Mapping[str, tf.Tensor]], Mapping[str, tf.Tensor]]
OutputSensitivity = Dict[str, np.ndarray]
def get_jacobians(
model: ModelTy... | [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
19720,
1330,
4889,
540,
11,
337,
5912,
11,
360,
713,
198,
198,
6738,
11485,
368,
1741,
13,
75,
6962,
13,
11265,
1634,
1330,
3210,
62,
7959,
3920,
62,... | 2.703257 | 829 |