content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from sklearn import preprocessing
matplotlib.use("Agg")
import datetime
import torch
from finrl.config import config
from finrl.marketdata.yahoodownloader import YahooDownloader
from finrl.preprocessing.preprocessors import Featu... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
1341,
35720,
1330,
662,
36948,
198,
198,
6759,
29487,
8019,
13,... | 3.390374 | 187 |
from functools import partial
import community as community_louvain
import torch
import torch.nn.functional as F
from ogb.graphproppred.mol_encoder import AtomEncoder, BondEncoder
from torch_geometric.data import Batch
from torch_geometric.nn import avg_pool
from torch_geometric.utils.convert import to_networkx
impor... | [
6738,
1257,
310,
10141,
1330,
13027,
198,
198,
11748,
2055,
355,
2055,
62,
75,
280,
85,
391,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
267,
22296,
13,
34960,
1676,
381,
445,
13,
43132,
62,
12685,... | 3.093168 | 161 |
# PURPOSE:script to get coverage of test suite for Defects4J defects
# INPUT: script requires <path-to-defects4j> as command line argument
# OUTPUT: output of the script is Defects4JCoverage.csv that lists Project, DefectId, and StatementCoverage for all the defects of Defects4J
# HOW TO RUN: run the script using comm... | [
2,
33079,
48933,
25,
12048,
284,
651,
5197,
286,
1332,
18389,
329,
2896,
478,
82,
19,
41,
22448,
198,
2,
3268,
30076,
25,
4226,
4433,
1279,
6978,
12,
1462,
12,
4299,
478,
82,
19,
73,
29,
355,
3141,
1627,
4578,
198,
2,
16289,
30076... | 2.472651 | 713 |
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# Copyright © 2021, Francisco Palm
#
# Licensed under the terms of the MIT license
# ----------------------------------------------------------------------------
"""
Spyder Pomodoro Timer Preferences Page.
"""
from q... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
16529,
10541,
198,
2,
15069,
10673,
33448,
11,
6033,
18358,
198,
2,
198,
2,
49962,
739,
262,
2846,
286,
262,
17168,
5964,
198,
2,
16529,
10541,
198,
37811,
198,
456... | 4.016949 | 177 |
import argparse
arg_lists = []
parser = argparse.ArgumentParser()
data_arg = add_argument_group('data')
data_arg.add_argument('--path', type=str, default='frames/')
data_arg.add_argument('--img_fmt', type=str, default='jpg')
data_arg.add_argument('--model', type=str, default='output.pth')
data_arg.add_argument('--r... | [
11748,
1822,
29572,
628,
198,
853,
62,
20713,
796,
17635,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
628,
198,
7890,
62,
853,
796,
751,
62,
49140,
62,
8094,
10786,
7890,
11537,
198,
7890,
62,
853,
13,
2860,
62,
49140,... | 2.657778 | 225 |
import featurize, load_data, numpy as np
import sklearn.linear_model
from scipy import stats
import statsmodels.api as sm
import sys
from sklearn import preprocessing
import pandas as pd
data = load_data.load_data()
data.tempo /= np.max(data.tempo)
audio_features1 = ['mode','tempo','danceability','acousticness','inst... | [
11748,
2218,
333,
1096,
11,
3440,
62,
7890,
11,
299,
32152,
355,
45941,
198,
11748,
1341,
35720,
13,
29127,
62,
19849,
198,
6738,
629,
541,
88,
1330,
9756,
198,
11748,
9756,
27530,
13,
15042,
355,
895,
198,
11748,
25064,
198,
6738,
13... | 2.528719 | 679 |
import argparse
import json
import sys
import os
import torch
import misc_utils as utils
"""
Arg parse
opt = parse_args()
"""
opt = parse_args()
opt.device = 'cuda:' + opt.gpu_ids if torch.cuda.is_available() and opt.gpu_ids != '-1' else 'cpu'
if opt.opt:
with open(opt.opt, 'r') as f:
a = js... | [
11748,
1822,
29572,
198,
11748,
33918,
198,
11748,
25064,
198,
11748,
28686,
198,
198,
11748,
28034,
198,
198,
11748,
12747,
62,
26791,
355,
3384,
4487,
198,
198,
37811,
198,
220,
220,
220,
20559,
21136,
198,
220,
220,
220,
2172,
796,
2... | 2.082111 | 341 |
#
# Copyright 2008-2012 NVIDIA Corporation
# Copyright 2009-2010 University of California
#
# 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/L... | [
2,
198,
2,
220,
220,
15069,
3648,
12,
6999,
15127,
10501,
198,
2,
220,
15069,
3717,
12,
10333,
2059,
286,
3442,
198,
2,
220,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
19... | 3.334866 | 1,305 |
from Analisis_Ascendente.Instrucciones.instruccion import Instruccion
| [
6738,
1052,
27315,
271,
62,
32,
1416,
437,
21872,
13,
6310,
622,
535,
295,
274,
13,
8625,
622,
535,
295,
1330,
2262,
622,
535,
295,
201,
198,
201,
198
] | 2.517241 | 29 |
from fathom import Point, ORIGIN
from fathom.tikz import Canvas
import fathom.geometry as geo
import fathom.layout as layout
import fathom.tikz.colors as colors
from itertools import *
BRANCH = 3
| [
6738,
277,
32910,
1330,
6252,
11,
43901,
1268,
198,
6738,
277,
32910,
13,
83,
1134,
89,
1330,
1680,
11017,
198,
11748,
277,
32910,
13,
469,
15748,
355,
40087,
198,
11748,
277,
32910,
13,
39786,
355,
12461,
198,
11748,
277,
32910,
13,
... | 3.078125 | 64 |
# Could eventually remove this code: Is this needed in unit tests?
"""
Object definitions that are used for testing.
"""
from typing import Iterator, Tuple, Dict
import numpy as np
from ..datatypes.common import StateIdAndCandidate
from ..datatypes.hp_ranges import HyperparameterRanges_Impl, \
HyperparameterRang... | [
2,
10347,
4191,
4781,
428,
2438,
25,
1148,
428,
2622,
287,
4326,
5254,
30,
198,
198,
37811,
198,
10267,
17336,
326,
389,
973,
329,
4856,
13,
198,
37811,
198,
198,
6738,
19720,
1330,
40806,
1352,
11,
309,
29291,
11,
360,
713,
198,
11... | 3.554348 | 368 |
from django.db.models.signals import post_delete, post_init, post_save
from django.dispatch import receiver
from .audit_log import log
@receiver(post_delete)
@receiver(post_init)
@receiver(post_save)
| [
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
12683,
874,
1330,
1281,
62,
33678,
11,
1281,
62,
15003,
11,
1281,
62,
21928,
198,
6738,
42625,
14208,
13,
6381,
17147,
1330,
9733,
198,
198,
6738,
764,
3885,
270,
62,
6404,
1330,
2604,
628,... | 2.875 | 72 |
from setuptools import setup
setup(
name='pyutils',
version='0.0.1rc',
packages=['pyutils'],
url='https://github.com/DANS-repo/pyutils',
license='Apache License Version 2.0',
author='hvdb',
author_email='',
description='A collection of utility methods, primarily written for use in noteb... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
9078,
26791,
3256,
198,
220,
220,
220,
2196,
11639,
15,
13,
15,
13,
16,
6015,
3256,
198,
220,
220,
220,
10392,
28,
17816,
9078,
26791,
6,
4357... | 2.734848 | 132 |
import zajem_podatkov_orodja as orodja
import csv
import os
# naredimo slovar slovarjev za ustavljanje podatkov iz csv datoteke
slovar = {}
for leto in range(1994, 2020):
slovar[leto] = {}
# noter ustavimo podatke
with open(os.path.join(orodja.mapa, 'esc.csv'), newline='') as dat:
reader = csv.DictReader(da... | [
11748,
1976,
1228,
368,
62,
33320,
265,
21862,
62,
273,
375,
6592,
355,
267,
14892,
6592,
198,
11748,
269,
21370,
198,
11748,
28686,
628,
198,
2,
299,
1144,
25147,
1017,
709,
283,
1017,
709,
283,
73,
1990,
1976,
64,
334,
301,
615,
7... | 1.963387 | 874 |
import numpy
N, M, P = map(int, input().split())
arr_n = numpy.array([input().strip().split() for _ in range(N)], int)
arr_m = numpy.array([input().strip().split() for _ in range(M)], int)
ar_N = numpy.reshape(arr_n, (N, P))
ar_M = numpy.reshape(arr_m, (M, P))
print(numpy.concatenate((ar_N, ar_M), axis = 0)) | [
11748,
299,
32152,
198,
198,
45,
11,
337,
11,
350,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
198,
3258,
62,
77,
796,
299,
32152,
13,
18747,
26933,
15414,
22446,
36311,
22446,
35312,
3419,
329,
4808,
287,
2837,
7,
45,
8,... | 2.284672 | 137 |
import requests
from scraping.quotes.pages.quotes_page import QuotesPage
page_content = requests.get('http://quotes.toscrape.com').content
page = QuotesPage(page_content)
for quote in page.quotes:
print(quote)
| [
11748,
7007,
198,
198,
6738,
46743,
13,
421,
6421,
13,
31126,
13,
421,
6421,
62,
7700,
1330,
2264,
6421,
9876,
198,
198,
7700,
62,
11299,
796,
7007,
13,
1136,
10786,
4023,
1378,
421,
6421,
13,
83,
17500,
13484,
13,
785,
27691,
11299,
... | 3.013889 | 72 |
r"""
Modules performing small, commonly used tasks throughout the package.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from math import ceil
import numpy as np
from warnings import warn
from astropy.table import Table
from ..custom_exceptions import HalotoolsError
__all__ ... | [
81,
37811,
198,
5841,
5028,
9489,
1402,
11,
8811,
973,
8861,
3690,
262,
5301,
13,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
1... | 2.50156 | 6,091 |
from flask import Flask, send_from_directory, session, request
import os
app = Flask(__name__)
from route.top import top
from route.prj import prj
app.register_blueprint(top)
app.register_blueprint(prj)
# sessionを有効にするための秘密鍵
app.secret_key = os.environ.get('SECRET_KEY')
# limit upload file size : 1MB
app.config['MA... | [
6738,
42903,
1330,
46947,
11,
3758,
62,
6738,
62,
34945,
11,
6246,
11,
2581,
198,
11748,
28686,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
198,
6738,
6339,
13,
4852,
1330,
1353,
198,
6738,
6339,
13,
1050,
73,
1330,
778,
... | 2.473684 | 190 |
import dis
import unittest
import sys
from typing import List
from typing import Optional
from crosshair.diff_behavior import BehaviorDiff
from crosshair.diff_behavior import diff_behavior
from crosshair.fnutil import walk_qualname
from crosshair.fnutil import FunctionInfo
from crosshair.options import AnalysisOptions... | [
11748,
595,
198,
11748,
555,
715,
395,
198,
11748,
25064,
198,
6738,
19720,
1330,
7343,
198,
6738,
19720,
1330,
32233,
198,
198,
6738,
3272,
27108,
13,
26069,
62,
46571,
1330,
20181,
28813,
198,
6738,
3272,
27108,
13,
26069,
62,
46571,
... | 3.076577 | 222 |
import pytest
import pyogg
import os
from config import Config
# FIXME: This shouldn't be a source of error, but it currently is.
# This works in macOS and probably Linux, but not Windows.
# def test_unicode_filename(pyogg_config: Config):
# filename = str(
# pyogg_config.rootdir
# / "example... | [
11748,
12972,
9288,
198,
11748,
12972,
10332,
198,
11748,
28686,
198,
198,
6738,
4566,
1330,
17056,
628,
220,
220,
220,
220,
198,
2,
44855,
11682,
25,
770,
6584,
470,
307,
257,
2723,
286,
4049,
11,
475,
340,
3058,
318,
13,
198,
2,
7... | 2.649007 | 151 |
from dataclasses import dataclass
from hashlib import md5
MAX_PACKET_SIZE: int = 64
DATA_SIZE: int = 43
CONTINUATION_PREFIX: bytes = b"\xFE\xFD"
SEQ_LIM = 2**32
FINISHER_DATA = b"TEKCAP TSAL"
@dataclass
| [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
198,
6738,
12234,
8019,
1330,
45243,
20,
198,
198,
22921,
62,
47,
8120,
2767,
62,
33489,
25,
493,
796,
5598,
198,
26947,
62,
33489,
25,
493,
796,
5946,
198,
37815,
1268,
52,
6234,
... | 2.285714 | 91 |
import argparse
import math
import h5py
import numpy as np
import tensorflow as tf
import socket
from scipy import stats
from IPython import embed
import provider
from model import *
# from test_utils import *
import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.di... | [
11748,
1822,
29572,
201,
198,
11748,
10688,
201,
198,
11748,
289,
20,
9078,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
11192,
273,
11125,
355,
48700,
201,
198,
11748,
17802,
201,
198,
6738,
629,
541,
88,
1330,
9756,
201,
... | 2.47876 | 871 |
# Importing the libraries
import numpy as np
import pandas as pd
import keras
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder
import tensorflow as tf
from keras.models import Sequential
from keras.layers import Dense
from sklearn.preprocessing import StandardScaler
from sklearn.... | [
2,
17267,
278,
262,
12782,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
41927,
292,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
6738,
1341,
35720... | 2.384363 | 1,522 |
from django.urls import path, include
from . import views
urlpatterns=[
path("" , views.index, name="index"),
path("signin", views.signin , name="signin" ),
path("login", views.login , name="login"),
path("logout", views.logout , name="logout"),
path("taskcreation", views.task_creation , name="crea... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
41888,
198,
220,
220,
220,
3108,
7203,
1,
837,
5009,
13,
9630,
11,
1438,
2625,
9630,
12340,
198,
220,
220,
220,
3108,
720... | 2.927152 | 151 |
#!/usr/bin/env python3
import os
import logging
import sys
try:
import multiprocessing
except:
pass
# nose requires multiprocessing and logging to be initialized before the setup
# call, or we'll get a spurious crash on exit.
from setuptools import setup, find_packages
from setuptools.dist import Distribution
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
28686,
198,
11748,
18931,
198,
11748,
25064,
198,
28311,
25,
198,
220,
220,
220,
1330,
18540,
305,
919,
278,
198,
16341,
25,
198,
220,
220,
220,
1208,
198,
2,
9686,
4... | 2.347985 | 819 |
import abc
from .window import Window
from gbvision.models.system import EMPTY_PIPELINE
from gbvision.utils.recorders.recorder import Recorder
class RecordingWindow(Window, abc.ABC):
"""
A basic window that records the stream it receives
:param recording_pipeline: a drawing pipeline to run on the record... | [
11748,
450,
66,
198,
198,
6738,
764,
17497,
1330,
26580,
198,
6738,
308,
65,
10178,
13,
27530,
13,
10057,
1330,
38144,
9936,
62,
47,
4061,
3698,
8881,
198,
6738,
308,
65,
10178,
13,
26791,
13,
8344,
6361,
13,
8344,
2875,
1330,
3311,
... | 3.349593 | 123 |
from django.contrib import admin
from .models import Transaction
# Register your models here.
admin.site.register(Transaction,TransactionAdmin) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
45389,
198,
2,
17296,
534,
4981,
994,
13,
628,
198,
28482,
13,
15654,
13,
30238,
7,
48720,
11,
48720,
46787,
8
] | 4.264706 | 34 |
# tests the --template argument of voila
import pytest
@pytest.fixture
@pytest.mark.gen_test
| [
2,
5254,
262,
1377,
28243,
4578,
286,
7608,
10102,
198,
11748,
12972,
9288,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
198,
31,
9078,
9288,
13,
4102,
13,
5235,
62,
9288,
198
] | 2.939394 | 33 |
from abc import ABCMeta, abstractmethod | [
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396
] | 4.333333 | 9 |
#!/usr/bin/env python
#############################################################################
##
# This file is part of Taurus
##
# http://taurus-scada.org
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Taurus is free software: you can redistribute it and/or modify
# it under the terms of t... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
29113,
29113,
7804,
4242,
2,
198,
2235,
198,
2,
770,
2393,
318,
636,
286,
309,
22302,
198,
2235,
198,
2,
2638,
1378,
83,
22302,
12,
1416,
4763,
13,
2398,
198,
2235,
198,
2,
15... | 2.350593 | 3,206 |
#!/usr/bin/env python
import unittest
import xml.dom.minidom
from dominic import xpath
class TestAbbreviations(unittest.TestCase):
"""Section 2.5: Abbreviated Syntax"""
if __name__ == '__main__':
unittest.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
555,
715,
395,
198,
11748,
35555,
13,
3438,
13,
1084,
312,
296,
198,
6738,
7462,
291,
1330,
2124,
6978,
198,
198,
4871,
6208,
4826,
4679,
8903,
602,
7,
403,
715,
395,
13,... | 2.593023 | 86 |
from itertools import tee, zip_longest
from .rangedict import RangeDict
def pairwise(iterable, longest=True):
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
a, b = tee(iterable)
next(b, None)
return (zip_longest if longest else zip)(a, b)
| [
6738,
340,
861,
10141,
1330,
30479,
11,
19974,
62,
6511,
395,
198,
198,
6738,
764,
34457,
713,
1330,
13667,
35,
713,
628,
198,
198,
4299,
5166,
3083,
7,
2676,
540,
11,
14069,
28,
17821,
2599,
198,
220,
220,
220,
366,
82,
4613,
357,
... | 2.345794 | 107 |
import asyncio
import io
import sys
import aiohttp
import aioredis
import attr
from PIL import Image
import imagehash
import numpy as np
"""Posts with these tags will be excluded from indexing.
"""
exclude_tags = [
"loli",
"shota",
"bestiality",
"guro",
"shadman"
]
"""A helper dictionary to conve... | [
11748,
30351,
952,
198,
11748,
33245,
198,
11748,
25064,
198,
198,
11748,
257,
952,
4023,
198,
11748,
257,
72,
1850,
271,
198,
11748,
708,
81,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
2939,
17831,
198,
11748,
299,
32152,
355,
45941... | 2.287342 | 1,580 |
from psqlextra.models import PostgresPartitionedModel
from .strategy import PostgresPartitioningStrategy
class PostgresPartitioningConfig:
"""Configuration for partitioning a specific model according to the
specified strategy."""
__all__ = ["PostgresPartitioningConfig"]
| [
6738,
26692,
80,
293,
742,
430,
13,
27530,
1330,
2947,
34239,
7841,
653,
276,
17633,
198,
198,
6738,
764,
2536,
4338,
1330,
2947,
34239,
7841,
653,
278,
13290,
4338,
628,
198,
4871,
2947,
34239,
7841,
653,
278,
16934,
25,
198,
220,
22... | 3.688312 | 77 |
""" Example: Shows how to create, train and use an FAQ matcher. """
import urllib3
import csv
import feersum_nlu
from feersum_nlu.rest import ApiException
from examples import feersumnlu_host, feersum_nlu_auth_token
# Configure API key authorization: APIKeyHeader
configuration = feersum_nlu.Configuration()... | [
37811,
17934,
25,
25156,
703,
284,
2251,
11,
4512,
290,
779,
281,
18749,
2603,
2044,
13,
37227,
201,
198,
201,
198,
11748,
2956,
297,
571,
18,
201,
198,
11748,
269,
21370,
201,
198,
201,
198,
11748,
730,
364,
388,
62,
77,
2290,
201,... | 2.099654 | 1,736 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628
] | 2.043478 | 23 |
from time import sleep
from selenium.webdriver import Chrome
from selenium.webdriver.remote.webelement import WebElement
from Pages.BasicHomePage import BasicHomePage
| [
6738,
640,
1330,
3993,
201,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
1330,
13282,
220,
201,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
47960,
13,
732,
1350,
1732,
1330,
5313,
20180,
201,
198,
6738,
28221,
13,
26416,
16060,... | 2.878788 | 66 |
#
# Copyright (c) 2014 Red Hat, 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 wri... | [
2,
198,
2,
15069,
357,
66,
8,
1946,
2297,
10983,
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,
26... | 3.722513 | 191 |
# -*- coding: UTF-8 -*-
from larksuiteoapi.api import Request, FormData, FormDataFile, set_timeout, set_path_params, set_query_params, \
set_is_response_stream, set_response_stream, set_tenant_key, set_need_help_desk_auth
from larksuiteoapi import Config, ACCESS_TOKEN_TYPE_TENANT, ACCESS_TOKEN_TYPE_USER, ACCESS_T... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
198,
6738,
300,
5558,
84,
578,
78,
15042,
13,
15042,
1330,
19390,
11,
5178,
6601,
11,
5178,
6601,
8979,
11,
900,
62,
48678,
11,
900,
62,
6978,
62,
37266,
11,
900,
62,
2... | 1.950931 | 591 |
from collections import OrderedDict
import torch
import torch.nn as nn
from rc_class.base_model_rc_ridge import Base_model_rc_ridge
| [
6738,
17268,
1330,
14230,
1068,
35,
713,
201,
198,
201,
198,
11748,
28034,
201,
198,
11748,
28034,
13,
20471,
355,
299,
77,
201,
198,
201,
198,
6738,
48321,
62,
4871,
13,
8692,
62,
19849,
62,
6015,
62,
12818,
1330,
7308,
62,
19849,
... | 2.84 | 50 |
"""Prepare Trans10K dataset"""
import os
import torch
import numpy as np
import logging
from PIL import Image
from IPython import embed
from ...config import cfg
from .seg_data_base import SegmentationDataset
from .trans10k_with_fakemix import TransSegmentationWithFakeMix
| [
37811,
37534,
533,
3602,
940,
42,
27039,
37811,
198,
11748,
28686,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
18931,
198,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
6101,
7535,
1330,
11525,
198,
198,
6738,
2644,
... | 3.493671 | 79 |
import sqlite3
from . import sql
from . import views
from . import exceptions
from . import makes
class DoxygenSQLite3(object):
"""TODO"""
indexpage = None
connection = None
types = None
# extend and compile are the same logic, but are separate for API semantics/readability.
def extend(self... | [
11748,
44161,
578,
18,
198,
198,
6738,
764,
1330,
44161,
198,
6738,
764,
1330,
5009,
198,
6738,
764,
1330,
13269,
198,
6738,
764,
1330,
1838,
628,
198,
4871,
360,
23536,
5235,
17861,
578,
18,
7,
15252,
2599,
198,
220,
220,
220,
37227,... | 2.869083 | 2,704 |
"""
Setup file for awesome-bib-builder
"""
import codecs
import os
from setuptools import find_packages, setup
# Get __version__ from _meta.py
_meta_file = os.path.join("src", "_meta.py")
with open(_meta_file) as f:
exec(f.read())
DISTNAME = "awesome-bib-builder"
DESCRIPTION = "Tool for generating an awesome RE... | [
37811,
198,
40786,
2393,
329,
7427,
12,
65,
571,
12,
38272,
198,
37811,
198,
198,
11748,
40481,
82,
198,
11748,
28686,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
2,
3497,
11593,
9641,
834,
422,
4808,... | 2.589695 | 524 |
from enum import Enum
__NAMESPACE__ = "http://www.w3.org/2001/SMIL20/"
| [
6738,
33829,
1330,
2039,
388,
198,
198,
834,
45,
29559,
47,
11598,
834,
796,
366,
4023,
1378,
2503,
13,
86,
18,
13,
2398,
14,
14585,
14,
12310,
4146,
1238,
30487,
628
] | 2.354839 | 31 |
from snmpagent_unity.commands import user, community, crypto, service
CMD = [user.AddUser, user.UpdateUser, user.DeleteUser, user.ListUsers,
community.CreateCommunity, community.DeleteCommunity,
crypto.Encrypt, crypto.Decrypt,
service.Start, service.Stop, service.Restart]
CMD_DICT = {cmd.name: cm... | [
6738,
3013,
3149,
25781,
62,
9531,
13,
9503,
1746,
1330,
2836,
11,
2055,
11,
21473,
11,
2139,
198,
198,
34,
12740,
796,
685,
7220,
13,
4550,
12982,
11,
2836,
13,
10260,
12982,
11,
2836,
13,
38727,
12982,
11,
2836,
13,
8053,
14490,
1... | 2.864407 | 118 |
#!/user/bin/env python
# Author: Wenbo Duan
# Email: pv19120@bristol.ac.uk
# Time: 09/12/2021
# File: utils.py
# Supplementary codes for recording results into .txt files for both network and capital budget problems in dynamic programming.
import pandas as pd
import itertools
import re
from copy import deepc... | [
2,
48443,
7220,
14,
8800,
14,
24330,
21015,
201,
198,
2,
6434,
25,
31164,
2127,
360,
7258,
201,
198,
2,
9570,
25,
279,
85,
1129,
10232,
31,
65,
1585,
349,
13,
330,
13,
2724,
201,
198,
2,
3862,
25,
7769,
14,
1065,
14,
1238,
2481,... | 1.953315 | 5,912 |
##################################################
# All functions related to applying sliding window on a dataset
##################################################
# Author: Marius Bock
# Email: marius.bock(at)uni-siegen.de
##################################################
import numpy as np
def sliding_window_se... | [
29113,
14468,
2235,
198,
2,
1439,
5499,
3519,
284,
11524,
22292,
4324,
319,
257,
27039,
198,
29113,
14468,
2235,
198,
2,
6434,
25,
1526,
3754,
347,
735,
198,
2,
9570,
25,
1667,
3754,
13,
65,
735,
7,
265,
8,
35657,
12,
44524,
5235,
... | 2.626409 | 1,863 |
# ---
# jupyter:
# jupytext:
# formats: ipynb,py
# split_at_heading: true
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.6.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# ... | [
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,
9078,
198,
2,
220,
220,
220,
220,
6626,
62,
265,
62,
33878,
25,
2081,
198,
2,
220... | 3.2966 | 5,118 |
_base_ = [
"../_base_/models/htc_without_semantic_swin_fpn.py",
# "../_base_/datasets/coco_instance.py",
"../_base_/datasets/coco_detection.py",
"../_base_/schedules/schedule_1x.py",
"../_base_/default_runtime.py",
]
model = dict(
backbone=dict(
type="CBSwinTransformer",
embed_d... | [
62,
8692,
62,
796,
685,
198,
220,
220,
220,
366,
40720,
62,
8692,
62,
14,
27530,
14,
4352,
66,
62,
19419,
62,
43616,
5109,
62,
2032,
259,
62,
69,
21999,
13,
9078,
1600,
198,
220,
220,
220,
1303,
366,
40720,
62,
8692,
62,
14,
196... | 1.332638 | 7,191 |
import unittest
from getkey.platforms import PlatformTest
| [
11748,
555,
715,
395,
198,
198,
6738,
651,
2539,
13,
24254,
82,
1330,
19193,
14402,
628
] | 3.75 | 16 |
package(default_visibility = ["//visibility:public"])
exports_files([
"node_pkg_link",
"npm_pkg_link",
"yarn_pkg_link",
"node_pkg_link/bin/node",
"yarn_pkg_link/bin/yarn"
])
alias(
name = "yarn_pkg_link/bin/yarn.js",
actual = ":yarn_pkg_link/bin/yarn",
)
| [
26495,
7,
12286,
62,
4703,
2247,
796,
14631,
1003,
4703,
2247,
25,
11377,
8973,
8,
198,
198,
1069,
3742,
62,
16624,
26933,
198,
220,
366,
17440,
62,
35339,
62,
8726,
1600,
198,
220,
366,
77,
4426,
62,
35339,
62,
8726,
1600,
198,
220... | 2.168 | 125 |
# -*-coding: utf-8 -*-
cars = 100
space_in_a_car = 4
drivers = 30
passengers = 90
cars_not_driven = cars - drivers
cars_driven = drivers
carpool_capacity = cars_driven * space_in_a_car
average_passengers_per_car = passengers / cars_driven
print "자동차", cars, "대가 있습니다."
print "운전자는", drivers, "명 뿐입니다."
print "오늘은 빈 차가"... | [
2,
532,
9,
12,
66,
7656,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37993,
796,
1802,
198,
13200,
62,
259,
62,
64,
62,
7718,
796,
604,
198,
36702,
796,
1542,
198,
6603,
9302,
796,
4101,
198,
37993,
62,
1662,
62,
15808,
796,
5... | 1.49848 | 329 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\plot_display_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 impor... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
45302,
59,
29487,
62,
13812,
62,
38969,
519,
13,
9019,
6,
198,
2,
198,
2,
15622,
416,
25,
9485,
48,
83,
20,
124... | 3.026087 | 115 |
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 5 19:16:54 2020
@author: Abhishek Mukherjee
"""
#Merge overlapping intervals...
#Leetcode problem
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
3825,
2365,
220,
642,
678,
25,
1433,
25,
4051,
12131,
201,
198,
201,
198,
31,
9800,
25,
2275,
14363,
258,
74,
31509,
372,
34589,
201,... | 2.4 | 65 |
import torch
import torch.nn as nn
import numpy as np
from typing import Tuple
class Representation(nn.Module):
"""
observation -> hidden state
"""
class Prediction(nn.Module):
"""
hidden state -> policy + value
"""
class Dynamics(nn.Module):
"""
hidden state + action -> next hi... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
19720,
1330,
309,
29291,
628,
628,
198,
198,
4871,
10858,
341,
7,
20471,
13,
26796,
2599,
198,
220,
220,
220,
37227,
198,
220,
22... | 3.034783 | 115 |
# djangodocker/settings/production.py
from os import environ
from .base import *
# Current mode
MODE = 'Development'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
| [
2,
42625,
648,
375,
12721,
14,
33692,
14,
25493,
13,
9078,
198,
6738,
28686,
1330,
551,
2268,
198,
6738,
764,
8692,
1330,
1635,
198,
198,
2,
9236,
4235,
198,
49058,
796,
705,
41206,
6,
198,
198,
2,
10729,
4261,
9050,
39410,
25,
836,... | 3.431034 | 58 |
import numpy as np
def write_results(info_dict):
""" Write the results in a file """
f = open('%s/results/results_summary.txt' % info_dict['MainDirectory'], 'w')
f.write ('Information about the simulation:\n')
f.write ('---------------------------------\n')
if info_dict['etc_type'] == 'time':
... | [
11748,
299,
32152,
355,
45941,
198,
198,
4299,
3551,
62,
43420,
7,
10951,
62,
11600,
2599,
198,
220,
220,
220,
37227,
19430,
262,
2482,
287,
257,
2393,
37227,
628,
220,
220,
220,
277,
796,
1280,
10786,
4,
82,
14,
43420,
14,
43420,
6... | 2.306909 | 5,109 |
import pytest
from rlp.sedes import big_endian_int
from rlp.sedes.lists import CountableList
from rlp import SerializationError
| [
11748,
12972,
9288,
198,
6738,
374,
34431,
13,
36622,
274,
1330,
1263,
62,
437,
666,
62,
600,
198,
6738,
374,
34431,
13,
36622,
274,
13,
20713,
1330,
2764,
540,
8053,
198,
6738,
374,
34431,
1330,
23283,
1634,
12331,
628
] | 3.307692 | 39 |
"""
Tools for asking the ESP about any alarms that have been raised,
and telling the user about them if so.
The top alarmbar shows little QPushButtons for each alarm that is currently active.
If the user clicks a button, they are shown the message text and a "snooze" button
for that alarm.
There is a single physical ... | [
37811,
198,
33637,
329,
4737,
262,
9428,
546,
597,
36302,
326,
423,
587,
4376,
11,
198,
392,
5149,
262,
2836,
546,
606,
611,
523,
13,
198,
198,
464,
1353,
10436,
5657,
2523,
1310,
1195,
49222,
1537,
27288,
329,
1123,
10436,
326,
318,
... | 2.337014 | 4,347 |
choice=input("是否需要输入新的学生信息(Yes/Y表示需要需要录入)?")
studentList=[]
if choice.upper()=="YES" or choice.upper()=="Y":
isError=False
student={}
student["name"]=input("请输入姓名:")
student["ID"]=input("请输入学号:")
score1=float(input("请输入语文成绩:"))
if score1 <= 100 and score1 >= 0:
student["score1"]=score1
... | [
25541,
28,
15414,
7203,
42468,
28938,
99,
165,
250,
222,
17358,
223,
164,
122,
241,
17739,
98,
23877,
108,
21410,
27764,
99,
37955,
46479,
94,
162,
223,
107,
7,
5297,
14,
56,
26193,
101,
163,
97,
118,
165,
250,
222,
17358,
223,
165,... | 1.522727 | 616 |
from PySide2.QtWidgets import QWidget
from PySide2.QtCore import Qt, QPoint
from PySide2.QtGui import QPainter, QPen, QColor, QFont
import os
import math
from Assets.mathematical_scripts.util import getElectrodesList
#Function which load electrodes position, all are based on the up-left-quarter electrod... | [
6738,
9485,
24819,
17,
13,
48,
83,
54,
312,
11407,
1330,
1195,
38300,
201,
198,
6738,
9485,
24819,
17,
13,
48,
83,
14055,
1330,
33734,
11,
1195,
12727,
201,
198,
6738,
9485,
24819,
17,
13,
48,
83,
8205,
72,
1330,
1195,
38490,
353,
... | 3.0375 | 160 |
import os
from datetime import datetime
import jinja2
from flask import Flask, redirect, render_template
from flask_cors import CORS
from raven.contrib.flask import Sentry
from werkzeug.middleware.proxy_fix import ProxyFix
from api import (admin_api, copy_study_api, dashboard_api, data_access_api, mobile_api,
oth... | [
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
11748,
474,
259,
6592,
17,
198,
6738,
42903,
1330,
46947,
11,
18941,
11,
8543,
62,
28243,
198,
6738,
42903,
62,
66,
669,
1330,
327,
20673,
198,
6738,
37735,
13,
3642,
82... | 2.838951 | 1,068 |
"""
Modulo que transforma la rúbrica en excel en un formato fácil de pasar a u-cursos
"""
from typing import Tuple
from pathlib import Path
import os
import pandas as pd
INDICE_NOMBRE_ALUMNO = 0
SUBSEC_CODIGO_FUENTE = ("Funcionalidad", "Diseño")
SECCIONES = ("Código Fuente", "Coverage", "Javadoc", "Resumen")
NOTA = "... | [
37811,
198,
5841,
43348,
8358,
6121,
64,
8591,
374,
21356,
65,
30997,
551,
27336,
551,
555,
1296,
5549,
277,
6557,
2856,
390,
38836,
283,
257,
334,
12,
66,
1834,
418,
198,
37811,
198,
6738,
19720,
1330,
309,
29291,
198,
6738,
3108,
80... | 2.007564 | 1,322 |
import re
| [
11748,
302,
628,
628,
198
] | 2.8 | 5 |
"""
StratoDem Analytics : __test_snapshot_test_case
Principal Author(s) : Michael Clawar
Secondary Author(s) :
Description :
Notes :
March 27, 2018
"""
import dash_html_components as html
from snapshot_test import DashSnapshotTestCase
| [
37811,
198,
13290,
5549,
11522,
30437,
1058,
11593,
9288,
62,
45380,
9442,
62,
9288,
62,
7442,
198,
42904,
8521,
6434,
7,
82,
8,
1058,
3899,
30358,
283,
198,
12211,
560,
6434,
7,
82,
8,
1058,
198,
11828,
1058,
198,
198,
16130,
1058,
... | 3.226667 | 75 |
# Generated by Django 2.2.5 on 2019-09-25 13:37
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
20,
319,
13130,
12,
2931,
12,
1495,
1511,
25,
2718,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import logging
import numpy as np
import os
from jiminy import pyprofile
import sys
from jiminy import error
from jiminy.vncdriver import server_messages
logger = logging.getLogger(__name__)
# # TODO: we don't seem to be able to have multiple independent
# # windows at once
# def update_rectangle(self,... | [
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
474,
320,
3541,
1330,
12972,
13317,
198,
11748,
25064,
198,
198,
6738,
474,
320,
3541,
1330,
4049,
198,
6738,
474,
320,
3541,
13,
85,
10782,
26230,
1330,
43... | 2.471698 | 530 |
"""Amplitude statistical module."""
import numpy as np
import scipy.stats
def mean(amplitude_values):
"""Calculate the mean value of the values.
Args:
amplitude_values (numpy.ndarray):
Array of floats representing signal values.
Returns:
float:
`mean` value of the ... | [
37811,
5840,
489,
3984,
13905,
8265,
526,
15931,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
34242,
628,
198,
4299,
1612,
7,
321,
489,
3984,
62,
27160,
2599,
198,
220,
220,
220,
37227,
9771,
3129,
378,
262,
... | 2.485909 | 1,171 |
"""add change.outdated
Revision ID: 7ef7dfa2ca3a
Revises: 37a702b7f58e
Create Date: 2016-08-09 08:59:04.441926
"""
# revision identifiers, used by Alembic.
revision = '7ef7dfa2ca3a'
down_revision = '37a702b7f58e'
import warnings
from alembic import op
import sqlalchemy as sa
from hubtty.dbsupport import sqlite_al... | [
37811,
2860,
1487,
13,
448,
8715,
198,
198,
18009,
1166,
4522,
25,
767,
891,
22,
7568,
64,
17,
6888,
18,
64,
198,
18009,
2696,
25,
5214,
64,
36680,
65,
22,
69,
3365,
68,
198,
16447,
7536,
25,
1584,
12,
2919,
12,
2931,
8487,
25,
... | 2.455882 | 136 |
from __future__ import absolute_import, division, print_function
import unittest
import ctypes
import sys
from blaze.compute import ckernel
from blaze.py2help import skipIf
from dynd import nd, ndt, _lowlevel
# On 64-bit windows python 2.6 appears to have
# ctypes bugs in the C calling convention, so
# disable these... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
198,
11748,
555,
715,
395,
198,
11748,
269,
19199,
198,
11748,
25064,
198,
198,
6738,
31259,
13,
5589,
1133,
1330,
269,
33885,
198,
6738,
31259,
13,
90... | 2.661538 | 195 |
import cv2
from glob import glob
import numpy as np
from tqdm import tqdm
im = cv2.imread('/home/storage/lsy/fashion/FashionAI_Keypoint_Detection/wu_train/Images/blouse/ff210d1818f907693a03a6ea2eb39f77.jpg')
for fn in tqdm(glob('/home/storage/lsy/fashion/FashionAI_Keypoint_Detection/r1_train/Images/blouse/*.jp... | [
11748,
269,
85,
17,
201,
198,
6738,
15095,
1330,
15095,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
201,
198,
201,
198,
320,
796,
269,
85,
17,
13,
320,
961,
10786,
14,
11195,
14,
... | 2.086124 | 209 |
#!/usr/bin/env python
import os
import sys
from os.path import abspath, dirname
if __name__ == "__main__":
project_dir = dirname(dirname(abspath(__file__)))
sys.path.insert(0, project_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zc_test_app.settings")
from django.core.management import exec... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
6738,
28686,
13,
6978,
1330,
2352,
6978,
11,
26672,
3672,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
2... | 2.63354 | 161 |
dirs = [
"./src/mobicoin-cli-res.rc",
"./src/mobicoin-cli.cpp",
"./src/mobicoind-res.rc",
"./src/mobicoind.cpp",
"./src/qt/locale/mobicoin_bar.ts",
"./src/qt/locale/mobicoin_bg.ts",
"./src/qt/locale/mobicoin_ca.ts",
"./src/qt/locale/mobicoin_cmn.ts",
"./src/qt/locale/mobicoin_cs.ts",
"./src/qt/locale/mobicoin_da.ts",
"... | [
15908,
82,
796,
685,
198,
1911,
14,
10677,
14,
39949,
3713,
259,
12,
44506,
12,
411,
13,
6015,
1600,
198,
1911,
14,
10677,
14,
39949,
3713,
259,
12,
44506,
13,
20322,
1600,
198,
1911,
14,
10677,
14,
39949,
3713,
521,
12,
411,
13,
... | 1.918848 | 764 |
from tamr_unify_client.models.base_resource import BaseResource
class AttributeConfiguration(BaseResource):
"""The configurations of Unify Attributes.
See https://docs.tamr.com/reference#the-attribute-configuration-object
"""
@classmethod
@property
def relative_id(self):
""":type: str... | [
6738,
21885,
81,
62,
403,
1958,
62,
16366,
13,
27530,
13,
8692,
62,
31092,
1330,
7308,
26198,
628,
198,
4871,
3460,
4163,
38149,
7,
14881,
26198,
2599,
198,
220,
220,
220,
37227,
464,
25412,
286,
791,
1958,
49213,
13,
628,
220,
220,
... | 2.506641 | 527 |
from pypy.tool.memusage import log2gnumeric
log = """
[1000] ...
[2000] {gc-collect
.----------- Full collection ------------------
| used before collection:
| in ArenaCollection: 500 bytes
| raw_malloced: 100 bytes
| used after collection:
| in ArenaCollection: 300 byt... | [
6738,
279,
4464,
88,
13,
25981,
13,
11883,
26060,
1330,
2604,
17,
4593,
39223,
198,
198,
6404,
796,
37227,
198,
58,
12825,
60,
2644,
198,
58,
11024,
60,
1391,
36484,
12,
33327,
198,
198,
13,
32284,
6462,
4947,
34400,
438,
198,
91,
9... | 2.543981 | 432 |
x = 206
y = 42
if x < y:
print(str(x) + ' is greater than ' + str(y))
| [
87,
796,
27253,
198,
88,
796,
5433,
198,
361,
2124,
1279,
331,
25,
198,
220,
220,
220,
3601,
7,
2536,
7,
87,
8,
1343,
705,
318,
3744,
621,
705,
1343,
965,
7,
88,
4008,
198
] | 2.114286 | 35 |
import torch
from torch import nn
from torch.nn import functional as F
from PIL import Image
import numpy as np
import json
from detectron2.data import MetadataCatalog
from detectron2.structures import ImageList, Instances, BitMasks
from detectron2.modeling.meta_arch.build import META_ARCH_REGISTRY
from .gt_generate... | [
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
28034,
13,
20471,
1330,
10345,
355,
376,
198,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
198,
6738,
4886,
1313,
17,
13,
7890,
... | 1.963721 | 10,061 |
#
# A graph G = (V,E) is a set of nodes V and a set of edges E
#
# Returns a list of edges sorted by weight in decreasing order
| [
2,
198,
2,
317,
4823,
402,
796,
357,
53,
11,
36,
8,
318,
257,
900,
286,
13760,
569,
290,
257,
900,
286,
13015,
412,
198,
2,
628,
220,
1303,
16409,
257,
1351,
286,
13015,
23243,
416,
3463,
287,
24030,
1502,
628
] | 3.219512 | 41 |
# # California COVID-19 Hospitalizations
#
# COVID-19 hospitalizations in California by county.
#
# ## Requirements
# ! conda install pygraphviz --yes --quiet
# ! pip install jupyter pandas ploomber matplotlib --quiet
# ## Data sources
#
# COVID-19: https://data.chhs.ca.gov/dataset/california-covid-19-hospital-data-... | [
2,
1303,
3442,
7375,
11008,
12,
1129,
9256,
4582,
198,
2,
198,
2,
7375,
11008,
12,
1129,
4436,
4582,
287,
3442,
416,
7968,
13,
198,
2,
198,
2,
22492,
24422,
198,
198,
2,
5145,
1779,
64,
2721,
12972,
34960,
85,
528,
1377,
8505,
137... | 2.534307 | 1,370 |
import datetime
import warnings
import weakref
import dateutil.parser
import numpy as np
| [
11748,
4818,
8079,
198,
11748,
14601,
198,
11748,
4939,
5420,
198,
198,
11748,
3128,
22602,
13,
48610,
198,
11748,
299,
32152,
355,
45941,
628,
198
] | 3.68 | 25 |
# -*- coding: utf-8 -*-
import tensorflow as tf
import tf_euler
if __name__ == '__main__':
print("begin....")
tf_euler.initialize_embedded_graph('ppi') # 图数据目录
source = tf_euler.sample_node(128, tf_euler.ALL_NODE_TYPE)
source.set_shape([128])
model = DeepWalk(tf_euler.ALL_NODE_TYPE, [0, 1], 56... | [
171,
119,
123,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
48700,
62,
68,
18173,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,... | 2.07907 | 430 |
import numpy as np
import cv2
from tqdm import tqdm
import torch
import torch.nn as nn
from torch.nn import functional as F
import torch.optim as optim
from torch.utils.data import DataLoader
from model.config import arguments
from model.model import BaseNet
from dataset.dataset import FlowerData
import matplotlib.p... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
20471,
1330,
10345,
355,
376,
198,
1174... | 2.625498 | 251 |
#! /usr/bin/env python3
# ------------
# tray_icon.py
# ------------
# Author: Daniel Sim (foxhead128)
# License: See LICENSE.md for more details.
# Description: This module contains a system tray icon class, used by Nimbus
# as it runs in the background.
# Import everything we need.
import sys
... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
220,
10541,
198,
2,
26473,
62,
4749,
13,
9078,
198,
2,
220,
10541,
198,
2,
6434,
25,
220,
220,
220,
220,
220,
7806,
3184,
357,
12792,
2256,
12762,
8,
198,
2,
13789,... | 2.764463 | 484 |
###############################################################################
# Done: READ the code below. TRACE (by hand) the execution of the code,
# predicting what will get printed. Then run the code
# and compare your prediction to what actually was printed.
# Then mark this _TODO_ as DONE and commit-and-push ... | [
29113,
29113,
7804,
4242,
21017,
198,
2,
24429,
25,
220,
20832,
262,
2438,
2174,
13,
7579,
11598,
357,
1525,
1021,
8,
262,
9706,
286,
262,
2438,
11,
198,
2,
25539,
644,
481,
651,
10398,
13,
220,
3244,
1057,
262,
2438,
198,
2,
290,
... | 4.188679 | 159 |
RETENTION_SQL = """
SELECT
datediff(%(period)s, {trunc_func}(toDateTime(%(start_date)s)), reference_event.event_date) as base_interval,
datediff(%(period)s, reference_event.event_date, {trunc_func}(toDateTime(event_date))) as intervals_from_base,
COUNT(DISTINCT event.target) count
FROM (
{returning_even... | [
26087,
45589,
62,
17861,
796,
37227,
198,
46506,
198,
220,
220,
220,
14567,
733,
7,
4,
7,
41007,
8,
82,
11,
1391,
2213,
19524,
62,
20786,
92,
7,
1462,
10430,
7575,
7,
4,
7,
9688,
62,
4475,
8,
82,
36911,
4941,
62,
15596,
13,
1559... | 2.434004 | 1,341 |
from platform import python_version
from typing import Optional
import click
from click.core import Context, Option
from .base import CONTEXT_SETTINGS, _DEFAULT_RESULT_TYPE, run_test
from ...config.meta import __TITLE__, __VERSION__
from ...models import ResultType
def pyspj_entry(name: str, spj, result_type: str =... | [
6738,
3859,
1330,
21015,
62,
9641,
198,
6738,
19720,
1330,
32233,
198,
198,
11748,
3904,
198,
6738,
3904,
13,
7295,
1330,
30532,
11,
16018,
198,
198,
6738,
764,
8692,
1330,
22904,
13918,
62,
28480,
51,
20754,
11,
4808,
7206,
38865,
62,
... | 2.784906 | 795 |
print(''' Vendetron 3000
El mejor programa para los vendedores en Panama!!
Izzzz Criminal!!!
''')
#Listas []
#Duplas ()
#Diccionarios {}
ventas_globales = 0.0
lista_vendedores = []
while True:
registro = {}
nombre = input("\nNombre: ") #Se introduce el nombre del vendedor.
while... | [
4798,
7,
7061,
6,
44220,
316,
1313,
20343,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2574,
502,
73,
273,
1430,
64,
31215,
22346,
410,
1631,
2850,
551,
23519,
3228,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
314,
301... | 2.128571 | 630 |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | [
2,
770,
2438,
318,
636,
286,
1195,
1984,
270,
13,
198,
2,
198,
2,
357,
34,
8,
15069,
19764,
12131,
13,
198,
2,
198,
2,
770,
2438,
318,
11971,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
13,
921,
743,
198,
2,
7330,
257,
486... | 2.1251 | 1,247 |
"""MAVLink log parsing utilities."""
import argparse
from pymavlink.dialects.v10 import ceaufmg as mavlink
from pymavlink import mavutil
import numpy as np
def main():
"""Parse a MAVLink log."""
parser = argparse.ArgumentParser(description=main.__doc__)
parser.add_argument("--condition", default=None,
... | [
37811,
5673,
53,
11280,
2604,
32096,
20081,
526,
15931,
628,
198,
11748,
1822,
29572,
198,
198,
6738,
279,
4948,
615,
8726,
13,
38969,
478,
82,
13,
85,
940,
1330,
2906,
559,
69,
11296,
355,
285,
615,
8726,
198,
6738,
279,
4948,
615,
... | 2.232945 | 601 |
import enum
import itertools
from collections import defaultdict
from django.db import models
from django.core.validators import MinValueValidator
from utils.django.models import EnumField
| [
11748,
33829,
198,
11748,
340,
861,
10141,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
7295,
13,
12102,
2024,
1330,
1855,
11395,
47139,
1352,
198,
198,
6738,
3384,
... | 3.679245 | 53 |
"""Bioprinter: print images with colored bacteria and yeast.
This implements the `bioprint` function, which takes an image and writes a CSV
file that the Labcyte Echo dispenser can use to print the pictures on a plate
using yeast, coli, ...
Written by Valentin for the Edinburgh Genome Foundry.
Original idea and Matla... | [
37811,
33,
14922,
81,
3849,
25,
3601,
4263,
351,
16396,
11492,
290,
20146,
13,
198,
198,
1212,
23986,
262,
4600,
8482,
404,
22272,
63,
2163,
11,
543,
2753,
281,
2939,
290,
6797,
257,
44189,
198,
7753,
326,
262,
3498,
948,
660,
21455,
... | 3.560606 | 132 |
import numpy as np | [
11748,
299,
32152,
355,
45941
] | 3.6 | 5 |
"""
AUTOMATION SCRIPT: Supervided Pretrained Autoencoders for Inference in Networks
@author: Gunjan Mahindre
Version: 1.0
Date last modified: Sept. 27 2020
Description:
Run the main autoencoder code for various percentages of deletion
Run the code over "iter" number of iterations
Calculates Me... | [
37811,
201,
198,
39371,
2662,
6234,
6374,
46023,
25,
3115,
85,
1384,
37123,
13363,
5231,
6571,
19815,
364,
329,
554,
4288,
287,
27862,
201,
198,
201,
198,
31,
9800,
25,
6748,
13881,
8882,
521,
260,
201,
198,
14815,
25,
352,
13,
15,
... | 2.93904 | 1,542 |
"""Known test tags so that common tags can safely reused in :func:`bitbots_test.decorators.tag`"""
INTERACTIVE = "interactive"
"Tests which require user interaction in order to be run"
WEBOTS = "webots"
"Tests which require webots"
| [
37811,
29870,
1332,
15940,
523,
326,
2219,
15940,
460,
11512,
46823,
287,
1058,
20786,
25,
63,
2545,
42478,
62,
9288,
13,
12501,
273,
2024,
13,
12985,
63,
37811,
198,
198,
41358,
10659,
9306,
796,
366,
3849,
5275,
1,
198,
1,
51,
3558,... | 3.25 | 72 |
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 20 01:59:55 2020
@author: abhi0
"""
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
3825,
8621,
1160,
5534,
25,
3270,
25,
2816,
12131,
201,
198,
201,
198,
31,
9800,
25,
450,
5303,
15,
201,
198,
37811,
201
] | 2.069767 | 43 |
#!/usr/bin/env python
#coding:utf-8
#realtime time log
import time
import redis
import json
import urllib2
rc = redis.Redis(host='192.168.1.15',port=6379)
f = open("/var/log/nginx/access.log", "r")
f.seek(0, 2)
while True:
offset = f.tell()
line = f.readline()
if not line:
f.seek(offset)
ti... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
66,
7656,
25,
40477,
12,
23,
198,
2,
5305,
2435,
640,
2604,
198,
11748,
640,
198,
11748,
2266,
271,
198,
11748,
33918,
198,
11748,
2956,
297,
571,
17,
198,
6015,
796,
2266,
271,
... | 1.9 | 380 |
"""booleanvalue.py
Created on: May 19, 2017
Author: Jeroen van der Heijden <jeroen@transceptor.technology>
"""
from .value import Value
| [
37811,
2127,
21052,
8367,
13,
9078,
198,
198,
41972,
319,
25,
1737,
678,
11,
2177,
198,
220,
220,
220,
6434,
25,
449,
3529,
268,
5719,
4587,
679,
2926,
6559,
1279,
73,
3529,
268,
31,
7645,
49492,
13,
45503,
29,
198,
37811,
198,
6738... | 2.958333 | 48 |
"""Support for 2-D geometric operations.
Mathematics for poses, frames, and coordinate transformations derived from Peter Corke's
"Robotics, Vision, and Control: Fundamental Algorithms in MATLAB".
"""
from collections import namedtuple
from itertools import chain
import numpy as np
from components.messaging import Br... | [
37811,
15514,
329,
362,
12,
35,
38445,
4560,
13,
198,
19044,
10024,
873,
329,
17313,
11,
13431,
11,
290,
20435,
38226,
10944,
422,
5613,
2744,
365,
338,
198,
1,
14350,
23891,
11,
19009,
11,
290,
6779,
25,
49983,
978,
7727,
907,
287,
... | 2.790482 | 4,854 |
from aiohttp.web import HTTPException
from aiommy.json import dumps
JSON_ERROR_KEY = 'error'
| [
6738,
257,
952,
4023,
13,
12384,
1330,
14626,
16922,
198,
6738,
257,
29005,
1820,
13,
17752,
1330,
45514,
198,
198,
40386,
62,
24908,
62,
20373,
796,
705,
18224,
6,
628,
198
] | 3.096774 | 31 |
nome = input('Digite seu nome inteiro: ').split()
print('Primeiro nome: ', nome[0])
print('Último nome: ', nome[-1])
| [
77,
462,
796,
5128,
10786,
19511,
578,
384,
84,
299,
462,
493,
68,
7058,
25,
705,
737,
35312,
3419,
198,
4798,
10786,
26405,
7058,
299,
462,
25,
46083,
299,
462,
58,
15,
12962,
198,
4798,
10786,
127,
248,
2528,
25147,
299,
462,
25,
... | 2.294118 | 51 |