content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
#์ํ ์ ์๋ฅผ ์
๋ ฅ๋ฐ์ 90 ~ 100์ ์ A, 80 ~ 89์ ์ B, 70 ~ 79์ ์ C, 60 ~ 69์ ์ D, ๋๋จธ์ง ์ ์๋ F๋ฅผ ์ถ๋ ฅํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
grade = int(input())
if(90 <= grade and grade <= 100) : print("A")
elif(80 <= grade and grade <= 89) : print("B")
elif(70 <= grade and grade <= 79) : print("C")
elif(60 <= grade and grade <= 69) : print("D")
else : print("F") | [
2,
168,
233,
250,
169,
245,
246,
23821,
254,
238,
168,
230,
246,
167,
98,
120,
23821,
252,
227,
167,
254,
98,
167,
108,
249,
168,
243,
226,
4101,
5299,
1802,
168,
254,
238,
35975,
222,
317,
11,
4019,
5299,
9919,
168,
254,
238,
3... | 1.509434 | 212 |
import torch
| [
11748,
28034,
220,
628
] | 3.75 | 4 |
#!/usr/bin/env python
# coding=utf-8
"""Forms Test."""
import json
import random
try:
from unittest.mock import MagicMock
except ImportError:
from mock import MagicMock # noqa
from django import forms, setup
from django.utils.timezone import now
from django.test import TestCase
from django_nghelp.forms impor... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
28,
40477,
12,
23,
198,
198,
37811,
8479,
82,
6208,
526,
15931,
198,
198,
11748,
33918,
198,
11748,
4738,
198,
28311,
25,
198,
220,
220,
220,
422,
555,
715,
395,
13,
76,
... | 2.077238 | 3,664 |
import hello
| [
11748,
23748,
628,
198
] | 3.75 | 4 |
import os
import gzip
import anndata
import shutil
| [
11748,
28686,
198,
11748,
308,
13344,
198,
11748,
281,
358,
1045,
198,
11748,
4423,
346,
628
] | 3.25 | 16 |
import numpy as np
import pandas as pd
| [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198
] | 3 | 13 |
import time
from typing import Optional, Union
import torch
import torch_geometric.transforms as T
from torch import Tensor
from torch.utils.data import DataLoader
from torch_geometric.data import Data
from torch_geometric.loader import ClusterLoader as ClusterL, NeighborLoader as NeighborL, \
GraphSAINTRandomWalk... | [
11748,
640,
198,
6738,
19720,
1330,
32233,
11,
4479,
198,
198,
11748,
28034,
198,
11748,
28034,
62,
469,
16996,
13,
7645,
23914,
355,
309,
198,
6738,
28034,
1330,
309,
22854,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198... | 3.276498 | 217 |
class ConfigNamespace(object):
"""Abstract class representing the interface of Config objects.
A ConfigNamespace is a collection of names mapped to values, where
the values may be nested namespaces. Values can be accessed via
container notation - obj[key] - or via dotted notation - obj.key.
Both t... | [
4871,
17056,
36690,
10223,
7,
15252,
2599,
198,
220,
220,
220,
37227,
23839,
1398,
10200,
262,
7071,
286,
17056,
5563,
13,
628,
220,
220,
220,
317,
17056,
36690,
10223,
318,
257,
4947,
286,
3891,
27661,
284,
3815,
11,
810,
198,
220,
2... | 2.784113 | 1,561 |
from lib import app
| [
6738,
9195,
1330,
598,
628
] | 4.2 | 5 |
# -*- coding: utf-8 -*-
"""CUBI+Snakemake wrapper code for bcftools stats: Snakemake wrapper.py
"""
from snakemake import shell
__author__ = "Clemens Messerschmidt"
shell(
r"""
set -x
export TMPDIR=$(mktemp -d)
trap "rm -rf $TMPDIR" EXIT
# Also pipe stderr to log file
if [[ -n "{snakemake.log}" ]]; then
if... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
43633,
3483,
10,
49795,
15883,
29908,
2438,
329,
47125,
701,
10141,
9756,
25,
16705,
15883,
29908,
13,
9078,
198,
37811,
198,
198,
6738,
17522,
15883,
1330,
7582,
1... | 2.178922 | 408 |
import logging
from tkinter import StringVar, BooleanVar, TkVersion
from hoverset.ui.icons import get_icon_image
from hoverset.ui.widgets import Frame, Label, Button, MenuButton
from hoverset.ui.menu import EnableIf
from studio.ui.geometry import absolute_position
from studio.ui.widgets import SearchBar
from studio.pr... | [
11748,
18931,
198,
6738,
256,
74,
3849,
1330,
10903,
19852,
11,
41146,
19852,
11,
309,
74,
14815,
198,
198,
6738,
8169,
690,
316,
13,
9019,
13,
34280,
1330,
651,
62,
4749,
62,
9060,
198,
6738,
8169,
690,
316,
13,
9019,
13,
28029,
11... | 3.551402 | 107 |
import datetime
import os
import logging
from requests.exceptions import HTTPError
from unittest import mock
from airq.lib.purpleair import PURPLEAIR_DATA_API_URL
from airq.lib.purpleair import PURPLEAIR_SENSORS_API_URL
from airq.models.cities import City
from airq.models.clients import Client
from airq.models.client... | [
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
18931,
198,
198,
6738,
7007,
13,
1069,
11755,
1330,
14626,
12331,
198,
6738,
555,
715,
395,
1330,
15290,
198,
198,
6738,
1633,
80,
13,
8019,
13,
14225,
1154,
958,
1330,
33079,
16437,
421... | 3.325 | 240 |
import dataclasses
import unittest
import pytest
from netdisc.tools import pandor
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
included = Included()
excluded = Excluded()
stupid_tree_1 = """
(ip_address = "10.20.30.40" and ip_address != "potato"
and
... | [
11748,
4818,
330,
28958,
201,
198,
11748,
555,
715,
395,
201,
198,
201,
198,
11748,
12972,
9288,
201,
198,
6738,
2010,
15410,
13,
31391,
1330,
19798,
273,
201,
198,
201,
198,
201,
198,
31,
19608,
330,
28958,
13,
19608,
330,
31172,
201... | 1.838851 | 2,960 |
from __future__ import print_function
import argparse
import os
import random
import torch.backends.cudnn as cudnn
import torch.utils.data
import torchvision.transforms as transforms
from dataset import HDF5Dataset
import dcgan
import utils
parser = argparse.ArgumentParser()
parser.add_argument('--dataset', default='... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
28034,
13,
1891,
2412,
13,
66,
463,
20471,
355,
269,
463,
20471,
198,
11748,
28034,
13,
26791,
13,
7890,
198,
11748... | 1.997242 | 1,813 |
from mediator import Mediator
| [
6738,
16957,
1352,
1330,
2019,
38585,
628
] | 4.428571 | 7 |
# -*- coding: utf-8 -*-
"""
ๆน้ๆฅ่ฏขๆไปถไฟกๆฏ
https://developer.qiniu.com/kodo/api/1250/batch
"""
from qiniu import build_batch_stat, Auth, BucketManager
access_key = ''
secret_key = ''
q = Auth(access_key, secret_key)
bucket = BucketManager(q)
bucket_name = ''
# ้่ฆๆฅ่ฏข็ๆไปถๅ
keys = ['1.gif', '2.txt', '3.png', '4.html']
o... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
33699,
117,
34932,
237,
162,
253,
98,
46237,
95,
23877,
229,
20015,
114,
46479,
94,
162,
223,
107,
198,
198,
5450,
1378,
16244,
263,
13,
80,
5362,
84,
13,
... | 2.035354 | 198 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import random
from person import Person
from gameConfig import global_arr
class Enemy(Person): # inherit class of Person
# This Class is making Enemy randomly
''' remove enemy from previous random position'''
''' make the enemy in current random position '''
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
4738,
198,
6738,
1048,
1330,
7755,
198,
6738,
983,
16934,
1330,
3298,
62,
3258,
628,
198,
4871,
21785,
7,
15439,
2599,
... | 3.442308 | 104 |
#!/usr/bin/env python
from __future__ import print_function
import os
import sys
import csv
import numpy as np
import math
import random
from collections import defaultdict
sys.path.append( '%s/../prog_common' % os.path.dirname(os.path.realpath(__file__)) )
from cmd_args import cmd_args
from prog_util import prod, ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
628,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
269,
21370,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
11748,
... | 3.011905 | 168 |
from django.utils.safestring import mark_safe
| [
6738,
42625,
14208,
13,
26791,
13,
49585,
395,
1806,
1330,
1317,
62,
21230,
628
] | 3.357143 | 14 |
num1=1
num2=2
num3=3
num4=40
| [
22510,
16,
28,
16,
198,
22510,
17,
28,
17,
198,
22510,
18,
28,
18,
198,
22510,
19,
28,
1821,
198
] | 1.45 | 20 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
34,
8,
2177,
3012,
198,
2,
22961,
3611,
5094,
13789,
410,
18,
13,
15,
10,
357,
3826,
27975,
45761,
... | 2.065281 | 13,909 |
import json
import pathlib
import os
import warnings
import hashlib
import PIL.Image
import yaml
import imagehash
from .species_utils import get_eppo_singleton
EPPO_PATH = "_eppo_xmlfull.zip"
def set_licenses(coco, metadata=None):
"""Set the license for each image to be that from the metadata"""
if metada... | [
11748,
33918,
198,
11748,
3108,
8019,
198,
11748,
28686,
198,
11748,
14601,
198,
11748,
12234,
8019,
198,
198,
11748,
350,
4146,
13,
5159,
198,
11748,
331,
43695,
198,
11748,
2939,
17831,
198,
198,
6738,
764,
35448,
62,
26791,
1330,
651,
... | 2.506184 | 1,132 |
from string import punctuation
PUNCTUATION_TRANS = str.maketrans(dict.fromkeys(punctuation))
FILE_TIMESTAMP_FORMAT = '%Y%b%d-%H_%M_%S'
CONSOLE_TIMESTAMP_FORMAT = '%I:%M %p:'
| [
6738,
4731,
1330,
21025,
2288,
628,
198,
47,
4944,
4177,
52,
6234,
62,
5446,
15037,
796,
965,
13,
76,
461,
21879,
504,
7,
11600,
13,
6738,
13083,
7,
79,
16260,
2288,
4008,
198,
25664,
62,
51,
3955,
6465,
23518,
62,
21389,
1404,
796,... | 2.120482 | 83 |
"""Django settings for djangoreactredux project."""
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) # remove /sswmain/settings to get base folder
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ajsdgas7&*kosdsa21[]jaksdhlka-;kmcv8l$#diepsm8&ah^'
DEB... | [
37811,
35,
73,
14208,
6460,
329,
42625,
648,
382,
529,
445,
2821,
1628,
526,
15931,
198,
198,
11748,
28686,
198,
198,
33,
11159,
62,
34720,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
... | 2.310288 | 1,215 |
import ntpath
import os
import posixpath
from contextlib import contextmanager
from unittest import mock, TestCase
from . import mock_open_data
from mopack.placeholder import placeholder
from mopack.path import Path
from mopack.shell import ShellArguments
from mopack.types import *
from mopack.yaml_tools import load_... | [
11748,
299,
83,
6978,
198,
11748,
28686,
198,
11748,
1426,
844,
6978,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
6738,
555,
715,
395,
1330,
15290,
11,
6208,
20448,
198,
198,
6738,
764,
1330,
15290,
62,
9654,
62,
7890,
198,
198,
67... | 3.318182 | 110 |
from setuptools import setup
from codecs import open
from os import path
if __name__ == '__main__':
# Get directory of this setup.py
this_dir = path.abspath(path.dirname(__file__))
# Read the text of README.rst and let that be the long_description
with open(path.join(this_dir,'README.rst')) as rme_fp:... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
6738,
40481,
82,
1330,
1280,
198,
6738,
28686,
1330,
3108,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
628,
220,
220,
220,
1303,
3497,
8619,
286,
428,
9058,
13,
9078,
1... | 2.33195 | 482 |
'''
camera.py
ancilla
Created by Kevin Musselman (kevin@frenzylabs.com) on 01/08/20
Copyright 2019 FrenzyLabs, LLC.
'''
import logging
import time
import os
import json
import string, random
from ....data.models import Camera as CameraModel, CameraRecording
from .driver import CameraConnector
from ...tasks.ca... | [
7061,
6,
198,
4676,
13,
9078,
198,
281,
66,
5049,
628,
15622,
416,
7939,
2629,
741,
805,
357,
365,
7114,
31,
69,
918,
89,
2645,
8937,
13,
785,
8,
319,
5534,
14,
2919,
14,
1238,
198,
15069,
13130,
48522,
43,
8937,
11,
11419,
13,
... | 3.683673 | 196 |
import time
import cv2
import os
import sqlite3
import pandas as pd
import matplotlib.pyplot as plt
import copy
import random
import numpy as np
import seaborn as sns
import csv
import pandas as pd
import argparse
import threading
from IPython.display import HTML
from PIL import Image
parser = argparse.ArgumentParser... | [
11748,
640,
198,
11748,
269,
85,
17,
198,
11748,
28686,
198,
11748,
44161,
578,
18,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
4866,
198,
11748,
4738,
198,
11748,
29... | 2.863889 | 360 |
#
# -*- coding: utf-8 -*-
#
# @Author: Arrack
# @Date: 2020-05-27 16:02:25
# @Last modified by: Arrack
# @Last Modified time: 2020-06-10 14:53:29
#
from faker import Faker
from app.extensions import db
from app.models import Article, Category, Tag, Talk, User, ArticleTag
| [
2,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
2488,
13838,
25,
943,
39638,
198,
2,
2488,
10430,
25,
220,
220,
12131,
12,
2713,
12,
1983,
1467,
25,
2999,
25,
1495,
198,
2,
2488,
5956,
9518,
4... | 2.607477 | 107 |
# -*- coding: utf-8 -*-
__version__ = '0.3.0'
from .handler import LogglyHandler, LogglyBulkHandler
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
834,
9641,
834,
796,
705,
15,
13,
18,
13,
15,
6,
198,
198,
6738,
764,
30281,
1330,
5972,
10853,
25060,
11,
5972,
10853,
33,
12171,
25060,
198
] | 2.428571 | 42 |
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import cv2
import numpy as np
from SFD.bbox import nms, decode
torch.backends.cudnn.bencmark = True
def output(net, im_path):
"""Output detection results of faces"""
img = cv2.imread(im_path)
bboxlist = detect(net, img)
... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
14362,
35,
13,
65,
3524,
1330,
299,
907,... | 2.127517 | 298 |
""" Financial Modeling Prep Model"""
__docformat__ = "numpy"
from datetime import datetime
import FundamentalAnalysis as fa # Financial Modeling Prep
import numpy as np
import pandas as pd
import valinvest
from gamestonk_terminal import config_terminal as cfg
from gamestonk_terminal.helper_funcs import long_number_fo... | [
37811,
11302,
9104,
278,
19141,
9104,
37811,
198,
834,
15390,
18982,
834,
796,
366,
77,
32152,
1,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
11748,
49983,
32750,
355,
24685,
220,
1303,
11302,
9104,
278,
19141,
198,
11748,
299,
3... | 2.33652 | 3,557 |
from os import listdir
import csv
import math
code_lines = {}
files_count = 0
for f in listdir("gists_files_cloc_analysis_result"):
with open("gists_files_cloc_analysis_result/"+f, 'rb') as csvfile:
lines = csv.reader(csvfile)
header = lines.next()
num_code = 0
for line in lines:
files_count += 1
num_co... | [
6738,
28686,
1330,
1351,
15908,
198,
11748,
269,
21370,
198,
11748,
10688,
198,
198,
8189,
62,
6615,
796,
23884,
198,
16624,
62,
9127,
796,
657,
198,
1640,
277,
287,
1351,
15908,
7203,
70,
1023,
62,
16624,
62,
565,
420,
62,
20930,
62,... | 2.398577 | 562 |
# -*- coding: utf-8 -*-
# !/usr/bin/env python
import pymysql
import phpserialize
import config
import os
db=WordpressNggDb() | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
5145,
14,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
279,
4948,
893,
13976,
198,
11748,
872,
862,
48499,
1096,
198,
11748,
4566,
198,
11748,
28686,
628,
628,... | 2.45283 | 53 |
import telnetlib
import time
if __name__ == "__main__":
with CiscoTelnet("192.168.100.1", "cisco", "cisco", "cisco") as r1:
print(r1.send_show_command("sh ip int br"))
raise ValueError
| [
11748,
13632,
3262,
8019,
198,
11748,
640,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
351,
28289,
33317,
3262,
7203,
17477,
13,
14656,
13,
3064,
13,
16,
1600,
366,
66,
4861,
1600,
366,
... | 2.337079 | 89 |
from ..resnet import ResNet
from torch import nn
import torch.nn.functional as F
| [
6738,
11485,
411,
3262,
1330,
1874,
7934,
198,
6738,
28034,
1330,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
628
] | 3.565217 | 23 |
from cartodb_services.google.geocoder import GoogleMapsGeocoder
from cartodb_services.google.bulk_geocoder import GoogleMapsBulkGeocoder
| [
6738,
6383,
375,
65,
62,
30416,
13,
13297,
13,
469,
420,
12342,
1330,
3012,
47010,
10082,
420,
12342,
198,
6738,
6383,
375,
65,
62,
30416,
13,
13297,
13,
65,
12171,
62,
469,
420,
12342,
1330,
3012,
47010,
33,
12171,
10082,
420,
12342,... | 3.186047 | 43 |
from ctypes import cdll, c_char, addressof
from ctypes import c_char_p, CFUNCTYPE, c_int, c_char, addressof, c_ulong
import pathlib as pl
import os
def get_project_root() -> pl.Path:
"""Returns project root folder."""
return pl.Path(__file__).parent.parent
###############################
# global memory ... | [
6738,
269,
19199,
1330,
269,
12736,
11,
269,
62,
10641,
11,
751,
33852,
69,
198,
6738,
269,
19199,
1330,
269,
62,
10641,
62,
79,
11,
18551,
4944,
4177,
56,
11401,
11,
269,
62,
600,
11,
269,
62,
10641,
11,
751,
33852,
69,
11,
269,
... | 2.680253 | 1,742 |
from django.db import models
from django.test import TestCase
from django.db.utils import DatabaseError
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
9945,
13,
26791,
1330,
24047,
12331,
198
] | 3.714286 | 28 |
#!/usr/bin/env python
"""JitPlot converts the files that HiJitReg creates and displays
a plot which represents them.
"""
# Copyright 2004-2020, Arizona Board of Regents on behalf of the Lunar and
# Planetary Laboratory at the University of Arizona.
# - Orignal Java programs.
#
# Copyright 2020, Ross A. Beyer (rbeyer... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
41,
270,
43328,
26161,
262,
3696,
326,
15902,
41,
270,
8081,
8075,
290,
11298,
198,
64,
7110,
543,
6870,
606,
13,
198,
37811,
198,
198,
2,
15069,
5472,
12,
42334,
11,
7943,
59... | 3.347917 | 480 |
import numpy as np
import pylab
from scipy import stats
from sklearn.datasets.samples_generator import make_regression
pylab.subplot(211)
x, y = make_regression(n_samples=100, n_features=1, n_informative=1, random_state=0, noise=35)
pylab.plot(x, y, 'o')
print('x.shape = {} y.shape = {}'.format(x.shape, y.s... | [
11748,
299,
32152,
355,
45941,
198,
11748,
279,
2645,
397,
198,
6738,
629,
541,
88,
1330,
9756,
198,
6738,
1341,
35720,
13,
19608,
292,
1039,
13,
82,
12629,
62,
8612,
1352,
1330,
787,
62,
2301,
2234,
628,
628,
628,
628,
628,
198,
79... | 2.404255 | 376 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from large_app import app
app.run(debug=True)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
1588,
62,
1324,
1330,
598,
198,
1324,
13,
5143,
7,
24442,
28,
17821,
8,
198
] | 2.325 | 40 |
from math import log as ln
K = 100
M = 100
while K >= 10 and M >= 12:
K = int(input('ะะฒะตะดะธัะต ะบะพะปะธัะตััะฒะพ ััะพะปะฑัะพะฒ ะผะฐััะธัั (ะฝะต ะฑะพะปััะต 10):\t'))
M = int(input('ะะฒะตะดะธัะต ะบะพะปะธัะตััะฒะพ ัััะพะบ ะผะฐััะธัั (ะฝะต ะฑะพะปััะต 12):\t'))
max_ind = None
min_ind = None
if K <= 10 and M <= 12:
F = []
... | [
6738,
10688,
1330,
2604,
355,
300,
77,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
42,
796,
1802,
201,
198,
44,
796,
1802,
201,
198,
4514,
509,
18189,
838,
290,
337,
18189,
1105,
25,
201,
198,
220,
220,
220,
509,
... | 1.439394 | 330 |
print('{}\n {:^25}\n {}\n'.format('='*25, '10 TERMOS DE UMA PA', '='*25), end=' ')
primeiro = int(input('Primeiro Termo: '))
razao = int(input(' Razรฃo: '))
acumulador = 0
for c in range(0, 10):
print(primeiro + acumulador, '=> ', end='')
acumulador += razao
print('ACABOU')
| [
4798,
10786,
90,
32239,
77,
46110,
61,
1495,
32239,
77,
23884,
59,
77,
4458,
18982,
10786,
11639,
9,
1495,
11,
705,
940,
28994,
44,
2640,
5550,
471,
5673,
8147,
3256,
705,
11639,
9,
1495,
828,
886,
11639,
705,
8,
198,
35505,
7058,
7... | 2.256 | 125 |
import vlc
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gio
if __name__ == '__main__':
# window & its main loop
win = MyWindow()
win.show_all()
Gtk.main()
| [
11748,
410,
44601,
198,
11748,
308,
72,
198,
198,
12397,
13,
46115,
62,
9641,
7203,
38,
30488,
1600,
366,
18,
13,
15,
4943,
198,
6738,
308,
72,
13,
260,
1930,
37765,
1330,
402,
30488,
11,
402,
952,
628,
198,
198,
361,
11593,
3672,
... | 2.292135 | 89 |
import os
import pytest
import numpy as np
import pandas as pd
from astropy import units as u
from astropy.time import Time
from ...utils import KERNELS_DE440
from ...utils import setupSPICE
from ...utils import getSPICEKernels
from ...testing import testOrbits
from ..state import shiftOrbitsOrigin
DATA_DIR = os.path... | [
11748,
28686,
198,
11748,
12972,
9288,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
6468,
28338,
1330,
4991,
355,
334,
198,
6738,
6468,
28338,
13,
2435,
1330,
3862,
198,
198,
6738,
2644,
26791,
13... | 2.373767 | 1,014 |
from cell_loaders import *
| [
6738,
2685,
62,
2220,
364,
1330,
1635,
198
] | 3.375 | 8 |
"""Common fixtures for the data api tests"""
import datetime
import io
import os
from unittest import mock
from uuid import uuid4
import pytest
from sqlalchemy import func
from quetzal.app.models import Family, Metadata, Workspace, WorkspaceState
@pytest.fixture(scope='function')
def make_workspace(db, db_session, ... | [
37811,
17227,
34609,
329,
262,
1366,
40391,
5254,
37811,
198,
11748,
4818,
8079,
198,
11748,
33245,
198,
11748,
28686,
198,
6738,
555,
715,
395,
1330,
15290,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
198,
11748,
12972,
9288,
198,
... | 2.625265 | 942 |
import config
import global_var
import global_funct
import random
import os
import scenes
import math
from colorama import init, Fore, Back, Style
import people
# self.clear()
# self.render() | [
11748,
4566,
198,
11748,
3298,
62,
7785,
198,
11748,
3298,
62,
12543,
310,
198,
11748,
4738,
198,
11748,
28686,
198,
11748,
8188,
198,
11748,
10688,
198,
6738,
3124,
1689,
1330,
2315,
11,
4558,
11,
5157,
11,
17738,
198,
11748,
661,
628,... | 3.119403 | 67 |
# Ryan Turner (turnerry@iro.umontreal.ca)
from __future__ import division, print_function
from builtins import range
from collections import OrderedDict
from string import ascii_letters
import numpy as np
import pandas as pd
import mlpaper.data_splitter as ds
from mlpaper.test_constants import MC_REPEATS_LARGE
... | [
2,
6047,
15406,
357,
15344,
6996,
31,
7058,
13,
388,
756,
5305,
13,
6888,
8,
198,
6738,
11593,
37443,
834,
1330,
7297,
11,
3601,
62,
8818,
198,
198,
6738,
3170,
1040,
1330,
2837,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
67... | 2.634259 | 216 |
class Validation(object):
""" Provides methods and attached properties that support data validation. """
@staticmethod
def AddErrorHandler(element, handler):
""" AddErrorHandler(element: DependencyObject,handler: EventHandler[ValidationErrorEventArgs]) """
pass
@staticmethod
... | [
4871,
3254,
24765,
7,
15252,
2599,
201,
198,
220,
220,
220,
37227,
47081,
5050,
290,
7223,
6608,
326,
1104,
1366,
21201,
13,
37227,
201,
198,
201,
198,
220,
220,
220,
2488,
12708,
24396,
201,
198,
220,
220,
220,
825,
3060,
12331,
2506... | 2.746846 | 2,378 |
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import copy
custom_data = np.load('Output/plotPoints_custom.npy')
opencv_data = np.load('Output/plotPoints_org.npy')
fig = plt.figure()
gs = plt.GridSpec(2, 3)
plt.legend(['Our Code', 'Built-In'])
plt.title('Compari... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
2603,
29487,
8019,
13,
11227,
341,
355,
11034,
198,
11748,
4866,
198,
198,
23144,
62,
7890,
796,
45941,
... | 2.381238 | 501 |
from flask import Flask, jsonify, request, Blueprint
import Schemas.depth_map_schema as DepthMapSchemata
from pprint import pprint
from .Misc import transform
from .Misc import vgg
from .Misc import utils
from .Misc import optimize
import numpy as np
import pdb, os
from PIL import Image, ImageFilter
from io import Byte... | [
6738,
42903,
1330,
46947,
11,
33918,
1958,
11,
2581,
11,
39932,
198,
11748,
1446,
4411,
292,
13,
18053,
62,
8899,
62,
15952,
2611,
355,
36350,
13912,
50,
15245,
1045,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
6738,
764,
44,
2304,
13... | 3.111969 | 259 |
s = input()
print(dfs(1, 0, 0))
| [
82,
796,
5128,
3419,
628,
198,
198,
4798,
7,
7568,
82,
7,
16,
11,
657,
11,
657,
4008,
198
] | 1.842105 | 19 |
"""
Get anomalies for a metric id
"""
import logging
import traceback
from sqlalchemy.sql import select
from database import get_engine, engine_disposal, metric_group_info_table_meta
from functions.metrics.get_base_name_from_metric_id import get_base_name_from_metric_id
from functions.metrics.get_metric_ids_and_base_n... | [
37811,
198,
3855,
35907,
329,
257,
18663,
4686,
198,
37811,
198,
11748,
18931,
198,
11748,
12854,
1891,
198,
6738,
44161,
282,
26599,
13,
25410,
1330,
2922,
198,
198,
6738,
6831,
1330,
651,
62,
18392,
11,
3113,
62,
6381,
40007,
11,
1866... | 2.189114 | 3,215 |
import json
from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton
from botController import BotController
from bot_utils import BotUtils
| [
11748,
33918,
198,
198,
6738,
5735,
13645,
13,
19199,
1330,
554,
1370,
9218,
3526,
9704,
929,
11,
554,
1370,
9218,
3526,
21864,
198,
198,
6738,
10214,
22130,
1330,
18579,
22130,
198,
6738,
10214,
62,
26791,
1330,
18579,
18274,
4487,
628
] | 3.875 | 40 |
"""
Spli, Join, Enumerate em Python
* Split - Dividir uma string #str
* Join - Juntar uma lista # str
* Enumerate - Enumerar elementos da lista # iteraveis
"""
string = 'O Brasil รฉ o paรญs do futebol, o Brasil รฉ penta.'
lista_1 = string.split(' ')
lista_2 = string.split(',')
# exemplo 1
#for valor in lista_1:
# p... | [
37811,
198,
26568,
72,
11,
15251,
11,
2039,
6975,
378,
795,
11361,
198,
9,
27758,
532,
360,
1699,
343,
334,
2611,
4731,
1303,
2536,
198,
9,
15251,
532,
449,
2797,
283,
334,
2611,
1351,
64,
1303,
965,
198,
9,
2039,
6975,
378,
532,
... | 2.215909 | 440 |
import tkinter as tk #ๅฏผๅ
ฅtkinterๆจกๅ
window = tk.Tk() #ๅๅปบไธป็ชๅฃๅฏน่ฑก
screen_width = window.winfo_screenwidth() #่ทๅๅฑๅนๅฎฝๅบฆ
screen_height = window.winfo_screenheight() #่ทๅๅฑๅน้ซๅบฆ
x = (screen_width - 200) / 2 #่ฎก็ฎ็ชๅฃๅๆ x
y = (screen_height - 100) / 2 #่ฎก็ฎ็ชๅฃๅๆ y
window.geometry('260x100+%d+%d' % (x, y)) #่ฎพ็ฝฎ็ชๅฃๅคงๅฐไธไฝ็ฝฎ
window.title('login')... | [
11748,
256,
74,
3849,
355,
256,
74,
220,
1303,
43380,
120,
17739,
98,
30488,
3849,
162,
101,
94,
161,
251,
245,
198,
17497,
796,
256,
74,
13,
51,
74,
3419,
220,
1303,
26344,
249,
161,
119,
118,
10310,
119,
163,
103,
245,
20998,
96... | 1.516022 | 905 |
from rest_framework import serializers
from taggit_serializer.serializers import TaggitSerializer, TagListSerializerField
from ..products.models import (
Product,
ProductBrand,
ProductCategory,
ProductColor,
ProductFile,
ProductImage,
ProductModel,
ProductSize,
ProductVAT,
Produ... | [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
7621,
18300,
62,
46911,
7509,
13,
46911,
11341,
1330,
309,
9460,
270,
32634,
7509,
11,
17467,
8053,
32634,
7509,
15878,
198,
198,
6738,
11485,
29498,
13,
27530,
1330,
357,
198,
220,
... | 2.893443 | 122 |
import sys
import pandas as pd
import numpy as np
import pickle as pkl
if __name__ == '__main__':
train_path = sys.argv[1]
dat = pd.read_csv(train_path)
dose_names = ['DOSE_0.01', 'DOSE_0.04','DOSE_0.12','DOSE_0.37','DOSE_1.11','DOSE_3.33','DOSE_10.00']
doses = [0.01, 0.04, 0.12, 0.37, 1.11, 3.33,... | [
198,
11748,
25064,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2298,
293,
355,
279,
41582,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
628,
220,
220,
220,
4512,
62,
697... | 2.18125 | 480 |
# Objective: find games which appear on Steam Points Shop, but are missing from SteamCardExchange.
from utils import get_urls_for_markdown_display
from download_steam_card_exchange import load_data_from_steam_card_exchange
from download_steam_points_shop import load_data_from_steam_points_shop
import steamspypi
if ... | [
2,
37092,
25,
1064,
1830,
543,
1656,
319,
9094,
11045,
13705,
11,
475,
389,
4814,
422,
9094,
16962,
3109,
3803,
13,
198,
198,
6738,
3384,
4487,
1330,
651,
62,
6371,
82,
62,
1640,
62,
4102,
2902,
62,
13812,
198,
6738,
4321,
62,
21465... | 3.032895 | 152 |
import pytest
from rpdk.core.jsonutils.utils import (
NON_MERGABLE_KEYS,
ConstraintError,
schema_merge,
traverse_path_for_sequence_members,
)
A = "VVNEON"
B = "HVPOEV"
@pytest.mark.parametrize("key", NON_MERGABLE_KEYS)
@pytest.mark.parametrize("key", NON_MERGABLE_KEYS)
@pytest.mark.parametrize("... | [
11748,
12972,
9288,
198,
198,
6738,
374,
30094,
74,
13,
7295,
13,
17752,
26791,
13,
26791,
1330,
357,
198,
220,
220,
220,
44521,
62,
29296,
38,
17534,
62,
7336,
16309,
11,
198,
220,
220,
220,
1482,
2536,
2913,
12331,
11,
198,
220,
2... | 2.242424 | 198 |
#
# Summary:
#
# This script converts Azure IoT C SDK header files into more friendly format for doxygen.
#
# Usage:
#
# replace_mockable.py <input_directory> <output_directory>
# Pre-existing files in <output_directory> will be overwritten.
#
# Motivation and additional details
#
# The Azure IoT C SDK relies on macr... | [
2,
198,
2,
21293,
25,
198,
2,
198,
2,
770,
4226,
26161,
22134,
38488,
327,
26144,
13639,
3696,
656,
517,
8030,
5794,
329,
466,
5431,
5235,
13,
198,
198,
2,
198,
2,
29566,
25,
198,
2,
198,
2,
6330,
62,
76,
735,
540,
13,
9078,
1... | 3.121381 | 898 |
#!/usr/bin/env python
from setuptools import setup, find_packages
with open('README.md') as readme_file:
readme = readme_file.read()
with open('version') as version_file:
version = version_file.read()
setup(
name='pyarrowfs-adlgen2',
version=version,
description='Use pyarrow with Azure Data Lake... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
4480,
1280,
10786,
15675,
11682,
13,
9132,
11537,
355,
1100,
1326,
62,
7753,
25,
198,
220,
220,
220,
1100,
1326... | 2.517895 | 475 |
# Generated by Django 3.0.9 on 2020-09-21 18:49
import app_ccf.models
import django.contrib.postgres.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import uuid
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
24,
319,
12131,
12,
2931,
12,
2481,
1248,
25,
2920,
198,
198,
11748,
598,
62,
535,
69,
13,
27530,
198,
11748,
42625,
14208,
13,
3642,
822,
13,
7353,
34239,
13,
25747,
198,
11748,
42625,
1... | 2.935065 | 77 |
import datetime
import functools
from flask import flash, redirect, request, session, url_for
from flask_login import current_user
from . import timing
| [
11748,
4818,
8079,
198,
11748,
1257,
310,
10141,
198,
198,
6738,
42903,
1330,
7644,
11,
18941,
11,
2581,
11,
6246,
11,
19016,
62,
1640,
198,
6738,
42903,
62,
38235,
1330,
1459,
62,
7220,
198,
198,
6738,
764,
1330,
10576,
198
] | 3.85 | 40 |
#!/usr/bin/env python
# Copyright 2021 Mario Guzzi
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
33448,
10682,
1962,
46218,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
220,
345,
743,
407,
... | 2.895833 | 864 |
"""
primitive plotting for ex5
"""
import numpy as np
import matplotlib.pyplot as plt
xs = {}
xs["n,g"] = np.loadtxt("talys/rp076192.tot")
xs["n,g_ENDF"] = np.loadtxt("database/endf.dat", usecols=[0,1])
xs["macs"] = np.loadtxt("talys_astro/astrorate.g")
# xs["n,n"] = np.loadtxt("ex2/rp076192.tot")
# exp = {}
# exp["... | [
37811,
198,
19795,
1800,
29353,
329,
409,
20,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
34223,
796,
23884,
198,
34223,
14692,
77,
11,
70,
8973,
796,
45... | 1.905132 | 643 |
from functools import wraps
import tensorflow as tf
class Module(metaclass=MetaModule):
""" Base class for all NN layers"""
def _initialize(self):
''' Initialize all TF variable and sub-layers here '''
pass
def _forward(self, *args, **kwargs):
''' Implement forward pass here. N... | [
6738,
1257,
310,
10141,
1330,
27521,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
628,
198,
198,
4871,
19937,
7,
4164,
330,
31172,
28,
48526,
26796,
2599,
198,
220,
220,
220,
37227,
7308,
1398,
329,
477,
399,
45,
11685,
37811,
628,
... | 2.619512 | 205 |
# Copyright 2010-2019 Dan Elliott, Russell Valentine
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | [
2,
220,
220,
15069,
3050,
12,
23344,
6035,
22386,
11,
11563,
23078,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
220,
345,
743,
407,
779,
428,
2393,
28... | 3.485477 | 241 |
from fairseq import checkpoint_utils, data, options, tasks
# Parse command-line arguments for generation
parser = options.get_generation_parser(default_task='simple_classification')
args = options.parse_args_and_arch(parser)
# Setup task
task = tasks.setup_task(args)
# Load model
print('| loading model from {}'.forma... | [
6738,
3148,
41068,
1330,
26954,
62,
26791,
11,
1366,
11,
3689,
11,
8861,
198,
198,
2,
2547,
325,
3141,
12,
1370,
7159,
329,
5270,
198,
48610,
796,
3689,
13,
1136,
62,
20158,
62,
48610,
7,
12286,
62,
35943,
11639,
36439,
62,
4871,
26... | 2.557233 | 795 |
try:
import numpy as np
import scipy.ndimage
except ImportError:
pass
from betty.conf.app import settings
import io
import math
from PIL import Image
MIN_UNIQUE_COLORS = 4096
COLOR_DENSITY_RATIO = 0.11
QUALITY_IN_MIN = 82
ERROR_THRESHOLD = 1.3
ERROR_THRESHOLD_INACCURACY = 0.01
def detect_optim... | [
28311,
25,
198,
220,
220,
220,
1330,
299,
32152,
355,
45941,
198,
220,
220,
220,
1330,
629,
541,
88,
13,
358,
9060,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1208,
198,
198,
6738,
731,
774,
13,
10414,
13,
1324,
1330,
6460,
... | 2.207063 | 1,246 |
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
from scipy.optimize import brentq
from scipy.linalg import solve_banded, block_diag
from multiprocessing import Pool
from itertools import product
from functools import partial
| [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
629,
541,
88,
13,
3849,
16104,
378,
1330,
987,
79,
16,
67,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
275,
1156,
80,
198,
... | 3.190476 | 84 |
from dresources import DResource
# noinspection PyAbstractClass
from external_services import ExternalServices
# noinspection PyAbstractClass
| [
6738,
288,
37540,
1330,
360,
26198,
198,
198,
2,
645,
1040,
14978,
9485,
23839,
9487,
198,
6738,
7097,
62,
30416,
1330,
34579,
31007,
628,
198,
2,
645,
1040,
14978,
9485,
23839,
9487,
198
] | 4.393939 | 33 |
import numpy as np
import os
import torch
import time
from collections import Iterable
from torch import nn
from sklearn.metrics import accuracy_score, roc_curve, precision_recall_curve, auc
from torch.nn.utils import clip_grad_norm_
def validate(model, val_dl, device, criterion, n_iterations=1):
"""
Fun... | [
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
28034,
198,
11748,
640,
198,
6738,
17268,
1330,
40806,
540,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
9922,
62,
26675,
11,
686,
66,
62,
... | 1.970921 | 1,238 |
#!/usr/bin/env python
import sys
import re
import os
from os.path import join, dirname
# import string
# import gzip
# import math
# import decimal
# import datetime
# from os import listdir
# import subprocess
# may also need some of these:
# import Ingos lib
# sys.path.append(os.path.join(os.path.dirname[0], "..... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
11748,
302,
198,
11748,
28686,
198,
198,
6738,
28686,
13,
6978,
1330,
4654,
11,
26672,
3672,
198,
2,
1330,
4731,
198,
198,
2,
1330,
308,
13344,
198,
2,
1330,
... | 2.226465 | 18,568 |
import unittest
import hcl2
from checkov.terraform.checks.resource.aws.RDSClusterSnapshotEncrypted import check
from checkov.common.models.enums import CheckResult
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
11748,
289,
565,
17,
198,
198,
6738,
2198,
709,
13,
353,
430,
687,
13,
42116,
13,
31092,
13,
8356,
13,
49,
5258,
2601,
5819,
43826,
9442,
27195,
15109,
1330,
2198,
198,
6738,
2198,
709,
13,
11321,
13,
2753... | 2.945205 | 73 |
p = Person()
# print(p + 123)
# print(p + 'sdfas')
r1 = Room(3, 5)
r2 = Room(4, 4)
print(r1.area)
print(r2.area)
print(r1 + r2)
print(r1 == r2) | [
198,
79,
796,
7755,
3419,
198,
2,
3601,
7,
79,
1343,
17031,
8,
198,
2,
3601,
7,
79,
1343,
705,
82,
7568,
292,
11537,
628,
198,
198,
81,
16,
796,
10096,
7,
18,
11,
642,
8,
198,
81,
17,
796,
10096,
7,
19,
11,
604,
8,
198,
47... | 1.8375 | 80 |
#
# Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... | [
2,
198,
2,
15069,
357,
66,
8,
1853,
12,
23344,
536,
959,
563,
4432,
330,
1279,
83,
2704,
273,
330,
5161,
14856,
400,
283,
13,
3262,
29,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
770,
3788,
318,
2426,
284,
262,
8617,
286,
... | 2.83603 | 927 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 21 15:53:34 2019
@author: leeh43
"""
import os
import nibabel.cmdline.ls
import nibabel as nib
#import cv2
nifti_deeplesion = os.path.join('/nfs/masi/leeh43/DeepLesion/Images_nifti/'
+ '000001_03_01_058-118.nii.gz'... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
7031,
8621,
2310,
1315,
25,
4310,
25,
2682,
13130,
198,
198,
31,
9800,
25,
443,
17231,
35... | 1.887097 | 620 |
#!/usr/bin/env python3
"""
Generate a 4096-bit Django SECRET_KEY and append it as a [secrets]
section to a config.ini. Use `config.ini' if the first argument does not
hold a path to a config.ini, and copy over `config.example.ini' if it
does not exist.
"""
import string
import sys
import os
import os.path
from config... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
8645,
378,
257,
42479,
12,
2545,
37770,
10729,
26087,
62,
20373,
290,
24443,
340,
355,
257,
685,
2363,
8004,
60,
198,
5458,
284,
257,
4566,
13,
5362,
13,
5765,
4... | 2.523124 | 973 |
import json
import traitlets
from collections import defaultdict
from traitlets.utils.bunch import Bunch
from glue.core.state_objects import State
from glue.core import Data, Subset, ComponentID
from glue.external.echo import CallbackList, CallbackDict
from matplotlib.colors import Colormap
from matplotlib.cm import ge... | [
11748,
33918,
198,
11748,
1291,
2578,
912,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
1291,
2578,
912,
13,
26791,
13,
65,
3316,
1330,
347,
3316,
198,
6738,
22749,
13,
7295,
13,
5219,
62,
48205,
1330,
1812,
198,
6738,
22749,
13,
7... | 3.035714 | 168 |
from django.shortcuts import render, redirect
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.views import LoginView, LogoutView
from .models import DiceUser
# Create your views here.
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
23914,
1330,
11787,
12443,
341,
8479,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
33571,
1330,
23093,
7680,
1... | 3.616667 | 60 |
import os
import sys
import numpy as np
import copy
#sys.path.append('../')
#from utils import *
from alchemistry_toolkit.utils import *
global kb, Na
kb = 1.38064852E-23 # Boltzmann constant
Na = 6.0221409E23 # Avogadro's number
def set_params(obj, line, param_name, attr_name=None, dtype=float):
"""
... | [
11748,
28686,
220,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4866,
220,
198,
2,
17597,
13,
6978,
13,
33295,
10786,
40720,
11537,
198,
2,
6738,
3384,
4487,
1330,
1635,
198,
6738,
435,
15245,
4592,
62,
25981,
1581... | 2.511111 | 360 |
"""
The module implements abstraction for reading data to the bit stream.
"""
import typing
from zserio.bitbuffer import BitBuffer
from zserio.limits import INT64_MIN
from zserio.exception import PythonRuntimeException
from zserio.float import uint16_to_float, uint32_to_float, uint64_to_float
class BitStreamReader:
... | [
37811,
198,
464,
8265,
23986,
34651,
329,
3555,
1366,
284,
262,
1643,
4269,
13,
198,
37811,
198,
198,
11748,
19720,
198,
198,
6738,
1976,
2655,
952,
13,
2545,
22252,
1330,
4722,
28632,
198,
6738,
1976,
2655,
952,
13,
49196,
1330,
17828,... | 2.242816 | 8,039 |
import numpy
import copy
from perceptron import Perceptron
LEARNINGFACTOR = .5
| [
11748,
299,
32152,
198,
11748,
4866,
198,
6738,
34953,
1313,
1330,
2448,
984,
1313,
198,
2538,
1503,
15871,
37,
10659,
1581,
796,
764,
20,
628,
198
] | 3.115385 | 26 |
from rest_framework import permissions
class IsOwner(permissions.BasePermission):
"""
Permission to object which the request user is the owner.
"""
| [
6738,
1334,
62,
30604,
1330,
21627,
198,
198,
4871,
1148,
42419,
7,
525,
8481,
13,
14881,
5990,
3411,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2448,
3411,
284,
2134,
543,
262,
2581,
2836,
318,
262,
48... | 3.3 | 50 |
import robo_rl.common.utils.nn_utils as nn_utils
import robo_rl.common.utils.utils as utils
import torch
from robo_rl.common.networks.discriminator import LinearDiscriminator
from torchviz import make_dot
input = 2
hidden_sizes = [4, 3]
discriminator = LinearDiscriminator(input_dim=input, hidden_dim=hidden_sizes)
uti... | [
11748,
686,
2127,
62,
45895,
13,
11321,
13,
26791,
13,
20471,
62,
26791,
355,
299,
77,
62,
26791,
198,
11748,
686,
2127,
62,
45895,
13,
11321,
13,
26791,
13,
26791,
355,
3384,
4487,
198,
11748,
28034,
198,
6738,
686,
2127,
62,
45895,
... | 2.98513 | 269 |
#
# Copyright (C) 2012, Martin Zibricky
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distribute... | [
2,
198,
2,
15069,
357,
34,
8,
2321,
11,
5780,
1168,
2889,
17479,
198,
2,
198,
2,
770,
1430,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
290,
14,
273,
198,
2,
13096,
340,
739,
262,
2846,
286,
262,
22961,
3611,
5094,
13789,
1... | 3.47619 | 336 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""File download handling."""
# System imports
import os
import logging
import mimetypes
from django.conf import settings
from django.utils.encoding import smart_str
from django.http import StreamingHttpResponse
from wsgiref.util import FileWrapper
logger = logging.getLo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
8979,
4321,
9041,
526,
15931,
198,
198,
2,
4482,
17944,
198,
11748,
28686,
198,
11748,
18931,
198,
11748,
17007,
... | 3.230769 | 104 |
from django.shortcuts import render, redirect
from django.contrib import messages
from .forms import UserRegistrationForm, UserUpdateForm, ProfileUpdateForm
from django.contrib.auth.decorators import login_required
# Create your views here.
@login_required
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
6218,
198,
6738,
764,
23914,
1330,
11787,
47133,
8479,
11,
11787,
10260,
8479,
11,
13118,
10260,
8479,
198,
6738,
42625,
14208,
13,... | 3.895522 | 67 |
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic.base import TemplateView
from django.conf import settings
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
19816,
1040,
1330,
23093,
37374,
35608,
259,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
8692,
1330,
37350,
7680,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198
] | 3.736842 | 38 |
# Copyright 2013-2017 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agree... | [
2,
15069,
2211,
12,
5539,
383,
14937,
261,
2478,
1074,
198,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
... | 3.321862 | 494 |
import os
import argparse
import numpy as np
INPUT_FILENAME_PATTERN = 'delay_%d_num_possible_symbols_%d_%s_inputs.npy'
TARGET_FILENAME_PATTERN = 'delay_%d_num_possible_symbols_%d_%s_targets.npy'
DEFAULT_DATA_DIR = os.path.expanduser(os.path.join('~', 'Data', 'CopyProblem'))
def generate_inputs_and_targets(delay, nu... | [
11748,
28686,
198,
11748,
1822,
29572,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
1268,
30076,
62,
46700,
1677,
10067,
62,
47,
1404,
31800,
796,
705,
40850,
62,
4,
67,
62,
22510,
62,
79,
4733,
62,
1837,
2022,
10220,
62,
4,
6... | 2.478335 | 2,354 |
# Created by MechAviv
# ID :: [910142051]
# Hidden Street : Harmony
sm.curNodeEventEnd(True)
sm.setTemporarySkillSet(0)
sm.setInGameDirectionMode(True, True, False, False)
sm.forcedInput(1)
sm.sendDelay(30)
sm.forcedInput(4)
OBJECT_1 = sm.sendNpcController(1032209, -15, -30)
sm.showNpcSpecialActionByObjectId(OBJECT_... | [
2,
15622,
416,
18202,
7355,
452,
198,
2,
4522,
7904,
685,
6420,
486,
27211,
4349,
60,
198,
2,
20458,
3530,
1058,
35088,
198,
198,
5796,
13,
22019,
19667,
9237,
12915,
7,
17821,
8,
198,
5796,
13,
2617,
12966,
5551,
35040,
7248,
7,
15... | 2.782979 | 940 |
import calendar
from django import template
register = template.Library()
@register.filter(is_safe=False)
| [
11748,
11845,
198,
6738,
42625,
14208,
1330,
11055,
198,
198,
30238,
796,
11055,
13,
23377,
3419,
628,
198,
31,
30238,
13,
24455,
7,
271,
62,
21230,
28,
25101,
8,
198
] | 3.633333 | 30 |
๏ปฟimport posixpath
import os
from posixpath import basename
from cmsis_svd.parser import SVDParser
import site
import json
import re
import FormattingTools as Ft
import argparse
import sys
parser = argparse.ArgumentParser(description='Generate chip files')
parser.add_argument('-f,--file', dest='file', h... | [
171,
119,
123,
11748,
1426,
844,
6978,
198,
11748,
28686,
198,
6738,
1426,
844,
6978,
1330,
1615,
12453,
198,
6738,
269,
907,
271,
62,
82,
20306,
13,
48610,
1330,
20546,
6322,
28198,
198,
11748,
2524,
198,
11748,
33918,
198,
11748,
302,... | 2.910072 | 278 |
from setuptools import setup, find_packages
import sys, os
VERSION = '0.1.6'
LONG_DESCRIPTION = open('README.rst').read()
setup(name='testkit',
version=VERSION,
description="testkit - A collection of tools for testing",
long_description=LONG_DESCRIPTION,
author='Reuven V. Gonzales',
author_email=... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
11748,
25064,
11,
28686,
198,
198,
43717,
796,
705,
15,
13,
16,
13,
21,
6,
198,
198,
43,
18494,
62,
30910,
40165,
796,
1280,
10786,
15675,
11682,
13,
81,
301,
27691,
961... | 2.546584 | 322 |
import json
from app.main.model.executive_type import ExecutiveType
from app.main.repository.device_group_repository import DeviceGroupRepository
from app.main.util.auth_utils import Auth
from app.main.util.constants import Constants
| [
11748,
33918,
198,
198,
6738,
598,
13,
12417,
13,
19849,
13,
18558,
8827,
62,
4906,
1330,
10390,
6030,
198,
6738,
598,
13,
12417,
13,
260,
1930,
37765,
13,
25202,
62,
8094,
62,
260,
1930,
37765,
1330,
16232,
13247,
6207,
13264,
198,
6... | 3.422535 | 71 |
from a10sdk.common.A10BaseClass import A10BaseClass
class Import(A10BaseClass):
""" :param geo_location: {"description": "Geo-location CSV File", "partition-visibility": "shared", "minLength": 1, "format": "string", "optional": true, "maxLength": 63, "type": "string"}
:param ssl_cert_key: {"optional":... | [
6738,
257,
940,
21282,
74,
13,
11321,
13,
32,
940,
14881,
9487,
1330,
317,
940,
14881,
9487,
628,
198,
4871,
17267,
7,
32,
940,
14881,
9487,
2599,
198,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
220,
220,
220,
1058,
17143,
40087... | 3.058756 | 1,736 |