content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import pytest
from lambda_log_shipper.handlers.base_handler import LogRecord
from lambda_log_shipper.logs_manager import LogsManager
@pytest.fixture(autouse=True)
@pytest.fixture(autouse=True)
@pytest.fixture(autouse=True)
@pytest.fixture
@pytest.fixture
| [
11748,
12972,
9288,
198,
198,
6738,
37456,
62,
6404,
62,
1477,
14710,
13,
4993,
8116,
13,
8692,
62,
30281,
1330,
5972,
23739,
198,
6738,
37456,
62,
6404,
62,
1477,
14710,
13,
6404,
82,
62,
37153,
1330,
5972,
82,
13511,
628,
198,
31,
... | 2.714286 | 98 |
'''
Bridge from UART host to RS485 module.
Created on 14.10.2020
@author: LK
'''
from PyTrinamicMicro.connections.tmcl_host_interface import tmcl_host_interface
from PyTrinamicMicro.platforms.motionpy2.connections.rs485_tmcl_interface import rs485_tmcl_interface
from PyTrinamicMicro.platforms.motionpy2.connections.u... | [
7061,
6,
198,
37385,
422,
471,
7227,
2583,
284,
19340,
32642,
8265,
13,
198,
198,
41972,
319,
1478,
13,
940,
13,
42334,
198,
198,
31,
9800,
25,
406,
42,
198,
7061,
6,
198,
198,
6738,
9485,
2898,
259,
18127,
13031,
13,
8443,
507,
1... | 3.006689 | 299 |
import re
from functools import lru_cache
from typing import List, Sequence
from git import Repo
from .commit import Commit
from .tag_manager import PrefixedTagManager, SimpleTagManager
remote_re = re.compile(
r"^(https://github\.com/|git@github\.com:)"
r"(?P<organization>[^/]+)/(?P<repository>[^.]+)(\.git)?... | [
11748,
302,
198,
6738,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
198,
6738,
19720,
1330,
7343,
11,
45835,
198,
198,
6738,
17606,
1330,
1432,
78,
198,
198,
6738,
764,
41509,
1330,
35910,
198,
6738,
764,
12985,
62,
37153,
1330,
3771,
... | 2.786325 | 117 |
import binascii
a = open('useless.py').read()
b = str(binascii.unhexlify(a), 'utf-8')
for j in range(3):
for i in range(256):
b = b.replace('+chr(%s)'%i,chr(i))
print(b)
| [
11748,
9874,
292,
979,
72,
198,
64,
796,
1280,
10786,
84,
10950,
13,
9078,
27691,
961,
3419,
198,
65,
796,
965,
7,
8800,
292,
979,
72,
13,
403,
33095,
75,
1958,
7,
64,
828,
705,
40477,
12,
23,
11537,
198,
198,
1640,
474,
287,
28... | 1.947368 | 95 |
import re
from coalib.bears.LocalBear import LocalBear
from coalib.results.Result import Result, RESULT_SEVERITY
from coalib.results.Diff import Diff
def generate_spacing_diff(file, filename, line, line_number,
match_object, required_spacing):
"""
Generate a diff for incorrectly spa... | [
11748,
302,
198,
198,
6738,
5655,
571,
13,
65,
4127,
13,
14565,
36352,
1330,
10714,
36352,
198,
6738,
5655,
571,
13,
43420,
13,
23004,
1330,
25414,
11,
15731,
16724,
62,
5188,
5959,
9050,
198,
6738,
5655,
571,
13,
43420,
13,
28813,
13... | 2.423905 | 1,439 |
from bmtk.builder import NetworkBuilder
import numpy as np
import sys
import synapses
import pandas as pd
df = pd.read_csv("Segments.csv")
types = np.array(df["Type"])
xs = np.array(df["X"])
ids = np.array(df["Sec ID"])
distances = np.array(df["Distance"])
dendrites = np.where(((types == "dend") | (types == "apic")) ... | [
6738,
275,
16762,
74,
13,
38272,
1330,
7311,
32875,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
25064,
198,
11748,
6171,
45903,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
7568,
796,
279,
67,
13,
961,
62,
40664,
7203,
41030,
9... | 1.978479 | 1,394 |
import requests
import numpy as np
from api_pkg.utils.parsing import *
from api_pkg.utils.tokenization import *
from api_pkg.utils import *
import unicodedata
| [
11748,
7007,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
40391,
62,
35339,
13,
26791,
13,
79,
945,
278,
1330,
1635,
198,
6738,
40391,
62,
35339,
13,
26791,
13,
30001,
1634,
1330,
1635,
198,
6738,
40391,
62,
35339,
13,
26791,
1330,
... | 3.285714 | 49 |
from copy import deepcopy
import itertools
from termcolor import colored
| [
6738,
4866,
1330,
2769,
30073,
198,
11748,
340,
861,
10141,
198,
6738,
3381,
8043,
1330,
16396,
198
] | 4.294118 | 17 |
from rest_framework import serializers
from users.serializers import UserProfileSerializer
from .models import Project, Risk
class BasicRiskSerializer(serializers.ModelSerializer):
"""
Serializes Risk objects for display as nested objects for views pertaining to Projects
"""
class ProjectSerializer(ser... | [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
2985,
13,
46911,
11341,
1330,
11787,
37046,
32634,
7509,
198,
198,
6738,
764,
27530,
1330,
4935,
11,
19602,
628,
198,
4871,
14392,
49,
1984,
32634,
7509,
7,
46911,
11341,
13,
17633,
... | 3.471616 | 687 |
from django.contrib.auth.models import User
from django import forms
from .models import Course, Student, Teacher, Material, Question
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
764,
27530,
1330,
20537,
11,
13613,
11,
32019,
11,
14633,
11,
18233,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
... | 3.814815 | 54 |
import ravop.core as R
| [
11748,
24343,
404,
13,
7295,
355,
371,
628,
628,
628,
628,
198
] | 2.583333 | 12 |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="rnaseq_barcode",
version="0.0.1",
author="Tom Roeschinger, Manuel Razo, Scott Saunders, Rob Phillips",
author_email="troeschi {at} caltech {dot} edu",
description="This repository contains... | [
11748,
900,
37623,
10141,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
198,
... | 2.785714 | 280 |
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
import numpy as np
from helper import batches # Helper function created in Mini-batching section
def print_epoch_stats(epoch_i, sess, last_features, last_labels):
"""
Print cost and validation accuracy of an epoch
"""
... | [
6738,
11192,
273,
11125,
13,
1069,
12629,
13,
83,
44917,
82,
13,
10295,
396,
1330,
5128,
62,
7890,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
31904,
1330,
37830,
220,
1303,
5053,
525,
2163,... | 2.552093 | 1,123 |
# High Scores scene
import pygwidgets
import pyghelpers
from HighScoresData import *
| [
2,
3334,
44654,
3715,
201,
198,
11748,
12972,
70,
28029,
11407,
201,
198,
11748,
12972,
70,
16794,
364,
201,
198,
6738,
3334,
3351,
2850,
6601,
1330,
1635,
201,
198,
201,
198
] | 2.935484 | 31 |
from . import make_work_dir, run_sql, log
from psycopg2.errors import UndefinedTable
import json
import os
import re
# TODO if this is going to get reused for other citations it should probably be
# in packs.py
citations_table_name = "citations"
| [
6738,
764,
1330,
787,
62,
1818,
62,
15908,
11,
1057,
62,
25410,
11,
2604,
198,
6738,
17331,
22163,
70,
17,
13,
48277,
1330,
13794,
18156,
10962,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
302,
198,
198,
2,
16926,
46,
611,
428,
... | 3.364865 | 74 |
# -*- encoding: utf-8 -*-
"""
Selection-Sort sem Flag em Python
by Ed
"""
while True:
valor_ini = input("Digite os números do seu vetor, como 10,20,30, digite:")
valores = eval("["+valor_ini+"]") #interpreta a sequencia como uma lista
print (selection_sort(valores))
| [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
4653,
1564,
12,
42758,
5026,
19762,
795,
11361,
198,
1525,
1717,
198,
37811,
198,
220,
220,
220,
220,
220,
198,
4514,
6407,
25,
198,
220,
220,
220,
1188,
2... | 2.394958 | 119 |
# coding=utf-8
#
# Copyright 2013 Y12Studio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
198,
2,
15069,
2211,
575,
1065,
41501,
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,
1... | 3.04898 | 490 |
from django.shortcuts import render, get_object_or_404, redirect
from .models import Category
from store.models import Product
# fetching products by category:
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
11,
18941,
198,
6738,
764,
27530,
1330,
21743,
198,
6738,
3650,
13,
27530,
1330,
8721,
198,
198,
2,
21207,
278,
3186,
416,
6536,
25,
628
] | 3.95122 | 41 |
from multiprocessing import Pool
import json
from pandas.io.parsers import TextFileReader
from os import path
from path_service import DATA_DIR, TMP_DIR
import pandas as pd
from typing import Dict, Callable, List, Set, Any, Tuple
POOL_SIZE = 5
CHUNK_SIZE = 10000000
if __name__ == "__main__":
ret_api_... | [
6738,
18540,
305,
919,
278,
1330,
19850,
198,
11748,
33918,
198,
6738,
19798,
292,
13,
952,
13,
79,
945,
364,
1330,
8255,
8979,
33634,
198,
6738,
28686,
1330,
3108,
198,
6738,
3108,
62,
15271,
1330,
42865,
62,
34720,
11,
309,
7378,
62... | 2.666667 | 228 |
from functools import wraps
import numpy as np
__all__ = ['array_io', 'as_array', 'merge_dict', 'merge_dicts']
def array_io(func=None, dim=0, optional=False):
"""
Decorator that ensures that the first input of function gets converted to a
numpy array of the dimension specified. The return value will als... | [
6738,
1257,
310,
10141,
1330,
27521,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
834,
439,
834,
796,
37250,
18747,
62,
952,
3256,
705,
292,
62,
18747,
3256,
705,
647,
469,
62,
11600,
3256,
705,
647,
469,
62,
11600,
82,
20520,
... | 2.389178 | 961 |
from setuptools import setup
from setuptools import find_packages
VERSION = '0.0.1'
setup(
name='coroutine',
url='https://github.com/jschwinger23/coroutine',
description='Coroutine-based threading interface',
author='ooth',
author_email='greyschwinger@gmail.com',
packages=find_packages(),
... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
628,
198,
43717,
796,
705,
15,
13,
15,
13,
16,
6,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
10215,
28399,
3256,
198,
220,
220,
220,... | 2.191304 | 230 |
import picamera
import time
from datetime import datetime
import cv2
import picamera.array
import numpy as np
time.sleep(0.1)
interval=30
continueCapture = True
start=datetime(2019, 12, 8,23,59)
end=datetime(2019, 12, 9,6,00)
timeStart = start.timestamp()
timeEnd = end.timestamp()
index=0
threshold=100
prevImage =... | [
11748,
8301,
18144,
198,
11748,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
269,
85,
17,
220,
198,
11748,
8301,
18144,
13,
18747,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2435,
13,
42832,
7,
15,
13,
16,
8,
198,
19... | 2.06734 | 594 |
"""
Import as:
import im.app.services.loader_factory as imaselofa
"""
from typing import Any
import im.common.data.load.abstract_data_loader as imcdladalo
# TODO(*): Move it out to app/
class LoaderFactory:
"""
Builds AbstractDataLoader objects based on different criteria (e.g.,
provider and storage ty... | [
37811,
198,
20939,
355,
25,
198,
198,
11748,
545,
13,
1324,
13,
30416,
13,
29356,
62,
69,
9548,
355,
545,
48038,
1659,
64,
198,
37811,
198,
6738,
19720,
1330,
4377,
198,
198,
11748,
545,
13,
11321,
13,
7890,
13,
2220,
13,
397,
8709,... | 2.340741 | 1,350 |
#! /usr/bin/env python
import os
import sys
import fnmatch
import time
import shutil
import subprocess
import stat
#------------------------
# General purpose
#------------------------
#------------------------
# Directory structure
#------------------------
solversPath = "solvers/"
drattrimPath = "drat-trim/"
gra... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
24714,
15699,
198,
11748,
640,
198,
11748,
4423,
346,
198,
11748,
850,
14681,
198,
11748,
1185,
198,
198,
2,
22369,
198,
2,
3611,
40... | 3.705521 | 163 |
from django.contrib import admin
from .models import (XApiObject, XApiActor, XApiVerb, SlackVerbField,
SlackObjectField, LrsConfig, SlackField)
admin.site.register(XApiObject, XApiObjectAdmin)
admin.site.register(XApiActor, XApiActorAdmin)
admin.site.register(XApiVerb, XApiVerbAdmin)
admin.... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
357,
55,
32,
14415,
10267,
11,
1395,
32,
14415,
40277,
11,
1395,
32,
14415,
13414,
65,
11,
36256,
13414,
65,
15878,
11,
198,
220,
220,
220,
220,
220,
220,
... | 2.661111 | 180 |
import collections
import logging
from typing import List
from pyspark import SparkContext
from pyspark_spy.interface import SparkListener
from pyspark_spy.classes import JobEndEvent, StageCompletedEvent, OutputMetrics, InputMetrics
logger = logging.getLogger(__name__)
# noinspection PyPep8Naming,PyPep8Naming
| [
11748,
17268,
198,
11748,
18931,
198,
6738,
19720,
1330,
7343,
198,
198,
6738,
279,
893,
20928,
1330,
17732,
21947,
198,
198,
6738,
279,
893,
20928,
62,
2777,
88,
13,
39994,
1330,
17732,
33252,
198,
6738,
279,
893,
20928,
62,
2777,
88,
... | 3.333333 | 96 |
import pytest
import responder
from gptchat.cmd.serve_chat_api import ChatHandler
@pytest.fixture
| [
11748,
12972,
9288,
198,
11748,
3031,
263,
198,
6738,
308,
457,
17006,
13,
28758,
13,
2655,
303,
62,
17006,
62,
15042,
1330,
24101,
25060,
628,
198,
198,
31,
9078,
9288,
13,
69,
9602,
628,
628
] | 2.971429 | 35 |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless... | [
2,
15069,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
220,
220,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
198,
2,
220,
220,
921,
743,
... | 3.467249 | 229 |
import os
root_dir = os.getcwd()
data_dir = root_dir + '\\data\\'
fruit_models_dir = root_dir + '\\fruit_models\\'
number_train_images = 7516
number_test_images = 13877 | [
11748,
28686,
198,
15763,
62,
15908,
796,
28686,
13,
1136,
66,
16993,
3419,
198,
7890,
62,
15908,
796,
6808,
62,
15908,
1343,
705,
6852,
7890,
6852,
6,
198,
34711,
62,
27530,
62,
15908,
796,
6808,
62,
15908,
1343,
705,
6852,
34711,
62... | 2.666667 | 63 |
import openpyxl
import csv
import logging
from typing import Sequence, Any, List, Type, NamedTuple, Callable, Iterator, \
Optional, FrozenSet, Iterable, NewType, Union, cast
import openpyxl.utils.cell
from PyQt5.QtWidgets import QDialog, QMessageBox
import core
import enum
import model
import branding
from gui.p... | [
11748,
1280,
9078,
87,
75,
198,
198,
11748,
269,
21370,
198,
11748,
18931,
198,
6738,
19720,
1330,
45835,
11,
4377,
11,
7343,
11,
5994,
11,
34441,
51,
29291,
11,
4889,
540,
11,
40806,
1352,
11,
3467,
198,
220,
220,
220,
32233,
11,
2... | 2.87037 | 324 |
""" Ip Info """
class Ip(object):
""" Ip Info """
| [
37811,
314,
79,
14151,
37227,
628,
198,
4871,
314,
79,
7,
15252,
2599,
198,
220,
220,
220,
37227,
314,
79,
14151,
37227,
628
] | 2.478261 | 23 |
"""
Tests for Upstream class
"""
import os
import re
import subprocess
from pathlib import Path
import github
import pytest
from flexmock import flexmock
from packit.config import Config
from rebasehelper.versioneer import versioneers_runner
from packit.exceptions import PackitException
from tests.spellbook import do... | [
37811,
198,
51,
3558,
329,
3205,
5532,
1398,
198,
37811,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
850,
14681,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
33084,
198,
11748,
12972,
9288,
198,
6738,
7059,
76,
735,
1330,
70... | 2.553435 | 262 |
import pytest
| [
11748,
12972,
9288,
628
] | 3.75 | 4 |
# -*- coding: utf-8 -*-
# @Time : 2019-12-21
# @Author : mizxc
# @Email : xiangxianjiao@163.com
from flask import Blueprint
bpHome = Blueprint("home",__name__)
from .view import *
from .navigationView import *
from .blogView import *
from .photoView import *
from .kshareView import * | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
220,
220,
220,
1058,
13130,
12,
1065,
12,
2481,
198,
2,
2488,
13838,
220,
1058,
285,
528,
25306,
198,
2,
2488,
15333,
220,
220,
1058,
2124,
15483,
87,
... | 2.728972 | 107 |
from rest_framework import serializers
from blog.models import Comment
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
4130,
13,
27530,
1330,
18957,
628,
198
] | 4.5625 | 16 |
import numpy as np
import pandas as pd
import glob
from pathlib import Path
from typing import List
from utils import config as cfg
from flexassist.core.system.profiler import reduce_mem_usage
from flexassist.core.system.writer import write_csv
from flexassist.core.system.reader import read_ya... | [
11748,
299,
32152,
220,
355,
45941,
220,
198,
11748,
19798,
292,
355,
279,
67,
220,
198,
11748,
15095,
220,
198,
6738,
220,
220,
3108,
8019,
1330,
10644,
198,
6738,
220,
220,
19720,
220,
1330,
7343,
220,
198,
6738,
220,
220,
3384,
448... | 2.369466 | 655 |
from sqlalchemy.orm import relationship
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.session import Session
__author__ = 'Josh'
Base = declarative_base()
| [
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
198,
6738,
44161,
282,
26599,
1330,
29201,
11,
34142,
11,
10903,
11,
8708,
9218,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
32446,
283,
876,
1330,
2377,
283,
876,
62,
8692,
198,
6738,
441... | 3.5 | 72 |
from django.db import models
from django.urls import reverse
from taggit.managers import TaggableManager
from django.utils import timezone
from django.template.defaultfilters import slugify
from django.core.exceptions import ValidationError
# Model that describes a category
# Model that describes a blog post
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
7621,
18300,
13,
805,
10321,
1330,
309,
9460,
540,
13511,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
6738,
42625,
14... | 3.888889 | 81 |
#!/usr/bin/python3
"""
City Class from Models Module
"""
import os
from models.base_model import BaseModel, Base
from sqlalchemy.orm import relationship
from sqlalchemy import Column, Integer, String, Float, ForeignKey
STORAGE_TYPE = os.environ.get('BTCPBNB_TYPE_STORAGE')
class City(BaseModel, Base):
"""City clas... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
37811,
198,
14941,
5016,
422,
32329,
19937,
198,
37811,
198,
11748,
28686,
198,
6738,
4981,
13,
8692,
62,
19849,
1330,
7308,
17633,
11,
7308,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
... | 2.73913 | 253 |
__version__ = "1.4.2"
default_app_config = "djangocms_references.apps.ReferencesConfig"
| [
834,
9641,
834,
796,
366,
16,
13,
19,
13,
17,
1,
198,
198,
12286,
62,
1324,
62,
11250,
796,
366,
28241,
648,
420,
907,
62,
5420,
4972,
13,
18211,
13,
19927,
16934,
1,
198
] | 2.617647 | 34 |
#-*- coding:utf-8 -*-
# ==============================================================================
# Copyright 2016 Windy Darian (Ruoyu Fan)
#
# 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 L... | [
2,
12,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
2,
38093,
25609,
28,
198,
2,
220,
220,
15069,
1584,
3086,
88,
360,
3699,
357,
40464,
726,
84,
13836,
8,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
1062... | 3.346032 | 315 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-07-09 14:24
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
24,
319,
2864,
12,
2998,
12,
2931,
1478,
25,
1731,
201,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
... | 2.53125 | 64 |
# ---------------------------------------------------------------------------------------------
# Copyright (c) Akash Nag. All rights reserved.
# Licensed under the MIT License. See LICENSE.md in the project root for license information.
# ------------------------------------------------------------------------------... | [
2,
16529,
1783,
32501,
198,
2,
220,
15069,
357,
66,
8,
9084,
1077,
15196,
13,
1439,
2489,
10395,
13,
198,
2,
220,
49962,
739,
262,
17168,
13789,
13,
4091,
38559,
24290,
13,
9132,
287,
262,
1628,
6808,
329,
5964,
1321,
13,
198,
2,
... | 5.589474 | 95 |
# coding=utf-8
"""This module contains the HostedFeatureServer class
for editing HostedFeatureServer configuration pre or post publish"""
# Python 2/3 compatibility
# pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-order,wrong-import-position,no-name-in-module,import-error
from __future__ import (a... | [
2,
19617,
28,
40477,
12,
23,
198,
37811,
1212,
8265,
4909,
262,
14504,
276,
38816,
10697,
1398,
198,
1640,
12857,
14504,
276,
38816,
10697,
8398,
662,
393,
1281,
7715,
37811,
198,
198,
2,
11361,
362,
14,
18,
17764,
198,
2,
279,
2645,
... | 1.581478 | 6,198 |
# Implementation of Perceptron and other variants.
import matplotlib.pyplot as plt
import numpy as np
from astropy.table import Table, Column
# Generates linearly seperable data in 2-D
class Perceptron :
"""An implementation of the perceptron algorithm.
Note that this implementation does not include a bias... | [
2,
46333,
286,
2448,
984,
1313,
290,
584,
17670,
13,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
6468,
28338,
13,
11487,
1330,
8655,
11,
29201,
198,
198,
2,
2980,
689,
... | 2.205607 | 3,103 |
import functools
from app.slave.cluster_slave import ClusterSlave
from app.subcommands.service_subcommand import ServiceSubcommand
from app.util import analytics, log
from app.util.conf.configuration import Configuration
from app.web_framework.cluster_slave_application import ClusterSlaveApplication
| [
11748,
1257,
310,
10141,
198,
198,
6738,
598,
13,
36341,
13,
565,
5819,
62,
36341,
1330,
38279,
11122,
1015,
198,
6738,
598,
13,
7266,
9503,
1746,
13,
15271,
62,
7266,
21812,
1330,
4809,
7004,
21812,
198,
6738,
598,
13,
22602,
1330,
2... | 3.986842 | 76 |
# Copyright 2021, Yahoo
# Licensed under the terms of the Apache 2.0 license. See the LICENSE file in the project root for terms
import shlex
import subprocess # nosec using shlex
from enum import Enum
from ipaddress import IPv4Address, IPv4Network
from queue import LifoQueue
from typing import List, Optional, Unio... | [
2,
220,
15069,
33448,
11,
16551,
198,
2,
220,
49962,
739,
262,
2846,
286,
262,
24843,
362,
13,
15,
5964,
13,
4091,
262,
38559,
24290,
2393,
287,
262,
1628,
6808,
329,
2846,
198,
198,
11748,
427,
2588,
198,
11748,
850,
14681,
220,
13... | 3.149123 | 228 |
from sklearn.metrics import jaccard_score
from sklearn.metrics import f1_score
from sklearn.metrics import accuracy_score
from sklearn.linear_model import RidgeClassifier
import numpy as np
def _ridgeclassifier(*, train, test, x_predict=None, metrics, alpha=1.0, fit_intercept=True, normalize=False, copy_X=True,
... | [
6738,
1341,
35720,
13,
4164,
10466,
1330,
474,
4134,
446,
62,
26675,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
277,
16,
62,
26675,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
9922,
62,
26675,
198,
198,
6738,
1341,
35720,
13,
2... | 2.561265 | 506 |
from pypdnsrest.parsers import CnameRecordParser
from pypdnsrest.dnsrecords import DNSCNameRecord
from tests.parsers.test_parsers import TestParserBase
| [
6738,
279,
4464,
67,
5907,
2118,
13,
79,
945,
364,
1330,
327,
3672,
23739,
46677,
198,
6738,
279,
4464,
67,
5907,
2118,
13,
67,
5907,
8344,
3669,
1330,
45080,
6173,
5376,
23739,
198,
6738,
5254,
13,
79,
945,
364,
13,
9288,
62,
79,
... | 3.04 | 50 |
from django.test import TestCase
from fluent_blogs.models import Entry
from fluent_blogs.models import get_entry_model
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
43472,
62,
49096,
13,
27530,
1330,
21617,
198,
6738,
43472,
62,
49096,
13,
27530,
1330,
651,
62,
13000,
62,
19849,
628
] | 3.78125 | 32 |
from direct.directnotify.DirectNotifyGlobal import directNotify
from toontown.building.DistributedElevatorIntAI import DistributedElevatorIntAI | [
6738,
1277,
13,
12942,
1662,
1958,
13,
13470,
3673,
1958,
22289,
1330,
1277,
3673,
1958,
198,
6738,
284,
756,
593,
13,
16894,
13,
20344,
6169,
36,
2768,
1352,
5317,
20185,
1330,
4307,
6169,
36,
2768,
1352,
5317,
20185
] | 3.763158 | 38 |
import argparse
import tensorflow as tf
import numpy as np
import importlib
from tqdm import tqdm
import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
sys.path.append(os.path.join(BASE_DIR, 'utils'))
sys.path.append(os.path.join(BASE_DIR, 'data_loader'))
from data_generat... | [
11748,
1822,
29572,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1330,
8019,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
28686,
198,
11748,
25064,
198,
33,
11159,
62,
34720,
... | 2.610212 | 803 |
import pandas as pd
df = pd.read_csv('../data/snp/gwas_info.tsv', sep = '\t')
print(df)
snps = 'rs11913721,rs1474347,rs11568817,rs1554973,rs1799880,rs2069763,rs3757351,rs2227306,rs2069772,rs7301328,rs7598440,rs743409,rs4680,rs12722489,rs2227284,rs1800797,rs2283792,rs4251961,rs10767664,rs2069812,rs1927914,rs7131056'.sp... | [
11748,
19798,
292,
355,
279,
67,
198,
198,
7568,
796,
279,
67,
13,
961,
62,
40664,
10786,
40720,
7890,
14,
16184,
79,
14,
70,
9776,
62,
10951,
13,
912,
85,
3256,
41767,
796,
705,
59,
83,
11537,
198,
4798,
7,
7568,
8,
198,
16184,
... | 2.093426 | 289 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 -- Lars Heuer.
# All rights reserved.
#
# License: BSD License
#
"""\
Script um eine fischertechnik-App für die Community Firmware zu erstellen.
Das Script erstellt das Manifest, sowie ein Standard-Icon und ein Python-Script.
"""
from __future__ import absolute_import, pr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
66,
8,
13130,
1377,
31239,
679,
15573,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
13789,
25,
347,
10305,
13789,
198,
2,
198,
37811,
... | 1.769623 | 3,134 |
import os
from http.server import HTTPServer, CGIHTTPRequestHandler
os.chdir('.')
server_object = HTTPServer(server_address=('', 8080), RequestHandlerClass=CGIHTTPRequestHandler)
# Start the web server
server_object.serve_forever()
| [
11748,
28686,
198,
6738,
2638,
13,
15388,
1330,
38288,
18497,
11,
36378,
40717,
18453,
25060,
198,
418,
13,
354,
15908,
10786,
2637,
8,
198,
15388,
62,
15252,
796,
38288,
18497,
7,
15388,
62,
21975,
28,
10786,
3256,
4019,
1795,
828,
193... | 3.411765 | 68 |
from bizfly_two_fa.utils.methods import do_request
from bizfly_two_fa.constants import (GEN_SESSION_ENDPOINT, SEND_OTP_ENDPOINT, GET_SESSION_INFO_ENDPOINT,
VERIFY_OTP_ENDPOINT, SEND_MEMBER_SECRET_KEY_ENDPOINT,
CONFIRM_SESSION_ENDPOINT, BASE_URL)
... | [
6738,
275,
528,
12254,
62,
11545,
62,
13331,
13,
26791,
13,
24396,
82,
1330,
466,
62,
25927,
198,
6738,
275,
528,
12254,
62,
11545,
62,
13331,
13,
9979,
1187,
1330,
357,
35353,
62,
50,
47621,
62,
1677,
6322,
46,
12394,
11,
311,
1061... | 1.758974 | 195 |
# encoding: utf-8
"""
@version: 1.0
@author: Jarrett
@file: views
@time: 2021/11/10 16:01
"""
from flask_restful import Resource, reqparse, Api
from flask_app.common.utils import BaseResponse
from flask_app.user import user_blueprint
from .models import db, BookModel
api = Api(user_blueprint)
REQUIRED_INFO = "该参数是必须的... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
37811,
198,
31,
9641,
25,
352,
13,
15,
198,
31,
9800,
25,
48654,
198,
31,
7753,
25,
5009,
198,
31,
2435,
25,
33448,
14,
1157,
14,
940,
1467,
25,
486,
198,
37811,
198,
6738,
42903,
62,
2118,
... | 2.612903 | 155 |
import _plotly_utils.basevalidators
| [
11748,
4808,
29487,
306,
62,
26791,
13,
8692,
12102,
2024,
628
] | 3.363636 | 11 |
#!/usr/bin/env python
import hashlib
import base64
from urllib.parse import urlunparse
from typing import List, Tuple
class UrlShorten(object):
"""Class used to shorten given urls."""
@staticmethod
@staticmethod
@staticmethod
@staticmethod
@staticmethod
@staticmethod
@staticme... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
12234,
8019,
198,
11748,
2779,
2414,
198,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
403,
29572,
198,
6738,
19720,
1330,
7343,
11,
309,
29291,
628,
198,
4871,
8799,
... | 2.927928 | 111 |
import dataset.transforms.joint_transforms as joint_transforms
import dataset.transforms.joint_transforms2 as joint_transforms2
import dataset.transforms.transforms as extended_transforms
| [
11748,
27039,
13,
7645,
23914,
13,
73,
1563,
62,
7645,
23914,
355,
6466,
62,
7645,
23914,
198,
11748,
27039,
13,
7645,
23914,
13,
73,
1563,
62,
7645,
23914,
17,
355,
6466,
62,
7645,
23914,
17,
198,
11748,
27039,
13,
7645,
23914,
13,
... | 3.76 | 50 |
from os import remove, system, rename, rmdir
from shutil import rmtree
system("python3 -m pip install pyinstaller")
system("pyinstaller -y -F \"./main.py\"")
rmtree("./build")
rename("./dist/main", "./main")
rmdir("dist")
remove("main.spec")
| [
6738,
28686,
1330,
4781,
11,
1080,
11,
36265,
11,
374,
9132,
343,
198,
6738,
4423,
346,
1330,
374,
16762,
631,
198,
198,
10057,
7203,
29412,
18,
532,
76,
7347,
2721,
12972,
17350,
263,
4943,
198,
10057,
7203,
9078,
17350,
263,
532,
88... | 2.7 | 90 |
# This program gets the price for given ticket and given date
import yfinance as yf
import datetime
import sys
from datetime import date, timedelta
TICKER = "FB"
DATE = str(date.today())
FUTURE_DATE = "2020-12-31"
Today = datetime.datetime(int(DATE[:4]), int(DATE[5:7]), int(DATE[8:]))
Future_date = datetime.datet... | [
2,
770,
1430,
3011,
262,
2756,
329,
1813,
7846,
290,
1813,
3128,
198,
198,
11748,
331,
69,
14149,
355,
331,
69,
198,
11748,
4818,
8079,
220,
198,
11748,
25064,
198,
6738,
4818,
8079,
1330,
3128,
11,
28805,
12514,
628,
198,
51,
11860,
... | 2.717286 | 619 |
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models.signals import post_save, post_delete, pre_delete
from django.dispatch import receiver
from haystack.exceptions import NotHandled
from haystack.signals import BaseSignalProcessor
from metashare.storage.models impo... | [
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
9515,
13921,
3673,
3109,
396,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
12683,
874,
1330,
1281,
62,
21928,
11,
1281,
62,
33678,
... | 2.439962 | 1,066 |
import re
from types import GeneratorType as generator
#This class saves synonyms of a specific compound, useful to know which synonyms are the most common.
# This way, matches start by the most common synonyms, instead of less common synonyms.
if __name__ == '__main__':
syn1 = Synonyms({'a', 'b'},'Compound'... | [
198,
11748,
302,
198,
6738,
3858,
1330,
35986,
6030,
355,
17301,
198,
198,
2,
1212,
1398,
16031,
6171,
43612,
286,
257,
2176,
13061,
11,
4465,
284,
760,
543,
6171,
43612,
389,
262,
749,
2219,
13,
198,
2,
770,
835,
11,
7466,
923,
416... | 3.346535 | 101 |
import sys
sys.path.insert(0,'../')
import pprint
from ttr import ttr
# test_ttr_load_template_method_load_content_inline()
def test_ttr_base_to_dir_templates_loader():
"""
gen.load_templates will fallback on using base template loader, which in turn will
fallback on using file template loader due to or... | [
11748,
25064,
198,
17597,
13,
6978,
13,
28463,
7,
15,
4032,
40720,
11537,
198,
11748,
279,
4798,
198,
198,
6738,
256,
2213,
1330,
256,
2213,
198,
198,
2,
1332,
62,
926,
81,
62,
2220,
62,
28243,
62,
24396,
62,
2220,
62,
11299,
62,
... | 1.444816 | 2,691 |
hwnames = (
"B-1000-1",
"E-8Di8Ro-1",
"E-14Ro-1",
"E-16Di-1",
"E-8Di8Ro-1_P-11DiMb485",
"E-14Ro-1_P-11DiR485-1",
"E-16Di-1_P-11DiR485-1",
"E-14Ro-1_U-14Ro-1",
"E-16Di-1_U-14Ro-1",
"E-14Ro-1_U-14Di-1",
"E-16Di-1_U-14Di-1",
"E-4Ai3Ao-1",
)
| [
198,
71,
675,
1047,
796,
357,
198,
220,
220,
220,
366,
33,
12,
12825,
12,
16,
1600,
198,
220,
220,
220,
366,
36,
12,
23,
18683,
23,
15450,
12,
16,
1600,
198,
220,
220,
220,
366,
36,
12,
1415,
15450,
12,
16,
1600,
198,
220,
220... | 1.341121 | 214 |
from conans import ConanFile, tools
import os
| [
6738,
369,
504,
1330,
31634,
8979,
11,
4899,
198,
11748,
28686,
628,
198
] | 3.692308 | 13 |
import json
import locale
import os
import re
import traceback
import datetime
from web import app
from web.actions import worker as w
from common.config.globals import CURRENCY_SYMBOLS
from common.utils import converters
# Treat *.plot files smaller than this as in-transit (copying) so don't count them
MINIMUM_K32_... | [
11748,
33918,
198,
11748,
36693,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
12854,
1891,
198,
198,
11748,
4818,
8079,
198,
198,
6738,
3992,
1330,
598,
198,
6738,
3992,
13,
4658,
1330,
8383,
355,
266,
198,
6738,
2219,
13,
11250,
13,... | 3.111732 | 179 |
import sys
import binascii
import codecs
if __name__ == '__main__':
if len(sys.argv) != 2:
print('usage example:')
print(' python remove_deflags.py flag.zip')
else:
print("ATTENTION: MAC OS CAN DIRECTLY UNCOMPRESS FAKE ENCODED ZIP FILE!")
para = sys.argv
removefade(para[1])
| [
11748,
25064,
198,
11748,
9874,
292,
979,
72,
198,
11748,
40481,
82,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
197,
361,
18896,
7,
17597,
13,
853,
85,
8,
14512,
362,
25,
198,
197,
197,
4798,
10786... | 2.487179 | 117 |
from datetime import datetime
from airflow.providers.apache.hive.hooks.hive import HiveServer2Hook
from pyhive import hive
from hooks.db.airflow_metastore_helper import AirflowMetaStoreHelper
from hooks.db.oracle_helper import OracleHelper
from hooks.hdfs.hdfs_helper import HdfsHelper
class HiveHelper(HiveServer2Ho... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
45771,
13,
15234,
4157,
13,
43073,
13,
71,
425,
13,
25480,
82,
13,
71,
425,
1330,
33235,
10697,
17,
39,
566,
198,
6738,
12972,
71,
425,
1330,
35881,
198,
198,
6738,
26569,
13,
9945... | 1.766181 | 1,236 |
#Python的多线程:
import threading ,time ,random
#在子线程中进行轮询操作
if __name__ == '__main__':
#打印主线程的名字
print("main tread name %s"%threading.current_thread().name)
#创建子线程
t =threading.Thread(target=loop,name="LoopThread")
t.start()
#执行其他的线程
t.join()
pass
"线程同步"
balance = 0
lock =threading.Lock()
t1 = threading.... | [
2,
37906,
21410,
13783,
248,
163,
118,
123,
163,
101,
233,
171,
120,
248,
628,
628,
198,
11748,
4704,
278,
837,
2435,
837,
25120,
198,
198,
2,
28839,
101,
36310,
163,
118,
123,
163,
101,
233,
40792,
32573,
249,
26193,
234,
164,
121,... | 0.876804 | 901 |
from django.test.testcases import TestCase
from dbfiles.models import DBFile
| [
6738,
42625,
14208,
13,
9288,
13,
9288,
33964,
1330,
6208,
20448,
198,
198,
6738,
20613,
16624,
13,
27530,
1330,
20137,
8979,
628
] | 3.590909 | 22 |
"""
Spaghetti <3
"""
from discord.ext import commands
import discord
import locale
from requests import get
from datetime import datetime
from cogs.utils import Defaults
locale.setlocale(locale.LC_ALL, '')
| [
37811,
198,
4561,
35812,
1279,
18,
198,
37811,
628,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
11748,
36446,
198,
198,
11748,
36693,
198,
198,
6738,
7007,
1330,
651,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
269,
18463,... | 3.257576 | 66 |
import time
from typing import List, Optional, Tuple, Union
from lightly.openapi_generated.swagger_client.models.datasource_config import DatasourceConfig
from lightly.openapi_generated.swagger_client.models.datasource_purpose import DatasourcePurpose
from lightly.openapi_generated.swagger_client.models.datasource_pro... | [
11748,
640,
198,
6738,
19720,
1330,
7343,
11,
32233,
11,
309,
29291,
11,
4479,
198,
198,
6738,
15376,
13,
9654,
15042,
62,
27568,
13,
2032,
7928,
62,
16366,
13,
27530,
13,
19608,
292,
1668,
62,
11250,
1330,
16092,
292,
1668,
16934,
19... | 3.61086 | 221 |
import asyncio
import logging
import os
import sys
from io import StringIO
from meltano.core.db import project_engine
from meltano.core.elt_context import ELTContext
from meltano.core.error import SubprocessError
from meltano.core.logging import capture_subprocess_output
from meltano.core.plugin import PluginType
from... | [
11748,
30351,
952,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
6738,
33245,
1330,
10903,
9399,
198,
198,
6738,
16867,
5733,
13,
7295,
13,
9945,
1330,
1628,
62,
18392,
198,
6738,
16867,
5733,
13,
7295,
13,
2120,
62,
228... | 3.756303 | 119 |
white = (255, 255, 255)
black = (0, 0, 0)
red = (255, 0, 0)
light_red = (150, 0, 0)
blue = (106, 133, 164)
pink = (171, 54, 81)
lavender = (230, 230, 250)
gray = (55, 55, 55)
bg = (170, 202, 154)
| [
11186,
796,
357,
13381,
11,
14280,
11,
14280,
8,
198,
13424,
796,
357,
15,
11,
657,
11,
657,
8,
198,
445,
796,
357,
13381,
11,
657,
11,
657,
8,
198,
2971,
62,
445,
796,
357,
8628,
11,
657,
11,
657,
8,
198,
17585,
796,
357,
158... | 2.085106 | 94 |
# coding=utf-8
# Copyright 2022 The Trax 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 applicable law or a... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
33160,
383,
4759,
87,
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,
... | 2.814437 | 13,521 |
"""
PureExpressions detects functions without side-effects.
"""
from pythran.analyses.aliases import Aliases
from pythran.analyses.argument_effects import ArgumentEffects
from pythran.analyses.global_effects import GlobalEffects
from pythran.passmanager import ModuleAnalysis
from pythran.intrinsic import Intrinsic
im... | [
37811,
198,
49548,
38839,
507,
39382,
5499,
1231,
1735,
12,
34435,
13,
198,
37811,
198,
198,
6738,
279,
5272,
2596,
13,
272,
43710,
13,
7344,
1386,
1330,
12104,
1386,
198,
6738,
279,
5272,
2596,
13,
272,
43710,
13,
49140,
62,
34435,
1... | 3.584746 | 118 |
from timer.helper.time_fractions import TimeFractions
from mock_data.time_fractions import random_minutes_as_ns
| [
6738,
19781,
13,
2978,
525,
13,
2435,
62,
69,
37810,
1330,
3862,
37,
37810,
198,
6738,
15290,
62,
7890,
13,
2435,
62,
69,
37810,
1330,
4738,
62,
1084,
1769,
62,
292,
62,
5907,
198
] | 3.294118 | 34 |
import sys
from collections import defaultdict
if __name__ == '__main__':
N, M, K = map(int, sys.stdin.readline().split())
board = [[5] * N for _ in range(N)]
A = [[int(x) for x in sys.stdin.readline().split()] for _ in range(N)]
tree_count = 0
tree_dict = defaultdict(lambda :[])
for _ in ran... | [
11748,
25064,
198,
6738,
17268,
1330,
4277,
11600,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
399,
11,
337,
11,
509,
796,
3975,
7,
600,
11,
25064,
13,
19282,
259,
13,
961,
1370,
22446,
35... | 2.312796 | 211 |
"""Config is a Pythonesque wrapper around a yices2 ctx_config_t object. Used to configure Contexts."""
import yices_api as yapi
from .YicesException import YicesException
| [
37811,
16934,
318,
257,
48657,
1952,
4188,
29908,
1088,
257,
331,
1063,
17,
269,
17602,
62,
11250,
62,
83,
2134,
13,
16718,
284,
17425,
30532,
82,
526,
15931,
198,
11748,
331,
1063,
62,
15042,
355,
331,
15042,
198,
198,
6738,
764,
56,... | 3.510204 | 49 |
# -*- coding: utf-8 -*-
"""
ReportCapableInterfaces for masks tools
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from niworkflows.nipype.interfaces import fsl, ants
from niworkflows.nipype.interfaces.base import (
File, BaseInterfaceInputSpec, traits, isdefined... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
19100,
15610,
540,
9492,
32186,
329,
20680,
4899,
198,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
280... | 3.107317 | 205 |
class OutOfBoundsCoordinates(ValueError):
"""Error used for when coordinates are out of bounds"""
| [
4871,
3806,
5189,
33,
3733,
7222,
585,
17540,
7,
11395,
12331,
2599,
198,
220,
220,
220,
37227,
12331,
973,
329,
618,
22715,
389,
503,
286,
22303,
37811,
198
] | 3.642857 | 28 |
"""Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
"""
if __name__ == '__main__':
grid = [['1', '1', '0'... | [
37811,
15056,
257,
362,
67,
10706,
3975,
286,
705,
16,
338,
357,
1044,
8,
290,
705,
15,
338,
357,
7050,
828,
954,
262,
1271,
286,
14807,
13,
1052,
7022,
318,
11191,
416,
1660,
290,
318,
7042,
416,
14320,
15909,
8604,
36774,
393,
316... | 2.37037 | 216 |
print('=' * 33)
print(' ' * 5, '10 TERMOS DE UMA PA', ' ' * 5)
print('=' * 33)
primeiro_termo = int(input('Primeiro Termo: '))
razao = int(input('Razão: '))
termo_geral = 0
termo = 0
for contagem in range(1, 11):
termo = primeiro_termo + (contagem - 1) * razao
print(termo, '-> ', end='')
print('ACABOU')
| [
4798,
10786,
11639,
1635,
4747,
8,
198,
4798,
10786,
705,
1635,
642,
11,
705,
940,
28994,
44,
2640,
5550,
471,
5673,
8147,
3256,
705,
705,
1635,
642,
8,
198,
4798,
10786,
11639,
1635,
4747,
8,
198,
198,
35505,
7058,
62,
4354,
78,
79... | 2.25 | 140 |
"""
Django settings for farmservice project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
... | [
37811,
201,
198,
35,
73,
14208,
6460,
329,
15893,
712,
501,
1628,
13,
201,
198,
201,
198,
8645,
515,
416,
705,
28241,
14208,
12,
28482,
923,
16302,
6,
1262,
37770,
362,
13,
17,
13,
201,
198,
201,
198,
1890,
517,
1321,
319,
428,
23... | 2.143328 | 2,428 |
### This script calculates the flux of mass and tracer through the 4 boundaries of the domain as an advective flux.
### o-KRM-o
# o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
from math import *
import matplotlib.pyplot as plt
impor... | [
21017,
770,
4226,
43707,
262,
28462,
286,
2347,
290,
491,
11736,
832,
262,
604,
13215,
286,
262,
7386,
355,
281,
512,
303,
14070,
28462,
13,
198,
21017,
267,
12,
42,
29138,
12,
78,
198,
198,
2,
267,
12,
78,
12,
78,
12,
78,
12,
7... | 2.654545 | 2,420 |
__author__ = 'droid'
if __name__ == '__main__':
print caller.calc(1,2)
print caller().output
new = caller()
new.output = 4
print new.output
| [
834,
9800,
834,
796,
705,
67,
3882,
6,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
628,
220,
220,
220,
3601,
24955,
13,
9948,
66,
7,
16,
11,
17,
8,
198,
220,
220,
220,
3601,
24955,
22446,
22915,
628,
220,
... | 2.411765 | 68 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##################################################################################################
# Routine to download in a systematically way the CORDEX data from
# https://esgf-data.dkrz.de/search/cordex-dkrz/
#
# @author: Ana Aguilar - ana.aguilar@mailbox.tu-dresden... | [
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,
29113,
29113,
29113,
2235,
198,
2,
371,
28399,
284,
4321,
287,
257,
25735,
835,
262,
327,
12532,
6369,
1366,
... | 2.639835 | 1,938 |
import datetime
| [
11748,
4818,
8079,
628
] | 4.25 | 4 |
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
from matplotlib.backend_bases import key_press_handler
from matplotlib.figure import Figure
from tkinter.ttk import *
from tkinter import *
import matplotlib.pyplot as plt
import numpy as np
import matplotlib
import itertools
... | [
6738,
2603,
29487,
8019,
13,
1891,
2412,
13,
1891,
437,
62,
30488,
9460,
1330,
11291,
6090,
11017,
51,
74,
46384,
11,
42115,
25391,
5657,
17,
51,
74,
201,
198,
6738,
2603,
29487,
8019,
13,
1891,
437,
62,
65,
1386,
1330,
1994,
62,
84... | 2.62069 | 174 |
from flask import request
from app import app
from app.db import postgre
from app import utils
from app.utils import wrappers, session, const, crossdomain, logger
logger = logger.Logger(__name__)
@app.route('/api/blunder/get', methods = ['POST'])
@wrappers.nullable()
@app.route('/api/mobile/blunder/get', methods = ... | [
6738,
42903,
1330,
2581,
198,
198,
6738,
598,
1330,
598,
198,
6738,
598,
13,
9945,
1330,
1281,
16694,
198,
6738,
598,
1330,
3384,
4487,
198,
6738,
598,
13,
26791,
1330,
7917,
11799,
11,
6246,
11,
1500,
11,
3272,
27830,
11,
49706,
198,... | 2.969466 | 131 |
# -*- coding: utf-8 -*-
'''
This module contains the function calls to execute command line scripts
'''
# Import python libs
from __future__ import absolute_import, print_function
import os
import sys
import time
import signal
import logging
import functools
import threading
import traceback
import signal
import funct... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
1212,
8265,
4909,
262,
2163,
3848,
284,
12260,
3141,
1627,
14750,
198,
7061,
6,
198,
198,
2,
17267,
21015,
9195,
82,
198,
6738,
11593,
37443,
834,
1330,
... | 2.257945 | 5,916 |
from loguru import logger
from rich import print
from rich.table import Table
from mdutils.mdutils import MdUtils
import semanticscholar as sch
from myterial import pink, blue_light
'''
Searches google scholar for papers using brainglobe's tools
'''
AUTHORS = (
'34308754', # Federico Claudi
'3853277', ... | [
6738,
2604,
14717,
1330,
49706,
198,
6738,
5527,
1330,
3601,
198,
6738,
5527,
13,
11487,
1330,
8655,
198,
6738,
45243,
26791,
13,
9132,
26791,
1330,
39762,
18274,
4487,
198,
198,
11748,
33815,
354,
6192,
355,
5513,
628,
198,
6738,
616,
... | 2.38721 | 2,846 |
from rest_framework import serializers
from .models import Product | [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
764,
27530,
1330,
8721
] | 5.076923 | 13 |
"""Configuration via UI for the integration."""
from __future__ import annotations
from datetime import datetime
from typing import Optional, Dict, Any
from homeassistant import config_entries
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from .... | [
37811,
38149,
2884,
12454,
329,
262,
11812,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
19720,
1330,
32233,
11,
360,
713,
11,
4377,
198,
198,
6738,
1363,
562,
10167,
13... | 1.98958 | 2,975 |
#!/usr/bin/python2
import os
import glob
import numpy as np
import cv2
import time
from tqdm import tqdm
img_list = glob.glob("pi/data/combined/*.png")
total_labels = 3
t = cv2.cvtColor(cv2.imread(img_list[0]), cv2.COLOR_RGB2GRAY)
dims = t.shape
inputs = dims[0]*dims[1]
label = np.identity(total_labels)
frames = ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
17,
198,
11748,
28686,
198,
11748,
15095,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
11748,
640,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
9600,
62,
4868,
796,
... | 2.257453 | 369 |
import time
import lightly
lightly.api.utils.RETRY_MAX_RETRIES = 1
from lightly.api.download import download_image
url_33MB = "https://cdn.eso.org/images/original/potw1130a.tif"
url_5MB = "https://cdn.eso.org/images/large/potw1130a.jpg"
url_1_5MB = "https://cdn.eso.org/images/publicationjpg/potw1130a.jpg"
start = t... | [
11748,
640,
198,
198,
11748,
15376,
198,
30945,
13,
15042,
13,
26791,
13,
2200,
40405,
62,
22921,
62,
2200,
5446,
11015,
796,
352,
198,
198,
6738,
15376,
13,
15042,
13,
15002,
1330,
4321,
62,
9060,
198,
198,
6371,
62,
2091,
10744,
796... | 2.477273 | 176 |
from py_2_and_3_compatibility import *
from pyradioconfig.calculator_model_framework.Utils.LogMgr import LogMgr
| [
198,
6738,
12972,
62,
17,
62,
392,
62,
18,
62,
5589,
25901,
1330,
1635,
198,
6738,
279,
2417,
9189,
36221,
5647,
13,
9948,
3129,
1352,
62,
19849,
62,
30604,
13,
18274,
4487,
13,
11187,
44,
2164,
1330,
5972,
44,
2164,
198
] | 2.756098 | 41 |
import uuid
from django import forms
from django.conf import settings
from django.core.mail import send_mail
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.utils.transl... | [
11748,
334,
27112,
198,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
7295,
13,
4529,
1330,
3758,
62,
4529,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530... | 3.47482 | 139 |