content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
"""AWS S3 Plugin."""
import os
from typing import List
from tempfile import NamedTemporaryFile
from netskope.integrations.cls.plugin_base import (
PluginBase,
ValidationResult,
PushResult,
)
from .utils.aws_s3_validator import (
AWSS3Validator,
)
from .utils.aws_s3_client import AWSS3Client
| [
37811,
12298,
50,
311,
18,
42636,
526,
15931,
198,
11748,
28686,
198,
6738,
19720,
1330,
7343,
198,
6738,
20218,
7753,
1330,
34441,
12966,
5551,
8979,
198,
198,
6738,
299,
29515,
3008,
13,
18908,
9143,
13,
565,
82,
13,
33803,
62,
8692,
... | 2.818182 | 110 |
"""Database fixtures."""
import pytest
| [
37811,
38105,
34609,
526,
15931,
198,
198,
11748,
12972,
9288,
628
] | 3.727273 | 11 |
import logging
import uvicorn
from fastapi_offline import FastAPIOffline as FastAPI
#from cdr_plugin_folder_to_folder.api.users import router
from osbot_utils.utils.Misc import to_int
from cdr_plugin_folder_to_folder.api.routes.Processing import router as router_processing
from cdr_plugin_folder_to_folder.api.routes... | [
11748,
18931,
198,
198,
11748,
334,
25531,
1211,
198,
6738,
3049,
15042,
62,
2364,
1370,
1330,
12549,
17614,
28657,
355,
12549,
17614,
198,
198,
2,
6738,
269,
7109,
62,
33803,
62,
43551,
62,
1462,
62,
43551,
13,
15042,
13,
18417,
1330,
... | 3.122249 | 409 |
# Evaluate using Shuffle Split Cross Validation
from pandas import read_csv
from sklearn.model_selection import ShuffleSplit
from sklearn.model_selection import cross_val_score
from sklearn.linear_model import LogisticRegression
filename = 'pima-indians-diabetes.data.csv'
names = ['preg', 'plas', 'pres', 'skin', 'test'... | [
2,
26439,
4985,
1262,
911,
18137,
27758,
6372,
3254,
24765,
198,
6738,
19798,
292,
1330,
1100,
62,
40664,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
911,
18137,
41205,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
3272,
6... | 2.781481 | 270 |
# coding: utf-8
from __future__ import (
unicode_literals, division, print_function, absolute_import
)
import re
import pytest
from ww import s, g, f
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
11593,
37443,
834,
1330,
357,
198,
220,
220,
220,
28000,
1098,
62,
17201,
874,
11,
7297,
11,
3601,
62,
8818,
11,
4112,
62,
11748,
198,
8,
198,
198,
11748,
302,
198,
198,
11748,
12972... | 2.725806 | 62 |
import ast
from sherlock.codelib.analyzer.variable import Type
from sherlock.codelib.system_function import system_function
| [
11748,
6468,
198,
6738,
15059,
5354,
13,
19815,
417,
571,
13,
38200,
9107,
13,
45286,
1330,
5994,
198,
6738,
15059,
5354,
13,
19815,
417,
571,
13,
10057,
62,
8818,
1330,
1080,
62,
8818,
628
] | 3.676471 | 34 |
from rest_framework.exceptions import APIException
from django.utils.translation import ugettext_lazy as _
from rest_framework.status import HTTP_423_LOCKED
# Create your errors here.
| [
6738,
1334,
62,
30604,
13,
1069,
11755,
1330,
7824,
16922,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
6738,
1334,
62,
30604,
13,
13376,
1330,
14626,
62,
43356,
62,
36840,
1961,
... | 3.72 | 50 |
from services.volt.models import AccessDevice, VOLTDevice
from xosresource import XOSResource
| [
6738,
2594,
13,
37764,
13,
27530,
1330,
8798,
24728,
11,
38570,
51,
24728,
198,
6738,
2124,
418,
31092,
1330,
1395,
2640,
26198,
628
] | 4.130435 | 23 |
import pandas as pd
import math
from matplotlib import pyplot
ts = pd.read_csv("airline-passengers.csv", header=0, index_col=0)
nOfPassengers = ts["Passengers"]
values = nOfPassengers.values.tolist()
forecast = [math.nan]
for i in range(0, len(values) - 1):
forecast.append(values[i])
pyplot.plot(values)
pyplot... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
10688,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
198,
198,
912,
796,
279,
67,
13,
961,
62,
40664,
7203,
958,
1370,
12,
6603,
9302,
13,
40664,
1600,
13639,
28,
15,
11,
6376,
62,
40... | 2.348 | 250 |
"""create exchange table
Revision ID: bfa53193d3bf
Revises: b97a89b20fa2
Create Date: 2019-09-22 01:17:06.735174
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bfa53193d3bf'
down_revision = 'b97a89b20fa2'
branch_labels = None
depends_on = None
| [
37811,
17953,
5163,
3084,
198,
198,
18009,
1166,
4522,
25,
275,
13331,
4310,
24943,
67,
18,
19881,
198,
18009,
2696,
25,
275,
5607,
64,
4531,
65,
1238,
13331,
17,
198,
16447,
7536,
25,
13130,
12,
2931,
12,
1828,
5534,
25,
1558,
25,
... | 2.516393 | 122 |
#!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
import time
import logging
import numpy as np
from biosppy.signals import ecg
from biosppy.storage import load_txt
import matplotlib.pyplot as plt
logging.basicConfig(level = logging.DEBUG,format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
201,
198,
201,
198,
11748,
25064,
201,
198,
11748,
640,
201,
198,
11748,
18931,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198... | 2.338983 | 236 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
from app import db
from app.models.base_model import BaseModel
| [
6738,
598,
1330,
20613,
198,
6738,
598,
13,
27530,
13,
8692,
62,
19849,
1330,
7308,
17633,
628
] | 3.764706 | 17 |
import time
import json
from copy import deepcopy
| [
11748,
640,
198,
11748,
33918,
198,
198,
6738,
4866,
1330,
2769,
30073,
628
] | 4 | 13 |
import math
import torch
from .Module import Module
from .utils import clear
| [
11748,
10688,
198,
11748,
28034,
198,
6738,
764,
26796,
1330,
19937,
198,
6738,
764,
26791,
1330,
1598,
628
] | 4.333333 | 18 |
"""
Utilities for testing
"""
import numpy as np
from astropy.table import Table as apTable
from astropy.utils.diff import report_diff_values
def compare_tables(t1, t2):
""" Compare all the tables in two `astropy.table.Table`)
Parameters
----------
t1 : `astropy.table.Table`
One table
t2 ... | [
37811,
198,
18274,
2410,
329,
4856,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
6468,
28338,
13,
11487,
1330,
8655,
355,
2471,
10962,
198,
6738,
6468,
28338,
13,
26791,
13,
26069,
1330,
989,
62,
26069,
62,
27160,
628... | 2.328048 | 1,009 |
__author__ = '__knh4vu__'
from helper import greeting
from helper3 import greeting3
from helper2 import greeting2
if __name__ == '__main__':
greeting('hello')
greeting2('There')
| [
834,
9800,
834,
796,
705,
834,
15418,
71,
19,
40939,
834,
6,
198,
198,
6738,
31904,
1330,
31933,
198,
198,
6738,
31904,
18,
1330,
31933,
18,
198,
198,
6738,
31904,
17,
1330,
31933,
17,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834... | 2.890625 | 64 |
from textwrap import dedent
import pytest
from pylox.lox import Lox
# Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/inheritance/constructor.lox
TEST_SRC = dedent(
"""\
class A {
init(param) {
this.field = param;
}
test() {
print this.fi... | [
6738,
2420,
37150,
1330,
4648,
298,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
279,
2645,
1140,
13,
75,
1140,
1330,
406,
1140,
198,
198,
2,
7308,
2663,
422,
3740,
1378,
12567,
13,
785,
14,
6199,
21559,
14,
3323,
278,
3849,
3866,
... | 2.257426 | 202 |
#! -*- coding:utf-8 -*-
"""Shortcuts for yuqing trials
.. moduleauthor:: Huan Di <hd@iamhd.top>
"""
from byq_trial.auth import SimpleAuth
from byq_trial.call import APICall
__all__ = [SimpleAuth, APICall]
| [
2,
0,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
37811,
16438,
23779,
329,
331,
84,
80,
278,
9867,
198,
198,
492,
8265,
9800,
3712,
367,
7258,
6031,
1279,
31298,
31,
1789,
31298,
13,
4852,
29,
198,
198,
37811,
198,
1... | 2.54878 | 82 |
#!/usr/bin/env python3
""" Import comunity modules. """
import os
import sys
import jinja2
import re
HERE = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, f"{HERE}")
def get_template(file_name, searchpath=f"{HERE}/templates"):
""" Load and return a Jinja template file. """
templateLoader ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
17267,
401,
9531,
13103,
13,
37227,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
474,
259,
6592,
17,
198,
11748,
302,
198,
198,
39,
9338,
796,
28686,
13,
6978... | 2.766382 | 351 |
lista_filmes = ['vingadores ultimato', 'star wars', 'as branquelas', 'vov... zona']#Criando as 4 listas
print("lista filmes: " ,lista_filmes)
print("\n")
lista_jogos = ['genshin impact', 'the witcher 3', 'dying light', 'destiny']#Criando as 4 listas
print("lista jogos: " ,lista_jogos)
print("\n")
lista_livros = ['o ult... | [
4868,
64,
62,
10379,
6880,
796,
37250,
1075,
324,
2850,
3789,
320,
5549,
3256,
705,
7364,
9976,
3256,
705,
292,
865,
26184,
417,
292,
3256,
705,
85,
709,
986,
1976,
4450,
20520,
2,
34,
380,
25440,
355,
604,
1351,
292,
198,
4798,
720... | 2.48 | 800 |
from django.test import TestCase
from django.test.client import Client
from django.core.urlresolvers import reverse
from ipaymu.forms import IpaymuForm
from ipaymu.models import IpaymuSessionID
from ipaymu.utils import save_session, verify_session, IpaymuParamsBuilder
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
9288,
13,
16366,
1330,
20985,
198,
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
198,
6738,
20966,
323,
30300,
13,
23914,
1330,
314,... | 3.3875 | 80 |
# ---
# jupyter:
# jupytext:
# formats: ipynb,md
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.10.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %% [markdown]
# # Eppy is ... | [
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
220,
220,
220,
220,
17519,
25,
20966,
2047,
65,
11,
9132,
198,
2,
220,
220,
220,
220,
2420,
62,
15603,
341,
25,
198,
2,
220,
220,
220... | 2.166294 | 4,913 |
# MINUTES
IT_IS = [[0,0],[0,1],[0,3],[0,4]]
FIVE = [[3,i] for i in range(7,11)]
TEN = [[1,i] for i in range(6,9)]
QUARTER = [[2,i] for i in range(2,9)]
TWENTY = [[3,i] for i in range(1,7)]
HALF = [[1,i] for i in range(2,6)]
TO = [[4,i] for i in range(1,3)]
PAST = [[4,i] for i in range(3,7)]
MINUTES = [
[],
FI... | [
2,
20625,
3843,
1546,
220,
198,
2043,
62,
1797,
796,
16410,
15,
11,
15,
38430,
15,
11,
16,
38430,
15,
11,
18,
38430,
15,
11,
19,
11907,
198,
37,
9306,
796,
16410,
18,
11,
72,
60,
329,
1312,
287,
2837,
7,
22,
11,
1157,
15437,
1... | 1.857143 | 1,365 |
# TCE CCSD(T) and CCSD[T] calculations
import os
import sys
import qcdb
from ..utils import *
| [
2,
309,
5222,
327,
7902,
35,
7,
51,
8,
290,
327,
7902,
35,
58,
51,
60,
16765,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
11748,
10662,
66,
9945,
198,
198,
6738,
11485,
26791,
1330,
1635,
628,
198
] | 2.578947 | 38 |
#!/usr/bin/env python3
import time
import multiprocessing
import os
import vim
from async_worker import AsyncWorker
import utils
# Global map for host (source code) window ID -> Squeezer instance
squeezers = {}
# set of Squeezer instances that are waiting for updates
polling_squeezers = set()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
640,
198,
11748,
18540,
305,
919,
278,
198,
11748,
28686,
198,
198,
11748,
43907,
198,
198,
6738,
30351,
62,
28816,
1330,
1081,
13361,
12468,
263,
198,
11748,
3384,
4487,... | 3.265957 | 94 |
# python code to demonstrate working of enumerate()
for key, value in enumerate(['The', 'Big', 'Bang', 'Theory']):
print(key, value)
print('\n')
# python code to demonstrate working of enumerate()
for key, value in enumerate(['Geeks', 'for', 'Geeks', 'is', 'the', 'Best', 'Coding', 'Platform']):
print(value, e... | [
2,
21015,
2438,
284,
10176,
1762,
286,
27056,
378,
3419,
198,
1640,
1994,
11,
1988,
287,
27056,
378,
7,
17816,
464,
3256,
705,
12804,
3256,
705,
43984,
3256,
705,
464,
652,
20520,
2599,
198,
220,
220,
220,
3601,
7,
2539,
11,
1988,
8... | 2.98325 | 597 |
# -*- coding: utf-8 -*-
from sandbox_python_structure import f
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
35204,
62,
29412,
62,
301,
5620,
1330,
277,
628
] | 2.6 | 25 |
"""initial tables
Revision ID: 9e7ee952f6ae
Revises:
Create Date: 2016-10-21 17:20:27.709284
"""
# revision identifiers, used by Alembic.
revision = '9e7ee952f6ae'
down_revision = None
branch_labels = None
depends_on = None
from alembic import op
from sqlalchemy.types import Text
import sqlalchemy as sa
from sqlalc... | [
37811,
36733,
8893,
198,
198,
18009,
1166,
4522,
25,
860,
68,
22,
1453,
49234,
69,
21,
3609,
198,
18009,
2696,
25,
198,
16447,
7536,
25,
1584,
12,
940,
12,
2481,
1596,
25,
1238,
25,
1983,
13,
31495,
30336,
198,
198,
37811,
198,
198,... | 2.828571 | 140 |
#!/usr/bin/env python3
try:
import os
import json
import argparse
import shutil
from git import Repo
from jinja2 import Template, Environment, FileSystemLoader
except ImportError as ie:
print("Import failed for " + ie.name)
exit(1)
NAME_TAG = 'name'
TABLES_TAG = 'tables'
BITWIDTH_TAG =... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
28686,
198,
220,
220,
220,
1330,
33918,
198,
220,
220,
220,
1330,
1822,
29572,
198,
220,
220,
220,
1330,
4423,
346,
198,
220,
220,
220,
... | 2.564417 | 978 |
from setuptools import setup
setup(
name='event_loop',
version='0.1',
author='mapogolions',
author_email='ivanovpavelalex45@gmail.com',
description='Simple event loop',
license='LICENSE.txt',
long_description=readme(),
packages=['event_loop'],
install_requires=['mood.event', 'pyuv... | [
6738,
900,
37623,
10141,
1330,
9058,
628,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
15596,
62,
26268,
3256,
198,
220,
220,
220,
2196,
11639,
15,
13,
16,
3256,
198,
220,
220,
220,
1772,
11639,
8899,
519,
349,
507,
3256,
19... | 2.539063 | 128 |
harry = Person('Harry', 'Male', 47)
print(harry)
| [
198,
198,
71,
6532,
796,
7755,
10786,
18308,
3256,
705,
25486,
3256,
6298,
8,
198,
198,
4798,
7,
71,
6532,
8,
198
] | 2.363636 | 22 |
#a = raw_input()
num = input()
for jjj in range(num):
a = raw_input()
b = a.split(" ")
l = int(b[0])
b = b[1:]
c = len(b)-1
pp = 1
t = []
for i in range(c):
t.append(i%2)
qq = len(t)
q = {}
ls = 99999999
lo = ""
while not (addone() == qqq):
out = makestring()
if (out != ""):
gg = calcscore(... | [
2,
64,
796,
8246,
62,
15414,
3419,
198,
198,
22510,
796,
5128,
3419,
198,
198,
1640,
474,
41098,
287,
2837,
7,
22510,
2599,
198,
197,
64,
796,
8246,
62,
15414,
3419,
198,
197,
65,
796,
257,
13,
35312,
7203,
366,
8,
198,
197,
75,
... | 1.887324 | 213 |
#!/usr/bin/env python
import sys,os,re,fileinput,argparse
import csv
import random
parser = argparse.ArgumentParser(description="takes a file of CYC data, and produces pairwise info for cytoscape network viewing" )
parser.add_argument("--fi",help="the file, must be headered as \"Pathway-id Pathway-name Gene-id Gene-nam... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
25064,
11,
418,
11,
260,
11,
7753,
15414,
11,
853,
29572,
198,
11748,
269,
21370,
198,
11748,
4738,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
2625,
83,
112... | 2.819951 | 411 |
import os
| [
11748,
28686,
201,
198
] | 2.75 | 4 |
from .exceptions import UnexpectedValue
from .constants import *
import socket, struct, threading, time
| [
6738,
764,
1069,
11755,
1330,
471,
42072,
11395,
198,
6738,
764,
9979,
1187,
1330,
1635,
198,
198,
11748,
17802,
11,
2878,
11,
4704,
278,
11,
640,
198
] | 3.888889 | 27 |
def binary_search(search_num, sorted_arr):
"""
https://runestone.academy/runestone/books/published/pythonds/SortSearch/TheBinarySearch.html
First Q at https://dev.to/javinpaul/20-basic-algorithms-problems-from-coding-interviews-4o76
"""
if sorted_arr[0] == search_num:
return True
arr_l... | [
198,
198,
4299,
13934,
62,
12947,
7,
12947,
62,
22510,
11,
23243,
62,
3258,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3740,
1378,
5143,
13631,
13,
330,
324,
3065,
14,
5143,
13631,
14,
12106,
14,
30271,
14,
79,
5272,
24764... | 2.274809 | 393 |
import unittest
import axelrod
| [
11748,
555,
715,
395,
198,
198,
11748,
7877,
417,
14892,
628
] | 3 | 11 |
#There is a collection of
#input strings and a collection of query strings. For each query string, determine how many times it occurs in the list of input strings
f()
#2nd solution
| [
2,
1858,
318,
257,
4947,
286,
220,
198,
2,
15414,
13042,
290,
257,
4947,
286,
12405,
13042,
13,
1114,
1123,
12405,
4731,
11,
5004,
703,
867,
1661,
340,
8833,
287,
262,
1351,
286,
5128,
13042,
628,
198,
69,
3419,
198,
198,
2,
17,
3... | 4.021739 | 46 |
# Generated by Django 3.2.4 on 2021-06-30 14:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
19,
319,
33448,
12,
3312,
12,
1270,
1478,
25,
940,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
142... | 3.019231 | 52 |
'''Ref: https://arxiv.org/pdf/2003.00295.pdf'''
from typing import Callable, Dict, List, Optional, Tuple
import numpy as np
from flwr.common import (
EvaluateIns,
EvaluateRes,
FitIns,
FitRes,
Weights,
parameters_to_weights,
weights_to_parameters,
)
from flwr.server.strategy.aggregate imp... | [
7061,
6,
8134,
25,
220,
3740,
1378,
283,
87,
452,
13,
2398,
14,
12315,
14,
16088,
13,
405,
25710,
13,
12315,
7061,
6,
198,
198,
6738,
19720,
1330,
4889,
540,
11,
360,
713,
11,
7343,
11,
32233,
11,
309,
29291,
198,
198,
11748,
299,... | 2.690265 | 226 |
# also update in setup.py
__version__ = '0.6.9'
| [
2,
635,
4296,
287,
9058,
13,
9078,
198,
834,
9641,
834,
796,
705,
15,
13,
21,
13,
24,
6,
198
] | 2.4 | 20 |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
long_description = """
Short description...
"""
setuptools.setup(
name='test_package_kthdesa',
version='1.0.0',
author='Alexandros Korkovelos',
author_email='alekor@desa.kth.se',
description='This is a test pack... | [
11748,
900,
37623,
10141,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
6511,
62,
11213,
796,
37227,
198,
16438,... | 2.440994 | 322 |
import torch
from torch.nn import LeakyReLU
from torch.nn.functional import interpolate
from gan.EqualizedLayers import EqualizedConv2d, EqualizedDeconv2d
| [
11748,
28034,
198,
6738,
28034,
13,
20471,
1330,
1004,
15492,
3041,
41596,
198,
6738,
28034,
13,
20471,
13,
45124,
1330,
39555,
378,
198,
198,
6738,
308,
272,
13,
36,
13255,
1143,
43,
6962,
1330,
28701,
1143,
3103,
85,
17,
67,
11,
287... | 3.137255 | 51 |
"""Linguistic data for statistical pre-processing.
Frequency statistics, as seen in data/, are provided by:
a) Mark Mayzner, 1965:
------------------------------------------------------------------------------
METHODOLOGY: Starting at a random place in a given newspapers/magazines/book,
record three- to seven-letter... | [
37811,
43,
6680,
2569,
1366,
329,
13905,
662,
12,
36948,
13,
628,
198,
37,
28707,
7869,
11,
355,
1775,
287,
1366,
47454,
389,
2810,
416,
25,
198,
198,
64,
8,
2940,
1737,
89,
1008,
11,
17672,
25,
198,
10097,
26171,
198,
49273,
43781,... | 4.086957 | 322 |
from keras import backend as K
import numpy as np
def Active_Contour_Loss(y_true, y_pred):
"""
lenth term
"""
x = y_pred[:,:,1:,:] - y_pred[:,:,:-1,:] # horizontal and vertical directions
y = y_pred[:,:,:,1:] - y_pred[:,:,:,:-1]
delta_x = x[:,:,1:,:-2]**2
delta_y = y[:,:,:-2,1:]**2
delta_u = K.abs(delta... | [
198,
6738,
41927,
292,
1330,
30203,
355,
509,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4299,
14199,
62,
4264,
454,
62,
43,
793,
7,
88,
62,
7942,
11,
331,
62,
28764,
2599,
220,
628,
197,
37811,
198,
197,
75,
7944,
3381,
198,
1... | 2.208877 | 383 |
# -*- coding: utf-8 -*-
# Imports
import pandas as pd
from .pd_utils import load_csv_or_excel
from .pd_utils import load_experiment_results
from .pd_utils import to_torch
from .math_utils import standard
# Objective function class
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
1846,
3742,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
764,
30094,
62,
26791,
1330,
3440,
62,
40664,
62,
273,
62,
1069,
5276,
198,
6738,
764,
... | 2.571429 | 98 |
import osmnx as ox
import networkx as nx | [
11748,
267,
5796,
77,
87,
355,
12018,
198,
11748,
3127,
87,
355,
299,
87
] | 2.857143 | 14 |
#!/usr/bin/env python3
from time import time
if __name__ == '__main__':
start = time()
solu = fib_sum(4e6)
elapse = time() - start
print('Solution: {}'.format(solu))
print('Solution found in {:.8f}s'.format(elapse))
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
640,
1330,
640,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
923,
796,
640,
3419,
198,
220,
220,
220,
1540,
84,
796,
12900,
... | 2.428571 | 98 |
from tkinter import filedialog, ttk, messagebox
from tkinter import *
import traceback
import requests
import zipfile
import json
import os
from source.Game import Game, RomAlreadyPatched, InvalidGamePath, InvalidFormat, in_thread, VERSION_FILE_URL
from source.Option import Option
from source.definition import get_ver... | [
6738,
256,
74,
3849,
1330,
5717,
498,
519,
11,
256,
30488,
11,
3275,
3524,
198,
6738,
256,
74,
3849,
1330,
1635,
198,
11748,
12854,
1891,
198,
11748,
7007,
198,
11748,
19974,
7753,
198,
11748,
33918,
198,
11748,
28686,
198,
198,
6738,
... | 3.475806 | 124 |
import FWCore.ParameterSet.Config as cms
| [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
220,
220,
220,
220,
628
] | 2.764706 | 17 |
import os, sys, re, transaction, base64, zlib
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from .models import (
DBSession,
CIA,
Entry,
User,
Group,
Base,
)
from .security import hash_password
| [
11748,
28686,
11,
25064,
11,
302,
11,
8611,
11,
2779,
2414,
11,
1976,
8019,
198,
198,
6738,
44161,
282,
26599,
1330,
3113,
62,
6738,
62,
11250,
198,
198,
6738,
27944,
13,
79,
1603,
1330,
357,
198,
220,
220,
220,
651,
62,
1324,
33692... | 2.575221 | 113 |
from sklearn.ensemble import RandomForestClassifier
import xgboost as xgb
from sklearn.model_selection import cross_val_score
from sklearn.pipeline import Pipeline
import numpy as np
# =============================================================
# Modeling tools for cross validation
# Reference: https://github.com/fm... | [
6738,
1341,
35720,
13,
1072,
11306,
1330,
14534,
34605,
9487,
7483,
198,
11748,
2124,
70,
39521,
355,
2124,
22296,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
3272,
62,
2100,
62,
26675,
198,
6738,
1341,
35720,
13,
79,
541,
4470,... | 2.227703 | 1,480 |
# MIT License
#
# Copyright (c) 2020 Oli Wright <oli.wright.github@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | [
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
12131,
440,
4528,
12206,
1279,
11106,
13,
29995,
13,
12567,
31,
14816,
13,
785,
29,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
... | 3.195946 | 592 |
#reads in the protocol requirements and stores the information in a class
import yaml
import logging
logger = logging.getLogger(__name__)
| [
2,
40779,
287,
262,
8435,
5359,
290,
7000,
262,
1321,
287,
257,
1398,
201,
198,
201,
198,
11748,
331,
43695,
201,
198,
11748,
18931,
201,
198,
201,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
201,
198
] | 3.395349 | 43 |
#
# PySNMP MIB module CADANT-CMTS-NOTIFICATION-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CADANT-CMTS-NOTIFICATION-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:45:14 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python vers... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
37292,
8643,
12,
24187,
4694,
12,
11929,
30643,
6234,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
2723,
2393,
1378,
... | 2.747989 | 3,357 |
n1 = int(input('Digite o primeiro termo da PA: '))
n2 = int(input('Digite a razo da PA: '))
for c in range(1, 11):
o = n1 + (c - 1)*n2
print(o, end=' - ')
print('ACABOU') | [
77,
16,
796,
493,
7,
15414,
10786,
19511,
578,
267,
6994,
7058,
3381,
78,
12379,
8147,
25,
705,
4008,
198,
77,
17,
796,
493,
7,
15414,
10786,
19511,
578,
257,
374,
44299,
12379,
8147,
25,
705,
4008,
198,
1640,
269,
287,
2837,
7,
1... | 2.144578 | 83 |
import requests
import sys
import os
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
requests.adapters.DEFAULT_RETRIES = 10
| [
11748,
7007,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
2956,
297,
571,
18,
198,
198,
333,
297,
571,
18,
13,
40223,
62,
40539,
654,
7,
333,
297,
571,
18,
13,
1069,
11755,
13,
818,
22390,
18453,
20361,
8,
198,
8897,
3558,
13,
... | 2.910714 | 56 |
import logging
import io
from asyncio import Queue
from sse_starlette.sse import (
EventSourceResponse as _EventSourceResponse,
AppStatus,
ServerSentEvent,
)
from .endec import Encode
logger = logging.getLogger("app_server")
| [
11748,
18931,
198,
11748,
33245,
198,
6738,
30351,
952,
1330,
4670,
518,
198,
6738,
264,
325,
62,
7364,
21348,
13,
82,
325,
1330,
357,
198,
220,
220,
220,
8558,
7416,
31077,
355,
4808,
9237,
7416,
31077,
11,
198,
220,
220,
220,
2034,
... | 3.037975 | 79 |
#! /usr/bin/env python3
"""
Packet Commands
"""
COMMAND_CPU_WRITE = 1
COMMAND_CPU_READ = 2
COMMAND_DAQ_WRITE = 3
COMMAND_DAQ_READ = 4
"""
RAM ADDRESSES
"""
RAM0_BASE_ADDRESS = 0x90000000
RAM1_BASE_ADDRESS = 0x90002000
RAM2_BASE_ADDRESS = 0x90004000
RAM3_BASE_ADDRESS = 0x90006000
"""
GPIO
"""
GPIO_BASE_ADDRESS = 0x40... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
47,
8317,
49505,
198,
37811,
198,
9858,
44,
6981,
62,
36037,
62,
18564,
12709,
796,
352,
198,
9858,
44,
6981,
62,
36037,
62,
15675,
796,
362,
198,
9858,
44,
... | 1.814075 | 1,151 |
from .figure import Figure
from .subplot import Subplot
from .subplot_time import SubplotTime
from .csv_reader import CsvReader, matchCsv
from .excel_reader import ExcelReader
from .get_path import getFileList, PathList
from .save_plot import actionSavePNG
| [
6738,
764,
26875,
1330,
11291,
198,
6738,
764,
7266,
29487,
1330,
3834,
29487,
198,
6738,
764,
7266,
29487,
62,
2435,
1330,
3834,
29487,
7575,
198,
6738,
764,
40664,
62,
46862,
1330,
327,
21370,
33634,
11,
2872,
34,
21370,
198,
6738,
76... | 3.520548 | 73 |
import os
| [
11748,
28686,
628
] | 3.666667 | 3 |
# Generated by Django 2.2.6 on 2019-10-22 08:11
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
21,
319,
13130,
12,
940,
12,
1828,
8487,
25,
1157,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from .app import create_app
# APP = create_app()
# python commands:
# in app dir
#FLASKAPP=twitoff flask run
# in root dir
# FLASK_APP=twitoff flask shell
'''
Notes for setup:
in root, FLASK_APP=twitoff flask shell
import create_app
init create_app()
import DB
DB.create_all()
creates tables
'''
'''
Other commands... | [
6738,
764,
1324,
1330,
2251,
62,
1324,
198,
198,
2,
43504,
796,
2251,
62,
1324,
3419,
628,
198,
2,
21015,
9729,
25,
198,
2,
287,
598,
26672,
198,
2,
3697,
1921,
42,
24805,
28,
4246,
270,
2364,
42903,
1057,
198,
198,
2,
287,
6808,
... | 2.623377 | 154 |
# Copyright 2015 TellApart, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | [
2,
15069,
1853,
14026,
39182,
11,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,... | 3.834437 | 151 |
import numpy as np
import pandas as pd
from rail.creation.engines import Engine
from typing import Callable
| [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
6787,
13,
38793,
13,
1516,
1127,
1330,
7117,
198,
6738,
19720,
1330,
4889,
540,
628
] | 3.758621 | 29 |
#!/usr/bin/python3
# Perform the unit tests on SV
import subprocess
import os
import pathlib
import traceback
import pipetestutils
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
35006,
262,
4326,
5254,
319,
20546,
198,
11748,
850,
14681,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
12854,
1891,
198,
11748,
7347,
316,
395,
26791,
198,
198,
361,
11593,
... | 3.035714 | 56 |
from . import base
from . import mixins
from datetime import date
transform = base.transform_factory(TransformedRecord)
| [
6738,
764,
1330,
2779,
198,
6738,
764,
1330,
5022,
1040,
198,
198,
6738,
4818,
8079,
1330,
3128,
628,
198,
35636,
796,
2779,
13,
35636,
62,
69,
9548,
7,
8291,
12214,
23739,
8,
198
] | 3.727273 | 33 |
from django.db.models import Count, Sum
from django.http import HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
# Create your views here.
from django.views import generic
from accountingsubject.forms import AccountingSubjectForm
from accountingsubject.models import AccountingSubject
from c... | [
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
2764,
11,
5060,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
7738,
1060,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
198,
... | 2.687422 | 803 |
print(duree ((14, 39), (18, 45)))
print(duree ((6, 0), (5, 15))) | [
198,
4798,
7,
67,
495,
68,
14808,
1415,
11,
5014,
828,
357,
1507,
11,
4153,
22305,
198,
4798,
7,
67,
495,
68,
14808,
21,
11,
657,
828,
357,
20,
11,
1315,
22305
] | 2.03125 | 32 |
""" General Utilities file. """
import sys
import os
############################ NON-TF UTILS ##########################
from skimage.util import img_as_float
import numpy as np
import cv2
import pickle
from PIL import Image
from io import BytesIO
import math
import tqdm
import scipy
import json
import matplo... | [
198,
37811,
3611,
41086,
2393,
13,
37227,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
198,
14468,
7804,
4242,
220,
220,
44521,
12,
10234,
19255,
45484,
220,
220,
1303,
14468,
7804,
2,
198,
198,
6738,
1341,
9060,
13,
22602,
1330,
337... | 2.1173 | 14,254 |
import queue
import multiprocessing
import itertools
import sys
__all__ = ["QConnect", "CConnect"]
pulse_length_default = 10 * 10 ** -12 # 10 ps photon pulse length
signal_speed = 2.998 * 10 ** 5 #speed of light in km/s
fiber_length_default = 0.0 | [
11748,
16834,
198,
11748,
18540,
305,
919,
278,
198,
11748,
340,
861,
10141,
198,
11748,
25064,
198,
198,
834,
439,
834,
796,
14631,
48,
13313,
1600,
366,
34,
13313,
8973,
198,
198,
79,
9615,
62,
13664,
62,
12286,
796,
838,
1635,
838,... | 2.987952 | 83 |
import typing as T
from pqcli.mechanic import Player, StatType
from pqcli.ui.curses.widgets import Focusable
from .progress_bar_window import DataTableProgressBarWindow
| [
11748,
19720,
355,
309,
198,
198,
6738,
279,
80,
44506,
13,
1326,
3147,
291,
1330,
7853,
11,
5133,
6030,
198,
6738,
279,
80,
44506,
13,
9019,
13,
66,
46998,
13,
28029,
11407,
1330,
17061,
540,
198,
198,
6738,
764,
33723,
62,
5657,
6... | 3.372549 | 51 |
import yaml
import pathlib
import json
import math
| [
11748,
331,
43695,
198,
11748,
3108,
8019,
198,
11748,
33918,
198,
11748,
10688,
628
] | 3.714286 | 14 |
import unittest
from tests.unit.test_account import TestAccount
from tests.unit.test_application import TestApplication
from tests.unit.test_usages import TestUsages
from tests.unit.test_conferences import TestConferences
from tests.unit.test_mms_messages import TestMmsMessages
from tests.unit.test_sms_messages import ... | [
11748,
555,
715,
395,
198,
6738,
5254,
13,
20850,
13,
9288,
62,
23317,
1330,
6208,
30116,
198,
6738,
5254,
13,
20850,
13,
9288,
62,
31438,
1330,
6208,
23416,
198,
6738,
5254,
13,
20850,
13,
9288,
62,
385,
1095,
1330,
6208,
5842,
1095,... | 2.87921 | 861 |
print(_get_square([1, 2, 3, 4, 5]))
print(get_square([1, 2, 3, 4, 5])) | [
220,
220,
198,
4798,
28264,
1136,
62,
23415,
26933,
16,
11,
362,
11,
513,
11,
604,
11,
642,
60,
4008,
198,
220,
220,
198,
4798,
7,
1136,
62,
23415,
26933,
16,
11,
362,
11,
513,
11,
604,
11,
642,
60,
4008
] | 1.853659 | 41 |
import json
if __name__ == "__main__":
main('data/train-v1.1.json', 10)
main('data/dev-v1.1.json', 2)
| [
11748,
33918,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
10786,
7890,
14,
27432,
12,
85,
16,
13,
16,
13,
17752,
3256,
838,
8,
198,
220,
220,
220,
1388,
10786,
7890,
14,
7959,
12,
8... | 2.113208 | 53 |
"""Provides ability to run jobs locally or on HPC."""
from collections import OrderedDict
import datetime
import fileinput
import importlib
import logging
import os
import shutil
import jade
from jade.common import (
CONFIG_FILE,
JOBS_OUTPUT_DIR,
OUTPUT_DIR,
RESULTS_FILE,
HPC_CONFIG_FILE,
)
from j... | [
37811,
15946,
1460,
2694,
284,
1057,
3946,
15726,
393,
319,
367,
5662,
526,
15931,
198,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
4818,
8079,
198,
11748,
2393,
15414,
198,
11748,
1330,
8019,
198,
11748,
18931,
198,
11748,
... | 2.369125 | 2,617 |
import os
import pytest
from starkware.starknet.compiler.compile import (
compile_starknet_files)
from starkware.starknet.testing.starknet import Starknet
from starkware.starknet.testing.contract import StarknetContract
# The path to the contract source code.
CONTRACT_FILE = os.path.join(
os.path.dirname(__fi... | [
11748,
28686,
198,
11748,
12972,
9288,
198,
198,
6738,
19278,
1574,
13,
301,
668,
3262,
13,
5589,
5329,
13,
5589,
576,
1330,
357,
198,
220,
220,
220,
17632,
62,
301,
668,
3262,
62,
16624,
8,
198,
6738,
19278,
1574,
13,
301,
668,
326... | 3.201342 | 149 |
__version__ = '0.1.12'
from ._useragent import UserAgentMiddleware
from ._markdown import MarkdownPipeline
from ._cookies import FirefoxCookiesMiddleware
from ._mongodb import MongoDBPipeline
from ._redis import RedisDupeFilter
| [
834,
9641,
834,
796,
705,
15,
13,
16,
13,
1065,
6,
628,
198,
6738,
47540,
7220,
25781,
1330,
11787,
36772,
34621,
1574,
198,
6738,
47540,
4102,
2902,
1330,
2940,
2902,
47,
541,
4470,
198,
6738,
47540,
27916,
444,
1330,
16802,
28937,
4... | 3.382353 | 68 |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... | [
2,
15069,
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,
198,
2,
743,
407,
779,
428,
2393,
2845,
... | 2.842213 | 488 |
import torch.optim
from numpy import ndarray
| [
11748,
28034,
13,
40085,
198,
6738,
299,
32152,
1330,
299,
67,
18747,
628
] | 3.538462 | 13 |
from celery import Celery, Task
from microengine_utils import errors
from microengine_utils.datadog import configure_metrics
from microengine_utils.constants import SCAN_FAIL, SCAN_SUCCESS, SCAN_TIME, SCAN_VERDICT
from microengineclamav.models import Bounty, ScanResult, Verdict, Assertion, Phase
from microengineclamav... | [
6738,
18725,
1924,
1330,
15248,
1924,
11,
15941,
198,
6738,
4580,
18392,
62,
26791,
1330,
8563,
198,
6738,
4580,
18392,
62,
26791,
13,
19608,
324,
519,
1330,
17425,
62,
4164,
10466,
198,
6738,
4580,
18392,
62,
26791,
13,
9979,
1187,
133... | 3.296296 | 135 |
import datetime
import os, sys, six, base64, copy
from jinja2 import Environment, FileSystemLoader, Template
from google.auth.transport import requests
from google.cloud import datastore
from google.cloud import storage
from google.cloud import bigquery
import google.oauth2.id_token
from flask import Flask, render_t... | [
11748,
4818,
8079,
198,
11748,
28686,
11,
25064,
11,
2237,
11,
2779,
2414,
11,
4866,
198,
198,
6738,
474,
259,
6592,
17,
1330,
9344,
11,
9220,
11964,
17401,
11,
37350,
198,
198,
6738,
23645,
13,
18439,
13,
7645,
634,
1330,
7007,
198,
... | 2.355687 | 3,042 |
NotaParcial1 = int(input("Nota primer Parcial: "))
NotaParcial2 = int(input("Nota segundo Parcial: "))
NotaTaller = int(input("Nota del Taller: "))
NotaProyecto = int(input("Nota del Proyecto: "))
Parcial1 = NotaParcial1*(25/100)
Parcial2 = NotaParcial2*(25/100)
Taller = NotaTaller*(20/100)
Proyecto = NotaPr... | [
3673,
64,
10044,
2413,
16,
796,
493,
7,
15414,
7203,
3673,
64,
33270,
2547,
2413,
25,
366,
4008,
201,
198,
3673,
64,
10044,
2413,
17,
796,
493,
7,
15414,
7203,
3673,
64,
384,
70,
41204,
2547,
2413,
25,
366,
4008,
201,
198,
3673,
6... | 2.257471 | 435 |
#!/usr/bin/env python3
"""
This script checksums, signs, and compresses malvarma-<version>.img, and
creates malvarma-<version>.tar.bz2.
The author's GPG signature is hardcoded below.
"""
import os
import shutil
import sys
import subprocess
if __name__ == "__main__":
if len(sys.argv) == 1:
print("Usage: ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
1212,
4226,
8794,
5700,
11,
5895,
11,
290,
552,
16746,
6428,
85,
10961,
12,
27,
9641,
28401,
9600,
11,
290,
198,
20123,
274,
6428,
85,
10961,
12,
27,
9641,
28401... | 2.321131 | 601 |
import os
import time
from signal import signal, SIGINT
from TauLidarCommon.frame import FrameType
from TauLidarCamera.camera import Camera
outputDir = './samples'
runLoop = True
if __name__ == "__main__":
camera = setup()
signal(SIGINT, handler)
if camera:
try:
run(camera)
... | [
11748,
28686,
198,
11748,
640,
198,
6738,
6737,
1330,
6737,
11,
33993,
12394,
198,
198,
6738,
36849,
43,
312,
283,
17227,
13,
14535,
1330,
25184,
6030,
198,
6738,
36849,
43,
312,
283,
35632,
13,
25695,
1330,
20432,
628,
198,
22915,
3527... | 2.44375 | 160 |
import sys
from collections import deque
if __name__ == '__main__':
N = int(input())
a = [[] for _ in range(N + 1)]
result = 1000000
res = []
while True:
u, v = map(int, sys.stdin.readline().split())
if u == -1 and v == -1:
break
a[u].append(v)
a[v].appen... | [
11748,
25064,
198,
6738,
17268,
1330,
390,
4188,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
399,
796,
493,
7,
15414,
28955,
198,
220,
220,
220,
257,
796,
16410,
60,
329,
4808,
287,
2837,
7,
45... | 1.902821 | 319 |
import json
from twisted.logger import Logger
from twisted.internet.defer import inlineCallbacks
from autobahn.twisted.wamp import ApplicationSession
from autobahn.twisted.wamp import ApplicationRunner
from bokeh.client import push_session
from bokeh.plotting import figure, curdoc
from bokeh.models.widgets import Pan... | [
11748,
33918,
198,
198,
6738,
19074,
13,
6404,
1362,
1330,
5972,
1362,
198,
6738,
19074,
13,
37675,
13,
4299,
263,
1330,
26098,
14134,
10146,
198,
6738,
1960,
672,
15386,
13,
4246,
6347,
13,
86,
696,
1330,
15678,
36044,
198,
6738,
1960,... | 2.308743 | 1,098 |
from pathlib import Path
import sys
from unittest.mock import patch
from nornir import InitNornir
import nornsible
from nornsible import InitNornsible, nornsible_delegate, nornsible_task
NORNSIBLE_DIR = nornsible.__file__
TEST_DIR = f"{Path(NORNSIBLE_DIR).parents[1]}/tests/"
def test_nornsible_task_skip_task()... | [
6738,
3108,
8019,
1330,
10644,
198,
11748,
25064,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
6738,
299,
1211,
343,
1330,
44707,
45,
1211,
343,
198,
198,
11748,
299,
19942,
856,
198,
6738,
299,
19942,
856,
1330,
44707... | 2.067424 | 2,729 |
## Web File
## Helper Functions
| [
198,
2235,
5313,
9220,
628,
198,
198,
2235,
5053,
525,
40480,
197,
198
] | 2.846154 | 13 |
# Lint as: python3
# Copyright 2018 The TensorFlow 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 ... | [
2,
406,
600,
355,
25,
21015,
18,
198,
2,
15069,
2864,
383,
309,
22854,
37535,
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,... | 3.725424 | 295 |
# computes equilibrium variance of ddm
# returns variance
np.random.seed(2020) # set random seed
# sweep through values for lambda
lambdas = np.arange(0.05, 0.95, 0.01)
empirical_variances = np.zeros_like(lambdas)
analytical_variances = np.zeros_like(lambdas)
sig = 0.87
# compute empirical equilibrium variance
for... | [
198,
2,
552,
1769,
29163,
24198,
286,
288,
36020,
198,
2,
5860,
24198,
198,
198,
37659,
13,
25120,
13,
28826,
7,
42334,
8,
1303,
900,
4738,
9403,
198,
198,
2,
16085,
832,
3815,
329,
37456,
198,
2543,
17457,
292,
796,
45941,
13,
283,... | 2.757202 | 243 |
__version__ = '0.0.11b'
from .base import *
from .context import *
from .task import *
from .env import *
from .parse import *
| [
834,
9641,
834,
796,
705,
15,
13,
15,
13,
1157,
65,
6,
198,
198,
6738,
764,
8692,
1330,
1635,
198,
6738,
764,
22866,
1330,
1635,
198,
6738,
764,
35943,
1330,
1635,
198,
6738,
764,
24330,
1330,
1635,
198,
6738,
764,
29572,
1330,
1635... | 2.931818 | 44 |
from tkinter import *
from tkinter.font import BOLD
from algoritmos.vrc import *
from algoritmos.noise_1_bits import *
######################################################################################################
# Pagina 1
| [
6738,
256,
74,
3849,
1330,
1635,
198,
6738,
256,
74,
3849,
13,
10331,
1330,
347,
15173,
198,
198,
6738,
435,
7053,
270,
16785,
13,
85,
6015,
1330,
1635,
198,
6738,
435,
7053,
270,
16785,
13,
3919,
786,
62,
16,
62,
9895,
1330,
1635,
... | 4.196429 | 56 |
from unittest.mock import patch
import numpy as np
from auxein.population.dna_builders import UniformRandomDnaBuilder, NormalRandomDnaBuilder
| [
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
257,
18095,
259,
13,
39748,
13,
67,
2616,
62,
50034,
1330,
35712,
29531,
35,
2616,
32875,
11,
14435,
29531,
35,
2616,
32875,
628,
628
] | 3.47619 | 42 |
# Written by Yunfei LIU
# Sep 23, 2020
# Please obey the license GPLv3
# This allows to input four integers with space between them
number1,number2,number3,number4 = map(int,input().split())
# Add them up
sum = number1 + number2 + number3 + number4
# Get the unit digit
result = sum%10
# Output the result
print(result... | [
2,
22503,
416,
20757,
5036,
72,
24653,
52,
198,
2,
8621,
2242,
11,
12131,
198,
2,
4222,
22389,
262,
5964,
38644,
85,
18,
198,
198,
2,
770,
3578,
284,
5128,
1440,
37014,
351,
2272,
1022,
606,
220,
198,
17618,
16,
11,
17618,
17,
11,... | 3.22 | 100 |
#!/usr/bin/env python
# https://en.wikipedia.org/wiki/Champernowne_constant
# sequences below are related to these constants
# counts how many numbers between two 10**n and 10**(n-1)
# http://oeis.org/A033714
# This sequence also gives the total count of digits of n below 10^n.
for i in range(0, 32):
print(i, A0(i... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
3740,
1378,
268,
13,
31266,
13,
2398,
14,
15466,
14,
1925,
321,
525,
3408,
68,
62,
9979,
415,
198,
2,
16311,
2174,
389,
3519,
284,
777,
38491,
198,
198,
2,
9853,
703,
867,
... | 2.791667 | 120 |
from model import *
from config import *
from utils import *
if __name__ == "__main__":
''' GPU(s) '''
gpus = tf.config.experimental.list_physical_devices('GPU')
GPU_N = 3
if gpus:
try:
tf.config.experimental.set_visible_devices(gpus[GPU_N:], 'GPU')
logical_gpus = tf.config.experimental.list_logical_devi... | [
6738,
2746,
1330,
1635,
198,
6738,
4566,
1330,
1635,
220,
198,
6738,
3384,
4487,
1330,
1635,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
197,
7061,
6,
11362,
7,
82,
8,
705,
7061,
198,
197,
31197,
385,
796... | 2.456797 | 1,817 |
# https://leetcode.com/problems/reverse-integer/
# Runtime: 32 ms, faster than 96.20% of Python3 online submissions for Reverse Integer.
# Runtime: 36 ms, faster than 84.28% of Python3 online submissions for Reverse Integer.
# Runtime: 44 ms, faster than 22.92% of Python3 online submissions for Reverse Integer.
x ... | [
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
50188,
12,
41433,
14,
198,
2,
43160,
25,
3933,
13845,
11,
5443,
621,
9907,
13,
1238,
4,
286,
11361,
18,
2691,
22129,
329,
31849,
34142,
13,
198,
2,
43160,
25,
4570,
1384... | 3.169231 | 130 |