content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from matplotlib import pyplot
iters = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72... | [
6738,
2603,
29487,
8019,
1330,
12972,
29487,
198,
198,
270,
364,
796,
685,
15,
11,
352,
11,
362,
11,
513,
11,
604,
11,
642,
11,
718,
11,
767,
11,
807,
11,
860,
11,
838,
11,
1367,
11,
1105,
11,
1511,
11,
1478,
11,
1315,
11,
146... | 2.015939 | 342,994 |
'''
Description: numpy
Author: HCQ
Company(School): UCAS
Email: 1756260160@qq.com
Date: 2021-04-25 19:49:38
LastEditTime: 2021-04-25 19:57:55
FilePath: /python-libraries/01Numpy/np_project.py
'''
import numpy as np
# np
# A = [[ 3 4 5 6]
# [ 7 8 9 10]
# [11 12 13 14]]
A = np.arange(3,15).reshape((3,4))
index =... | [
7061,
6,
198,
11828,
25,
299,
32152,
198,
13838,
25,
27327,
48,
198,
39154,
7,
26130,
2599,
14417,
1921,
198,
15333,
25,
1596,
3980,
2075,
486,
1899,
31,
38227,
13,
785,
198,
10430,
25,
33448,
12,
3023,
12,
1495,
678,
25,
2920,
25,
... | 2.137363 | 182 |
import FWCore.ParameterSet.Config as cms
QualityMon = cms.EDAnalyzer("SiStripMonitorQuality",
StripQualityLabel = cms.string('test1'),
OutputMEsInRootFile = cms.bool(False),
OutputFileName = cms.string('SiStripQuality.root')
)
| [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
198,
35013,
9069,
796,
269,
907,
13,
1961,
37702,
9107,
7203,
42801,
1273,
5528,
35479,
35013,
1600,
198,
220,
220,
220,
18508,
35013,
33986,
796,
269,
907,
13,
8841,
... | 2.781609 | 87 |
import os
import sys
sys.path.append("../../../monk/");
import psutil
from gluon_prototype import prototype
##########################################################################################################################
gtf = prototype(verbose=1);
gtf.Prototype("sample-project-1", "sample-experiment-1");... | [
11748,
28686,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7203,
40720,
40720,
40720,
2144,
74,
14,
15341,
198,
11748,
26692,
22602,
198,
198,
6738,
1278,
84,
261,
62,
38124,
1330,
14879,
628,
198,
198,
29113,
29113,
29113,
14468,
... | 4.334728 | 239 |
import models
from DefCurse import widgets
from DefCurse import style
from DefCurse import area
| [
11748,
4981,
198,
198,
6738,
2896,
34,
12321,
1330,
40803,
198,
6738,
2896,
34,
12321,
1330,
3918,
198,
6738,
2896,
34,
12321,
1330,
1989,
198
] | 3.88 | 25 |
from django.conf.urls import url, include
from rest_framework import routers
from api.views import UserViewSet, GroupViewSet,FeedViewSet
router = routers.DefaultRouter()
router.register(r'users', UserViewSet)
router.register(r'groups', GroupViewSet)
router.register(r'feeds', FeedViewSet)
router.register(r'category', ... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
11,
2291,
198,
6738,
1334,
62,
30604,
1330,
41144,
198,
198,
6738,
40391,
13,
33571,
1330,
11787,
7680,
7248,
11,
4912,
7680,
7248,
11,
18332,
7680,
7248,
198,
198,
472,
353,
7... | 3.079787 | 188 |
#!/usr/bin/env python3
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
]
setup_requirements = [
'pytest-runner',
]
test_requirements = [
'pytest>... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
4480,
1280,
10786,
15675,
11682,
13,
81,
301,
11537,
355,
1100,
1326,
62,
7753,
25,
198,
220,
220,
220,
1... | 2.482759 | 609 |
import argparse
import os
import sys
import subprocess
import time
import numpy as np
import random
import h5py
if __name__ == "__main__":
main()
| [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
850,
14681,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4738,
198,
11748,
289,
20,
9078,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
... | 3.081633 | 49 |
undefined
for (i = 0; i < document.getElementsByTagName("code").length; i++) { console.log(document.getElementsByTagName("code")[i].innerText); }
| [
198,
917,
18156,
198,
1640,
357,
72,
796,
657,
26,
1312,
1279,
3188,
13,
1136,
36,
3639,
3886,
24835,
5376,
7203,
8189,
11074,
13664,
26,
1312,
29577,
1391,
220,
220,
220,
220,
8624,
13,
6404,
7,
22897,
13,
1136,
36,
3639,
3886,
248... | 2.763636 | 55 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
if __name__ == "__main__":
if len(sys.argv) != 2:
print('Usage:', sys.argv[0], '<input>')
exit(1)
with open(sys.argv[1]) as f:
result = check(f.read().strip())
print('Result:', result)
| [
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,
11748,
25064,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
61... | 2.020979 | 143 |
import setuptools
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
import sys
import setuptools
import os
import re
import platform
import subprocess
# from pathlib import Path
from os.path import expanduser, join
from distutils.version import LooseVersion
impor... | [
11748,
900,
37623,
10141,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
27995,
11,
1064,
62,
43789,
198,
6738,
900,
37623,
10141,
13,
21812,
13,
11249,
62,
2302,
1330,
1382,
62,
2302,
198,
11748,
25064,
198,
11748,
900,
37623,
10141,
19... | 2.557214 | 1,005 |
'''
https://www.geeksforgeeks.org/command-method-python-design-patterns/
Command Method is Behavioral Design Pattern that encapsulates a request as an object, thereby allowing for the parameterization of clients with different requests and the queuing or logging of requests. Parameterizing other objects with different ... | [
7061,
6,
198,
5450,
1378,
2503,
13,
469,
2573,
30293,
2573,
13,
2398,
14,
21812,
12,
24396,
12,
29412,
12,
26124,
12,
33279,
82,
14,
198,
21575,
11789,
318,
38483,
8495,
23939,
326,
32652,
15968,
257,
2581,
355,
281,
2134,
11,
12839,
... | 4.5917 | 747 |
import functools
import numpy as np
import theano
import theano.tensor as T
import treeano
import treeano.nodes as tn
import canopy
from treeano.sandbox.nodes import batch_normalization as bn
fX = theano.config.floatX
def residual_block_conv_2d(name,
num_filters,
... | [
11748,
1257,
310,
10141,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
262,
5733,
198,
11748,
262,
5733,
13,
83,
22854,
355,
309,
198,
11748,
5509,
5733,
198,
11748,
5509,
5733,
13,
77,
4147,
355,
256,
77,
198,
11748,
39418,
198,
67... | 1.654418 | 8,001 |
from test_module import module_func_2 as oar
module_func() | [
6738,
1332,
62,
21412,
1330,
8265,
62,
20786,
62,
17,
355,
267,
283,
198,
21412,
62,
20786,
3419
] | 3.222222 | 18 |
from astropy import constants
import math
import autofit as af
import autoarray as aa
import autogalaxy as ag
from autoarray.mock.mock import *
from autofit.mock.mock import *
from autofit.mock import mock as af_m
# MockProfiles #
# Mock Galaxy #
# Mock Cosmology #
# Mock Model-Fitt... | [
6738,
6468,
28338,
1330,
38491,
201,
198,
11748,
10688,
201,
198,
201,
198,
11748,
1960,
1659,
270,
355,
6580,
201,
198,
11748,
8295,
18747,
355,
257,
64,
201,
198,
11748,
1960,
519,
282,
6969,
355,
556,
201,
198,
6738,
8295,
18747,
1... | 2.416058 | 137 |
import json
import ast
import plotly.plotly as py
import plotly.graph_objs as go
import plotly.io as pio
import os
import numpy as np
import plotly
plotly.io.orca.config.executable = '/home/gabi/dev/miniconda3/bin/orca' #May be useful in Ubuntu
#PARAMS
logs_path = "C:\\Users\\gbosetti\\Desktop\\test\\logs"
output_pat... | [
11748,
33918,
198,
11748,
6468,
198,
11748,
7110,
306,
13,
29487,
306,
355,
12972,
198,
11748,
7110,
306,
13,
34960,
62,
672,
8457,
355,
467,
198,
11748,
7110,
306,
13,
952,
355,
279,
952,
198,
11748,
28686,
198,
11748,
299,
32152,
35... | 2.4 | 860 |
from controllers import *
route = [
(
r"/",
home.homeHandler
),
(
r"/auth/register",
auth.registerHandler
),
(
r"/logout",
logout.logoutHandler
),
(
r"/home",
timetable.timeTableHandler
),
(
r"/auth/login",
auth.loginHandler
)
]
| [
198,
6738,
20624,
1330,
1635,
198,
38629,
796,
685,
198,
197,
197,
7,
198,
197,
197,
197,
81,
1,
14,
1600,
198,
197,
197,
197,
11195,
13,
11195,
25060,
198,
197,
197,
828,
198,
197,
197,
7,
198,
197,
197,
197,
81,
1,
14,
18439,
... | 1.887417 | 151 |
# -*- coding: utf-8 -*-
import unittest
import libkeepass
import keepass_guesser
# file : attempts from file expected before success or failure
guess_files = {'tests/data/guesslist0': {'attempts': 3, 'guessphrase': None},
'tests/data/guesslist1': {'attempts': 1, 'guessphrase': 'test'},
't... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
555,
715,
395,
198,
11748,
9195,
14894,
562,
198,
11748,
1394,
562,
62,
5162,
408,
263,
198,
198,
2,
2393,
1058,
6370,
422,
2393,
2938,
878,
1943,
393,
5287,
19... | 2.234266 | 286 |
import numpy as np
import os
if __name__ == '__main__':
dataloader = MovielensDatasetLoader()
print(dataloader.ratings) | [
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
197,
67,
10254,
1170,
263,
796,
44795,
8207,
641,
27354,
292,
316,
17401,
3419,
198,
197,
4798,
7,
67,
10254,
1... | 2.595745 | 47 |
# Copyright (c) 2021, Thomas Aglassinger
# All rights reserved. Distributed under the BSD 3-Clause License.
from sanpo.command import main_without_logging_setup
from ._common import PoFileTest
| [
2,
15069,
357,
66,
8,
33448,
11,
5658,
2449,
31172,
3889,
198,
2,
1439,
2489,
10395,
13,
4307,
6169,
739,
262,
347,
10305,
513,
12,
2601,
682,
13789,
13,
198,
6738,
5336,
7501,
13,
21812,
1330,
1388,
62,
19419,
62,
6404,
2667,
62,
... | 3.611111 | 54 |
import pytest
import logging
import struct
import base64
import msgpack
import nacl.signing
import algosdk
from . import txn_utils
from . import ui_interaction
from . import speculos
txn_labels = {
'review', 'txn type', 'sender', 'fee (alg)', 'genesis id', 'genesis hash', 'vote pk','vrf pk',
'vote fir... | [
11748,
12972,
9288,
198,
11748,
18931,
198,
11748,
2878,
198,
11748,
2779,
2414,
198,
198,
11748,
31456,
8002,
198,
11748,
299,
37779,
13,
12683,
278,
198,
198,
11748,
435,
70,
418,
34388,
198,
6738,
764,
1330,
27765,
77,
62,
26791,
198... | 2.254038 | 681 |
from sklearn.feature_extraction.text import TfidfVectorizer
from database_utils import get_all_data, remove_summary
from collections import OrderedDict
import operator
if __name__ == 'main':
main() | [
6738,
1341,
35720,
13,
30053,
62,
2302,
7861,
13,
5239,
1330,
309,
69,
312,
69,
38469,
7509,
198,
6738,
6831,
62,
26791,
1330,
651,
62,
439,
62,
7890,
11,
4781,
62,
49736,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
220,
198,
1174... | 3.344262 | 61 |
from netapp.netapp_object import NetAppObject
| [
6738,
2010,
1324,
13,
3262,
1324,
62,
15252,
1330,
3433,
4677,
10267,
198
] | 3.538462 | 13 |
from .abstractExpression import AbstractExpression
from typing import TypeVar
T = TypeVar('T')
| [
6738,
764,
397,
8709,
16870,
2234,
1330,
27741,
16870,
2234,
198,
6738,
19720,
1330,
5994,
19852,
198,
198,
51,
796,
5994,
19852,
10786,
51,
11537,
628
] | 3.730769 | 26 |
import os
import sys
from typing import Tuple
import pkg_resources
from Bio import SeqIO
import RNA
import numpy as np
complement_table = str.maketrans('ATGCU', 'TACGA')
if __name__ == '__main__':
pass | [
11748,
28686,
198,
11748,
25064,
198,
6738,
19720,
1330,
309,
29291,
198,
198,
11748,
279,
10025,
62,
37540,
198,
198,
6738,
16024,
1330,
1001,
80,
9399,
198,
198,
11748,
25897,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
785,
26... | 2.74026 | 77 |
#!/usr/bin/env python3
#
# Analyses a hierarchical tab-indented list file
# and prints out subsection sizes on a requested nesting level
# Subsections with the same name in different subtrees
# are treated as continutaions of a single section
# The script accepts two command line parameters:
# file name
# indent... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
198,
2,
1052,
43710,
257,
38958,
7400,
12,
521,
4714,
1351,
2393,
198,
2,
290,
20842,
503,
8371,
10620,
319,
257,
9167,
46282,
1241,
198,
2,
3834,
23946,
351,
262,
976,
... | 3.5 | 110 |
#based on the code from https://github.com/studywolf/blog/blob/master/VREP/two_link_arm/vrep_twolink_controller.py
#explained at https://studywolf.wordpress.com/2016/04/18/using-vrep-for-simulation-of-force-controlled-models/
import numpy as np
from VrepWorld import VrepWorld
#create the world object
world = Vrep... | [
198,
198,
2,
3106,
319,
262,
2438,
422,
3740,
1378,
12567,
13,
785,
14,
44517,
18829,
14,
14036,
14,
2436,
672,
14,
9866,
14,
53,
35316,
14,
11545,
62,
8726,
62,
1670,
14,
85,
7856,
62,
4246,
349,
676,
62,
36500,
13,
9078,
198,
... | 2.655577 | 511 |
from ROAR.control_module.controller import Controller
from ROAR.utilities_module.vehicle_models import VehicleControl, Vehicle
from ROAR.utilities_module.data_structures_models import Transform, Location
import numpy as np
import logging
from ROAR.agent_module.agent import Agent
from typing import Tuple
import json
fro... | [
6738,
15107,
1503,
13,
13716,
62,
21412,
13,
36500,
1330,
22741,
198,
6738,
15107,
1503,
13,
315,
2410,
62,
21412,
13,
33892,
1548,
62,
27530,
1330,
21501,
15988,
11,
21501,
198,
6738,
15107,
1503,
13,
315,
2410,
62,
21412,
13,
7890,
... | 3.533898 | 118 |
from django.test import TestCase
from eahub.base.models import User
from eahub.localgroups.models import LocalGroup, Organisership
from eahub.profiles.models import Profile
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
304,
993,
549,
13,
8692,
13,
27530,
1330,
11787,
198,
6738,
304,
993,
549,
13,
12001,
24432,
13,
27530,
1330,
10714,
13247,
11,
7221,
21572,
1056,
198,
6738,
304,
993,
5... | 3.5 | 50 |
import boto3
import sys
import getopt
import datetime
import pytz
# Globals
BucketName = ''
FolderName = ''
HowManyDays = None
ProfileName = 'default'
Env = 'us-east-1'
Delete = False
# Parse CL opts
opts, args = getopt.getopt(sys.argv[1:],'he:b:p:f:k:d')
for opt, arg in opts:
if opt == '-h':
print '-b bu... | [
11748,
275,
2069,
18,
198,
11748,
25064,
198,
11748,
651,
8738,
198,
11748,
4818,
8079,
198,
11748,
12972,
22877,
198,
198,
2,
40713,
874,
198,
33,
38811,
5376,
796,
10148,
198,
41092,
5376,
796,
10148,
198,
2437,
7085,
38770,
796,
6045... | 2.31756 | 951 |
from cloudmosh.components.base import CloudMoshComponent
import os
import numpy as np
# Keras / TensorFlow
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '5'
from keras.models import load_model
import skimage.io
from skimage.transform import resize
from keras.engine.topology import Layer, InputSpec
import keras.utils.conv_utils ... | [
6738,
6279,
76,
3768,
13,
5589,
3906,
13,
8692,
1330,
10130,
44,
3768,
21950,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
2,
17337,
292,
1220,
309,
22854,
37535,
198,
418,
13,
268,
2268,
17816,
10234,
62,
8697,
47,
62,... | 3.13986 | 143 |
# ==============================================================================
# Copyright 2018 Intel Corporation
#
# 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.apa... | [
2,
38093,
25609,
28,
198,
2,
220,
15069,
2864,
8180,
10501,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
35... | 2.516512 | 3,452 |
from fixing import *
from observable import *
from generate_flows import *
from generate_observables import *
if __name__ == '__main__':
_test()
| [
6738,
18682,
1330,
1635,
198,
6738,
42550,
1330,
1635,
198,
6738,
7716,
62,
44041,
1330,
1635,
198,
6738,
7716,
62,
672,
3168,
2977,
1330,
1635,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
4... | 3.333333 | 45 |
import discord
from discord.ext import commands
import os
import random
from server import run_server
#token
token = os.environ.get("token")
#prefisso
bot = commands.Bot(command_prefix="m!", description="Nada.")
bot.remove_command('help')
#status
#log
#comandi
#support
#triggered
run_server()
bot.run(token) | [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
11748,
28686,
198,
11748,
4738,
198,
6738,
4382,
1330,
1057,
62,
15388,
198,
198,
2,
30001,
198,
30001,
796,
28686,
13,
268,
2268,
13,
1136,
7203,
30001,
4943,
198,
198,
2,
38... | 2.962617 | 107 |
import numpy as np
import string
import re
__all__ = ['BADAA',
'AALPHABET',
'convertHLAAsterisk',
'isvalidmer',
'isvalidHLA',
'rankEpitopes',
'rankKmers',
'rankMers',
'getIC50',
'getMers',
'getMerInd... | [
11748,
299,
32152,
355,
45941,
198,
11748,
4731,
198,
11748,
302,
198,
198,
834,
439,
834,
796,
37250,
33,
2885,
3838,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
32,
1847,
11909,
6242,
2767,
3256,
198,
22... | 2.304669 | 7,582 |
assert __name__ == '__main__'
# in shell
import os, sys
simfempypath = os.path.abspath(os.path.join(__file__, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir,'simfempy'))
sys.path.insert(0,simfempypath)
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import pygm... | [
30493,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
6,
198,
2,
287,
7582,
198,
11748,
28686,
11,
25064,
198,
14323,
69,
45787,
4464,
776,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
22179,
7,
834,
7753,
834,
1... | 3.627907 | 258 |
import re
import ujson
from psycopg2.sql import SQL, Composable, Identifier
from polecat.utils import to_bool, to_tuple
from ...schema.column import ReverseColumn
from .expression import Expression
# class NotNull(FilterType):
# def eval(self, filter):
# super().eval(filter)
# retu... | [
11748,
302,
198,
198,
11748,
334,
17752,
198,
6738,
17331,
22163,
70,
17,
13,
25410,
1330,
16363,
11,
29936,
540,
11,
11440,
7483,
198,
198,
6738,
16825,
9246,
13,
26791,
1330,
284,
62,
30388,
11,
284,
62,
83,
29291,
198,
6738,
2644,
... | 2.375367 | 341 |
import json
from autobahn.asyncio.websocket import WebSocketClientProtocol
from config import DEBUG, CLIENTS_MSGS_COUNT, CLIENTS_COUNT
| [
11748,
33918,
198,
198,
6738,
1960,
672,
15386,
13,
292,
13361,
952,
13,
732,
1443,
5459,
1330,
5313,
39105,
11792,
19703,
4668,
198,
198,
6738,
4566,
1330,
16959,
11,
43749,
15365,
62,
5653,
14313,
62,
34,
28270,
11,
43749,
15365,
62,
... | 3.136364 | 44 |
import pytest
import time
import json
from datetime import date, timedelta
from www.core import Synapse, Env
from www.services.synapse_space.daa import GrantDaaAccessService
import synapseclient as syn
def test_it_creates_the_team(mk_service, assert_basic_service_success):
service = mk_service()
assert ser... | [
11748,
12972,
9288,
198,
11748,
640,
198,
11748,
33918,
198,
6738,
4818,
8079,
1330,
3128,
11,
28805,
12514,
198,
6738,
7324,
13,
7295,
1330,
16065,
7512,
11,
2039,
85,
198,
6738,
7324,
13,
30416,
13,
28869,
7512,
62,
13200,
13,
6814,
... | 2.648036 | 662 |
import numpy as np
# create J[k,h], the number of individuals in niche k on island h
# create D[k,h], the number of founding individuals in each niche k on island h
# create a sample using my species generator
| [
11748,
299,
32152,
355,
45941,
628,
198,
2,
2251,
449,
58,
74,
11,
71,
4357,
262,
1271,
286,
3925,
287,
21404,
479,
319,
7022,
289,
198,
198,
2,
2251,
360,
58,
74,
11,
71,
4357,
262,
1271,
286,
16636,
3925,
287,
1123,
21404,
479,
... | 3.706897 | 58 |
""" Game fix for Watch_Dogs
"""
# pylint: disable=C0103
import subprocess
from protonfixes import util
from protonfixes import splash
def main():
""" Fix the in-game sound
"""
util.protontricks('xact')
util.protontricks('winxp')
info_popup()
| [
37811,
3776,
4259,
329,
6305,
62,
35,
18463,
198,
37811,
198,
2,
279,
2645,
600,
25,
15560,
28,
34,
486,
3070,
198,
11748,
850,
14681,
198,
6738,
386,
1122,
42624,
1330,
7736,
198,
6738,
386,
1122,
42624,
1330,
22870,
628,
198,
4299,
... | 2.78125 | 96 |
import collections
from abc import ABC, abstractmethod
from typing import TypeVar, Generic, Callable, OrderedDict, Collection, Any
from brigadier import Command, RedirectModifier
S = TypeVar('S')
# the class ouroboros keeps growing
| [
11748,
17268,
198,
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
6738,
19720,
1330,
5994,
19852,
11,
42044,
11,
4889,
540,
11,
14230,
1068,
35,
713,
11,
12251,
11,
4377,
198,
198,
6738,
24393,
38868,
1330,
9455,
11,
2297,
1060,
58... | 3.651515 | 66 |
from absl import app, flags, logging
from absl.flags import FLAGS
import cv2
import os
import numpy as np
import tensorflow as tf
import time
from PIL import Image
from modules.models import RetinaFaceModel
from modules.utils import (set_memory_growth, load_yaml, draw_bbox_landm,
pad_input_... | [
6738,
2352,
75,
1330,
598,
11,
9701,
11,
18931,
198,
6738,
2352,
75,
13,
33152,
1330,
9977,
4760,
50,
198,
11748,
269,
85,
17,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
1174... | 2.432692 | 416 |
from .resource import ValveCompiledResource
from .vphys import ValveCompiledPhysics
from .vmat import ValveCompiledMaterial
from .vtex import ValveCompiledTexture
from .vmdl import ValveCompiledModel
from .vwrld import ValveCompiledWorld
from .vmorf import ValveCompiledMorph
from .vrman import ValveCompiledResourceMani... | [
6738,
764,
31092,
1330,
22479,
7293,
3902,
26198,
198,
6738,
764,
85,
34411,
1330,
22479,
7293,
3902,
2725,
23154,
198,
6738,
764,
85,
6759,
1330,
22479,
7293,
3902,
17518,
198,
6738,
764,
85,
16886,
1330,
22479,
7293,
3902,
32742,
198,
... | 3.790698 | 86 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
b2ac.compat
~~~~~~~~~~~
B2AC compatiblity module.
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
import sys
is_py3 = (sys.version_info[0] > 2)
# Py3 mappings
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
65,
17,
330,
13,
5589,
265,
198,
15116,
4907,
93,
198,
198,
33,
17,
2246,
8330,
10506,
414,
8265,
13,
1... | 2.679389 | 131 |
#!/usr/bin/env python3
n, *a = map(int, open(0).read().split())
from itertools import*
*S, = accumulate(a)
*M, = accumulate(S, max)
Z = ans = 0
for s, m in zip(S, M):
ans = max(ans, Z + m)
Z += s
print(ans) | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
77,
11,
1635,
64,
796,
3975,
7,
600,
11,
1280,
7,
15,
737,
961,
22446,
35312,
28955,
198,
6738,
340,
861,
10141,
1330,
9,
198,
9,
50,
11,
796,
29915,
7,
64,
8,
198,
9,
44,
... | 2.183673 | 98 |
import functools
def adageop(func):
"""
Decorator that adds a 's' attribute to a function
The attribute can be used to partially define
the function call, except for the 'adageobj'
keyword argument, the return value is a
single-argument ('adageobj') function
"""
func.s = partial
ret... | [
11748,
1257,
310,
10141,
198,
198,
4299,
512,
496,
404,
7,
20786,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
4280,
273,
1352,
326,
6673,
257,
705,
82,
6,
11688,
284,
257,
2163,
198,
220,
220,
220,
383,
11688,
460,
307,
9... | 3.062338 | 385 |
import sys
import getpass
from keepassxc_pwned import check_password
pw = getpass.getpass("Password to check: ")
count = check_password(pw)
if count > 0:
print("Found password {} times!".format(count))
sys.exit(1)
else:
print("Could not find that password in the dataset.")
sys.exit(0)
| [
11748,
25064,
198,
11748,
651,
6603,
198,
198,
6738,
1394,
562,
25306,
62,
79,
675,
276,
1330,
2198,
62,
28712,
198,
198,
79,
86,
796,
651,
6603,
13,
1136,
6603,
7203,
35215,
284,
2198,
25,
366,
8,
198,
9127,
796,
2198,
62,
28712,
... | 2.884615 | 104 |
from __future__ import unicode_literals
import django
from django.test import TestCase
from job.configuration.results.results_manifest.results_manifest import ResultsManifest
from job.configuration.results.exceptions import InvalidResultsManifest, \
MissingRequiredOutput
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
42625,
14208,
198,
220,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
1693,
13,
11250,
3924,
13,
43420,
13,
43420,
62,
805,
8409,
13,
... | 3.594937 | 79 |
# -*- coding: utf-8 -*-
# _ __
# | |/ /___ ___ _ __ ___ _ _
# | ' </ -_) -_) '_ \/ -_) '_|
# |_|\_\___\___| .__/\___|_|
# |_|
#
# Keeper Commander
# Copyright 2022 Keeper Security Inc.
# Contact: ops@keepersecurity.com
#
from typing import Optional, Callable, Iterator, List, Iterable, Tuple
import ar... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
220,
4808,
220,
11593,
198,
2,
930,
930,
14,
1220,
17569,
46444,
4808,
11593,
220,
46444,
4808,
4808,
220,
198,
2,
930,
705,
7359,
532,
62,
8,
532,
62,
8,
705,
... | 2.653155 | 1,949 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import with_statement
from builtins import input
import mpcorbget as mpc
def main():
"""Handy dandy quick ephemeris tool"""
print("QuickEphem v1.1... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
11593,
37443,
834,
... | 3 | 285 |
import unittest
import logging
import game_code
log = logging.getLogger('test.level_1')
| [
11748,
555,
715,
395,
198,
11748,
18931,
198,
11748,
983,
62,
8189,
628,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
10786,
9288,
13,
5715,
62,
16,
11537,
628
] | 3.137931 | 29 |
import unittest
from project.player.beginner import Beginner
from project.player.player_repository import PlayerRepository
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
6738,
1628,
13,
7829,
13,
27471,
1008,
1330,
16623,
1008,
198,
6738,
1628,
13,
7829,
13,
7829,
62,
260,
1930,
37765,
1330,
7853,
6207,
13264,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,... | 3.163636 | 55 |
import xml.etree.ElementTree as ET
| [
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198
] | 3.181818 | 11 |
from .datasets import * # noqa
from .metrics import * # noqa
| [
6738,
764,
19608,
292,
1039,
1330,
1635,
1303,
645,
20402,
198,
6738,
764,
4164,
10466,
1330,
1635,
1303,
645,
20402,
198
] | 2.904762 | 21 |
from monstage import *
bobo = MonType(sprites=["img/bobo.png","img/bobo2.png"],stage=bab)
plainegg = MonType(sprites=["img/egg1.png","img/egg2.png"],becomes=[bobo])
| [
6738,
937,
14247,
1330,
1635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
65,
20391,
796,
2892,
6030,
7,
2777,
23156,
28,
14692,
9600,
14,
65,
20391,
13,
11134,
2430,
9600,
14,
65,
20391,
17,
13,
11134,
33116,
14247,
28,
65,
... | 2.24359 | 78 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2019-04-09 04:03
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
1485,
319,
13130,
12,
3023,
12,
2931,
8702,
25,
3070,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198... | 2.754386 | 57 |
import sys
import os
import subprocess as proc
import distutils.spawn as which
version = sys.version[:3]
activate_env_path = os.path.join("env", "bin", "activate_this.py")
activate_env = activate_env_path
opts = {}
dependencies = ["pandoc", "pandoc-citeproc",
"pandoc-crossref", "pandoc-sidenote",
... | [
11748,
25064,
198,
11748,
28686,
198,
11748,
850,
14681,
355,
13834,
198,
11748,
1233,
26791,
13,
48183,
355,
543,
198,
198,
9641,
796,
25064,
13,
9641,
58,
25,
18,
60,
198,
39022,
62,
24330,
62,
6978,
796,
28686,
13,
6978,
13,
22179,... | 2.543909 | 706 |
# from functools import lru_cache as memoize
from collections import namedtuple
from pyparsing import Regex, SkipTo, ParseException, OneOrMore, Optional, Suppress, Empty
Language = namedtuple("Language", ["code", "text"])
# directives
# _dsee = Suppress("@see")+SkipTo(LineEnd())
# _dparam = Suppress("@param")+SkipT... | [
2,
422,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
355,
16155,
1096,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
198,
6738,
279,
4464,
945,
278,
1330,
797,
25636,
11,
32214,
2514,
11,
2547,
325,
16922,
11,
1881,
5574,
5167,
11,
... | 2.591667 | 360 |
from abc import ABC, abstractmethod
| [
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
628
] | 4.111111 | 9 |
import logging
import sys
import concurrent.futures as cf
from time import clock, time
import numpy as np
import pytest
from worms import simple_search_dag, Cyclic, grow_linear, NullCriteria
from worms.util import InProcessExecutor
from worms.database import CachingBBlockDB, CachingSpliceDB
from worms.ssdag_pose impo... | [
11748,
18931,
198,
11748,
25064,
198,
11748,
24580,
13,
69,
315,
942,
355,
30218,
198,
6738,
640,
1330,
8801,
11,
640,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
198,
6738,
29174,
1330,
2829,
62,
12947,
62,
... | 2.667532 | 385 |
import urllib2
import json
import base64
import time
import ssl
"""
define our rubrik credentials
"""
RUBRIK_IP='rubrik.demo.com'
RUBRIK_USER='admin'
RUBRIK_PASS='mypassword123!'
"""
ignore self-signed certs
"""
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
# get the repo... | [
11748,
2956,
297,
571,
17,
198,
11748,
33918,
198,
11748,
2779,
2414,
198,
11748,
640,
198,
11748,
264,
6649,
198,
37811,
198,
13086,
674,
6437,
12602,
18031,
198,
37811,
198,
49,
10526,
7112,
42,
62,
4061,
11639,
25089,
12602,
13,
9536... | 2.419128 | 711 |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
33448,
383,
3012,
4992,
46665,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
... | 3.337237 | 427 |
import numpy as np
import pandas as pd
from sklearn.metrics import silhouette_samples, silhouette_score
from sklearn.metrics import confusion_matrix, accuracy_score, recall_score, precision_score, f1_score,roc_auc_score,roc_curve
from sklearn.metrics import mean_squared_error,mean_absolute_error,r2_score
import ma... | [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
41834,
62,
82,
12629,
11,
41834,
62,
26675,
201,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
10802,
62,
6... | 2.001588 | 6,929 |
import re
from urlparse import urlparse
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from plone.app.layout.viewlets.common import ViewletBase
ZOTERO_JSON_BASE = 'https://api.zotero.org{}?v=3&format=json'
Z_MATCH = re.compile(r'^/(groups|users)/\d+/items/[A-Z1-9]+$')
| [
11748,
302,
198,
6738,
19016,
29572,
1330,
19016,
29572,
198,
6738,
18675,
13,
20029,
13,
40259,
13,
79,
363,
316,
368,
6816,
7753,
1330,
3582,
9876,
30800,
8979,
198,
6738,
458,
505,
13,
1324,
13,
39786,
13,
1177,
5289,
13,
11321,
13... | 2.619469 | 113 |
#!/usr/bin/env python
import argparse
import json
import jinja2
import webbrowser
import graph
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('groups', help='json file describing seed groups')
args = parser.parse_args()
# load group from file
with open(args.gro... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
1822,
29572,
198,
11748,
33918,
198,
11748,
474,
259,
6592,
17,
198,
11748,
3992,
40259,
198,
198,
11748,
4823,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,... | 2.677419 | 403 |
"Actual (primitive) types instanitated in the type system."
import sys
from .typesys import *
int32 = TCon("Int32")
int64 = TCon("Int64")
float32 = TCon("Float")
double64 = TCon("Double")
void = TCon("Void")
| [
1,
6398,
723,
357,
19795,
1800,
8,
3858,
916,
272,
13939,
287,
262,
2099,
1080,
526,
198,
198,
11748,
25064,
198,
198,
6738,
764,
19199,
893,
1330,
1635,
628,
198,
198,
600,
2624,
796,
309,
3103,
7203,
5317,
2624,
4943,
198,
600,
24... | 2.730769 | 78 |
import sys
from numbers import Real
from hypothesis import given
from cfractions import Fraction
from tests.utils import (equivalence,
is_fraction_valid,
skip_reference_counter_test)
from . import strategies
| [
11748,
25064,
198,
6738,
3146,
1330,
6416,
198,
198,
6738,
14078,
1330,
1813,
198,
198,
6738,
30218,
37810,
1330,
376,
7861,
198,
6738,
5254,
13,
26791,
1330,
357,
4853,
2473,
594,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,... | 2.504587 | 109 |
# -*- coding: utf-8 -*-
"""
flag.parser
~~~~~~~~~~~
"""
import argparse
from . import registry
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
6056,
13,
48610,
198,
220,
220,
220,
220,
15116,
4907,
93,
198,
37811,
198,
11748,
1822,
29572,
198,
198,
6738,
764,
1330,
20478,
628
] | 2.44186 | 43 |
import json
import pandas as pd
import numpy as np
import random
from Sqldatabasehandler import sqlhandler
from datetime import datetime
from sklearn.linear_model import SGDClassifier
from sklearn.preprocessing import PolynomialFeatures
import pickle
import torch
from torch import nn
import torch.optim as optim
from ... | [
11748,
33918,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4738,
198,
6738,
311,
80,
335,
265,
5754,
30281,
1330,
44161,
30281,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
1341,
3572... | 2.671679 | 399 |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import torch
from torch.nn import functional as F
def crop_mask_within_box(mask, box, mask_size):
"""
Crop the mask content in the given box.
The cropped mask is resized to (mask_size, mask_size).
This function is used when genera... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
1439,
6923,
33876,
198,
11748,
28034,
198,
6738,
28034,
13,
20471,
1330,
10345,
355,
376,
628,
198,
4299,
13833,
62,
27932,
62,
33479,
62,
3524,
7,
27932,
11,
3091,
11,
... | 2.71917 | 819 |
from fastapi import APIRouter, Depends
from fastapi_plus.schema.base import ListArgsSchema, RespListSchema, RespIdSchema, RespBaseSchema
from fastapi_plus.utils.auth import get_auth_data
from fastapi_plus.utils.custom_route import CustomRoute
from ..schema.org import OrgInfoSchema, OrgRespDetailSchema
from ..service.o... | [
6738,
3049,
15042,
1330,
3486,
4663,
39605,
11,
2129,
2412,
198,
6738,
3049,
15042,
62,
9541,
13,
15952,
2611,
13,
8692,
1330,
7343,
42035,
27054,
2611,
11,
10328,
8053,
27054,
2611,
11,
10328,
7390,
27054,
2611,
11,
10328,
14881,
27054,
... | 3.178862 | 123 |
#!/usr/bin/env python
# coding=utf8
import os
TOP = os.path.abspath('.')
STATIC = os.path.join(os.path.abspath('.'), 'static', 'exe')
ALLOWED_EXTENSIONS = set(['py']) | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
28,
40477,
23,
198,
11748,
28686,
198,
35222,
796,
28686,
13,
6978,
13,
397,
2777,
776,
10786,
2637,
8,
198,
35744,
2149,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,... | 2.319444 | 72 |
import unittest
from django.contrib.redirects.models import Redirect
from django.contrib.sites.models import Site
from django.db.utils import IntegrityError
from django.test import TestCase
| [
11748,
555,
715,
395,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
445,
1060,
82,
13,
27530,
1330,
2297,
1060,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
49315,
13,
27530,
1330,
14413,
198,
6738,
42625,
14208,
13,
9945,
13,
26791... | 3.490909 | 55 |
# flake8: noqa # FIXME: find sol for F403 error (caused by import *), most likely need to import everything by hand
from .sg_module import *
from super_gradients.training.models.classification_models.densenet import *
from super_gradients.training.models.classification_models.dpn import *
from super_gradients.training.... | [
2,
781,
539,
23,
25,
645,
20402,
1303,
44855,
11682,
25,
1064,
1540,
329,
376,
31552,
4049,
357,
6888,
1484,
416,
1330,
1635,
828,
749,
1884,
761,
284,
1330,
2279,
416,
1021,
198,
6738,
764,
45213,
62,
21412,
1330,
1635,
198,
6738,
... | 3.575309 | 405 |
from selenium.common.exceptions import NoAlertPresentException
import nerodia
from .exception import UnknownObjectException
from .wait.wait import Waitable, TimeoutError
| [
6738,
384,
11925,
1505,
13,
11321,
13,
1069,
11755,
1330,
1400,
36420,
34695,
16922,
198,
198,
11748,
17156,
375,
544,
198,
6738,
764,
1069,
4516,
1330,
16185,
10267,
16922,
198,
6738,
764,
17077,
13,
17077,
1330,
16314,
540,
11,
3862,
... | 4 | 43 |
from finetwork.distance_calculator import _distance_metrics
import pandas as pd
| [
6738,
957,
316,
1818,
13,
30246,
62,
9948,
3129,
1352,
1330,
4808,
30246,
62,
4164,
10466,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198
] | 3.153846 | 26 |
#!/usr/bin/python3
# -*- encoding: utf-8 -*-
__version__ = 1.2
from tkinter.ttk import *
from tkinter.messagebox import *
from tkinter.scrolledtext import *
from tkinter import *
from bs4 import BeautifulSoup
from urllib.request import urlopen
from mailcomposer import MailComposer
from threading import Thread
import ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
834,
9641,
834,
796,
352,
13,
17,
198,
198,
6738,
256,
74,
3849,
13,
926,
74,
1330,
1635,
198,
6738,
256,
74,
3... | 2.432692 | 1,144 |
#!/usr/bin/env python
"""
Copyright 2015 Brocade Communications Systems, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
15269,
1853,
2806,
46395,
14620,
11998,
11,
3457,
13,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
... | 3.918239 | 159 |
'''
51.
1:
: [7,5,6,4]
: 5
0 <= <= 50000
https://leetcode-cn.com/problems/shu-zu-zhong-de-ni-xu-dui-lcof/
:1564 ms, Python3 85.67%
:18.5 MB, Python3 100.00%
'''
# merge-sort
# test cases:
# 1. input [] or [int]:return 0
# 2. function test: input sorted array: return
| [
7061,
6,
198,
4349,
13,
220,
628,
352,
25,
198,
25,
685,
22,
11,
20,
11,
21,
11,
19,
60,
198,
25,
642,
198,
198,
15,
19841,
220,
19841,
642,
2388,
198,
5450,
1378,
293,
316,
8189,
12,
31522,
13,
785,
14,
1676,
22143,
14,
1477,... | 2.097744 | 133 |
# File: greynoise_connector.py
#
# Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
# Python 3 Compatibility imports
from __future__ import print_function, unicode_literals
# Phantom App imports
import phantom.app as phantom
from phantom.base_connector import BaseConnector
from phantom.acti... | [
2,
9220,
25,
10536,
2047,
25678,
62,
8443,
273,
13,
9078,
198,
2,
198,
2,
49962,
739,
24843,
362,
13,
15,
357,
5450,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
13,
14116,
8,
198,
198,
... | 2.511026 | 1,043 |
import subprocess
import sys | [
11748,
850,
14681,
198,
11748,
25064
] | 4.666667 | 6 |
numero_vogal = 0
espao = 0
numero_consoante = 0
contador = 0
escrita = 0
arquivo = input('Digite o nome do seu arquivo (.txt): ')
with open(arquivo, 'w', encoding='utf-8') as texto:
while escrita != 'sair':
escrita = input('Digite: ')
texto.write(escrita)
texto.write('... | [
22510,
3529,
62,
85,
519,
282,
796,
657,
201,
198,
201,
198,
9774,
5488,
796,
657,
201,
198,
201,
198,
22510,
3529,
62,
1102,
568,
12427,
796,
657,
201,
198,
201,
198,
3642,
7079,
796,
657,
201,
198,
201,
198,
3798,
799,
64,
796,
... | 1.822606 | 637 |
# -*- coding: utf-8 -*-
from base64 import b64encode, b64decode
from unittest import mock
from django.conf import settings
from django.http import HttpResponseRedirect
from django.test import TestCase, Client
from django.urls import reverse
from testutils import factories
from urllib.parse import urlparse, parse_qs
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
2779,
2414,
1330,
275,
2414,
268,
8189,
11,
275,
2414,
12501,
1098,
198,
6738,
555,
715,
395,
1330,
15290,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198... | 3.27551 | 98 |
"""ensembl interaction function"""
import os
import requests, sys
import yaml
import logging
import gffutils
from collections import defaultdict
import mammoth.logger as mylog
server = "http://rest.ensembl.org{ext}"
ext = "/sequence/id/{id}?type=cds"
prot = "/sequence/id/{id}?type=protein"
sequence = "/sequence/reg... | [
37811,
1072,
2022,
75,
10375,
2163,
37811,
198,
11748,
28686,
198,
11748,
7007,
11,
25064,
198,
11748,
331,
43695,
198,
11748,
18931,
198,
198,
11748,
308,
487,
26791,
198,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
11748,
44268,
13,
... | 2.97561 | 123 |
# -*- coding: utf-8 -*-
# 2013-03, Erik Svensson <erik.public@gmail.com>
# Licensed under the MIT license.
import unittest
import transmissionrpc
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
2,
2211,
12,
3070,
11,
22722,
44611,
16528,
1279,
263,
1134,
13,
11377,
31,
14816,
13,
785,
29,
201,
198,
2,
49962,
739,
262,
17168,
5964,
13,
201,
198,
201,
19... | 2.637931 | 58 |
# __init__.py
from ._sgRNA_Library import _sgRNA_Library as Library
# functions
from ._gene_annotation_functions._merge_reduce_gene_regions import _merge_reduce_gene_regions as merge_reduce
from ._guide_annotation_functions._annotate_biochemistry import _annotate_biochemistry as annotate_biochemistry, _annotate_GC_c... | [
2,
11593,
15003,
834,
13,
9078,
198,
198,
6738,
47540,
45213,
27204,
62,
23377,
1330,
4808,
45213,
27204,
62,
23377,
355,
10074,
198,
198,
2,
5499,
198,
6738,
47540,
70,
1734,
62,
1236,
14221,
62,
12543,
2733,
13557,
647,
469,
62,
445... | 3.087302 | 126 |
__copyright__ = """ Copyright (c) 2021 HangYan. """
__license__ = 'MIT license'
__version__ = '1.0'
__author__ = 'topaz1668@gmail.com'
from models import conn_db, UploadFiles
from sqlalchemy import func, distinct, or_, and_
import datetime
from datetime import timedelta
import time
import math
# def page_limit():
... | [
834,
22163,
4766,
834,
796,
37227,
15069,
357,
66,
8,
33448,
24300,
49664,
13,
37227,
198,
834,
43085,
834,
796,
705,
36393,
5964,
6,
198,
834,
9641,
834,
796,
705,
16,
13,
15,
6,
198,
834,
9800,
834,
796,
705,
4852,
1031,
1433,
3... | 2.112842 | 4,236 |
"""
"""
import datetime
import unittest
import numpy
from math import pi
import oyb
from oyb import earth, anomaly
if __name__ == '__main__':
unittest.main()
| [
37811,
198,
37811,
198,
198,
11748,
4818,
8079,
198,
11748,
555,
715,
395,
198,
11748,
299,
32152,
198,
6738,
10688,
1330,
31028,
198,
11748,
35104,
65,
198,
6738,
35104,
65,
1330,
4534,
11,
32172,
198,
198,
361,
11593,
3672,
834,
6624,... | 2.877193 | 57 |
#!/usr/bin/env python
"""
The actual jobArchiver algorithm
"""
import logging
import os
import os.path
import shutil
import tarfile
import threading
from Utils.IteratorTools import grouper
from Utils.Timers import timeFunction
from WMCore.DAOFactory import DAOFactory
from WMCore.JobStateMachine.ChangeState import Chan... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
464,
4036,
1693,
19895,
1428,
11862,
198,
37811,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
11748,
4423,
346,
198,
11748,
13422,
7753,
198,
11748,
... | 3.313084 | 214 |
#!/usr/bin/env python
# coding: utf-8
import psycopg2
def executeScriptsFromFile(filename, cursor):
'''Execute SQL create views'''
fd = open(filename, 'r')
sqlFile = fd.read()
fd.close()
sqlCommands = sqlFile.split(';')
for command in sqlCommands:
try:
print(command)
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
17331,
22163,
70,
17,
628,
198,
4299,
12260,
7391,
82,
4863,
8979,
7,
34345,
11,
23493,
2599,
198,
220,
220,
220,
705,
7061,
23002,
... | 2.233645 | 214 |
from __future__ import print_function
import argparse
from math import ceil
from random import Random
from socket import socket
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.optim.lr_scheduler import StepLR
import... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
1822,
29572,
198,
6738,
10688,
1330,
2906,
346,
198,
6738,
4738,
1330,
14534,
198,
6738,
17802,
1330,
17802,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
... | 3.085627 | 327 |
# -*- codeing = utf-8 -*-
# @Time : 2022/4/12 13:43
# @Author : linyaxuan
# @File : one_scripts.py
# @Software : PyCharm
"""
es
"""
import pymysql
import traceback
from elasticsearch import Elasticsearch
if __name__ == "__main__":
insert_data_to_es() | [
2,
532,
9,
12,
2438,
278,
796,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
1058,
33160,
14,
19,
14,
1065,
1511,
25,
3559,
198,
2,
2488,
13838,
1058,
300,
3541,
897,
7258,
198,
2,
2488,
8979,
1058,
530,
62,
46521,
13,
907... | 2.514563 | 103 |
from django.test import TestCase
from core.services.freckle import Freckle
from datetime import datetime
| [
6738,
42625,
14208,
13,
9288,
1330,
220,
6208,
20448,
198,
6738,
4755,
13,
30416,
13,
69,
11402,
293,
1330,
4848,
694,
293,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198
] | 3.533333 | 30 |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# licensed under CC-Zero: https://creativecommons.org/publicdomain/zero/1.0
import pywikibot
from pywikibot.data import api
import re
site = pywikibot.Site('wikidata', 'wikidata')
site.login()
repo = site.data_repository()
if __name__ == "__main__":
main... | [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
201,
198,
2,
11971,
739,
12624,
12,
28667,
25,
3740,
1378,
20123,
425,
9503,
684,
13,
2398,
14,
11377,
27830,
14,
22570,
14,
16... | 2.330935 | 139 |
from domanda1 import *
import random
import time
"""
Implementazione dell'algoritmo DPA per la generazione di un grafo casuale
"""
"""
Restituisce la distribuzione del grado uscente del grafo, come
dizionario avente per chiavi il grado e per valori la probabilita'
"""
"""
Genera il grafico delle due distribuzioni, ... | [
6738,
2401,
5282,
16,
1330,
1635,
198,
11748,
4738,
198,
11748,
640,
628,
198,
37811,
198,
3546,
26908,
1031,
7935,
390,
297,
6,
282,
7053,
270,
5908,
360,
4537,
583,
8591,
1152,
1031,
7935,
2566,
555,
7933,
6513,
9341,
68,
198,
37811... | 2.328084 | 381 |
from typing import List
# https://leetcode.com/problems/permutations-ii/discuss/18602/9-line-python-solution-with-1-line-to-handle-duplication-beat-99-of-others-%3A-)
def permute_unique(nums):
rs = []
nums.sort()
dfs(nums, [])
return rs
def permute_unique(nums):
n = len(nums)
rs = []
... | [
6738,
19720,
1330,
7343,
628,
198,
198,
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
16321,
32855,
12,
4178,
14,
15410,
1046,
14,
1507,
31418,
14,
24,
12,
1370,
12,
29412,
12,
82,
2122,
12,
4480,
12,
16,
12,
1370,
... | 2.190722 | 194 |
#MSO5x.py
# Created on: 2020.11.18
# Author: ppudo
# e-mail: ppudo@outlook.com
#
# Project: labtoys
# Description: Class representing Tektronix MSO5 osciloscope series
#
#
# Changelog:
# -2021.11.18 version: 0.1.0
# - Initial class
#
#------------------------------------------------... | [
2,
5653,
46,
20,
87,
13,
9078,
198,
2,
220,
220,
15622,
319,
25,
197,
42334,
13,
1157,
13,
1507,
198,
2,
220,
220,
220,
220,
220,
220,
6434,
25,
9788,
12003,
198,
2,
220,
220,
220,
220,
220,
220,
304,
12,
4529,
25,
197,
381,
... | 2.489726 | 292 |
from pedurma.pecha import ProofreadNotePage
from pedurma.utils import from_yaml
| [
6738,
7190,
333,
2611,
13,
431,
11693,
1330,
29999,
961,
6425,
9876,
198,
6738,
7190,
333,
2611,
13,
26791,
1330,
422,
62,
88,
43695,
628,
628,
198
] | 3.111111 | 27 |
import json
from rest_framework import status, response
from django.urls import reverse
from .base import ArticlesBaseTest
from .test_data import VALID_ARTICLE
from authors.apps.authentication.tests.test_data import (
VALID_USER_DATA
)
from rest_framework.test import APIClient, APITestCase
from .base import BaseTes... | [
11748,
33918,
198,
6738,
1334,
62,
30604,
1330,
3722,
11,
2882,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
764,
8692,
1330,
22698,
14881,
14402,
198,
6738,
764,
9288,
62,
7890,
1330,
26173,
2389,
62,
7227,
31419,
198,... | 3.446809 | 94 |