content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import sys
if sys.version_info[0] < 3:
raise Exception("Python 3 or a more recent version is required.")
import base64
from Crypto.Cipher import DES3, AES
import hashlib
from pathlib import Path, PurePath
import argparse
from lxml import etree
import xml.etree.ElementTree as ET
import copy
rdp_skel... | [
11748,
25064,
201,
198,
361,
25064,
13,
9641,
62,
10951,
58,
15,
60,
1279,
513,
25,
201,
198,
220,
220,
220,
5298,
35528,
7203,
37906,
513,
393,
257,
517,
2274,
2196,
318,
2672,
19570,
201,
198,
201,
198,
201,
198,
11748,
2779,
2414... | 2.042545 | 2,703 |
import os
from os import path
from shutil import copyfile | [
11748,
28686,
220,
220,
198,
6738,
28686,
1330,
3108,
198,
6738,
4423,
346,
1330,
4866,
7753
] | 3.6875 | 16 |
import click
from contextlib import closing
import copy
import math
import numpy as np
import os
import pandas as pd
import random
import scipy.io as sio
import tables as tb
import time
@click.command()
@click.argument('action', type=click.Choice(('update', 'verify')))
@click.argument('annotation', type=click.Path())
... | [
11748,
3904,
198,
6738,
4732,
8019,
1330,
9605,
198,
11748,
4866,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
4738,
198,
11748,
629,
541,
88,
13,
952,
355,
... | 2.80943 | 509 |
from flowpython.fp import foreach, flow_map, andThen
from typing import Dict
from ..typepy import strict, Or
import re
SRE_Pattern = re.compile("").__class__
class Rule:
""" To match strings more easily.
It could be slower than `re` module, as a result, it could be more powerful and convenient.
us... | [
6738,
5202,
29412,
13,
46428,
1330,
1674,
620,
11,
5202,
62,
8899,
11,
290,
6423,
198,
6738,
19720,
1330,
360,
713,
198,
6738,
11485,
4906,
9078,
1330,
7646,
11,
1471,
198,
11748,
302,
198,
50,
2200,
62,
47546,
796,
302,
13,
5589,
5... | 2.52381 | 336 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import xml.etree.ElementTree as ET
import urllib.parse
if __name__ == '__main__':
urlFromFile('./Qx10Example.xml', 1)
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198,
11748,
2956,
297,
571,
13,
29572,
628,
198,
361,
11593,
... | 2.319444 | 72 |
from typing import Tuple, Optional, Dict
import logging
from collections import defaultdict, OrderedDict
import pyvex
import claripy
from archinfo.arch_arm import is_arm_arch
from ....concretization_strategies import SimConcretizationStrategyAny
from ....knowledge_plugins.cfg import IndirectJump, IndirectJumpType
fro... | [
6738,
19720,
1330,
309,
29291,
11,
32233,
11,
360,
713,
198,
11748,
18931,
198,
6738,
17268,
1330,
4277,
11600,
11,
14230,
1068,
35,
713,
198,
198,
11748,
12972,
303,
87,
198,
11748,
10212,
541,
88,
198,
6738,
3934,
10951,
13,
998,
62... | 1.884094 | 27,298 |
#!/usr/bin/env python3
import urllib.request
import pandas as pd
import rcf
if __name__ == "__main__":
data_filename = 'nyc_taxi.csv'
data_source = 'https://raw.githubusercontent.com/numenta/NAB/master/data/realKnownCause/nyc_taxi.csv'
urllib.request.urlretrieve(data_source, data_filename)
taxi_data ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
374,
12993,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
... | 2.392344 | 209 |
from airflow.plugins_manager import AirflowPlugin
from airflow_metrics.airflow_metrics import patch
patch()
| [
6738,
45771,
13,
37390,
62,
37153,
1330,
3701,
11125,
37233,
198,
198,
6738,
45771,
62,
4164,
10466,
13,
958,
11125,
62,
4164,
10466,
1330,
8529,
628,
198,
17147,
3419,
628
] | 3.733333 | 30 |
#!/usr/bin/env python3
""" Generic code to fit a SpeechBrain ASR model with different
Curriculum Learning techniques. In particular, you may choose
one of the following methods (in your <hyperparameters>.yaml file):
Sorting methods:
- wer: the train set is decoded and then sorted based on wer
(set reverse... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
42044,
2438,
284,
4197,
257,
24709,
44687,
7054,
49,
2746,
351,
1180,
198,
26628,
1173,
14452,
18252,
7605,
13,
554,
1948,
11,
345,
743,
3853,
220,
198,
505,
286,
262,
1708,... | 2.354991 | 4,648 |
from dataclasses import dataclass
from datetime import datetime
from datetime import date
import datetime as import_datetime
import tldextract
from json import JSONEncoder
import requests
from reppy.robots import Robots
from validator_collection import validators, checkers, errors
from .utils import dynamodb
import t... | [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
220,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
4818,
8079,
1330,
3128,
198,
11748,
4818,
8079,
355,
1330,
62,
19608,
8079,
198,
11748,
256,
335,
2302,
974,
220,
198,
6738,
33918,... | 2.5 | 490 |
# Copyright 2014 - Mirantis, Inc.
# Copyright 2015 - StackStorm, 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
#
# Unl... | [
2,
15069,
1946,
532,
7381,
20836,
11,
3457,
13,
198,
2,
15069,
1853,
532,
23881,
32173,
11,
3457,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,... | 3.394619 | 223 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import sys
import traceback
import random
from queue import Queue
from concurrent.futures import ThreadPoolExecutor
import numpy as np
import torch
from torch.utils.data import IterableDataset
from .streaming import StreamSamplerTest, StreamSampl... | [
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
11748,
4738,
198,
6738,
16834,
1330,
4670,
518,
198,
6738,
24580,
13,
69,
315,
942,
1330,
14122,
... | 2.028084 | 4,807 |
"""
Base classes for sets of featurizers.
"""
import abc
from typing import List
__authors__ = ["Alex Dunn <ardunn@lbl.gov>", "Alex Ganose <aganose@lbl.gov>"]
class FeaturizerSet(abc.ABC):
"""Abstract class for defining sets of featurizers.
All FeaturizerSets should implement at least fours sets of featuri... | [
37811,
198,
14881,
6097,
329,
5621,
286,
2218,
333,
11341,
13,
198,
37811,
198,
198,
11748,
450,
66,
198,
6738,
19720,
1330,
7343,
198,
198,
834,
41617,
834,
796,
14631,
15309,
30833,
1279,
446,
20935,
31,
75,
2436,
13,
9567,
29,
1600... | 2.783649 | 1,003 |
from typing import Optional
from sqlalchemy.ext.asyncio import AsyncSession
from reddit.users.models import User
from reddit.posts.models import Post
async def create_post(
session: AsyncSession,
title: str,
owner_id: int,
subreddit_id: int,
link: Optional[str] = None,
text: Optional[str] = ... | [
6738,
19720,
1330,
32233,
198,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
292,
13361,
952,
1330,
1081,
13361,
36044,
198,
198,
6738,
18374,
13,
18417,
13,
27530,
1330,
11787,
198,
6738,
18374,
13,
24875,
13,
27530,
1330,
2947,
628,
198... | 2.726316 | 380 |
from django.contrib import admin
from webbrowser import register
from models import *
@admin.register(Turn)
@admin.register(Challenge) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
3992,
40259,
1330,
7881,
198,
6738,
4981,
1330,
1635,
198,
198,
31,
28482,
13,
30238,
7,
17278,
8,
198,
198,
31,
28482,
13,
30238,
7,
41812,
3540,
8
] | 3.578947 | 38 |
raw_data = open('input.txt', 'r')
freqs = raw_data.readlines()
freq_list = [0]
current_freq = 0
found = False
while found is not True:
for freq in freqs:
sign = freq[:1]
if sign == '+':
value = freq[1:]
current_freq = current_freq + int(value)
print... | [
1831,
62,
7890,
796,
1280,
10786,
15414,
13,
14116,
3256,
705,
81,
11537,
201,
198,
201,
198,
19503,
48382,
796,
8246,
62,
7890,
13,
961,
6615,
3419,
201,
198,
19503,
80,
62,
4868,
796,
685,
15,
60,
201,
198,
14421,
62,
19503,
80,
... | 1.740602 | 532 |
# coding=utf-8
# Copyright 2008, Sean B. Palmer, inamidst.com
# Copyright © 2012, Elad Alfassa <elad@fedoraproject.org>
# Copyright 2012-2015, Elsie Powell, http://embolalia.com
# Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com>
#
# Licensed under the Eiffel Forum License 2.
from __future__ import abs... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
3648,
11,
11465,
347,
13,
18918,
11,
287,
321,
312,
301,
13,
785,
198,
2,
15069,
10673,
2321,
11,
2574,
324,
17136,
562,
64,
1279,
417,
324,
31,
19082,
273,
499,
305,
752,
13,
2398,
29... | 2.59637 | 2,314 |
"""Failure analysis of national-scale networks
For transport modes at national scale:
- rail
- Can do raod as well
Input data requirements
-----------------------
1. Correct paths to all files and correct input parameters
2. csv sheets with results of flow mapping based on MIN-MAX generalised costs estimates:... | [
37811,
50015,
3781,
286,
2260,
12,
9888,
7686,
198,
1890,
4839,
12881,
379,
2260,
5046,
25,
198,
220,
220,
220,
532,
6787,
198,
220,
220,
220,
532,
1680,
466,
2179,
375,
355,
880,
198,
198,
20560,
1366,
5359,
198,
19351,
6329,
198,
... | 2.347784 | 7,243 |
# write to Gyro
WHO_AM_I_G = 0x0F
INT1_CFG_G = 0x30
CTRL_REG1_G = 0x20
CTRL_REG4_G = 0x23
# read from Gyro
# X
OUT_X_L_G = 0x28
OUT_X_H_G = 0x29
# Y
OUT_Y_L_G = 0x2A
OUT_Y_H_G = 0x2B
# Z
OUT_Z_L_G = 0x2C
OUT_Z_H_G = 0x2D
# write to Accl/Mag
CTRL_REG1_XM = 0x20
CTRL_REG2_XM = 0x21
CTRL_REG5_XM = 0x... | [
2,
3551,
284,
18488,
305,
201,
198,
41856,
62,
2390,
62,
40,
62,
38,
796,
657,
87,
15,
37,
201,
198,
12394,
16,
62,
22495,
38,
62,
38,
796,
657,
87,
1270,
201,
198,
4177,
7836,
62,
31553,
16,
62,
38,
796,
657,
87,
1238,
201,
... | 1.468326 | 442 |
import torch.nn as nn
from torchvision import models
# alexnet_model = models.alexnet(pretrained=True)
| [
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
10178,
1330,
4981,
628,
198,
2,
257,
2588,
3262,
62,
19849,
796,
4981,
13,
1000,
87,
3262,
7,
5310,
13363,
28,
17821,
8,
198
] | 3.088235 | 34 |
from bionetgen.atomizer.utils import readBNGXML
import argparse
from collections import defaultdict
# from cStringIO import StringIO
from io import StringIO
from bionetgen.atomizer.utils import extractAtomic
from copy import deepcopy
import networkx as nx
def molecule2stateTuples(molecule):
"""
Receives a mo... | [
6738,
275,
295,
316,
5235,
13,
37696,
7509,
13,
26791,
1330,
1100,
33,
10503,
55,
5805,
198,
11748,
1822,
29572,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
2,
422,
269,
10100,
9399,
1330,
10903,
9399,
198,
6738,
33245,
1330,
10903,
... | 1.92562 | 10,406 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2022 F4PGA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
34,
8,
12131,
12,
1238,
1828,
376,
19,
6968,
32,
46665,
13,
198,
2,
198,
2,
49962,
739... | 2.604466 | 627 |
# MIT License
#
# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# r... | [
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
34,
8,
383,
1215,
690,
36098,
3851,
436,
1108,
16984,
3524,
357,
7227,
8,
46665,
12131,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257... | 2.591883 | 2,193 |
import os
import pytest
import shutil
import pyfastaq
from simutator import simulate_reads, utils
def test_simulate_illumina_paired_reads_from_fasta():
"""test simulate_illumina_paired_reads_from_fasta"""
# Just test if we can run ART. Make a fake genome and then simulate
# some reads from it
tmp_o... | [
11748,
28686,
198,
11748,
12972,
9288,
198,
11748,
4423,
346,
198,
198,
11748,
12972,
7217,
30188,
198,
198,
6738,
985,
315,
1352,
1330,
29308,
62,
40779,
11,
3384,
4487,
628,
198,
4299,
1332,
62,
14323,
5039,
62,
359,
388,
1437,
62,
... | 2.451299 | 308 |
import discord
import telegram
from facebook2telegram import send_post_to_tg
client = discord.Client()
@client.event
@client.event
if __name__ == '__main__':
client.run(os.environ['DI_TOKEN'])
| [
11748,
36446,
198,
11748,
573,
30536,
198,
6738,
23960,
17,
660,
30536,
1330,
3758,
62,
7353,
62,
1462,
62,
25297,
198,
198,
16366,
796,
36446,
13,
11792,
3419,
628,
198,
31,
16366,
13,
15596,
628,
198,
31,
16366,
13,
15596,
198,
198,... | 2.819444 | 72 |
#ciclo for
amigos = ["Joseph", "Glen", "Sally"]
#amigos = "joseph, glen, sally"
for amigo in amigos:
print("Feliz Año Nuevo: " , amigo)
print("¡terminado!")
""" #ciclo acumulador
total = 0
for valor in (3,41,12,9,74,15):
total = total + valor
print ("total: ", total ) """
| [
2,
66,
291,
5439,
329,
201,
198,
321,
328,
418,
796,
14631,
29458,
1600,
366,
9861,
268,
1600,
366,
50,
453,
8973,
201,
198,
2,
321,
328,
418,
796,
366,
73,
577,
746,
11,
1278,
268,
11,
264,
453,
1,
201,
198,
1640,
716,
14031,
... | 2.040268 | 149 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from sklearn.model_selection import train_test_split as sk_train_test_split
import numpy as np
import pandas as pd
from sklearn.utils import shuffle as sk_shuffle
def input_output_split(dataset):
"""Prepare dataset to training. Starts feature extracting.
R... | [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
9288,
62,
35312,
355,
1341,
62,
27432,
62,
9288... | 2.201067 | 1,875 |
import pybamm
import numpy as np
import sys
import unittest
@unittest.skipIf(not pybamm.have_idaklu(), "idaklu solver is not installed")
if __name__ == "__main__":
print("Add -v for more debug output")
if "-v" in sys.argv:
debug = True
pybamm.settings.debug_mode = True
unittest.main()
| [
11748,
12972,
65,
6475,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
25064,
198,
11748,
555,
715,
395,
628,
198,
31,
403,
715,
395,
13,
48267,
1532,
7,
1662,
12972,
65,
6475,
13,
14150,
62,
312,
461,
2290,
22784,
366,
312,
461,
2... | 2.507937 | 126 |
echo "print ("Hellow World!")" | [
30328,
366,
4798,
5855,
39,
5037,
2159,
2474,
16725
] | 3.333333 | 9 |
### Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
import time
import os
from collections import OrderedDict
from options.test_options import TestOptions
from data.data_loader import CreateDataLoa... | [
21017,
15069,
357,
34,
8,
2177,
15127,
10501,
13,
1439,
2489,
10395,
13,
220,
198,
21017,
49962,
739,
262,
12624,
11050,
12,
7792,
12,
4090,
604,
13,
15,
5964,
357,
5450,
1378,
20123,
425,
9503,
684,
13,
2398,
14,
677,
4541,
14,
152... | 2.899317 | 586 |
# Copyright 2021 Alibaba Group Holding Limited. 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 ... | [
2,
15069,
33448,
41992,
4912,
31703,
15302,
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.895652 | 1,150 |
"""H1st IoT Maintenance Operations: admin."""
from django.contrib.admin.decorators import register
from django.contrib.admin.options import ModelAdmin
from django.db.models import Prefetch
from silk.profiling.profiler import silk_profile
from h1st_contrib.iot_mgmt.maint_ops.models import (
EquipmentProblemType,... | [
37811,
39,
16,
301,
38488,
34857,
16205,
25,
13169,
526,
15931,
628,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
28482,
13,
12501,
273,
2024,
1330,
7881,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
28482,
13,
25811,
1330,
9104,
46787,
... | 2.209993 | 5,824 |
# author ww9210
import angr
from pwn import *
import time
| [
2,
1772,
266,
86,
5892,
940,
198,
11748,
281,
2164,
198,
6738,
279,
675,
1330,
1635,
198,
11748,
640,
628
] | 2.95 | 20 |
"""
This module provides a pythonic way to process ADS-B messages. It can work with any software that provides BaseStation-like output,
for example `dump1090 <https://github.com/MalcolmRobb/dump1090>`_.
"""
from .connection import Connection
from .message import Message
from .collection import FlightCollection | [
37811,
201,
198,
1212,
8265,
3769,
257,
21015,
291,
835,
284,
1429,
44784,
12,
33,
6218,
13,
632,
460,
670,
351,
597,
3788,
326,
3769,
7308,
12367,
12,
2339,
5072,
11,
201,
198,
1640,
1672,
4600,
39455,
940,
3829,
1279,
5450,
1378,
... | 3.865854 | 82 |
# https://www.hackerrank.com/challenges/easy-sum
import math
import cProfile
if __name__ == "__main__" :
# read the number of test cases
T = int(raw_input().strip())
testcases = []
rows = []
for test in range(T):
N,m = get_testcase()
testcases.append((N,m))
for (N,m) in... | [
2,
3740,
1378,
2503,
13,
31153,
8056,
962,
13,
785,
14,
36747,
34120,
14,
38171,
12,
16345,
198,
198,
11748,
10688,
198,
11748,
269,
37046,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1,
1058,
628,
220,
22... | 2.127413 | 259 |
import re
from unittest import TestCase
from expects import expect, equal, raise_error
from slender import List
| [
198,
11748,
302,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
13423,
1330,
1607,
11,
4961,
11,
5298,
62,
18224,
220,
198,
198,
6738,
36808,
1330,
7343,
220,
628,
628
] | 3.71875 | 32 |
# -*- coding: utf-8 -*-
import caffe
from caffe import layers as L, params as P, proto, to_proto
# 设定文件的保存路径
root = '/home/ubuntu/test/pycaffe/' # 根目录
train_list = root + 'mnist/train/train.txt' # 训练图片列表
test_list = root + 'mnist/test/test.txt' # 测试图片列表
train_proto = root + 'mnist/train.prototxt' # 训练配置文件
test_pr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
21121,
198,
6738,
21121,
1330,
11685,
355,
406,
11,
42287,
355,
350,
11,
44876,
11,
284,
62,
1676,
1462,
198,
198,
2,
5525,
106,
122,
22522,
248,
23877,
22... | 1.556995 | 386 |
#aula 7
#Claculadora_1
# Construindo métodos funções e classes em python
if __name__ == '__main__':
calculadora = Calculadora(50,2)
print(calculadora.valor_a)
print(calculadora.soma())
print(calculadora.sub())
print(calculadora.div())
print(calculadora.multi()) | [
2,
2518,
64,
767,
198,
2,
2601,
330,
377,
324,
5799,
62,
16,
198,
2,
4757,
622,
521,
78,
285,
25125,
375,
418,
1257,
16175,
127,
113,
274,
304,
6097,
795,
21015,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
... | 2.179104 | 134 |
from django.urls import path
from . import views
from .views import autosuggest
urlpatterns = [
# path("", views.index, name="index"),
path("", views.dashboard, name="dashboard"),
path("login/", views.login, name="login"),
path('logout', views.logout, name='logout'),
path("add_patient/", views.add_p... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
1330,
5009,
198,
6738,
764,
33571,
1330,
44619,
29212,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
1303,
3108,
7203,
1600,
5009,
13,
9630,
11,
1438,
2625,
9630,
123... | 2.830435 | 230 |
from IOTools import getFileLines, getDataLines, writeDataLines
from Entry import Entry
from Country import Country
from statistics import mean, StatisticsError
from numbers import Number
rawData = [Entry(line) for line in getDataLines("LifeExpectancyDataRAW")]
countries = {}
for entry in rawData:
if (("... | [
6738,
314,
2394,
10141,
1330,
651,
8979,
43,
1127,
11,
651,
6601,
43,
1127,
11,
3551,
6601,
43,
1127,
201,
198,
6738,
21617,
1330,
21617,
201,
198,
6738,
12946,
1330,
12946,
201,
198,
6738,
7869,
1330,
1612,
11,
14370,
12331,
201,
198... | 2.626887 | 2,053 |
"""
Longest Palindromic Subsequence
Given a sequence, find the length of the longest palindromic subsequence in it.
Example :
Input:"bbbab"
Output:4
"""
if __name__ == "__main__":
print(lps("bbbab"))
print(lps("BBABCBCAB"))
| [
37811,
198,
14617,
395,
3175,
521,
398,
291,
3834,
43167,
198,
198,
15056,
257,
8379,
11,
1064,
262,
4129,
286,
262,
14069,
6340,
521,
398,
291,
6399,
594,
287,
340,
13,
198,
16281,
1058,
198,
20560,
11097,
11848,
65,
397,
1,
198,
2... | 2.651685 | 89 |
from flask import Blueprint
site = Blueprint('site', __name__)
from resume.site import views | [
6738,
42903,
1330,
39932,
198,
198,
15654,
796,
39932,
10786,
15654,
3256,
11593,
3672,
834,
8,
198,
198,
6738,
15294,
13,
15654,
1330,
5009
] | 3.916667 | 24 |
#first file
print("rathesh")
| [
2,
11085,
2393,
201,
198,
4798,
7203,
10366,
956,
71,
4943,
201,
198
] | 2.384615 | 13 |
from django.contrib import admin
from .models import Resume , Feedback
# @admin.register(Resume)
admin.site.register(Feedback, ResumeAdmin)
pass | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
1874,
2454,
837,
37774,
198,
198,
2,
2488,
28482,
13,
30238,
7,
4965,
2454,
8,
628,
198,
28482,
13,
15654,
13,
30238,
7,
18332,
1891,
11,
1874,
2454,
46787,
... | 3.217391 | 46 |
from nodes.arithmetics.BaseDataModel import BaseDataModel
| [
6738,
13760,
13,
283,
342,
27757,
13,
14881,
6601,
17633,
1330,
7308,
6601,
17633,
628
] | 3.933333 | 15 |
__version__ = "0.0.2-rc"
| [
834,
9641,
834,
796,
366,
15,
13,
15,
13,
17,
12,
6015,
1,
198
] | 1.785714 | 14 |
# -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
12131,
3469,
6916,
15664,
23973,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
... | 2.991249 | 1,257 |
from .event import Event # noqa
from .event_group import EventGroup # noqa
from .key import Key # noqa
from .project import Project # noqa
| [
6738,
764,
15596,
1330,
8558,
220,
1303,
645,
20402,
198,
6738,
764,
15596,
62,
8094,
1330,
8558,
13247,
220,
1303,
645,
20402,
198,
6738,
764,
2539,
1330,
7383,
220,
1303,
645,
20402,
198,
6738,
764,
16302,
1330,
4935,
220,
1303,
645,
... | 3.325581 | 43 |
import numpy as np
def mean_absolute_percentage_error(y_true, y_pred):
"""
MAPE can be problematic as it doesnt account for missing values and there's a danger of dividing
by zero. Both these cases are excluded from the computation by subsetting the y_true and y_pred arrays
"""
y_true, y_pred = n... | [
11748,
299,
32152,
355,
45941,
198,
198,
4299,
1612,
62,
48546,
62,
25067,
496,
62,
18224,
7,
88,
62,
7942,
11,
331,
62,
28764,
2599,
220,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
34645,
36,
460,
307,
15833,
355,
340,
46701,
... | 2.261194 | 402 |
import sys
from selenium.webdriver import Chrome
from selenium.webdriver.support.ui import WebDriverWait
# Set browser
driver = Chrome()
# Verify if printer IP argument was provided
try:
sys.argv[1]
except IndexError:
print("Printer IP was not provided")
else:
printerIp = sys.argv[1]
print("IP: %s" % ... | [
11748,
25064,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
1330,
13282,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11284,
13,
9019,
1330,
5313,
32103,
21321,
198,
198,
2,
5345,
6444,
198,
26230,
796,
13282,
3419,
198,
198,
2,
... | 2.562925 | 588 |
#Copyright (c) 2017 Andre Santos
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute... | [
198,
2,
15269,
357,
66,
8,
2177,
10948,
28458,
198,
2,
198,
2,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
1659,
428,
3788,
290,
3917,
10314,
3696,
357,
1169,
366,
25423,
12340,
... | 3.449612 | 903 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 10 18:06:59 2020
@author: jarekj
"""
#%%
from PyQt5 import QtGui, QtWidgets, QtCore
from PyQt5.QtCore import Qt, QAbstractTableModel
import pandas as pd
import numpy as np
from PROC.albedo import albedo
#%%
| [
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,
19480,
2365,
838,
1248,
25,
3312,
25,
3270,
12131,
198,
198,
31,
9800,
25,
474,
533,
4242... | 2.415254 | 118 |
from py2neo.ogm import GraphObject, Property
class Search(GraphObject):
'''
Search object
'''
id = Property()
title = Property()
firstname = Property()
lastname = Property()
mobile = Property()
email = Property()
bio = Property()
knownAs = Property()
avatar = Property()... | [
6738,
12972,
17,
710,
78,
13,
519,
76,
1330,
29681,
10267,
11,
14161,
198,
198,
4871,
11140,
7,
37065,
10267,
2599,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
11140,
2134,
198,
220,
220,
220,
705,
7061,
628,
220,
220,
220,
... | 2.791304 | 115 |
open_bra = ["(", "[", "{"]
close_bra = [")", "]", "}"]
group1 = "{[]{}}"
print(validate_brackets(group1))
group2 = "{[][{}}"
print(validate_brackets(group2))
| [
198,
9654,
62,
16057,
796,
14631,
7,
1600,
12878,
1600,
366,
4895,
60,
198,
19836,
62,
16057,
796,
685,
4943,
1600,
366,
60,
1600,
366,
92,
8973,
628,
198,
198,
8094,
16,
796,
45144,
21737,
90,
11709,
1,
198,
4798,
7,
12102,
378,
... | 2.202703 | 74 |
# Generated by Django 2.0.1 on 2018-04-23 14:13
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
16,
319,
2864,
12,
3023,
12,
1954,
1478,
25,
1485,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import logging
from celery import shared_task
from django.conf import settings
from django.contrib import auth
from django.contrib.contenttypes.models import ContentType
from rest_framework import status
from rest_framework.reverse import reverse
from waldur_core.core import tasks as core_tasks
from waldur_core.core ... | [
11748,
18931,
198,
198,
6738,
18725,
1924,
1330,
4888,
62,
35943,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
6284,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
11299,
19199,
13,
27530,
1... | 3.137313 | 335 |
#!/usr/bin/env python3
import abc
import inspect
from typing import Optional
from reagent.core.registry_meta import RegistryMeta
from reagent.core.types import RecurringPeriod, RLTrainingOutput
from reagent.workflow.model_managers.model_manager import ModelManager
from reagent.workflow.result_registries import Publis... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
450,
66,
198,
11748,
10104,
198,
6738,
19720,
1330,
32233,
198,
198,
6738,
302,
25781,
13,
7295,
13,
2301,
4592,
62,
28961,
1330,
33432,
48526,
198,
6738,
302,
25781,
1... | 2.632065 | 867 |
from datetime import date, datetime, time, timezone
from typing import Optional
import pandas as pd
from rest_framework import serializers
from cryptofeed_werks.constants import Exchange
from cryptofeed_werks.lib import get_current_time, get_min_time
from cryptofeed_werks.models import Symbol
class TradeDataParamet... | [
6738,
4818,
8079,
1330,
3128,
11,
4818,
8079,
11,
640,
11,
640,
11340,
198,
6738,
19720,
1330,
32233,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
8194,
1659,
2308,
62,
154... | 2.880096 | 417 |
'''
Classes for building command line interface (CLI) tools, such as for bulk
processing data at the command line.
'''
import os
import sys
import h5py
import numpy as np
from osgeo import gdal
from cached_property import cached_property
from pyl4c.data.fixtures import EASE2_GRID_PARAMS
from pyl4c.epsg import EPSG
fro... | [
7061,
6,
198,
9487,
274,
329,
2615,
3141,
1627,
7071,
357,
5097,
40,
8,
4899,
11,
884,
355,
329,
11963,
198,
36948,
1366,
379,
262,
3141,
1627,
13,
198,
7061,
6,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
289,
20,
9078,
... | 2.129287 | 5,190 |
from django.urls import path, include
from django.contrib import admin
from django.views.decorators.csrf import csrf_exempt
from rest_framework import routers, urlpatterns
from .views import *
urlpatterns = [
path("profile/", UserView.as_view(), name="view-user"),
path("placements/", UserPlacementsView.as_vie... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
6359,
41871,
1330,
269,
27891,
69,
62,
42679,
198,
6738,
1334,
... | 2.759104 | 357 |
from datetime import datetime
from time import mktime
import feedparser
import requests
from lxml import etree as ET
from podcasts.models import Episode
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
640,
1330,
33480,
2435,
198,
198,
11748,
3745,
48610,
198,
11748,
7007,
198,
6738,
300,
19875,
1330,
2123,
631,
355,
12152,
198,
198,
6738,
31969,
13,
27530,
1330,
7922,
628,
628,
628
] | 4 | 40 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
33918,
198,
198,
6738,
435,
541,
323,
13,
64,
404,
13,
15042,
13,
26209,
13,
2348,
541,
323,
31077,
1330,
978,... | 2.571429 | 49 |
import os
import sys
import json
import re
import base64
from openapi.endpoint import fsim, restapi
from openapi.redfish import roobject
from examples.utils import *
ipaddr = '100.96.26.136'
endpoint = fsim(ipaddr, os.path.join('..', '..', 'dell'))
# endpoint = restapi(ipaddr, auth=('root', 'calvin'))
redfish = endp... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
33918,
198,
11748,
302,
198,
11748,
2779,
2414,
198,
6738,
1280,
15042,
13,
437,
4122,
1330,
277,
14323,
11,
1334,
15042,
198,
6738,
1280,
15042,
13,
445,
11084,
1330,
686,
15252,
198,
6738,
... | 1.803763 | 1,488 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 28 19:35:56 2019
@author: chuong nguyen <chuong.nguyen@csiro.au>
"""
'''It performs the image stacking task. It first align the images given the
transformaton function. We used ECC algorithm to align the images. Then it
blended the aligned images... | [
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,
7031,
4280,
2579,
678,
25,
2327,
25,
3980,
13130,
198,
198,
31,
9800,
25,
442,
84,
506,
... | 2.038674 | 1,810 |
# coding=utf-8
"""
===============================
API Для работы с пользователями
===============================
"""
from typing import Union, List, Dict, Tuple, Any
from flask_login import current_user
from app.api.tokens import check_token, activate_token
from app.api.convert import ConvertedDocument, convert_mon... | [
2,
19617,
28,
40477,
12,
23,
198,
37811,
198,
4770,
25609,
18604,
198,
17614,
12466,
242,
30143,
40623,
220,
21169,
16142,
140,
109,
15166,
20375,
45035,
220,
21727,
12466,
123,
25443,
119,
45367,
140,
115,
25443,
110,
16142,
20375,
16843... | 1.77017 | 5,243 |
from .constants import AWSRegion | [
6738,
764,
9979,
1187,
1330,
30865,
47371
] | 4.571429 | 7 |
# coding=utf-8
import re
from datetime import datetime
from typing import Dict, Tuple
from bs4 import Tag
| [
2,
19617,
28,
40477,
12,
23,
198,
11748,
302,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
19720,
1330,
360,
713,
11,
309,
29291,
198,
198,
6738,
275,
82,
19,
1330,
17467,
628,
628,
628,
628,
628,
628
] | 3.025641 | 39 |
import matplotlib.pyplot as plt
from scipy.stats import bernoulli
p = 2/3
# Initially all poll totals (values 0..100) are set to '0'
allPolls = [0] * 101
for i in range(0,1000):
responses = bernoulli.rvs(p, size=100)
allPolls[sum(responses)] += 1
#plt.bar(list(range(0,101)), allPolls)
#plt.show()
| [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
629,
541,
88,
13,
34242,
1330,
275,
1142,
280,
15516,
198,
198,
79,
796,
362,
14,
18,
198,
2,
30900,
477,
3278,
26310,
357,
27160,
657,
492,
3064,
8,
389,
900,
28... | 2.356061 | 132 |
from urllib.parse import quote
from flask import render_template
from logbook import Logger
from copy import deepcopy
from ..query import get_bangumi, parse
from .. import name, bp
log = Logger(__name__)
@bp.route('/bilibili_<hash>.html')
| [
6738,
2956,
297,
571,
13,
29572,
1330,
9577,
198,
6738,
42903,
1330,
8543,
62,
28243,
198,
6738,
2604,
2070,
1330,
5972,
1362,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
11485,
22766,
1330,
651,
62,
36668,
12994,
11,
21136,
198,
673... | 3.123457 | 81 |
# coding=utf-8
"""
Defines several classes of Events in the simulation.
"""
from typing import Optional, Dict, Any, Tuple
from ..base import BaseSimObj
import warnings
from ..models.ev import EV
class Event(BaseSimObj):
""" Base class for all events.
Args:
timestamp (int): Timestamp when an event o... | [
2,
19617,
28,
40477,
12,
23,
198,
37811,
198,
7469,
1127,
1811,
6097,
286,
18715,
287,
262,
18640,
13,
198,
37811,
198,
6738,
19720,
1330,
32233,
11,
360,
713,
11,
4377,
11,
309,
29291,
198,
198,
6738,
11485,
8692,
1330,
7308,
8890,
... | 2.270896 | 2,680 |
# Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License MIT (https://opensource.org/licenses/MIT).
import base64
from odoo.addons.test_mail.tests.test_mail_mail import TestMail
| [
2,
15069,
2864,
21798,
28876,
528,
283,
11203,
1279,
5450,
1378,
270,
12,
42068,
13,
10951,
14,
15097,
14,
88,
417,
528,
283,
11203,
29,
198,
2,
15069,
2864,
25910,
1530,
709,
21000,
81,
1279,
5450,
1378,
270,
12,
42068,
13,
10951,
... | 3.052083 | 96 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
"""
test_django-jsonsuit
------------
Tests for `django-jsonsuit`.
"""
from django.test import TestCase
from django.template import Context, Template
from jsonsuit.app_settings import (
W... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
1... | 2.725714 | 175 |
"""
Python Data Types:
- Boolean : bool
- Numeric : int, float, complex
- Text : str
- List : list, tuple, range
- Set : set, frozenset
- Map : dict
- Binary : bytes, bytearray, memoryview
There are six sequence types:
- strings,
- Unicode strings (deprecated)
- lists : ordered , mutable.... | [
37811,
198,
37906,
6060,
24897,
25,
198,
12,
41146,
1058,
197,
30388,
198,
12,
399,
39223,
1058,
197,
600,
11,
12178,
11,
3716,
198,
12,
8255,
220,
220,
220,
1058,
197,
2536,
198,
12,
7343,
220,
220,
220,
1058,
197,
4868,
11,
46545,... | 2.773333 | 225 |
# -*- coding: utf-8 -*-
# @Author: TD21forever
# @Date: 2019-05-08 13:35:17
# @Last Modified by: TD21forever
# @Last Modified time: 2019-05-08 19:22:13
from math import sqrt
import random
global_list = []
tmp = []
questionList = [11,15,27,88,99,102,5,23,8,10,6,99,4,3,2,1,0]
MergeSort(quest... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
2,
2488,
13838,
25,
13320,
2481,
754,
332,
201,
198,
2,
2488,
10430,
25,
220,
220,
13130,
12,
2713,
12,
2919,
1511,
25,
2327,
25,
1558,
201,
198,
2,
2488,
5956,... | 1.976526 | 213 |
import brownie
import pytest
from brownie import ZERO_ADDRESS
@pytest.fixture(scope="module")
| [
11748,
7586,
494,
198,
11748,
12972,
9288,
198,
6738,
7586,
494,
1330,
1168,
34812,
62,
2885,
7707,
7597,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
29982,
2625,
21412,
4943,
628,
628,
628,
628,
628,
628
] | 2.891892 | 37 |
import numpy as np
from optable.synthesis import meta_feature as meta_feature_mod
USE_LEARNED_PRIORITY = True
learned_weight_with_plus_restrict_of_feature_importance = np.array([
1.95736349e-01, 2.43198164e-02, 1.25749722e-01, 1.92912683e-01,
1.13415754e+00, 6.60585687e-02, 6.87092030e-03, 1.26865172e+00,
... | [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
2172,
540,
13,
1837,
429,
8497,
1330,
13634,
62,
30053,
355,
13634,
62,
30053,
62,
4666,
628,
198,
19108,
62,
2538,
1503,
45,
1961,
62,
4805,
41254,
9050,
796,
6407,
628,
198,
35720,
276,... | 1.758253 | 4,029 |
from django.db.models.signals import pre_save, post_save
from django.dispatch import receiver
from seedorf.chatkit.client import create_client
from seedorf.games.models import Game
@receiver(pre_save, sender=Game)
@receiver(post_save, sender=Game)
| [
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
12683,
874,
1330,
662,
62,
21928,
11,
1281,
62,
21928,
198,
6738,
42625,
14208,
13,
6381,
17147,
1330,
9733,
198,
198,
6738,
9403,
24263,
13,
17006,
15813,
13,
16366,
1330,
2251,
62,
16366,
... | 3.135802 | 81 |
# from aptk.__version__ import release
import sys, os
from setuptools import setup, find_packages
long_desc = '''
This package contains the Inline Syntax Highlight Sphinx Extension
'''
#if sys.argv[1] == 'test':
# sys.path.insert(0, os.path.dirname(__file__))
# import aptk
# r = aptk._test(aptk)
# faile... | [
2,
422,
15409,
74,
13,
834,
9641,
834,
1330,
2650,
198,
11748,
25064,
11,
28686,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
6511,
62,
20147,
796,
705,
7061,
198,
1212,
5301,
4909,
262,
554,
1370,
2... | 2.497382 | 573 |
from extutils import get_filename
import os
| [
6738,
1070,
26791,
1330,
651,
62,
34345,
198,
11748,
28686,
198
] | 4 | 11 |
"""Letters."""
import string
from typing import Set
LETTERS: Set[str] = set(string.ascii_letters)
def is_letter(character: str) -> bool:
"""Return if a character is a letter."""
return character in LETTERS
def not_letter(character: str) -> bool:
"""Return if a character is not a letter."""
return c... | [
37811,
5756,
1010,
526,
15931,
198,
11748,
4731,
198,
6738,
19720,
1330,
5345,
198,
198,
2538,
15751,
4877,
25,
5345,
58,
2536,
60,
796,
900,
7,
8841,
13,
292,
979,
72,
62,
15653,
8,
628,
198,
4299,
318,
62,
9291,
7,
22769,
25,
96... | 3.044248 | 113 |
"""
@brief Configuration script for the pick and place task of the rail over a
circular target
@author Claudia D'Ettorre (c.dettorre@ucl.ac.uk)
@date 03 Sep 2020
"""
from gym import utils
from dVRL_simulator.PsmEnv_Position_rail_target import PSMEnv_Position_pickplace_t
import numpy as np
| [
37811,
198,
31,
65,
3796,
220,
28373,
4226,
329,
262,
2298,
290,
1295,
4876,
286,
262,
6787,
625,
257,
220,
198,
220,
220,
220,
220,
220,
220,
220,
18620,
2496,
198,
31,
9800,
50214,
360,
6,
36,
926,
273,
260,
357,
66,
13,
67,
3... | 2.779817 | 109 |
from django.urls import path
from .views import SignUpView,LoginView
app_name = 'accounts'
urlpatterns = [
path('signup/',SignUpView.as_view(),name = 'signup_view'),
path('login/',LoginView.as_view(),name = 'login_view'),
]
| [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
33571,
1330,
5865,
4933,
7680,
11,
47790,
7680,
198,
198,
1324,
62,
3672,
796,
705,
23317,
82,
6,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
12... | 2.659091 | 88 |
#!/usr/bin/python
# coding: utf-8
import sys
import os
import subprocess
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../lib/antlr/antlr/'))
sys.path.insert(0, os.path.abspath('../lib/BeautifulSoup/'))
sys.path.insert(0, os.path.abspath('../lib/topdown/'))
sys.path.insert(0, os.path.ab... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
28686,
13,
6978,
13,
397,
2777,
776,
10786,
40720,
... | 2.352459 | 244 |
import spacy
from textacy.preprocess import preprocess_text
from textacy.keyterms import singlerank
import re
| [
11748,
599,
1590,
198,
6738,
2420,
1590,
13,
3866,
14681,
1330,
662,
14681,
62,
5239,
198,
6738,
2420,
1590,
13,
2539,
38707,
1330,
1702,
1754,
962,
198,
11748,
302,
198
] | 3.666667 | 30 |
import multiprocessing
import os
import subprocess
try:
subprocess.call(['cairosvg', '--version'], stdout=open(os.devnull, 'w'), stderr=open(os.devnull, 'w'))
except OSError as e:
raise ImportError('svg_to_png: cairosvg does not seem to be installed: ' + str(e))
def svg_to_png(path):
"""
Given `path`... | [
11748,
18540,
305,
919,
278,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
198,
28311,
25,
198,
220,
220,
220,
850,
14681,
13,
13345,
7,
17816,
66,
1872,
4951,
45119,
3256,
705,
438,
9641,
6,
4357,
14367,
448,
28,
9654,
7,
418,
13... | 2.421395 | 1,692 |
# --------------------------------------------------------------------
# errors.py
#
# Author: Lain Musgrove (lain.proliant@gmail.com)
# Date: Thursday May 7, 2020
#
# Distributed under terms of the MIT license.
# --------------------------------------------------------------------
# ---------------------------------... | [
2,
16529,
650,
198,
2,
8563,
13,
9078,
198,
2,
198,
2,
6434,
25,
406,
391,
2629,
27333,
303,
357,
34277,
13,
1676,
75,
3014,
31,
14816,
13,
785,
8,
198,
2,
7536,
25,
3635,
1737,
767,
11,
12131,
198,
2,
198,
2,
4307,
6169,
739,... | 9.215686 | 102 |
soma = 0
for c in range (0,6):
n = int(input("Digite um valor: "))
if n % 2 == 0:
soma = soma + n
print('A soma dos valores é {}'.format(soma))
| [
82,
6086,
796,
657,
198,
1640,
269,
287,
2837,
357,
15,
11,
21,
2599,
198,
220,
220,
220,
299,
796,
493,
7,
15414,
7203,
19511,
578,
23781,
1188,
273,
25,
366,
4008,
198,
220,
220,
220,
611,
299,
4064,
362,
6624,
657,
25,
198,
2... | 2.105263 | 76 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Bits & Bytes related humanization."""
suffixes = {
'decimal': ('kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'),
'binary': ('KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'),
'gnu': "KMGTPEZY",
}
def naturalsize(value, binary=False, gnu=False, format... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
33,
896,
1222,
2750,
4879,
3519,
1692,
1634,
526,
15931,
198,
198,
37333,
844,
274,
796,
1391,
198,
220,
... | 2.458466 | 626 |
#!/usr/bin/env python
import pyfits
import numpy as np
import os
import argparse as ARG
if __name__ == '__main__':
p = ARG.ArgumentParser(
description='''
Copy the grouping of one file to another file
''',
formatter_class=ARG.ArgumentDefaultsHelpFormatter ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
628,
198,
11748,
12972,
21013,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
1822,
29572,
355,
5923,
38,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
1035... | 2.327422 | 733 |
##################################################################################################################################
#
# script : delight-learn.py
#
# input : 'training_catFile'
# output : localData or reducedData usefull for Gaussian Process in 'training_paramFile'
# - find the normalisation of the fl... | [
29113,
29113,
29113,
29113,
2235,
198,
2,
198,
2,
4226,
1058,
10974,
12,
35720,
13,
9078,
198,
2,
198,
2,
220,
5128,
1058,
705,
34409,
62,
9246,
8979,
6,
198,
2,
220,
5072,
1058,
1957,
6601,
393,
5322,
6601,
779,
12853,
329,
12822,
... | 2.524911 | 2,248 |
import ast
import os
import requests
import math
import time
import urllib.parse
import re
import OpenFarm
import operator
import json
from abc import abstractmethod
from farmware_tools import device, app
from datetime import *
from typing import *
from utils import utc_now, get_factory, Entity, parse_datetime, dump_da... | [
11748,
6468,
198,
11748,
28686,
198,
11748,
7007,
198,
11748,
10688,
198,
11748,
640,
198,
11748,
2956,
297,
571,
13,
29572,
198,
11748,
302,
198,
11748,
4946,
48412,
198,
11748,
10088,
198,
11748,
33918,
198,
6738,
450,
66,
1330,
12531,
... | 2.637339 | 466 |
from __future__ import absolute_import, division, print_function
# LIBTBX_SET_DISPATCHER_NAME phenix.secondary_structure_validation
from mmtbx.programs import ss_validation
from iotbx.cli_parser import run_program
run_program(ss_validation.Program)
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
2,
45651,
22737,
55,
62,
28480,
62,
26288,
47,
11417,
1137,
62,
20608,
6566,
844,
13,
38238,
62,
301,
5620,
62,
12102,
341,
198,
198,
6738,
8085,
83,... | 3.098765 | 81 |
"""
This file is part of the tagup Python module which is released under MIT.
See file LICENSE for full license details.
"""
from unittest import TestCase
from unittest.mock import MagicMock
from tagup import (
BaseRenderer,
StaticTagMixin,
TagDictMixin,
TrimMixin,
)
from tagup.exceptions import (
... | [
37811,
198,
1212,
2393,
318,
636,
286,
262,
7621,
929,
11361,
8265,
543,
318,
2716,
739,
17168,
13,
198,
6214,
2393,
38559,
24290,
329,
1336,
5964,
3307,
13,
198,
37811,
628,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
555... | 2.794118 | 170 |
#! /usr/bin/python3
# -*- coding: utf-8 -*-
#=================================================================================
# author: Chancerel Codjovi (aka codrelphi)
# date: 2019-09-18
# source: https://www.hackerrank.com/challenges/nested-list/problem
#=============================================================... | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
23926,
4770,
28,
198,
2,
1772,
25,
11809,
2411,
18720,
73,
47297,
357,
8130,
14873,
2411,
34846,
8,
198,
2,
3128,... | 2.862595 | 262 |
area = float(input())
sum = 7.61 * area
sum1 = sum * 0.18
result = sum - sum1
print(f"The final price is: {result} lv.")
print(f"The discount is: {sum1} lv.") | [
20337,
796,
12178,
7,
15414,
28955,
198,
16345,
796,
767,
13,
5333,
1635,
1989,
198,
16345,
16,
796,
2160,
1635,
657,
13,
1507,
198,
20274,
796,
2160,
532,
2160,
16,
198,
4798,
7,
69,
1,
464,
2457,
2756,
318,
25,
1391,
20274,
92,
... | 2.548387 | 62 |
from tipico.types.instrument_status import InstrumentStatus
from tipico.utils.constants import Constants
defaultConfigFilePath= _getDefaultConfigFilePath()
| [
6738,
8171,
3713,
13,
19199,
13,
259,
43872,
62,
13376,
1330,
42410,
19580,
198,
6738,
8171,
3713,
13,
26791,
13,
9979,
1187,
1330,
4757,
1187,
628,
198,
198,
12286,
16934,
8979,
15235,
28,
4808,
1136,
19463,
16934,
8979,
15235,
3419,
6... | 3.833333 | 42 |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import re
import json
import string
import xlwings
import requests
import threading
import subprocess
from lxml import etree
from time import sleep
from pathlib import Path
from random import randint
from urllib.parse import quote
from playsound import playsound
from sqlalch... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
302,
198,
11748,
33918,
198,
11748,
4731,
198,
11748,
2124,
75,
48819,
198,
11748,
7007,
198,
11748,
4704,
278,
198,
... | 1.949541 | 654 |
import requests
import json
import imaplib
import smtplib
with open('order_list.txt', 'r') as orders:
orders = orders.read()
orders = orders.split('\n')
notif = NotifyFeedback()
for order in orders:
notif.get_status(order) | [
11748,
7007,
198,
11748,
33918,
198,
11748,
545,
64,
489,
571,
198,
11748,
895,
83,
489,
571,
628,
198,
198,
4480,
1280,
10786,
2875,
62,
4868,
13,
14116,
3256,
705,
81,
11537,
355,
6266,
25,
198,
220,
220,
220,
6266,
796,
6266,
13,... | 2.57732 | 97 |
#
# Copyright (C) [2020-2021] Futurewei Technologies, Inc. All rights reserved.
#
# OpenArkCompiler is licensed underthe Mulan Permissive Software License v2.
# You can use this software according to the terms and conditions of the MulanPSL - 2.0.
# You may obtain a copy of MulanPSL - 2.0 at:
#
# https://opensource.o... | [
2,
198,
2,
15069,
357,
34,
8,
685,
42334,
12,
1238,
2481,
60,
10898,
42990,
21852,
11,
3457,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
4946,
42007,
7293,
5329,
318,
11971,
739,
1169,
17996,
272,
2448,
33532,
10442,
13789,
410,
17,
... | 3.07563 | 238 |
from __future__ import unicode_literals
from asgi_redis import RedisLocalChannelLayer
from asgiref.conformance import ConformanceTestCase
# Local layer conformance tests
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
355,
12397,
62,
445,
271,
1330,
2297,
271,
14565,
29239,
49925,
198,
6738,
355,
70,
557,
69,
13,
1102,
10367,
1330,
1482,
10367,
14402,
20448,
628,
198,
2,
10714,
... | 3.73913 | 46 |