content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import cv2
import numpy as np
import matplotlib.pyplot as plt
img = cv2.imread("../imori_1.jpg")
gt = np.array((47, 41, 129, 103), dtype=np.float32)
result = RandomCropping(img, gt)
cv2.imshow("result", result)
cv2.waitKey(0)
cv2.imwrite("myans_94.jpg", result)
| [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
9600,
796,
269,
85,
17,
13,
320,
961,
7203,
40720,
320,
10145,
62,
16,
13,
9479,
4943,
198,
13655,
796,
... | 2.313043 | 115 |
import numpy as np
def prof_weight_compute(list_probe_filenames,start_layer,last_layer,y_train2):
"""
Key function that computes the per sample weights based on probe classifier confidences from various layers. It averages the probe
confidences of the layers.
Parmeters:
list_probe_filenames (List of strings):... | [
11748,
299,
32152,
355,
45941,
628,
198,
198,
4299,
1534,
62,
6551,
62,
5589,
1133,
7,
4868,
62,
1676,
1350,
62,
10379,
268,
1047,
11,
9688,
62,
29289,
11,
12957,
62,
29289,
11,
88,
62,
27432,
17,
2599,
198,
197,
37811,
198,
197,
... | 3.13347 | 487 |
from typing import Any, Callable, List, Optional, Tuple, Union
import gym
import numpy as np
from tianshou.env.worker import (
DummyEnvWorker,
EnvWorker,
RayEnvWorker,
SubprocEnvWorker,
)
from tianshou.utils import RunningMeanStd
class BaseVectorEnv(gym.Env):
"""Base class for vectorized environ... | [
6738,
19720,
1330,
4377,
11,
4889,
540,
11,
7343,
11,
32233,
11,
309,
29291,
11,
4479,
198,
198,
11748,
11550,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
256,
1547,
15710,
13,
24330,
13,
28816,
1330,
357,
198,
220,
220,
220,
... | 2.399228 | 5,438 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 2 15:02:44 2018
Train WGAN
@author: vayer
"""
#%%
import os,sys
#path='/home/vayer/wgw/gwtest-master/code_deep_ecn'
path='./code_deep_ecn/lib'
module_path = os.path.abspath(os.path.join(path))
sys.path.append(module_path)
from wgan import WGAN
fr... | [
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,
30030,
2556,
220,
362,
1315,
25,
2999,
25,
2598,
2864,
198,
198,
44077,
370,
45028,
198,
... | 2.3375 | 240 |
import pathlib
from typing import Sequence, Dict, Any, Optional
from jinja2 import Environment, FileSystemLoader, Template
from derobertis_project_logo.color import random_color_hex, Color
from derobertis_project_logo.shape import Shape
TEMPLATE_DIR = pathlib.Path(__file__).parent / 'templates'
jinja_env = Environme... | [
11748,
3108,
8019,
198,
6738,
19720,
1330,
45835,
11,
360,
713,
11,
4377,
11,
32233,
198,
198,
6738,
474,
259,
6592,
17,
1330,
9344,
11,
9220,
11964,
17401,
11,
37350,
198,
198,
6738,
4587,
2023,
48010,
62,
16302,
62,
6404,
78,
13,
... | 3.057692 | 156 |
import os
import sys
import yaml
import json
import requests
from twitter import OAuth
from twitter import Twitter
from datetime import datetime
from pymongo import ASCENDING
from pymongo import DESCENDING
from pymongo import MongoClient
from pymongo.errors import DuplicateKeyError
sys.path.append('../..')
from not... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
331,
43695,
198,
11748,
33918,
198,
11748,
7007,
198,
198,
6738,
17044,
1330,
440,
30515,
198,
6738,
17044,
1330,
3009,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
279,
4948,
25162... | 1.933775 | 3,473 |
#!/usr/bin/env python
from gooey import Gooey, GooeyParser
import datetime
import requests
import urllib3
import time
import glob
import os
API_ENDPOINT = 'https://olc.cloud.inspection.gc.ca/api/'
# SSL cert isn't quite right on portal. Use this to disable warning.
urllib3.disable_warnings(urllib3.exceptions.Insecur... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
467,
2577,
88,
1330,
1514,
2577,
88,
11,
1514,
2577,
88,
46677,
198,
11748,
4818,
8079,
198,
11748,
7007,
198,
11748,
2956,
297,
571,
18,
198,
11748,
640,
198,
11748,
15095,... | 2.753521 | 142 |
from ai_toolkit import viz
if __name__ == "__main__":
viz()
| [
6738,
257,
72,
62,
25981,
15813,
1330,
48569,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
48569,
3419,
198
] | 2.407407 | 27 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-05-14 10:00
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
19,
319,
2177,
12,
2713,
12,
1415,
838,
25,
405,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
19... | 2.73913 | 69 |
import functools
import itertools
import collections
import threading
import numpy as np
import psutil
import tensorflow as tf
import ray
from utility.ray_setup import cpu_affinity
from utility.utils import Every, config_attr, batch_dicts
from utility.timer import Timer
from utility.typing import EnvOutput
from utilit... | [
11748,
1257,
310,
10141,
198,
11748,
340,
861,
10141,
198,
11748,
17268,
198,
11748,
4704,
278,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
26692,
22602,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
26842,
198,
198,
6738,
10... | 3.305147 | 272 |
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
n = int(readline())
a = list(map(int, readline().split()))
ans = a[0]
for i in range(1, n):
ans = a[i] + ans * 2
print(ans)
| [
11748,
25064,
198,
961,
796,
25064,
13,
19282,
259,
13,
22252,
13,
961,
198,
961,
1370,
796,
25064,
13,
19282,
259,
13,
22252,
13,
961,
1370,
198,
961,
6615,
796,
25064,
13,
19282,
259,
13,
22252,
13,
961,
6615,
198,
17597,
13,
2617... | 2.464286 | 112 |
#!/usr/bin/env python
__author__ = "Moonis Javed"
import roslib
import rospy
import math
import numpy as np
from geometry_msgs.msg import Twist
from sensor_msgs.msg import LaserScan
from nav_msgs.msg import Odometry
roslib.load_manifest('lab2')
if __name__ == '__main__':
try:
rospy.init_node('... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
834,
9800,
834,
796,
366,
31640,
271,
449,
9586,
1,
198,
198,
11748,
686,
6649,
571,
198,
11748,
686,
2777,
88,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
22939,... | 2.237942 | 311 |
_base_ = [
'../faster_rcnn_r50_fpn_1x_coco.py',
'../../_base_/datasets/hdr_detection_mantiuk.py'
] | [
62,
8692,
62,
796,
685,
198,
220,
220,
220,
705,
40720,
69,
1603,
62,
6015,
20471,
62,
81,
1120,
62,
69,
21999,
62,
16,
87,
62,
66,
25634,
13,
9078,
3256,
198,
220,
220,
220,
705,
40720,
40720,
62,
8692,
62,
14,
19608,
292,
1039... | 1.766667 | 60 |
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "76ba6b88-f162-4922-8a35-43828460a08f",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_... | [
90,
198,
366,
46342,
1298,
685,
198,
220,
1391,
198,
220,
220,
366,
3846,
62,
4906,
1298,
366,
8189,
1600,
198,
220,
220,
366,
18558,
1009,
62,
9127,
1298,
9242,
11,
198,
220,
220,
366,
312,
1298,
366,
4304,
7012,
21,
65,
3459,
12... | 2.057437 | 1,358 |
"""
Copyright 2021 Objectiv B.V.
"""
# Any import from modelhub initializes all the types, do not remove
import pytest
from tests.functional.bach.test_data_and_utils import get_df_with_test_data
from tests_modelhub.functional.modelhub.logistic_regression_test_utils import TestLR
from tests_modelhub.data_and_utils.ut... | [
37811,
198,
15269,
33448,
9515,
452,
347,
13,
53,
13,
198,
37811,
198,
198,
2,
4377,
1330,
422,
2746,
40140,
4238,
4340,
477,
262,
3858,
11,
466,
407,
4781,
628,
198,
11748,
12972,
9288,
198,
6738,
5254,
13,
45124,
13,
19496,
13,
92... | 2.907216 | 194 |
from jarvis.settings.base import *
DEBUG = True
# Not using because of the conflicts with JSONField() in Visitor
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }
# }
DATABASES = {
'default': {
'ENGINE': g... | [
6738,
17379,
4703,
13,
33692,
13,
8692,
1330,
1635,
198,
198,
30531,
796,
6407,
198,
198,
2,
1892,
1262,
780,
286,
262,
12333,
351,
19449,
15878,
3419,
287,
6911,
2072,
198,
198,
2,
360,
1404,
6242,
1921,
1546,
796,
1391,
198,
2,
22... | 2.214076 | 682 |
#!/usr/bin/python3
"""
A gene string can be represented by an 8-character long string, with choices
from "A", "C", "G", "T".
Suppose we need to investigate about a mutation (mutation from "start" to
"end"), where ONE mutation is defined as ONE single character changed in the
gene string.
For example, "AACCGGTT" -> "A... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
37811,
198,
32,
9779,
4731,
460,
307,
7997,
416,
281,
807,
12,
22769,
890,
4731,
11,
351,
7747,
198,
6738,
366,
32,
1600,
366,
34,
1600,
366,
38,
1600,
366,
51,
1911,
198,
198,
15979,... | 3.230986 | 355 |
from chispa import assert_df_equality
from cishouseholds.merge import many_to_one_antibody_flag
| [
6738,
442,
8802,
64,
1330,
6818,
62,
7568,
62,
48203,
198,
198,
6738,
269,
680,
1076,
2946,
82,
13,
647,
469,
1330,
867,
62,
1462,
62,
505,
62,
415,
571,
1118,
62,
32109,
628
] | 2.882353 | 34 |
from pyb import ADC
from pyb import Pin
pin = Pin('X22', mode=Pin.IN, pull=Pin.PULL_DOWN)
adc = ADC('X22')
print(adc)
# read single sample
val = adc.read()
assert val < 500
# timer for read_timed
tim = pyb.Timer(5, freq=500)
# read into bytearray
buf = bytearray(50)
adc.read_timed(buf, tim)
print(len(buf))
for i in... | [
6738,
12972,
65,
1330,
49169,
198,
6738,
12972,
65,
1330,
13727,
198,
198,
11635,
796,
13727,
10786,
55,
1828,
3256,
4235,
28,
28348,
13,
1268,
11,
2834,
28,
28348,
13,
5105,
3069,
62,
41925,
8,
198,
324,
66,
796,
49169,
10786,
55,
... | 2.402344 | 256 |
import sys
import gym
import gym.spaces
import math
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
| [
11748,
25064,
198,
198,
11748,
11550,
198,
11748,
11550,
13,
2777,
2114,
198,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
285,
489,
62,
25981,
74,
... | 2.754717 | 53 |
from greek_accentuation.characters import base
import betacode.conv
import string
if __name__ == '__main__':
import sys
args = sys.argv[1:]
remover = Remover()
raw = ''
with open(args[0], 'r', encoding='utf-8') as f:
raw = f.read()
with open(args[1], 'w', encoding='utf-8') as f:
... | [
6738,
308,
10316,
62,
330,
1087,
2288,
13,
10641,
19858,
1330,
2779,
198,
198,
11748,
731,
330,
1098,
13,
42946,
198,
11748,
4731,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1330,
25064,
19... | 2.355263 | 152 |
# Generated by Django 3.1.3 on 2021-10-26 09:45
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
18,
319,
33448,
12,
940,
12,
2075,
7769,
25,
2231,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import numpy as np
import pandas as pd
import scipy.optimize as opt
from statsmodels import regression
import statsmodels.formula.api as sm
from numba import jit, njit, prange, float64, int64
def glo_min(kbar, data, niter, temperature, stepsize):
"""2-step basin-hopping method combines global stepping algorithm
... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
629,
541,
88,
13,
40085,
1096,
355,
2172,
198,
6738,
9756,
27530,
1330,
20683,
198,
11748,
9756,
27530,
13,
687,
4712,
13,
15042,
355,
895,
198,
6738,
99... | 1.982327 | 3,395 |
from .scrape import load
from sys import version_info
if version_info < (3, 9):
from importlib_resources import files
else:
from importlib.resources import files # type: ignore
from pathlib import Path
from typing import Dict, List, Tuple, Union
example_names = ('irish-coffee', 'google', 'taco-salad', '... | [
6738,
764,
1416,
13484,
1330,
3440,
198,
198,
6738,
25064,
1330,
2196,
62,
10951,
198,
198,
361,
2196,
62,
10951,
1279,
357,
18,
11,
860,
2599,
198,
220,
220,
220,
422,
1330,
8019,
62,
37540,
1330,
3696,
220,
198,
17772,
25,
198,
22... | 2.374558 | 849 |
import unittest
from pysapets.bus import Bus
from pysapets.animal import Animal
import pysapets.constants as constants
from unittest.mock import patch
from io import StringIO
from copy import deepcopy
# test that get_type returns the correct type
# test that bus starts with base health of ?
# test that bu... | [
198,
11748,
555,
715,
395,
198,
6738,
279,
893,
499,
1039,
13,
10885,
1330,
5869,
198,
6738,
279,
893,
499,
1039,
13,
41607,
1330,
13792,
198,
11748,
279,
893,
499,
1039,
13,
9979,
1187,
355,
38491,
198,
6738,
555,
715,
395,
13,
76,... | 3.603774 | 212 |
if __name__== "__main__":
s = SomeSingleton("343","43443")
| [
198,
198,
361,
11593,
3672,
834,
855,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
264,
796,
2773,
29974,
10565,
7203,
32118,
2430,
3559,
34938,
4943,
198,
220,
220,
220,
220
] | 2.15625 | 32 |
""" Definition of power meter interfacing commands. """
import numpy as np
from mqlab.connections import Instrument
class ThorlabsPM100(PowerMeter):
""" Interface for communication with ThorLabs Power Meters over USB.
Notes:
Drivers must be installed before use (see ThorLabs website).
... | [
37811,
30396,
286,
1176,
16430,
9556,
4092,
9729,
13,
37227,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
6738,
285,
13976,
397,
13,
8443,
507,
1330,
42410,
201,
198,
201,
198,
201,
198,
201,
198,
4871,
13002,
75,
8937... | 2.515298 | 621 |
import os
from dotenv import load_dotenv
import psycopg2 as db
from logger_base import log
import sys
load_dotenv()
if __name__ == '__main__':
conexion = Conexion.obtener_conexion()
cursor = Conexion.obtener_cursor()
cursor.execute("SELECT * FROM persona")
print(cursor.fetchall())
Conexion.cerrar(... | [
11748,
28686,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
11748,
17331,
22163,
70,
17,
355,
20613,
198,
6738,
49706,
62,
8692,
1330,
2604,
198,
11748,
25064,
198,
198,
2220,
62,
26518,
24330,
3419,
198,
198,
361,
11593,
... | 2.568 | 125 |
"""
Actuator Error/Exception Functions
"""
def action_not_implemented(*args: tuple, **kwargs: dict) -> dict:
"""
Default function if no action function is found
:return: OpenC2 response message - dict
"""
return dict(
status=501,
status_text=f"Action not implemented"
)
def ta... | [
37811,
198,
6398,
84,
1352,
13047,
14,
16922,
40480,
198,
37811,
628,
198,
4299,
2223,
62,
1662,
62,
320,
1154,
12061,
46491,
22046,
25,
46545,
11,
12429,
46265,
22046,
25,
8633,
8,
4613,
8633,
25,
198,
220,
220,
220,
37227,
198,
220,... | 2.962376 | 1,010 |
__version__ = '0.1.0a0.dev2'
default_app_config = 'foundation.config.FoundationConfig'
| [
834,
9641,
834,
796,
705,
15,
13,
16,
13,
15,
64,
15,
13,
7959,
17,
6,
198,
198,
12286,
62,
1324,
62,
11250,
796,
705,
42526,
13,
11250,
13,
21077,
341,
16934,
6,
198
] | 2.588235 | 34 |
from flask import current_app
from typing import List
import ldap
| [
6738,
42903,
1330,
1459,
62,
1324,
198,
6738,
19720,
1330,
7343,
198,
11748,
300,
67,
499,
628,
628,
628
] | 3.736842 | 19 |
from uFire_ISE import uFire_ISE
import math
POTENTIAL_REGISTER_ADDRESS = 100
| [
6738,
334,
13543,
62,
24352,
1330,
334,
13543,
62,
24352,
198,
11748,
10688,
198,
47,
2394,
3525,
12576,
62,
31553,
41517,
62,
2885,
7707,
7597,
796,
1802,
628
] | 2.785714 | 28 |
# input
N = int(input())
# process
'''
max(N)=1,000,000이고 시간제한 2초이므로 O(n) 완전탐색 가능
'''
found = False
for i in range(N):
digits = tuple(map(int, list(str(i))))
digitSum = i + sum(digits)
if digitSum == N:
found = i
break
# output
print(found) if found else print(0) | [
2,
5128,
198,
45,
796,
493,
7,
15414,
28955,
198,
2,
1429,
198,
7061,
6,
198,
9806,
7,
45,
47505,
16,
11,
830,
11,
830,
35975,
112,
166,
111,
254,
23821,
233,
250,
166,
108,
226,
168,
254,
250,
47991,
250,
362,
168,
112,
230,
... | 1.764706 | 153 |
print("enter your config for the sudoku grid, 0 equals empty")
A1 = int(input("A1"))
A2 = int(input("A2"))
A3 = int(input("A3"))
A4 = int(input("A4"))
A5 = int(input("A5"))
A6 = int(input("A6"))
A7 = int(input("A7"))
A8 = int(input("A8"))
A9 = int(input("A9"))
B1 = int(input("B1"))
B2 = int(input("B2"))
B3 = int(i... | [
4798,
7203,
9255,
534,
4566,
329,
262,
424,
67,
11601,
10706,
11,
657,
21767,
6565,
4943,
198,
32,
16,
796,
493,
7,
15414,
7203,
32,
16,
48774,
198,
32,
17,
796,
493,
7,
15414,
7203,
32,
17,
48774,
198,
32,
18,
796,
493,
7,
1541... | 1.889153 | 1,263 |
from tsdesktop.testing import TSDesktopTest
from .dockman import view
from tsdesktop import dockman
from bottle import HTTPResponse, HTTPError
images = [{}]
containers = [{'Status': None}]
| [
6738,
40379,
41375,
13,
33407,
1330,
26136,
36881,
14402,
198,
6738,
764,
67,
735,
805,
1330,
1570,
198,
6738,
40379,
41375,
1330,
23423,
805,
198,
6738,
9294,
1330,
7154,
51,
4805,
9774,
2591,
11,
14626,
12331,
198,
198,
17566,
796,
68... | 3.333333 | 57 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
cw = os.getcwd()
os.chdir("./returned_exams")
import re, sys, string, codecs, zipfile
import stat
import md5
import hashlib
from pyparsing import Word, alphanums, Literal, LineEnd, LineStart, SkipTo, Optional
filesBySize = {}
os.path.walk(".", walker, filesBySi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
66,
86,
796,
28686,
13,
1136,
66,
16993,
3419,
198,
418,
13,
354,
15908,
7,
1911,
14,
7783,
276,
... | 2.12643 | 1,748 |
#!/usr/bin/env python3
from bbmigrate import main
main.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
6738,
275,
20475,
42175,
1330,
1388,
628,
198,
12417,
13,
12417,
3419,
198
] | 2.782609 | 23 |
import numpy as np
import os
import MDAnalysis as mda
import MDAnalysis.analysis.rms
import sys
#system_list=np.loadtxt("system_list",dtype=str)
cwd=os.getcwd()
#f=open('system_list','r')
#f1=f.readlines()
#os.chdir ('..')
#print (i)
#files=i.split()
#psf=files[0]
#xtc=files[1]
psf=sys.argv[1]
xtc=sys.argv[2]
ref=s... | [
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
220,
198,
11748,
10670,
32750,
355,
285,
6814,
198,
11748,
10670,
32750,
13,
20930,
13,
81,
907,
198,
11748,
25064,
198,
2,
10057,
62,
4868,
28,
37659,
13,
2220,
14116,
7203,
10057,
62,
... | 1.945916 | 4,530 |
# Copyright 2017, 2018 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. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fi... | [
2,
15069,
2177,
11,
2864,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
921,
743,
407,
198,
2,
779,
... | 2.461911 | 3,715 |
#!/usr/bin/env python
#
# canvasopts.py - The SliceCanvasOpts and LightBoxCanvasOpts classes.
#
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
"""This module provides the following classes:
- :class:`SliceCanvasOpts` (for the :class:`.SliceCanvas`)
- :class:`LightBoxCanvasOpts` (for the :class:`.LightBoxCanva... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
21978,
404,
912,
13,
9078,
532,
383,
3454,
501,
6090,
11017,
27871,
82,
290,
4401,
14253,
6090,
11017,
27871,
82,
6097,
13,
198,
2,
198,
2,
6434,
25,
3362,
18751,
1279,
... | 2.683042 | 3,379 |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.13.0)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x28\x16\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x61\x... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
20857,
2134,
2438,
198,
2,
198,
2,
15622,
416,
25,
383,
20857,
3082,
5329,
329,
9485,
48,
83,
20,
357,
48,
83,
410,
20,
13,
1485,
13,
15,
8,
198,
2,
198,... | 1.233683 | 281,826 |
import re
import os
import pandas as pd
import csv
import shutil
from circmimi.reference import gendb
from circmimi.reference.species import species_list
from circmimi.seq import parse_fasta
from circmimi.reference import resource as rs
from circmimi.reference.utils import cwd
from circmimi.reference.mirbase import Mat... | [
11748,
302,
198,
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
269,
21370,
198,
11748,
4423,
346,
198,
6738,
2498,
76,
25236,
13,
35790,
1330,
308,
437,
65,
198,
6738,
2498,
76,
25236,
13,
35790,
13,
35448,
1330,
469... | 3.346154 | 104 |
from flask_socketio import emit
from .game import Game
| [
6738,
42903,
62,
44971,
952,
1330,
27588,
201,
198,
201,
198,
6738,
764,
6057,
1330,
3776,
201,
198,
201,
198
] | 3.05 | 20 |
# -*- coding: future_fstrings -*-
from xml.dom import minidom
import xpath
import os
import json
import base64
import mimetypes
with open("templates/cartela_template_1.svg", 'r', encoding='utf-8') as f:
_cartela1 = minidom.parse(f)
with open("templates/cartela_template_2.svg", 'r', encoding='utf-8') as f... | [
2,
532,
9,
12,
19617,
25,
2003,
62,
69,
37336,
532,
9,
12,
201,
198,
6738,
35555,
13,
3438,
1330,
949,
312,
296,
201,
198,
11748,
2124,
6978,
201,
198,
11748,
28686,
201,
198,
11748,
33918,
201,
198,
11748,
2779,
2414,
201,
198,
1... | 2.302752 | 436 |
# DRUNKWATER TEMPLATE(add description and prototypes)
# Question Title and Description on leetcode.com
# Function Declaration and Function Prototypes on leetcode.com
#494. Target Sum
#You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you s... | [
2,
10560,
4944,
42,
54,
23261,
309,
3620,
6489,
6158,
7,
2860,
6764,
290,
32338,
8,
198,
2,
18233,
11851,
290,
12489,
319,
443,
316,
8189,
13,
785,
198,
2,
15553,
24720,
290,
15553,
5038,
13567,
319,
443,
316,
8189,
13,
785,
198,
... | 2.659204 | 402 |
import datetime
from collections import defaultdict
from functools import lru_cache
from math import sqrt, sin, cos, atan2
from operator import itemgetter
from coordinates import datum
from coordinates.broadcast import rnx_nav
from coordinates.exceptions import SatSystemError, NavMessageNotFoundError
# GPS, BDS, Gali... | [
11748,
4818,
8079,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
198,
6738,
10688,
1330,
19862,
17034,
11,
7813,
11,
8615,
11,
379,
272,
17,
198,
6738,
10088,
1330,
2378,
1136,
353,
198,
... | 2.022968 | 4,528 |
# default setting
INPUT_LOG = "../converted_logs/8vana_input.json"
LOG_POLLING_TIME = 5
LOG_HASH_ALGO = 'md5'
# ログウィンドウ向けセッティング(各種表示位置を設定)
LOG_AREA_X = 52
LOG_AREA_Y = 184
LOG_FRAME_X1 = 48
LOG_FRAME_Y1 = 175
LOG_FRAME_X2 = 246
LOG_FRAME_Y2 = 232
LOG_MAX_LINE = 7... | [
2,
4277,
4634,
201,
198,
201,
198,
1268,
30076,
62,
25294,
220,
220,
220,
220,
220,
220,
220,
796,
366,
40720,
1102,
13658,
62,
6404,
82,
14,
23,
33175,
62,
15414,
13,
17752,
1,
201,
198,
25294,
62,
16402,
3069,
2751,
62,
34694,
7... | 1.473539 | 2,173 |
#!/usr/bin/env python3
import inspect
from pathlib import Path
from my.pdfs import get_annots, annotated_pdfs
ROOT = Path(__file__).parent.absolute()
EXPECTED_HIGHLIGHTS = set(
[
"Since 1994, when we first began organizing web sites, we have enjoyed a rare opportunity to participate in the birth of a ne... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
10104,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
616,
13,
12315,
82,
1330,
651,
62,
1236,
1747,
11,
24708,
515,
62,
12315,
82,
628,
198,
13252,
2394,
796,
1... | 2.831683 | 505 |
from __future__ import print_function, division
"""
RadFriends region with transforms
----------------------------------
Copyright (c) 2017 Johannes Buchner
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributio... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
198,
37811,
198,
198,
15546,
36705,
3814,
351,
31408,
198,
3880,
438,
198,
198,
15269,
357,
66,
8,
2177,
38579,
23670,
1008,
198,
198,
7738,
396,
3890,
290,
779,
287,
2723,
290,... | 3.769412 | 425 |
from flask import current_app
from itsdangerous import Serializer
from . import db, login_manager
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
@login_manager.user_loader
| [
6738,
42903,
1330,
1459,
62,
1324,
198,
6738,
663,
38537,
516,
1330,
23283,
7509,
198,
6738,
764,
1330,
20613,
11,
17594,
62,
37153,
198,
6738,
266,
9587,
2736,
1018,
13,
12961,
1330,
7716,
62,
28712,
62,
17831,
11,
2198,
62,
28712,
6... | 3.703125 | 64 |
from azureml.core import Run, Workspace, Datastore, Dataset
from azureml.data.datapath import DataPath
import pandas as pd
import os
import argparse
from sklearn.datasets import load_iris
import snowflake.connector
# Get current run
current_run = Run.get_context()
# Get associated AML workspace
ws = current_run.exper... | [
6738,
35560,
495,
4029,
13,
7295,
1330,
5660,
11,
10933,
10223,
11,
16092,
459,
382,
11,
16092,
292,
316,
198,
6738,
35560,
495,
4029,
13,
7890,
13,
19608,
499,
776,
1330,
6060,
15235,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,... | 2.853896 | 308 |
import time
import os
import sys
from supported_apps import SupportedApps
run()
| [
11748,
640,
198,
11748,
28686,
198,
11748,
25064,
198,
6738,
4855,
62,
18211,
1330,
36848,
48433,
628,
628,
628,
628,
198,
5143,
3419,
198
] | 3.666667 | 24 |
""" this modules tests the functionality of language translation methods """
import unittest
from machinetranslation.translator import englishToFrench, frenchToEnglish
class TestEnglishToFrench(unittest.TestCase):
""" this class contains method to test the english to french translation functionality """
def t... | [
37811,
428,
13103,
5254,
262,
11244,
286,
3303,
11059,
5050,
37227,
198,
11748,
555,
715,
395,
198,
198,
6738,
3235,
259,
21879,
504,
7592,
13,
7645,
41880,
1330,
46932,
2514,
24111,
11,
48718,
2514,
15823,
198,
198,
4871,
6208,
15823,
... | 3.250774 | 323 |
import numpy as np
#mle fit to lr model: source: /home/timothytyree/Documents/GitHub/care/notebooks/Data/initial-conditions-lr-600x600/param_qu_tmax_30/Log/ic600x600.0.1_traj_sr_1200_mem_0.csv
shape=-0.338#74#-0.3383994872096594;
location=0.186#2#0.18616306715070396; #//cm
scale=0.139#86#5657625455955; #//cm
niter=250... | [
11748,
299,
32152,
355,
45941,
198,
2,
76,
293,
4197,
284,
300,
81,
2746,
25,
2723,
25,
1220,
11195,
14,
16514,
14863,
774,
631,
14,
38354,
14,
38,
270,
16066,
14,
6651,
14,
11295,
12106,
14,
6601,
14,
36733,
12,
17561,
1756,
12,
... | 1.818599 | 871 |
#!/usr/bin/env python3
# std imports
from typing import Union, Sequence, Optional, List, Dict, Tuple
import pdb
# local imports
from jumpstart.utils import echo, bcolors
from jumpstart.installs.cmd_builders import snap_install, snap_remove
TRIVIAL_PGKS = [
"slack",
"inkscape",
"pycharm-community",
"p... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
14367,
17944,
198,
6738,
19720,
1330,
4479,
11,
45835,
11,
32233,
11,
7343,
11,
360,
713,
11,
309,
29291,
198,
11748,
279,
9945,
198,
198,
2,
1957,
17944,
198,
6738,
4391... | 1.902181 | 1,605 |
import datetime
import time
from .schema_dsl_common import *
JSON_TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
ToTimestamp = SchemaFilter('filter', 'ToTimestamp', to_timestamp)
Trim = SchemaFilter('filter', 'Trim', trim)
ToString = SchemaFilter('filter', 'ToString', to_string)
| [
11748,
4818,
8079,
198,
11748,
640,
198,
198,
6738,
764,
15952,
2611,
62,
67,
6649,
62,
11321,
1330,
1635,
198,
198,
40386,
62,
34694,
62,
21389,
1404,
796,
705,
4,
56,
12,
4,
76,
12,
4,
67,
51,
4,
39,
25,
4,
44,
25,
4,
50,
... | 2.536364 | 110 |
import subprocess
from .common import *
| [
11748,
850,
14681,
198,
198,
6738,
764,
11321,
1330,
1635,
198
] | 3.727273 | 11 |
from coronacheck_tools.verification.mobilecore import validate as mobilecore_validate, clearconfig as mobilecore_clearconfig, \
readconfig as mobilecore_readconfig
# there's only one strategy at the moment
# mobilecore: a thin wrapper around the mobilecore validator from the coronacheck.nl app
strategies = ('mobil... | [
6738,
26920,
4891,
694,
62,
31391,
13,
332,
2649,
13,
24896,
7295,
1330,
26571,
355,
5175,
7295,
62,
12102,
378,
11,
1598,
11250,
355,
5175,
7295,
62,
20063,
11250,
11,
3467,
198,
220,
220,
220,
1100,
11250,
355,
5175,
7295,
62,
961,
... | 3.257908 | 411 |
from django.shortcuts import render
from django.http import Http404
from .models import onepiece, naruto, haikyu, aot, onepunchman, bnha, afrosamurai, bleach, deathnote, kny, fairytail, \
fmab, hxh, tokyoghoul, boruto
from list.models import animelist, topanime
# Create your views here.
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
26429,
198,
6738,
764,
27530,
1330,
530,
12239,
11,
30083,
9390,
11,
387,
1134,
24767,
11,
257,
313,
11,
530,
79,
3316,
805,
11,
27... | 2.785714 | 112 |
# -*- coding: utf-8 -*-
import functools
import click
import tensorflow as tf
from tensorflow.contrib.framework import arg_scope, add_arg_scope
from tfsnippet.bayes import BayesianNet
from tfsnippet.distributions import Normal, Bernoulli
from tfsnippet.examples.datasets import load_mnist, bernoulli_flow
from tfsnippe... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
1257,
310,
10141,
198,
198,
11748,
3904,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
3642,
822,
13,
30604,
1330,
1822,
62,
29982,
... | 2.014859 | 673 |
import time
import board
from analogio import AnalogIn
input = AnalogIn(board.A1)
while True:
print(input)
time.sleep(0.5)
| [
11748,
640,
198,
11748,
3096,
198,
6738,
15075,
952,
1330,
50088,
818,
198,
198,
15414,
796,
50088,
818,
7,
3526,
13,
32,
16,
8,
198,
198,
4514,
6407,
25,
198,
220,
220,
220,
3601,
7,
15414,
8,
198,
220,
220,
220,
640,
13,
42832,
... | 2.66 | 50 |
"""
This is a modelmanager plugin for a django server app that gives you a
browser interface and a database backend for your model.
The plugin is made up of two custom Django apps, one residing in the
modelmanager package and one in the project/resourcedir/browser directory.
While the first is fully importable (i.e. i... | [
37811,
198,
1212,
318,
257,
2746,
37153,
13877,
329,
257,
42625,
14208,
4382,
598,
326,
3607,
345,
257,
198,
40259,
7071,
290,
257,
6831,
30203,
329,
534,
2746,
13,
198,
198,
464,
13877,
318,
925,
510,
286,
734,
2183,
37770,
6725,
11,... | 3.821229 | 179 |
import os.path
import json
import copy
import itertools
import requests.exceptions
from . import transport
from . import errors
from . import utils
from . import schemata
service_error = utils.registry(errors.ServiceError, 'ERRORS')
@service_error(-1)
class InternalError(errors.ServiceError):
"""An internal servi... | [
11748,
28686,
13,
6978,
198,
11748,
33918,
198,
11748,
4866,
198,
11748,
340,
861,
10141,
198,
11748,
7007,
13,
1069,
11755,
198,
198,
6738,
764,
1330,
4839,
198,
6738,
764,
1330,
8563,
198,
6738,
764,
1330,
3384,
4487,
198,
6738,
764,
... | 3.173913 | 759 |
#!/usr/bin/env python
###### ver 0.2
#
# 0.1 init
# 0.2 add whois
#
import socket, select, string | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
220,
220,
220,
220,
220,
220,
198,
198,
4242,
2235,
3326,
657,
13,
17,
198,
2,
198,
2,
657,
13,
16,
2315,
198,
2,
657,
13,
17,
751,
508,
271,
198,
2,
198,
198,
11748,
17802,
11,
292... | 2.1875 | 48 |
from . import *
from bfg9000.objutils import *
| [
6738,
764,
1330,
1635,
198,
198,
6738,
275,
40616,
24,
830,
13,
26801,
26791,
1330,
1635,
628,
628,
198
] | 2.736842 | 19 |
from enum import EnumMeta, Enum, IntFlag
from datetime import datetime, timezone
from typing import get_args, get_origin, Union
def is_high_model_type(type_):
"""
Whether ``type_`` is both a model type and not a base model type.
"high" here is meant to indicate that it is not at the bottom of the model
... | [
6738,
33829,
1330,
2039,
388,
48526,
11,
2039,
388,
11,
2558,
34227,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
640,
11340,
198,
6738,
19720,
1330,
651,
62,
22046,
11,
651,
62,
47103,
11,
4479,
628,
198,
4299,
318,
62,
8929,
62,
1... | 2.976575 | 1,238 |
'''https://practice.geeksforgeeks.org/problems/duplicate-subtrees/1
Duplicate Subtrees
Medium Accuracy: 43.37% Submissions: 15751 Points: 4
Given a binary tree of size N, your task is to that find all duplicate subtrees from the given binary tree.
Example:
Input :
Output : 2 4
4
Explanation: Above Trees a... | [
7061,
6,
5450,
1378,
39541,
13,
469,
2573,
30293,
2573,
13,
2398,
14,
1676,
22143,
14,
646,
489,
5344,
12,
7266,
83,
6037,
14,
16,
198,
35660,
489,
5344,
3834,
83,
6037,
220,
198,
31205,
33222,
25,
5946,
13,
2718,
4,
3834,
8481,
2... | 2.705263 | 475 |
from django.views.generic import TemplateView, FormView
from .readopensecrets import read_contributions, read_contibutors
from .readpolitifact import read_recent_statements
from .fivethirtyeight import getPollNum
from django.http.response import HttpResponseRedirect
from django.shortcuts import reverse
from .forms impo... | [
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
37350,
7680,
11,
5178,
7680,
198,
6738,
764,
961,
404,
1072,
7513,
912,
1330,
1100,
62,
3642,
2455,
507,
11,
1100,
62,
3642,
571,
315,
669,
198,
6738,
764,
961,
34470,
29660,
1330,
1100,... | 3.722222 | 90 |
import copy
import pytest
import typing
import argparse
from mitmproxy import options
from mitmproxy import optmanager
from mitmproxy import exceptions
| [
11748,
4866,
198,
11748,
12972,
9288,
198,
11748,
19720,
198,
11748,
1822,
29572,
198,
198,
6738,
10255,
76,
36436,
1330,
3689,
198,
6738,
10255,
76,
36436,
1330,
2172,
37153,
198,
6738,
10255,
76,
36436,
1330,
13269,
628,
628,
628,
628,
... | 3.632653 | 49 |
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Generates Go source files from a mojom.Module.'''
from itertools import chain
import os
import re
from mojom.generate.template_expander import UseJinja
... | [
2,
15069,
1853,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
198,
7061,... | 2.146725 | 1,145 |
# coding=utf-8
# Copyright (C) 2020 ATHENA AUTHORS; Ne Luo
# 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,
19617,
28,
40477,
12,
23,
198,
2,
15069,
357,
34,
8,
12131,
317,
4221,
45510,
37195,
20673,
26,
3169,
25956,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
... | 2.357547 | 2,120 |
"""aiocogeo.tag"""
import logging
import struct
from dataclasses import dataclass
from typing import Any, Optional, Tuple, Union
from . import config
from .constants import GEO_KEYS, TIFF_TAGS
from .filesystems import Filesystem
logger = logging.getLogger(__name__)
logger.setLevel(config.LOG_LEVEL)
@dataclass
class... | [
37811,
1872,
25634,
469,
78,
13,
12985,
37811,
198,
11748,
18931,
198,
11748,
2878,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
4377,
11,
32233,
11,
309,
29291,
11,
4479,
198,
198,
6738,
764,
1330,
4566,... | 2.179174 | 2,372 |
#!/usr/bin/env python
import os
from ehive.runnable.IGFBaseJobFactory import IGFBaseJobFactory
from igf_data.illumina.samplesheet import SampleSheet
class SampleSheetFlowcellFactory(IGFBaseJobFactory):
'''
A class for finding all the projects mentioned in the SampleSheet
''' | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
28686,
198,
6738,
32622,
425,
13,
5143,
77,
540,
13,
3528,
37,
14881,
33308,
22810,
1330,
46757,
14881,
33308,
22810,
198,
6738,
45329,
69,
62,
7890,
13,
359,
388,
1437,
13,
82,... | 3.241379 | 87 |
from .checkHugoCommand import isHugoAvailable
from os import system as runCommand
from logging import getLogger as gL
LOGGER = gL(__name__)
def startHugoSite(hugoFolder: str) -> None:
"""
Run Hugo command to create a new site folder
"""
# precondition
assert isinstance(hugoFolder, str), "hugoFol... | [
6738,
764,
9122,
48098,
78,
21575,
1330,
318,
48098,
78,
10493,
198,
6738,
28686,
1330,
1080,
355,
1057,
21575,
198,
6738,
18931,
1330,
651,
11187,
1362,
355,
308,
43,
198,
198,
25294,
30373,
796,
308,
43,
7,
834,
3672,
834,
8,
628,
... | 2.739583 | 192 |
# flake8: noqa
# import all models into this package
# if you have many models here with many references from one model to another this may
# raise a RecursionError
# to avoid this, import only the models that you directly need like:
# from from kleister.model.pet import Pet
# or import this package, but before doing ... | [
2,
781,
539,
23,
25,
645,
20402,
198,
198,
2,
1330,
477,
4981,
656,
428,
5301,
198,
2,
611,
345,
423,
867,
4981,
994,
351,
867,
10288,
422,
530,
2746,
284,
1194,
428,
743,
198,
2,
5298,
257,
3311,
24197,
12331,
198,
2,
284,
3368... | 3.47619 | 630 |
# Test Script for checking elementary modes
# Dec 2017
import structural
import numpy as np
import pkg_resources
import os
import tempfile
| [
2,
6208,
12327,
329,
10627,
19823,
12881,
198,
2,
4280,
2177,
198,
198,
11748,
13204,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
279,
10025,
62,
37540,
198,
11748,
28686,
198,
11748,
20218,
7753,
628,
628,
628,
628
] | 3.868421 | 38 |
#!/usr/bin/python3
from random import randint
MAX_ = 500 # Specify biggest possible value from random number generation
# Asks user for a guess and returns this when successful
num_to_guess = randint(0, MAX_) # Generates a random number between 0 and value of MAX_
print(
"Welcome to my random number guessing ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
6738,
4738,
1330,
43720,
600,
198,
198,
22921,
62,
796,
5323,
220,
1303,
18291,
1958,
4094,
1744,
1988,
422,
4738,
1271,
5270,
198,
198,
2,
1081,
591,
2836,
329,
257,
4724,
290,
5860,
4... | 2.736018 | 447 |
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Recipe for 'git' building.
During testing, it may be useful to focus on building Git. This can be done by
running this recipe module directly.
"""
from ... | [
2,
15069,
2177,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
198,
37811... | 2.238411 | 604 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Copyright (c) 2021, One Identity LLC
# File: get_sudo_policy_for_unix_host.py
# Desc: Ansible module for sudo_policy_for_unix_host role that runs pmsrvinfo
# and returns its results.
# Aut... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
16529,
26171,
198,
2,
15069,
357,
66,
8,
33448,
11,
1881,
27207,
11419,
198,
2,
9220,
25,
651,
62,
24032,
62,
3058... | 2.798038 | 2,446 |
nota1 = float(input('Informe sua nota do Trabalho de Laboratório: '))
nota2 = float(input('Informe sua nota da Avaliação semestral: '))
nota3 = float(input('Informe sua nota do Exame Final: '))
media = ((nota1 * 2) + (nota2 * 3) + (nota3 * 5)) / 10
if media <= 2.9:
print(f'Sua média foi de {media:2f}. Você foi REP... | [
1662,
64,
16,
796,
12178,
7,
15414,
10786,
818,
687,
68,
424,
64,
407,
64,
466,
833,
44349,
8873,
390,
7882,
265,
10205,
27250,
25,
705,
4008,
198,
1662,
64,
17,
796,
12178,
7,
15414,
10786,
818,
687,
68,
424,
64,
407,
64,
12379,
... | 2.116379 | 232 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Upload the game for distribution - make sure to configure Build.json
# Usage : UploadItch.py <absolute-output-dir>
#
# Gwennaël Arbona 2021
#----------------------------------------... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
2,
10097,
24305,
201,
198,
2,
36803,
262,
983,
329,
6082,
532,
787,
1654,
284,
17425,
10934,
13,
... | 3.447154 | 615 |
# Generated by Django 3.2.9 on 2021-11-30 09:20
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
24,
319,
33448,
12,
1157,
12,
1270,
7769,
25,
1238,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | [
2,
15069,
13130,
383,
6378,
5908,
4946,
16092,
292,
316,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
... | 3.05516 | 562 |
#!/usr/bin/env python
"""In a OS shell::
python cma_multiplt.py data_file_name
or in a python shell::
import cma_multiplt as lcmaplt
lcmaplt.plot(data_file_name)
"""
# CMA-ES, Covariance Matrix Adaptation Evolution Strategy
# Copyright (c) 2014 Inria
# Author: Emmanuel Benazera <emmanuel.benazer... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
818,
257,
7294,
7582,
3712,
628,
220,
220,
220,
21015,
269,
2611,
62,
47945,
83,
13,
9078,
1366,
62,
7753,
62,
3672,
198,
220,
220,
220,
220,
198,
273,
287,
257,
21015,
7582,
... | 3.120553 | 506 |
import inspect
from spidermon.exceptions import (
InvalidMonitor,
InvalidMonitorClass,
InvalidMonitorTuple,
)
from .monitors import Monitor
from .actions import Action
| [
11748,
10104,
198,
198,
6738,
19230,
2144,
13,
1069,
11755,
1330,
357,
198,
220,
220,
220,
17665,
35479,
11,
198,
220,
220,
220,
17665,
35479,
9487,
11,
198,
220,
220,
220,
17665,
35479,
51,
29291,
11,
198,
8,
198,
6738,
764,
2144,
... | 3.45283 | 53 |
from __future__ import print_function, division, absolute_import
from .authentication import Authentication
from .backend_key_data import BackendKeyData
from .bind_complete import BindComplete
from .close_complete import CloseComplete
from .command_complete import CommandComplete
from .copy_in_response import CopyInRe... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
11,
4112,
62,
11748,
198,
198,
6738,
764,
41299,
3299,
1330,
48191,
198,
6738,
764,
1891,
437,
62,
2539,
62,
7890,
1330,
5157,
437,
9218,
6601,
198,
6738,
764,
21653,
62,
20751,... | 3.75873 | 315 |
from taliesin.connectors.v0.models import Connector
from taliesin.databases.v0.models import Database
from taliesin.queries.v0.models import Query
| [
6738,
3305,
444,
259,
13,
8443,
669,
13,
85,
15,
13,
27530,
1330,
8113,
273,
198,
6738,
3305,
444,
259,
13,
19608,
18826,
13,
85,
15,
13,
27530,
1330,
24047,
198,
6738,
3305,
444,
259,
13,
421,
10640,
13,
85,
15,
13,
27530,
1330,
... | 3.217391 | 46 |
"""
Crie um programa que tenha uma Tupla totalmente preenchida com uma contagem por extenso,
de zero até vinte.
Seu programa devera ler um numero pelo teclado(entre 0 e 20) e mostra-lo por extenso.
"""
numeros = ('Zero', 'Um', 'Dois', 'Tres', 'Quatro', 'Cinco', 'Seis',
'Sete', 'Oito', 'Nove', 'Dez', 'Onze',... | [
37811,
198,
34,
5034,
23781,
1430,
64,
8358,
3478,
3099,
334,
2611,
16749,
489,
64,
2472,
434,
68,
662,
24421,
3755,
401,
334,
2611,
34335,
368,
16964,
1070,
268,
568,
11,
198,
2934,
6632,
379,
2634,
410,
600,
68,
13,
198,
198,
4653... | 2.319853 | 272 |
from unittest import mock, TestCase
from utop.lib.memory import Memory
| [
6738,
555,
715,
395,
1330,
15290,
11,
6208,
20448,
198,
198,
6738,
3384,
404,
13,
8019,
13,
31673,
1330,
14059,
628
] | 3.47619 | 21 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""taivision: a deep learning vision toolkit powered by pytorch."""
from __future__ import absolute_import
pytorch_version = '1.7.1'
__version__ = '0.0.0'
import warnings
import os
import torch
# from . import data
# from . import model_zoo
# from . import nn
# fro... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
8326,
452,
1166,
25,
257,
2769,
4673,
5761,
2891,
15813,
13232,
416,
12972,
13165,
354,
526,
15931,
198,
67... | 2.944134 | 179 |
from systems.system import System
from scripts.callbacks import *
from scripts.components import *
| [
6738,
3341,
13,
10057,
1330,
4482,
198,
6738,
14750,
13,
13345,
10146,
1330,
1635,
198,
6738,
14750,
13,
5589,
3906,
1330,
1635,
628
] | 4.347826 | 23 |
import subprocess
if __name__ == "__main__":
run_tests_command = (
"unittest-parallel -t . -s tests --coverage --coverage-rcfile .coveragerc"
)
subprocess.run(run_tests_command.split(" "), check=True, text=True)
| [
11748,
850,
14681,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1057,
62,
41989,
62,
21812,
796,
357,
198,
220,
220,
220,
220,
220,
220,
220,
366,
403,
715,
395,
12,
1845,
29363,
532,
83,
... | 2.478723 | 94 |
import math
import random
import numpy as np
from util import rot_matrix
# Frequency at which animations are updated
UPDATE_RATE = 30
# Time between each update (in seconds)
UPDATE_TIME = 1 / UPDATE_RATE
# Colors
GREEN = np.array([0,1,0])
BLUE = np.array([0,0,1])
RED = np.array([1,0,0])
YELLOW = np.array([1,1,0])
CY... | [
11748,
10688,
198,
11748,
4738,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
7736,
1330,
5724,
62,
6759,
8609,
198,
198,
2,
31902,
379,
543,
22407,
389,
6153,
198,
16977,
62,
49,
6158,
796,
1542,
198,
198,
2,
3862,
1022,
1123,
4296,... | 2.899846 | 649 |
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | [
2,
49962,
284,
1012,
280,
1082,
64,
11,
3457,
13,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
1012,
280,
1082,
... | 3.841155 | 277 |
#!/usr/bin/env python
# -*- coding: utf-8 -*
import os
import script
import sys
from script import *
from collections import Counter
def prepararSalida(fichero):
""" Preparamos el fichero de salida escribiendo los headers. """
f= open(fichero,"w+")
f.write("texto; disc. token (%); disc. split (%); disc. ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
198,
198,
11748,
28686,
198,
11748,
4226,
198,
11748,
25064,
198,
198,
6738,
4226,
1330,
1635,
198,
6738,
17268,
1330,
15034,
198,... | 2.246091 | 1,471 |
# -*- encoding=utf-8 -*-
# import tensorflow as tf
import tflite_runtime.interpreter as tflite
import numpy as np
PATH_TO_TENSORFLOW_MODEL = 'models/face_mask_detection.pb'
EDGETPU_SHARED_LIB = "libedgetpu.so.1"
| [
2,
532,
9,
12,
21004,
28,
40477,
12,
23,
532,
9,
12,
198,
2,
1330,
11192,
273,
11125,
355,
48700,
198,
11748,
256,
2704,
578,
62,
43282,
13,
3849,
3866,
353,
355,
256,
2704,
578,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
... | 2.347826 | 92 |
from pallets_sphinx_themes import ProjectLink
# -- Project information -----------------------------------------------------
project = 'Flask-JSONRPC'
copyright = '2021, Nycholas de Oliveira e Oliveira' # pylint: disable=W0622
author = 'Nycholas de Oliveira e Oliveira'
release = '2.1.0'
version = '2.1.0'
# -- Gener... | [
6738,
6340,
5289,
62,
82,
746,
28413,
62,
1169,
6880,
1330,
4935,
11280,
198,
198,
2,
1377,
4935,
1321,
20368,
19351,
12,
198,
198,
16302,
796,
705,
7414,
2093,
12,
40386,
49,
5662,
6,
198,
22163,
4766,
796,
705,
1238,
2481,
11,
177... | 2.759207 | 706 |
"""Refeed manually captured data to the classifier."""
import argparse
from base64 import b64encode
import json
import os
from pathlib import Path
import requests
if __name__ == "__main__":
init()
| [
37811,
8134,
2308,
14500,
7907,
1366,
284,
262,
1398,
7483,
526,
15931,
198,
11748,
1822,
29572,
198,
6738,
2779,
2414,
1330,
275,
2414,
268,
8189,
198,
11748,
33918,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
7007... | 3.423729 | 59 |
from panda3d.core import Vec3, Point3, BitMask32
UNPICKABLE = ['x-disc-visible', 'y-disc-visible', 'z-disc-visible',
'GridBack', 'unpickable']
# For linmath operations
X_AXIS = Vec3(1, 0, 0)
Y_AXIS = Vec3(0, 1, 0)
Z_AXIS = Vec3(0, 0, 1)
NEG_X_AXIS = Vec3(-1, 0, 0)
NEG_Y_AXIS = Vec3(0, -1, 0)
NEG_Z_AXIS ... | [
6738,
279,
5282,
18,
67,
13,
7295,
1330,
38692,
18,
11,
6252,
18,
11,
4722,
45195,
2624,
198,
198,
4944,
47,
11860,
17534,
796,
37250,
87,
12,
15410,
12,
23504,
3256,
705,
88,
12,
15410,
12,
23504,
3256,
705,
89,
12,
15410,
12,
23... | 1.932471 | 696 |
"""
This script constructs the Disease and the Drug Graph
"""
# Assuming usual suspects are already imported
import pandas as pd
import networkx as nx
# Paths for input geo and mesh files
GEO_PATH = '../../data/final/geo.pkl'
MESH_PATH = '../../data/final/mesh.pkl'
# Paths for output Gephi files
GEPHI_NODES = 'Gephi... | [
37811,
198,
1212,
4226,
34175,
262,
17344,
290,
262,
11095,
29681,
198,
37811,
198,
198,
2,
33238,
6678,
11826,
389,
1541,
17392,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
3127,
87,
355,
299,
87,
198,
198,
2,
10644,
82,
329,
... | 2.4136 | 1,603 |