content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
#!/usr/bin/env python
# encoding: utf-8
"""
Advent of Code 2020 - Day 8 - Challenge 1
https://adventofcode.com/2020/day/8
Solution: 1384
"""
__author__ = "Filippo Corradino"
__email__ = "filippo.corradino@gmail.com"
from aocmodule import Processor
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
37811,
198,
2782,
1151,
286,
6127,
12131,
532,
3596,
807,
532,
13879,
352,
198,
5450,
1378,
324,
1151,
1659,
8189,
13,
785,
14,
42334,
14,
820,
... | 2.59292 | 113 |
#!/usr/bin/env python
# coding:utf-8
# Based on GAppProxy 2.0.0 by Du XiaoGang <dugang.2008@gmail.com>
# Based on WallProxy 0.4.0 by Hust Moon <www.ehust@gmail.com>
# Contributor:
# Phus Lu <phus.lu@gmail.com>
# Hewig Xu <hewigovens@gmail.com>
# Ayanamist Yang <ayanamist@gmail.com>
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
40477,
12,
23,
198,
2,
13403,
319,
402,
4677,
44148,
362,
13,
15,
13,
15,
416,
10343,
28249,
38,
648,
1279,
646,
28284,
13,
11528,
31,
14816,
13,
785,
29,
198,
2,
1... | 1.904051 | 17,947 |
# -*- coding: utf-8 -*-
from __future__ import division
__copyright__ = "Copyright (C) 2014 Andreas Kloeckner"
__license__ = """
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 restricti... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
198,
834,
22163,
4766,
834,
796,
366,
15269,
357,
34,
8,
1946,
33728,
14770,
2577,
694,
1008,
1,
198,
198,
834,
43085,
8... | 2.234105 | 8,902 |
# Data
import sys
import pandas as pd
import numpy as np
import re
from sqlalchemy import create_engine
from collections import defaultdict
import pickle
from warnings import filterwarnings
#Sklearn
from sklearn.pipeline import Pipeline
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer
from... | [
2,
6060,
198,
11748,
25064,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
302,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
6738,
17268,
1330,
4277,
11600,
198,
11748,
2298,
293,
198,... | 2.459435 | 2,231 |
import os
import collections
if __name__ == '__main__':
main()
| [
11748,
28686,
198,
11748,
17268,
628,
628,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.777778 | 27 |
# Generated by Django 3.2.7 on 2021-09-15 21:27
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
22,
319,
33448,
12,
2931,
12,
1314,
2310,
25,
1983,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#SCH1006.py --> JB_WORK_INVOICE.py
#**************************************************************************************************************
#
# Programmer : bibin
# Version : 1.0
#
# Description :
#
#
#
# Initial Creation:
#
# Date (YYYY-MM-DD) Change Description
# ----------------- ... | [
2,
50,
3398,
3064,
21,
13,
9078,
220,
14610,
449,
33,
62,
33249,
62,
1268,
29516,
8476,
13,
9078,
198,
198,
2,
17174,
17174,
17174,
46068,
1174,
198,
2,
198,
2,
6118,
647,
220,
220,
1058,
275,
571,
259,
198,
2,
10628,
220,
220,
... | 2.95202 | 396 |
#!/usr/bin/env python
from collections import defaultdict
from framework.dependency_management.dependency_resolver import BaseComponent
from framework.lib.general import *
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
6738,
9355,
13,
45841,
1387,
62,
27604,
13,
45841,
1387,
62,
411,
14375,
1330,
7308,
21950,
198,
6738,
9355,
13,
8019,
13,
24622,
1330,
1... | 4.069767 | 43 |
"""
Parses MiRDeath database
:argument: DATA_FILE: http://www.rna-world.org/mirdeathdb/data/miRDeathDB_all_data.txt
:argument: DB_DESTINATION: saving location of database
"""
# Imports
from SLKlib.SQLiteDBApi.sqlite_db_api import PsimiSQL
# Defining constants
SQL_SEED = '../../../../../SLKlib/SQLiteDBApi/network-d... | [
37811,
198,
47,
945,
274,
13756,
49,
20148,
6831,
198,
1058,
49140,
25,
42865,
62,
25664,
25,
2638,
1378,
2503,
13,
81,
2616,
12,
6894,
13,
2398,
14,
76,
1447,
68,
776,
9945,
14,
7890,
14,
11632,
49,
20148,
11012,
62,
439,
62,
789... | 1.702473 | 1,294 |
#!/usr/bin/env python3
from typing import Tuple
import sys
import torch
import torch.nn as nn
import numpy as np
from tqdm import tqdm, trange
from nn_utils import freeze
from recipe_dataset import Dataset
from eval_utils import scoring, measure_time
from architecture import Processor, AbstractToGoal, AbstractToAbstr... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
19720,
1330,
309,
29291,
198,
11748,
25064,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
256,
80,
36020,
... | 2.120638 | 3,324 |
import numpy as np
import pandas as pd
from staircase.constants import inf
from staircase.core.arrays import docstrings
from staircase.core.stairs import Stairs
from staircase.core.stats.statistic import corr as _corr
from staircase.core.stats.statistic import cov as _cov
from staircase.util._decorators import Appende... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
27656,
13,
9979,
1187,
1330,
1167,
198,
6738,
27656,
13,
7295,
13,
3258,
592,
1330,
2205,
37336,
198,
6738,
27656,
13,
7295,
13,
17617,
1330,
520,
34... | 3.053043 | 1,150 |
from cone.app import compat
from cone.app import testing
from cone.app.browser.ajax import AjaxEvent
from cone.app.browser.ajax import AjaxMessage
from cone.app.browser.ajax import AjaxPath
from cone.app.browser.authoring import _FormRenderingTile
from cone.app.browser.authoring import add
from cone.app.browser.authori... | [
6738,
27763,
13,
1324,
1330,
8330,
198,
6738,
27763,
13,
1324,
1330,
4856,
198,
6738,
27763,
13,
1324,
13,
40259,
13,
1228,
897,
1330,
46362,
9237,
198,
6738,
27763,
13,
1324,
13,
40259,
13,
1228,
897,
1330,
46362,
12837,
198,
6738,
2... | 3.681416 | 452 |
import sys
import terminal
import ftp_server
import ftp_client
if __name__ == '__main__':
main()
| [
11748,
25064,
198,
11748,
12094,
198,
11748,
10117,
79,
62,
15388,
198,
11748,
10117,
79,
62,
16366,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.810811 | 37 |
import json
import os
import re
import base64
import io
import aiohttp
import discord
from redbot.core import checks, data_manager, commands
from redbot.core.utils.chat_formatting import inline, box, pagify
R_MESSAGE_LINK = r"https://discordapp.com/channels/(\d+)/(\d+)/(\d+)"
R_ATTATCH_LINK = r"https://cdn.discordapp... | [
11748,
33918,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
2779,
2414,
198,
11748,
33245,
198,
11748,
257,
952,
4023,
198,
198,
11748,
36446,
198,
6738,
2266,
13645,
13,
7295,
1330,
8794,
11,
1366,
62,
37153,
11,
9729,
198,
6738,
226... | 2.606864 | 641 |
# pylint: disable=protected-access,missing-function-docstring, missing-class-docstring, missing-module-docstring, missing-class-docstring # noqa
# -*- coding: utf-8 -*-
import unittest
import tempfile
from pathlib import Path
from mlspeclib.helpers import convert_yaml_to_dict
import marshmallow.class_registry
from m... | [
2,
279,
2645,
600,
25,
15560,
28,
24326,
12,
15526,
11,
45688,
12,
8818,
12,
15390,
8841,
11,
4814,
12,
4871,
12,
15390,
8841,
11,
4814,
12,
21412,
12,
15390,
8841,
11,
4814,
12,
4871,
12,
15390,
8841,
1303,
645,
20402,
198,
2,
53... | 2.944724 | 199 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2020.2.9),
on Mon Feb 1 17:31:07 2021
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindel... | [
171,
119,
123,
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,
1212,
6306,
373,
2727,
1262,
38955,
20519,
18,
29544,
35869,
357,
85,
42334,
13,
17,
13,
2... | 2.594254 | 13,262 |
# -*- coding: utf-8 -*-
from knitter import datadriver, log
from demoprj.page import KnitterDemo
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
638,
1967,
1330,
4818,
324,
38291,
11,
2604,
198,
6738,
1357,
404,
81,
73,
13,
7700,
1330,
6102,
1967,
11522,
78,
628,
628,
628,
628,
628,
628,
628,
198
] | 2.488889 | 45 |
import unittest
from prob_distrs import Exponential
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
6738,
1861,
62,
17080,
3808,
1330,
5518,
35470,
198,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.560976 | 41 |
import json
from http import HTTPStatus
from typing import Any, Dict
from aws_lambda_powertools.logging.logger import Logger
from aws_lambda_powertools.utilities.typing import LambdaContext
logger: Logger = Logger(service='my_service') # JSON output format, service name can be set by environment variable "POWERTOOLS... | [
11748,
33918,
198,
6738,
2638,
1330,
14626,
19580,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
198,
198,
6738,
3253,
82,
62,
50033,
62,
6477,
31391,
13,
6404,
2667,
13,
6404,
1362,
1330,
5972,
1362,
198,
6738,
3253,
82,
62,
50033,
62,... | 3.428571 | 98 |
from pathlib import Path
from advent.solutions import day07
| [
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
19980,
13,
82,
14191,
1330,
1110,
2998,
628,
198
] | 3.705882 | 17 |
import json
import logging.config
import yaml
| [
11748,
33918,
198,
11748,
18931,
13,
11250,
198,
11748,
331,
43695,
628,
198
] | 3.692308 | 13 |
import requests
from bs4 import BeautifulSoup
from openpyxl import Workbook
from openpyxl import load_workbook
import winreg
#额外任务,获取当前用户的桌面路径,这样就可以把抓到的Excel表格存到桌面了
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders')
mydesktop = winreg.QueryValueEx(key... | [
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
220,
1280,
9078,
87,
75,
1330,
220,
5521,
2070,
220,
198,
6738,
1280,
9078,
87,
75,
1330,
3440,
62,
1818,
2070,
198,
11748,
1592,
2301,
198,
198,
2,
165,
95,
... | 1.799766 | 854 |
"""RLBotChoreography
Usage:
choreograph [--min-bots=<min>] [--bot-folder=<folder>]
Options:
--min-bots=<min> The minimum number of bots to spawn [default: 10].
--bot-folder=<folder> Searches this folder for bot configs to use for names and appearances [default: .].
"""
import traceback... | [
37811,
7836,
20630,
1925,
382,
4867,
198,
198,
28350,
25,
198,
220,
220,
220,
30569,
2384,
685,
438,
1084,
12,
42478,
28,
27,
1084,
37981,
685,
438,
13645,
12,
43551,
28,
27,
43551,
37981,
198,
198,
29046,
25,
198,
220,
220,
220,
13... | 2.446384 | 1,203 |
# -*- coding: utf-8 -*-
# Copyright 2017-TODAY LasLabs Inc.
# License MIT (https://opensource.org/licenses/MIT).
import mock
import unittest
from contextlib import contextmanager
from ..request_paginator import RequestPaginator
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
2177,
12,
51,
3727,
4792,
10123,
43,
8937,
3457,
13,
198,
2,
13789,
17168,
357,
5450,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
36393,
737,
198,
198,
... | 3.093333 | 75 |
# -*- coding: utf-8 -*-
# Copyright 2018-2022 the orix developers
#
# This file is part of orix.
#
# orix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
2864,
12,
1238,
1828,
262,
267,
8609,
6505,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
267,
8609,
13,
198,
2,
198,
2,
267,
8609,
318,
1479,
3788,
25,
345,... | 2.108649 | 10,198 |
import os
import pandas as pd
import numpy as np
import keras
from keras.models import Sequential
from keras.layers import *
from keras.utils import to_categorical
train_dataset = pd.read_csv('datasets/train.csv')
test_dataset = pd.read_csv('datasets/test.csv')
train_dataset.head()
train_images = train_dataset.iloc[... | [
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
41927,
292,
198,
6738,
41927,
292,
13,
27530,
1330,
24604,
1843,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
1635,
198,
6738,
41927,
292,... | 2.561892 | 719 |
#coding:utf-8
import cv2
import numpy as np
import sys
sys.path.append(".\vision")
#棋盘格模板规格
w = 9
h = 7
# TODO
if __name__ == '__main__':
a_temp = Calibrate()
image_path = '.\\data\\*.jpg'
a_temp.read_sample(image_path)
a_temp.calibrate()
# filename = '.\\Config\\calibrate_config.t... | [
2,
66,
7656,
25,
40477,
12,
23,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
1911,
59,
10178,
4943,
198,
198,
2,
162,
96,
233,
33566,
246,
43718,
120,
162... | 1.835073 | 479 |
from unittest import mock
from unittest.mock import ANY
from math import nan
import pandas as pd
from phc.easy.omics.genomic_test import GenomicTest
raw_df = pd.DataFrame(
# NOTE: Sample is taken and adapted from BRCA data set
[
{
"sets": [
{
"status": "... | [
6738,
555,
715,
395,
1330,
15290,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
15529,
198,
6738,
10688,
1330,
15709,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
872,
66,
13,
38171,
13,
31994,
13,
5235,
10179,
62,
9288,
133... | 1.535685 | 3,601 |
# @Author : bamtercelboo
# @Datetime : 2018/8/27 15:34
# @File : Embed.py
# @Last Modify Time : 2018/8/27 15:34
# @Contact : bamtercelboo@{gmail.com, 163.com}
"""
FILE : Embed.py
FUNCTION : None
"""
import os
import sys
import time
import tqdm
import numpy as np
import torch
import torch.nn as nn
import torc... | [
2,
2488,
13838,
1058,
275,
321,
353,
5276,
2127,
78,
198,
2,
2488,
27354,
8079,
1058,
2864,
14,
23,
14,
1983,
1315,
25,
2682,
198,
2,
2488,
8979,
1058,
13302,
276,
13,
9078,
198,
2,
2488,
5956,
3401,
1958,
3862,
1058,
2864,
14,
23... | 2.016805 | 3,868 |
from spaceone.api.cost_analysis.plugin import data_source_pb2
from spaceone.core.pygrpc.message_type import *
__all__ = ['PluginInfo']
| [
6738,
2272,
505,
13,
15042,
13,
15805,
62,
20930,
13,
33803,
1330,
1366,
62,
10459,
62,
40842,
17,
198,
6738,
2272,
505,
13,
7295,
13,
9078,
2164,
14751,
13,
20500,
62,
4906,
1330,
1635,
628,
198,
834,
439,
834,
796,
37250,
37233,
1... | 3.066667 | 45 |
import pymongo
read_pref = pymongo.read_preferences.ReadPreference.SECONDARY
c = pymongo.MongoClient(host="mongodb://localhost:27017",
replicaSet="rs1",
w=3, wtimeout=10000, j=True,
read_preference=read_pref)
db = c.m101
people = db.people
pr... | [
198,
11748,
279,
4948,
25162,
198,
198,
961,
62,
3866,
69,
796,
279,
4948,
25162,
13,
961,
62,
3866,
69,
4972,
13,
5569,
6719,
4288,
13,
23683,
18672,
13153,
198,
198,
66,
796,
279,
4948,
25162,
13,
44,
25162,
11792,
7,
4774,
2625,
... | 2.279528 | 254 |
#
# Function for fresh plain deployment
import os
import fnmatch
import os.pathsep
from java.io import File
from java.io import FileInputStream
username = None
password = None
adminUrl = None
applicationPath = None
planPath = None
targetServers = None
# All the application will be undeployed.... | [
2,
201,
198,
2,
15553,
329,
4713,
8631,
14833,
201,
198,
201,
198,
11748,
28686,
201,
198,
11748,
24714,
15699,
201,
198,
11748,
28686,
13,
6978,
325,
79,
201,
198,
201,
198,
6738,
20129,
13,
952,
1330,
9220,
201,
198,
6738,
20129,
... | 2.705202 | 173 |
from io import StringIO
from unittest import TestCase
from rpa_logger import Logger
from rpa_logger.task import ERROR, STATUSES, SUCCESS
| [
6738,
33245,
1330,
10903,
9399,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
374,
8957,
62,
6404,
1362,
1330,
5972,
1362,
198,
6738,
374,
8957,
62,
6404,
1362,
13,
35943,
1330,
33854,
11,
15486,
2937,
1546,
11,
13558,
... | 3.136364 | 44 |
#!/usr/bin/env python3
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Convert VCD file to VHDL statements')
parser.add_argument("-i", "--input", required=True)
args = parser.parse_args()
timescale = "0 ns"
prev_t = 0
r = ""
with open(args.input) a... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
1822,
29572,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
11639,
3103,
1... | 1.840726 | 496 |
"""https://adventofcode.com/2020/day/12"""
import io
import math
def part1(stdin: io.TextIOWrapper, stderr: io.TextIOWrapper) -> int:
"""
Figure out where the navigation instructions lead. What is the Manhattan
distance between that location and the ship's starting position?
"""
directions = par... | [
37811,
5450,
1378,
324,
1151,
1659,
8189,
13,
785,
14,
42334,
14,
820,
14,
1065,
37811,
198,
198,
11748,
33245,
198,
11748,
10688,
628,
198,
4299,
636,
16,
7,
19282,
259,
25,
33245,
13,
8206,
40,
3913,
430,
2848,
11,
336,
1082,
81,
... | 2.135332 | 1,234 |
"""
1232. Check If It Is a Straight Line
Easy
You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line in the XY plane.
Example 1:
Input: coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]]
Output: true
Example 2:
Inp... | [
37811,
198,
1065,
2624,
13,
6822,
1002,
632,
1148,
257,
27680,
6910,
198,
28406,
198,
198,
1639,
389,
1813,
281,
7177,
22715,
11,
22715,
58,
72,
60,
796,
685,
87,
11,
331,
4357,
810,
685,
87,
11,
331,
60,
6870,
262,
20435,
286,
25... | 2.882653 | 196 |
from numba import jit
# fast roc_auc computation: https://www.kaggle.com/c/microsoft-malware-prediction/discussion/76013
@jit
# idea from this kernel: https://www.kaggle.com/fabiendaniel/detecting-malwares-with-lgbm
| [
6738,
997,
7012,
1330,
474,
270,
198,
198,
2,
3049,
686,
66,
62,
14272,
29964,
25,
3740,
1378,
2503,
13,
74,
9460,
293,
13,
785,
14,
66,
14,
40485,
12,
7617,
1574,
12,
28764,
2867,
14,
15410,
11956,
14,
4304,
30273,
198,
31,
45051... | 2.695122 | 82 |
n = 3.14159
raio = float(input())
A = pow(raio, 2)*n
print('A={:.4f}'.format(A))
| [
77,
796,
513,
13,
1415,
19707,
198,
430,
952,
796,
12178,
7,
15414,
28955,
198,
32,
796,
7182,
7,
430,
952,
11,
362,
27493,
77,
198,
4798,
10786,
32,
34758,
25,
13,
19,
69,
92,
4458,
18982,
7,
32,
4008,
198
] | 1.97561 | 41 |
#!/usr/bin/env python
import sys
import os
# Import pycdlib itself.
import pycdlib
if len(sys.argv) < 1:
print('Usage: %s' % (sys.argv[0]))
sys.exit(1)
# Create a new PyCdlib object.
iso = pycdlib.PyCdlib()
iso.new(interchange_level=3)
slash = '/'
for i in range(1, len(sys.argv)):
name = '/%s' % sys.arg... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
25064,
198,
11748,
28686,
198,
198,
2,
17267,
12972,
10210,
8019,
2346,
13,
198,
11748,
12972,
10210,
8019,
198,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
1279,
352,
25,
198,
... | 2.280335 | 239 |
import argparse
import pickle
import os
import numpy as np
from filter_corrected_alleles import parse_perfect_sam, parse_fasta
from parse_contig_realign import parse_CIGAR
from utils import get_reverse_complement
import sys
if __name__ == "__main__":
args = parse_args()
fn_sam_H1 = args.fn_sam_H1
f... | [
11748,
1822,
29572,
198,
11748,
2298,
293,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
8106,
62,
30283,
276,
62,
6765,
829,
1330,
21136,
62,
25833,
62,
37687,
11,
21136,
62,
7217,
64,
198,
6738,
21136,
62,
3642,
... | 1.987471 | 4,310 |
import random
from common.key_exchange.protocols.srp import SecureRemotePasswordClient,\
SecureRemotePasswordServer
| [
11748,
4738,
198,
198,
6738,
2219,
13,
2539,
62,
1069,
3803,
13,
11235,
4668,
82,
13,
27891,
79,
1330,
26707,
36510,
35215,
11792,
11,
59,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2... | 2.023529 | 85 |
"""Clone some funtions from Keras.
# References https://github.com/keras-team/keras/blob/master/keras/backend/numpy_backend.py
"""
import numpy as np | [
37811,
2601,
505,
617,
1257,
45240,
422,
17337,
292,
13,
198,
2,
31458,
3740,
1378,
12567,
13,
785,
14,
6122,
292,
12,
15097,
14,
6122,
292,
14,
2436,
672,
14,
9866,
14,
6122,
292,
14,
1891,
437,
14,
77,
32152,
62,
1891,
437,
13,
... | 2.777778 | 54 |
import datetime, time
from urlparse import urlparse
from django.db import models
from django.contrib.auth.models import User
| [
11748,
4818,
8079,
11,
640,
198,
6738,
19016,
29572,
1330,
19016,
29572,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198
] | 3.6 | 35 |
"""Allow users to view and modify (add, delete, chnage) material data.
For the convennience of data manipulation and displaying, this application
is built on Django REST Framework.
""" | [
37811,
35265,
2985,
284,
1570,
290,
13096,
357,
2860,
11,
12233,
11,
442,
77,
496,
8,
2587,
1366,
13,
198,
198,
1890,
262,
7292,
77,
1240,
286,
1366,
17512,
290,
19407,
11,
428,
3586,
198,
271,
3170,
319,
37770,
30617,
25161,
13,
19... | 4.204545 | 44 |
################################################################################
#
# New Zealand Geographic Board gazetteer application,
# Crown copyright (c) 2020, Land Information New Zealand on behalf of
# the New Zealand Government.
#
# This file is released under the MIT licence. See the LICENCE file found
# ... | [
29113,
29113,
14468,
198,
2,
198,
2,
220,
968,
8936,
33636,
5926,
308,
1031,
5857,
263,
3586,
11,
198,
2,
220,
12223,
6634,
357,
66,
8,
12131,
11,
6379,
6188,
968,
8936,
319,
8378,
286,
198,
2,
220,
262,
968,
8936,
5070,
13,
198,
... | 4.646552 | 116 |
"""Class to hold all sensor accessories."""
import logging
from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT, TEMP_CELSIUS,
ATTR_DEVICE_CLASS, STATE_ON, STATE_HOME)
from . import TYPES
from .accessories import HomeAccessory, add_preload_service, setup_char
from .const import (
CATEGORY_SENSOR, SE... | [
37811,
9487,
284,
1745,
477,
12694,
18199,
526,
15931,
198,
11748,
18931,
198,
198,
6738,
1363,
562,
10167,
13,
9979,
1330,
357,
198,
220,
220,
220,
5161,
5446,
62,
4944,
2043,
62,
19238,
62,
11682,
1921,
11335,
10979,
11,
309,
39494,
... | 2.238784 | 3,455 |
from karatsuba import karatsuba
if __name__ == '__main__':
print(karatsuba.karatsuba(3141592653589793238462643383279502884197169399375105820974944592,
2718281828459045235360287471352662497757247093699959574966967627)) | [
6738,
479,
283,
1381,
22013,
1330,
479,
283,
1381,
22013,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
3601,
7,
21070,
1381,
22013,
13,
21070,
1381,
22013,
7,
33638,
19707,
22980,
2327,
4531,
... | 2.04878 | 123 |
import argparse
import os
import time
import numpy as np
from . import util,dsp,plot | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
764,
1330,
7736,
11,
67,
2777,
11,
29487
] | 3.36 | 25 |
from hashlib import md5
import logging
import base64
h = logging.StreamHandler()
serial_log = logging.Logger(__name__)
h.setFormatter(logging.Formatter("%(levelname)s:%(name)s:%(message)s"))
serial_log.addHandler(h)
serial_log.critical("""
# NOTE: This program serialises objects that if saved to an external source ... | [
6738,
12234,
8019,
1330,
45243,
20,
198,
11748,
18931,
198,
11748,
2779,
2414,
628,
198,
71,
796,
18931,
13,
12124,
25060,
3419,
198,
46911,
62,
6404,
796,
18931,
13,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
71,
13,
2617,
8479,
... | 3.475904 | 332 |
import uuid
from django.db import models
| [
11748,
334,
27112,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 3.307692 | 13 |
"""Test the util.interfaces module."""
# Builtins
import abc
# Packages
from phylline.util.interfaces import InterfaceClass, SetterProperty
class Interface(object, metaclass=InterfaceClass):
"""Interface class for testing interfaces."""
def __init__(self):
"""Initialize members."""
self.v... | [
37811,
14402,
262,
7736,
13,
3849,
32186,
8265,
526,
15931,
198,
198,
2,
28477,
1040,
198,
198,
11748,
450,
66,
198,
198,
2,
6400,
1095,
198,
198,
6738,
872,
25727,
500,
13,
22602,
13,
3849,
32186,
1330,
26491,
9487,
11,
5345,
353,
... | 3.028866 | 485 |
import cv2
from skimage.color import rgb2hsv,hsv2rgb
import numpy as np
from skimage.color import rgb2lab, lab2rgb
from global_StretchingL import global_stretching
from global_stretching_ab import global_Stretching_ab
| [
11748,
269,
85,
17,
198,
6738,
1341,
9060,
13,
8043,
1330,
46140,
17,
11994,
85,
11,
11994,
85,
17,
81,
22296,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
9060,
13,
8043,
1330,
46140,
17,
23912,
11,
2248,
17,
81,
22296,
198... | 2.92 | 75 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2018-05-25 06:47
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
24,
13,
940,
319,
2864,
12,
2713,
12,
1495,
9130,
25,
2857,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.736842 | 57 |
import sys
import random
import Event
import numpy as np
# 1 is couple, 0 is single, affecting the risk
# allocate this person according to the risk
# get the probability of affecting
| [
11748,
25064,
198,
11748,
4738,
198,
11748,
8558,
198,
11748,
299,
32152,
355,
45941,
628,
628,
220,
220,
220,
1303,
352,
318,
3155,
11,
657,
318,
2060,
11,
13891,
262,
2526,
628,
220,
220,
220,
1303,
31935,
428,
1048,
1864,
284,
262,... | 3.722222 | 54 |
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_DOWN, KEY_UP
from random import randint
WIDTH = 35
HEIGHT = 20
MAX_X = WIDTH - 2
MAX_Y = HEIGHT - 2
SNAKE_LENGTH = 5
SNAKE_X = SNAKE_LENGTH + 1
SNAKE_Y = 3
TIMEOUT = 100
if __name__ == '__main__':
curses.initscr()
curses.beep()
curses.beep()
... | [
198,
11748,
43878,
198,
6738,
43878,
1330,
35374,
62,
49,
9947,
11,
35374,
62,
2538,
9792,
11,
35374,
62,
41925,
11,
35374,
62,
8577,
198,
6738,
4738,
1330,
43720,
600,
198,
198,
54,
2389,
4221,
796,
3439,
198,
13909,
9947,
796,
1160,... | 2.010256 | 585 |
import os
import pandas as pd
import sys
import json
import random
from collections import defaultdict
import csv
import pickle
# 22179163 taobao单个用户最大scale
random.seed(1230)
name = 'book'
filter_size = 80 # 过滤item
filter_len = 0 # 过滤item history
# 把不对的时间筛掉
def read_from_amazon(source):
"... | [
11748,
28686,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
25064,
201,
198,
11748,
33918,
201,
198,
11748,
4738,
201,
198,
6738,
17268,
1330,
4277,
11600,
201,
198,
11748,
269,
21370,
201,
198,
11748,
2298,
293,
201,
198,... | 1.805596 | 679 |
import pickle
import numpy as np
import scipy
import sklearn
from sklearn.metrics import confusion_matrix
import torch
| [
11748,
2298,
293,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
629,
541,
88,
201,
198,
11748,
1341,
35720,
201,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
10802,
62,
6759,
8609,
201,
198,
11748,
28034,
201,
198,
201,
... | 2.148649 | 74 |
from setuptools import setup, Extension
import numpy as np
from Cython.Distutils import build_ext
requires = ['h5py',
'pandas',
'scipy',
'george',
'emcee',
'matplotlib',
'bokeh==0.10',
'astropy',
'corner',
'scik... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
27995,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
327,
7535,
13,
20344,
26791,
1330,
1382,
62,
2302,
198,
198,
47911,
796,
37250,
71,
20,
9078,
3256,
198,
220,
220,
220,
220,
220,
220,
220,... | 1.966985 | 1,151 |
"""This module contains the utils functions of the library."""
import re
import random
import numpy as np
from typing import Callable, List, Optional, Sequence, Tuple, Union
from importlib import util
from skimage.segmentation import slic, felzenszwalb
from ..helpers.model_interface import ModelInterface
if util.find_... | [
37811,
1212,
8265,
4909,
262,
3384,
4487,
5499,
286,
262,
5888,
526,
15931,
198,
11748,
302,
198,
11748,
4738,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
19720,
1330,
4889,
540,
11,
7343,
11,
32233,
11,
45835,
11,
309,
29291,
11,
... | 2.299278 | 4,845 |
from datetime import datetime
from unittest import TestCase
from unittest.mock import patch
from common.repository import Repository
from dapp_user.config import NETWORK_ID, NETWORKS
from dapp_user.domain.services.user_service import UserService
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
6738,
2219,
13,
260,
1930,
37765,
1330,
1432,
13264,
198,
6738,
288,
1324,
62,
7220,
13,
1... | 3.647059 | 68 |
import logging
import os
import numpy as np
from keras_preprocessing.image import Iterator, load_img, img_to_array, array_to_img
from keras_preprocessing.image.iterator import BatchFromFilesMixin
from keras_preprocessing.image.directory_iterator import DirectoryIterator
class MildIterator(Iterator):
"""Abstract b... | [
11748,
18931,
198,
11748,
28686,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
41927,
292,
62,
3866,
36948,
13,
9060,
1330,
40806,
1352,
11,
3440,
62,
9600,
11,
33705,
62,
1462,
62,
18747,
11,
7177,
62,
1462,
62,
9600,
198,
6738... | 3.257895 | 190 |
from vimba import *
import sys
sys.path.append('D:/Dropbox/py_projects/vimba-api/src/')
import vimbaapilib as val
from time import sleep, time_ns
if __name__ == '__main__':
main() | [
6738,
43907,
7012,
1330,
1635,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
35,
14079,
26932,
3524,
14,
9078,
62,
42068,
14,
31124,
7012,
12,
15042,
14,
10677,
14,
11537,
198,
11748,
43907,
7012,
499,
22282,
355,
1188,
198... | 2.761194 | 67 |
name = "nwbindexer"
| [
3672,
796,
366,
77,
39346,
9630,
263,
1,
198
] | 2.222222 | 9 |
#!/usr/bin/env python
import argparse
import logging
import logging.config
import os
import random
import signal
from dataclasses import asdict, dataclass
from typing import Dict, NamedTuple
import gym
import numpy as np
import torch
import torch.nn as nn
import wandb
from gym_gridverse.rng import reset_gv_rng
from a... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
18931,
13,
11250,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
6737,
198,
6738,
4818,
330,
28958,
1330,
355,
11600,
11,
4818,
330,
... | 2.202929 | 956 |
import getpass
import logging
import os
import phanas.nas
import phanas.file_utils
import subprocess
import sys
from pathlib import Path
from subprocess import PIPE
MOUNT_DIR_NAME = "__NAS__"
| [
11748,
651,
6603,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
872,
15991,
13,
24716,
198,
11748,
872,
15991,
13,
7753,
62,
26791,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
850,
... | 3.233333 | 60 |
from django.urls.base import reverse_lazy
from django.views.generic.detail import DetailView
from django.views.generic.edit import FormMixin, FormView
from django.views.generic.list import ListView
from products.forms import Reviewform
from products.models import Color, Product, ProductCategory, Review, Size
from djang... | [
6738,
42625,
14208,
13,
6371,
82,
13,
8692,
1330,
9575,
62,
75,
12582,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
49170,
1330,
42585,
7680,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
19312,
1330,
5178,
35608,
259,
11,
... | 3.541096 | 146 |
import compas
from compas.datastructures import Mesh
from compas_viewers import MeshViewer
viewer = MeshViewer()
viewer.mesh = Mesh.from_polyhedron(6)
viewer.show()
| [
11748,
552,
292,
198,
6738,
552,
292,
13,
19608,
459,
1356,
942,
1330,
47529,
198,
6738,
552,
292,
62,
1177,
364,
1330,
47529,
7680,
263,
628,
198,
1177,
263,
796,
47529,
7680,
263,
3419,
198,
1177,
263,
13,
76,
5069,
796,
47529,
13... | 2.847458 | 59 |
# Load external modules.
from datetime import datetime, timedelta
import logging
import numpy as np
import pandas as pd
# Load internal modules.
import constants as const
import storage
import utils
#########
# NODES #
#########
#########
# EDGES #
#########
| [
2,
8778,
7097,
13103,
13,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
2,
8778,
5387,
13103,
13,
198,
11748,
38491,
3... | 3.447368 | 76 |
from ipaddress import IPv4Address, IPv6Address
import click
import pytest
from click_params.network import (
IP_ADDRESS, IPV4_ADDRESS, IPV6_ADDRESS, IP_NETWORK, IPV4_NETWORK, IPV6_NETWORK, Ipv4AddressRange, Ipv6AddressRange,
IpAddressListParamType, Ipv4AddressListParamType, Ipv6AddressListParamType, IpNetwork... | [
6738,
20966,
21975,
1330,
25961,
19,
20231,
11,
25961,
21,
20231,
198,
198,
11748,
3904,
198,
11748,
12972,
9288,
198,
198,
6738,
3904,
62,
37266,
13,
27349,
1330,
357,
198,
220,
220,
220,
6101,
62,
2885,
7707,
7597,
11,
6101,
53,
19,... | 2.141301 | 2,845 |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right | [
2,
30396,
329,
257,
13934,
5509,
10139,
13,
198,
2,
1398,
12200,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1188,
28,
15,
11,
1364,
28,
14202,
11,
826,
28,
14202,
2599,
198,
2,
220,
220,
220,
220,... | 2.27381 | 84 |
#!/usr/bin/env python3
__author__ = 'konradk'
import sys
import argparse
from pprint import pprint
from datetime import date
from collections import Counter
from tqdm import tqdm
from gnomad.utils import slack
from ukbb_pan_ancestry import *
if __name__ == '__main__':
parser = argparse.ArgumentParser... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
834,
9800,
834,
796,
705,
74,
261,
6335,
74,
6,
198,
198,
11748,
25064,
198,
11748,
1822,
29572,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
6738,
4818,
8079,
1330,
3128,
19... | 2.586314 | 643 |
import os
import cv2
import argparse
import numpy as np
import pandas as pd
from PIL import Image
import tensorflow as tf
import matplotlib.pyplot as plt
from reg.data import DataLoader, read_image_by_tf
data = DataLoader("../data/training_set",
one_hot_encoding=True,
palette=[255... | [
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
1822,
29572,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
350,
4146,
1330,
7412,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
2603... | 2.450331 | 151 |
import json
import os
from ibm_watson import LanguageTranslatorV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from dotenv import load_dotenv
load_dotenv()
apikey = os.environ['apikey']
url = os.environ['url']
authenticator = IAMAuthenticator(apikey)
language_translator = LanguageTranslatorV3(
... | [
11748,
33918,
198,
11748,
28686,
198,
6738,
24283,
76,
62,
86,
13506,
1330,
15417,
8291,
41880,
53,
18,
198,
6738,
24283,
76,
62,
17721,
62,
21282,
74,
62,
7295,
13,
41299,
44549,
1330,
314,
2390,
47649,
26407,
198,
6738,
16605,
24330,
... | 2.92638 | 163 |
from django.conf.urls.defaults import patterns, include, url
try:
from django.views.generic.base import TemplateView
urlpatterns = patterns('',
url(r'^robots\.txt$', TextPlainView.as_view(template_name='robots.txt')),
)
except:
urlpatterns = patterns('django.views.generic.simple',
(r'^r... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12286,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
42625,
14208,
13,
33571,
13,
41357,
13,
8692,
1330,
37350,
7680,
198,
220,
220,
220,
19016,
3... | 2.50641 | 156 |
# -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
# Copyright 2018 New Vector
# Copyright 2019 Awesome Technologies Innovationslabor GmbH
#
# 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 Lice... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
1853,
11,
1584,
4946,
27470,
12052,
198,
2,
15069,
2864,
968,
20650,
198,
2,
15069,
13130,
25020,
21852,
43405,
602,
75,
4820,
402,
2022,
39,
198,
2,
198,
2,... | 3.610345 | 290 |
from rest_framework.permissions import BasePermission, SAFE_METHODS
from v1.teams.models.team import CoreTeam, ProjectTeam
from v1.teams.models.team_member import CoreMember, ProjectMember
class IsStaffOrReadOnly(BasePermission):
"""The request is authenticated as a user and is staff, or is a read-only request"... | [
6738,
1334,
62,
30604,
13,
525,
8481,
1330,
7308,
5990,
3411,
11,
37630,
36,
62,
49273,
50,
198,
198,
6738,
410,
16,
13,
660,
4105,
13,
27530,
13,
15097,
1330,
7231,
15592,
11,
4935,
15592,
198,
6738,
410,
16,
13,
660,
4105,
13,
2... | 3.511278 | 133 |
from .train import Train
from .test import Test
framwork = "torch"
| [
198,
6738,
764,
27432,
1330,
16835,
198,
6738,
764,
9288,
1330,
6208,
198,
198,
19298,
1818,
796,
366,
13165,
354,
1,
628
] | 3.181818 | 22 |
import io
import json
import os
import subprocess
import sdi_utils.gensolution as gs
import sdi_utils.set_logging as slog
import sdi_utils.textfield_parser as tfp
import sdi_utils.tprogress as tp
try:
api
except NameError:
all_lines = list()
inports = [{'name': 'stream', 'type': 'message.file',"description":"... | [
11748,
33245,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
198,
11748,
264,
10989,
62,
26791,
13,
70,
641,
2122,
355,
308,
82,
198,
11748,
264,
10989,
62,
26791,
13,
2617,
62,
6404,
2667,
355,
25801,
198,
11748,
... | 2.379374 | 543 |
from datetime import datetime
atual = datetime.now().year
maiores = 0
menores = 0
for c in range(1,8):
nasc = int(input('Em Que Ano Você Nasceu? '))
idade = atual - nasc
if idade >= 18:
maiores += 1
else:
menores += 1
print('{} pessoa(s) é(são) de maior(es)'.format(maiores))
print('{} ... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
265,
723,
796,
4818,
8079,
13,
2197,
22446,
1941,
198,
76,
1872,
2850,
796,
657,
198,
3653,
2850,
796,
657,
198,
198,
1640,
269,
287,
2837,
7,
16,
11,
23,
2599,
198,
220,
220,
220,
299... | 2.101695 | 177 |
"""Extract body part annotations."""
import re
import spacy
from traiter.const import COMMA
from traiter.patterns.matcher_patterns import MatcherPatterns
from myrsidea.pylib.const import COMMON_PATTERNS, CONJ, MISSING, REPLACE
JOINER = CONJ + COMMA
MISSING_RE = '|'.join([fr'\b{m}\b' for m in MISSING])
MISSING_RE =... | [
37811,
11627,
974,
1767,
636,
37647,
526,
15931,
198,
198,
11748,
302,
198,
198,
11748,
599,
1590,
198,
6738,
1291,
2676,
13,
9979,
1330,
9440,
5673,
198,
6738,
1291,
2676,
13,
33279,
82,
13,
6759,
2044,
62,
33279,
82,
1330,
6550,
204... | 2.093304 | 911 |
SELIA_MANAGERS_APPS = [
'selia_managers',
]
| [
50,
3698,
3539,
62,
10725,
4760,
4877,
62,
2969,
3705,
796,
685,
198,
220,
220,
220,
705,
741,
544,
62,
805,
10321,
3256,
198,
60,
198
] | 1.846154 | 26 |
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
import os
from typing import List, Tuple
import pandas as pd
import numpy as np
import datetime as dt
import py_scripts.transform
import pickle
MODELSDIR = r'../models'
DATASET = r'../data/sim_ts_limpo.csv'
class modelo_produtos:
""" encapsulador para os modelos de c... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
28686,
198,
6738,
19720,
1330,
7343,
11,
309,
29291,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
... | 2.637795 | 127 |
#!/usr/bin/env python3
'''
CLI interface for the grape system.
This allows the user to only deal with a single interface.
'''
import os
import sys
from grape import __version__
from grape import create, delete, save, load, ximport, xexport, status, tree
PROGRAM = os.path.splitext(os.path.basename(sys.argv[0]))[0]
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
7061,
6,
198,
5097,
40,
7071,
329,
262,
30777,
1080,
13,
198,
198,
1212,
3578,
262,
2836,
284,
691,
1730,
351,
257,
2060,
7071,
13,
198,
7061,
6,
198,
11748,
28686,
198,
11748,
... | 2.220439 | 2,368 |
#! /usr/bin/python
import sys
print "fib_loop: ", fib_loop()
| [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
628,
198,
11748,
25064,
198,
198,
4798,
366,
69,
571,
62,
26268,
25,
33172,
12900,
62,
26268,
3419,
198
] | 2.37037 | 27 |
class Token:
"""
Basic token class.
Parameters
----------
lex : str
Token's lexeme.
token_type : Enum
Token's type.
"""
@property
| [
220,
220,
220,
220,
201,
198,
4871,
29130,
25,
201,
198,
220,
220,
220,
37227,
201,
198,
220,
220,
220,
14392,
11241,
1398,
13,
201,
198,
201,
198,
220,
220,
220,
40117,
201,
198,
220,
220,
220,
24200,
438,
201,
198,
220,
220,
220... | 1.95098 | 102 |
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.model_selection import GridSearchCV
parameters = {'n_estimators':[2, 5, 10, 50, 100],
'max_depth':[3, 4, 5],
'learning_rate':[0.001, 0.01, 0.1]}
model = GradientBoostingClassifier()
clfs = GridSearchCV(model, parameters... | [
6738,
1341,
35720,
13,
1072,
11306,
1330,
17701,
1153,
45686,
278,
9487,
7483,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
24846,
18243,
33538,
198,
198,
17143,
7307,
796,
1391,
6,
77,
62,
395,
320,
2024,
10354,
58,
17,
11,
64... | 2.323171 | 164 |
"""Various compromisable services.
Attackers are PERMITTED to:
- call any service method not prefixed by an underscore
Attackers are PROHIBITED from:
- instantiating additional services beyond the one(s) provided
- manually getting/setting service attributes, regardless of underscores
"""
from Cryptodome.Cipher impor... | [
37811,
40009,
8382,
43942,
2594,
13,
198,
198,
27732,
364,
389,
19878,
44,
22470,
1961,
284,
25,
198,
12,
869,
597,
2139,
2446,
407,
7694,
2966,
416,
281,
44810,
198,
198,
27732,
364,
389,
4810,
12096,
9865,
22061,
422,
25,
198,
12,
... | 3.824074 | 108 |
# Copyright (c) 2015 Mirantis, Inc.
# 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 requir... | [
2,
15069,
357,
66,
8,
1853,
7381,
20836,
11,
3457,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220... | 2.161663 | 1,299 |
""" Constants. """
import os
POLICY_REMOTE_URL = "https://dl.eff.org/starttls-everywhere/policy.json"
POLICY_FILENAME = "policy.json"
POLICY_LOCAL_FILE = os.path.join(os.path.dirname(__file__), POLICY_FILENAME)
| [
37811,
4757,
1187,
13,
37227,
198,
198,
11748,
28686,
198,
198,
45472,
2149,
56,
62,
40726,
23051,
62,
21886,
796,
366,
5450,
1378,
25404,
13,
14822,
13,
2398,
14,
9688,
83,
7278,
12,
16833,
3003,
14,
30586,
13,
17752,
1,
198,
45472,
... | 2.366667 | 90 |
#!/usr/bin/env mayapy
import pymel.internal.apicache as apicache
import pymel.internal.cmdcache as cmdcache
print apicache
import pymel.internal.startup
print pymel.internal.startup
logger = pymel.internal.startup._logger
cacheClasses = (
# apicache.ApiMelBridgeCache,
apicache.ApiCache,
cmdcache.CmdExamplesCa... | [
2,
48443,
14629,
14,
8800,
14,
24330,
743,
12826,
198,
11748,
279,
4948,
417,
13,
32538,
13,
499,
291,
4891,
355,
2471,
291,
4891,
198,
11748,
279,
4948,
417,
13,
32538,
13,
28758,
23870,
355,
23991,
23870,
198,
4798,
2471,
291,
4891,... | 2.442085 | 518 |
#!/usr/bin/env python
"""
@package mi.dataset.parser.zplsc_b
@file marine-integrations/mi/dataset/parser/zplsc_b.py
@author Ronald Ronquillo & Richard Han
@brief Parser for the zplsc_b dataset driver
This file contains code for the zplsc_b parser to produce data particles and echogram plots.
The Simrad EK60 scientif... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
31,
26495,
21504,
13,
19608,
292,
316,
13,
48610,
13,
89,
489,
1416,
62,
65,
198,
31,
7753,
16050,
12,
18908,
9143,
14,
11632,
14,
19608,
292,
316,
14,
48610,
14,
... | 2.221293 | 9,083 |
from typing import Optional
from ...error import GraphQLError
from ...language import OperationDefinitionNode, OperationType
from . import ASTValidationRule
__all__ = ['SingleFieldSubscriptionsRule', 'single_field_only_message']
class SingleFieldSubscriptionsRule(ASTValidationRule):
"""Subscriptions must only ... | [
6738,
19720,
1330,
32233,
198,
198,
6738,
2644,
18224,
1330,
29681,
48,
2538,
81,
1472,
198,
6738,
2644,
16129,
1330,
14680,
36621,
19667,
11,
14680,
6030,
198,
6738,
764,
1330,
29273,
7762,
24765,
31929,
198,
198,
834,
439,
834,
796,
3... | 3.765766 | 111 |
from typing import List
from autoprep.relation import Relation
from autoprep.storage.base.train_storage_mixin import TrainStorageMixin
from autoprep.table import Table
| [
6738,
19720,
1330,
7343,
198,
198,
6738,
22320,
7856,
13,
49501,
1330,
4718,
341,
198,
6738,
22320,
7856,
13,
35350,
13,
8692,
13,
27432,
62,
35350,
62,
19816,
259,
1330,
16835,
31425,
35608,
259,
198,
6738,
22320,
7856,
13,
11487,
1330... | 3.953488 | 43 |
import datetime
import time
import datedelta
import sqlalchemy.orm
import models.collateral
import models.database
import models.financing_statement
import models.party
import models.payment
import models.search
import schemas.financing_statement
import schemas.payment
| [
11748,
4818,
8079,
198,
11748,
640,
198,
198,
11748,
14567,
12514,
198,
11748,
44161,
282,
26599,
13,
579,
198,
198,
11748,
4981,
13,
26000,
10534,
198,
11748,
4981,
13,
48806,
198,
11748,
4981,
13,
15643,
5077,
62,
26090,
198,
11748,
4... | 3.835616 | 73 |
from collections import deque | [
6738,
17268,
1330,
390,
4188
] | 5.8 | 5 |
from decimal import Inexact
from sqlalchemy import Column, Float
from .database import Base
from sqlalchemy import Column, Integer, String, Float
# this is a truncated version of the above table
# to improve browser performance
| [
6738,
32465,
1330,
554,
1069,
529,
198,
6738,
44161,
282,
26599,
1330,
29201,
11,
48436,
198,
6738,
764,
48806,
1330,
7308,
198,
198,
6738,
44161,
282,
26599,
1330,
29201,
11,
34142,
11,
10903,
11,
48436,
198,
198,
2,
428,
318,
257,
4... | 4.181818 | 55 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import csv
def StoreRecords(data, path='data.csv', verbose=False):
'''Store records in a CSV file.'''
try:
with open(path, 'wb') as f:
w = csv.writer(f)
w.writerow(data[0].keys())
for record in data:
w.writerow([value.encode('utf-8').strip()... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
269,
21370,
198,
198,
4299,
9363,
6690,
3669,
7,
7890,
11,
3108,
11639,
7890,
13,
40664,
3256,
15942,
577,
28,
2... | 2.427083 | 192 |
from request import request
if __name__ == '__main__':
main() | [
6738,
2581,
1330,
2581,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419
] | 3 | 22 |
import unittest
from Day12 import sum_of_numbers_in_json as sut
if __name__ == '__main__':
unittest.main(verbosity=2)
| [
11748,
555,
715,
395,
198,
198,
6738,
3596,
1065,
1330,
2160,
62,
1659,
62,
77,
17024,
62,
259,
62,
17752,
355,
264,
315,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
1... | 2.431373 | 51 |
import requests
import json
import time
read("Hello To All ")
time.sleep(2)
# Steps To Find any News API
# #
# 1. go to chrome search for news API
# 2. create new account and get your api key
# 3. then go to source section search your favorite News API
# 4. copy that url
# 5. then enter here
while(True):
read("... | [
11748,
7007,
198,
11748,
33918,
198,
11748,
640,
628,
198,
961,
7203,
15496,
1675,
1439,
366,
8,
198,
198,
2435,
13,
42832,
7,
17,
8,
198,
2,
32144,
1675,
9938,
597,
3000,
7824,
198,
2,
1303,
198,
2,
352,
13,
467,
284,
32030,
2989... | 2.335632 | 870 |