content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import tkinter
import webbrowser
from tkinter import messagebox
if __name__ == '__main__':
import lyrics
lyrics.main(True)
| [
11748,
256,
74,
3849,
198,
11748,
3992,
40259,
198,
6738,
256,
74,
3849,
1330,
3275,
3524,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1330,
15844,
198,
220,
220,
220,
15844,
13,
12417,... | 2.934783 | 46 |
import theano
import theano.tensor as T
import treeano
@treeano.register_node("monitor_update_ratio")
class MonitorUpdateRatioNode(treeano.Wrapper1NodeImpl):
"""
monitor's the ratio between the a statistic (eg. norm, max, min) between an
update of a parameter and the parameter itself
monitor's param... | [
11748,
262,
5733,
198,
11748,
262,
5733,
13,
83,
22854,
355,
309,
198,
11748,
5509,
5733,
628,
198,
31,
21048,
5733,
13,
30238,
62,
17440,
7203,
41143,
62,
19119,
62,
10366,
952,
4943,
198,
4871,
18289,
10260,
29665,
952,
19667,
7,
21... | 3.12766 | 235 |
import discord
from discord.ext import commands
import sys
sys.path.append('../..')
import config
| [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
492,
11537,
198,
11748,
4566,
198
] | 3.666667 | 27 |
from typing import Iterable
from pathlib import Path
import json
from xrtm.models import CSV, CsvRecord, VTraceTx, VTraceRx, STraceTx, STraceRx, PTraceTx, PTraceRx, parse_and_scale_1000, scale_and_serialize_1000
| [
6738,
19720,
1330,
40806,
540,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
33918,
198,
6738,
2124,
17034,
76,
13,
27530,
1330,
44189,
11,
327,
21370,
23739,
11,
569,
2898,
558,
46047,
11,
569,
2898,
558,
49,
87,
11,
311,
2898,
558... | 2.7 | 80 |
from cawebhelper import CAWebHelper
import unittest
if __name__ == '__main__':
unittest.main()
| [
6738,
269,
707,
1765,
2978,
525,
1330,
7257,
13908,
47429,
198,
11748,
555,
715,
395,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
628
] | 2.657895 | 38 |
import sys
import mraa
from twisted.internet.defer import inlineCallbacks
from twisted.internet.task import LoopingCall
from autobahn.twisted.wamp import ApplicationSession
from autobahn import wamp
# adjust this for your setup:
LED1_PIN = 11 # O0 (used as digital) on Arduino Tinkershield
BTN1_PIN = 14 # I0 (used ... | [
11748,
25064,
198,
11748,
285,
430,
64,
198,
6738,
19074,
13,
37675,
13,
4299,
263,
1330,
26098,
14134,
10146,
198,
6738,
19074,
13,
37675,
13,
35943,
1330,
6706,
15816,
14134,
198,
6738,
1960,
672,
15386,
13,
4246,
6347,
13,
86,
696,
... | 2.821086 | 313 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 20 21:02:29 2017
@author: ahefny
"""
from __future__ import print_function
import numpy as np
import theano
import theano.tensor as T
from rpsp.rpspnets.psr_lite.rnn_filter import RNNFilter
from rpsp.rpspnets.psr_lite.utils.p3 import *
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
3158,
1160,
2310,
25,
2999,
25,
1959,
2177,
198,
198,
31,
9800,
25,
257,
258,
69,
... | 2.333333 | 138 |
#!/bin/env python
import json
import os
import pytest
import B_stemming as B
| [
2,
48443,
8800,
14,
24330,
21015,
198,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
12972,
9288,
198,
198,
11748,
347,
62,
927,
2229,
355,
347,
198
] | 2.925926 | 27 |
import re
import csv
from time import sleep
from bs4 import BeautifulSoup
import requests
import pandas as pd
request = 'https://news.search.yahoo.com/search?p={}'
headers = {
'accept': '*/*',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9',
'referer': 'https://www.google.c... | [
11748,
302,
198,
11748,
269,
21370,
198,
6738,
640,
1330,
3993,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
7007,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
25927,
796,
705,
5450,
1378,
10827,
13,
12947,
13,
40774... | 2.522573 | 886 |
from typing import List
from fastapi import status, HTTPException
from sqlalchemy.orm import Session
from .. import models, schemas, utils
| [
6738,
19720,
1330,
7343,
198,
6738,
3049,
15042,
1330,
3722,
11,
14626,
16922,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
23575,
198,
6738,
11485,
1330,
4981,
11,
3897,
5356,
11,
3384,
4487,
628,
628,
198
] | 3.972222 | 36 |
import os
import logging
import sys
import json
logging.basicConfig(level=logging.DEBUG)
from rekall import session
from rekall import plugins
s = session.Session(
filename=str(sys.argv[1]),
autodetect=["rsds"],
logger=logging.getLogger(),
autodetect_scan_length=18446744073709551616,
profile_path... | [
11748,
28686,
198,
11748,
18931,
198,
11748,
25064,
198,
11748,
33918,
198,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
30531,
8,
198,
198,
6738,
302,
74,
439,
1330,
6246,
198,
6738,
302,
74,
439,
1330,
20652,
198,... | 2.446154 | 260 |
#!/usr/bin/env python3
"""
Prepare the output of the convert benchmark script for the R plotting script.
"""
import argparse
import os
import sys
import re
op = argparse.ArgumentParser(description=__doc__)
op.add_argument('--version', action='version', version='%(prog)s 1.0')
op.add_argument("--mult", "-m", action="s... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
37534,
533,
262,
5072,
286,
262,
10385,
18335,
4226,
329,
262,
371,
29353,
4226,
13,
198,
37811,
198,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
25064,
198,
... | 2.290503 | 895 |
# YouTube: https://youtu.be/JzHlMtlohNE
# Publicação: https://caffeinealgorithm.com/blog/20211022/classes-e-objetos-em-python/
inimigo1 = Inimigo()
inimigo2 = Inimigo()
inimigo1.ataque() # Eu fui atacado e perdi uma vida.
inimigo1.ataque() # Eu fui atacado e perdi uma vida.
inimigo1.ataque() # Eu fui atacado ... | [
2,
7444,
25,
3740,
1378,
32594,
13,
1350,
14,
41,
89,
39,
75,
44,
28781,
1219,
12161,
201,
198,
2,
5094,
64,
16175,
28749,
25,
3740,
1378,
66,
21223,
500,
282,
42289,
13,
785,
14,
14036,
14,
1238,
2481,
940,
1828,
14,
37724,
12,
... | 2.186364 | 220 |
"""
530. Minimum Absolute Difference in BST
"""
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
| [
37811,
201,
198,
38612,
13,
26265,
36532,
43795,
287,
44992,
201,
198,
37811,
201,
198,
2,
30396,
329,
257,
13934,
5509,
10139,
13,
201,
198,
2,
1398,
12200,
19667,
7,
15252,
2599,
201,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
... | 2.040323 | 124 |
from yaml import load
from json import loads, dumps
from datetime import datetime
from Crypto.Cipher import AES
import base64
import sys
# read config.yaml
| [
6738,
331,
43695,
1330,
3440,
198,
6738,
33918,
1330,
15989,
11,
45514,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
36579,
13,
34,
10803,
1330,
34329,
198,
11748,
2779,
2414,
198,
11748,
25064,
628,
198,
2,
1100,
4566,
13,
88,
... | 3.586957 | 46 |
from string import Template
import os
import shutil
import sublime
import sublime_plugin
| [
6738,
4731,
1330,
37350,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
41674,
198,
11748,
41674,
62,
33803,
628,
628
] | 4.380952 | 21 |
import pytest
from rlp import decode, DecodingError
invalid_rlp = (
'',
'\x00\xab',
'\x00\x00\xff',
'\x83dogcat',
'\x83do',
'\xc7\xc0\xc1\xc0\xc3\xc0\xc1\xc0\xff',
'\xc7\xc0\xc1\xc0\xc3\xc0\xc1'
'\x81\x02',
'\xb8\x00',
'\xb9\x00\x00',
'\xba\x00\x02\xff\xff',
'\x81\x54'
... | [
11748,
12972,
9288,
198,
6738,
374,
34431,
1330,
36899,
11,
4280,
7656,
12331,
628,
198,
259,
12102,
62,
81,
34431,
796,
357,
198,
220,
220,
220,
705,
3256,
198,
220,
220,
220,
705,
59,
87,
405,
59,
87,
397,
3256,
198,
220,
220,
2... | 1.560386 | 207 |
#!/usr/bin/python3
import argparse
import glob
from PIL import Image, ImageOps
import os
import sys
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Encoder and decoder for boot screen image stored in firmware of Tronxy 3D Printers.')
# Main action of app
subparsers = parser.ad... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
1822,
29572,
198,
11748,
15095,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
41472,
198,
11748,
28686,
198,
11748,
25064,
198,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6... | 2.305051 | 2,534 |
#=======================================================================
# isa_RV32M.py
#=======================================================================
'RISC-V instructions for integer multiplication and division.'
from utils import sext_xlen, sext_32, sext, signed, trim, multhi64
from pydgin.utils imp... | [
2,
23926,
1421,
18604,
198,
2,
318,
64,
62,
49,
53,
2624,
44,
13,
9078,
198,
2,
23926,
1421,
18604,
198,
6,
49,
37719,
12,
53,
7729,
329,
18253,
48473,
290,
7297,
2637,
198,
198,
6738,
3384,
4487,
220,
220,
220,
220,
220,
220,
2... | 3.070529 | 397 |
camMessage = {
'ip':"192.168.1.200",
'user':"admin",
'passwd':"@wali959"
}
hk_imgW = 1280
hk_imgH = 720
| [
20991,
12837,
796,
1391,
198,
220,
220,
220,
705,
541,
10354,
1,
17477,
13,
14656,
13,
16,
13,
2167,
1600,
198,
220,
220,
220,
705,
7220,
10354,
1,
28482,
1600,
198,
220,
220,
220,
705,
6603,
16993,
10354,
1,
31,
86,
7344,
24,
327... | 1.8 | 65 |
import torch
import torch.nn as nn
import torch.nn.functional as F
import random
import os
import wave as we
import numpy as np
import mir_eval
import csv
import re
from model import Net
from utils import melody_eval,est,seg,iseg
from thop import profile
Net = Net()
Net.cuda()
Net.float()
Net.train()
flops1, params1... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
4738,
198,
11748,
28686,
198,
11748,
6769,
355,
356,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
5720,
62,
1820... | 2.882353 | 136 |
import numpy as np
import os
import sys
from sklearn.preprocessing import normalize
from scipy import stats
import warnings
from OnClass.OnClass_utils import *
from OnClass.BilinearNN import BilinearNN
| [
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
25064,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
3487,
1096,
198,
6738,
629,
541,
88,
1330,
9756,
198,
11748,
14601,
198,
6738,
1550,
9487,
13,
2202,
9487,
62,
26791,
13... | 3.482759 | 58 |
import pytest
from pytest import mark
from torchmdnet import models
from torchmdnet.models.model import create_model
from torchmdnet.models.wrappers import AtomFilter
from utils import load_example_args, create_example_batch
@mark.parametrize("remove_threshold", [-1, 2, 5])
@mark.parametrize("model_name", models.__al... | [
11748,
12972,
9288,
198,
6738,
12972,
9288,
1330,
1317,
198,
6738,
28034,
9132,
3262,
1330,
4981,
198,
6738,
28034,
9132,
3262,
13,
27530,
13,
19849,
1330,
2251,
62,
19849,
198,
6738,
28034,
9132,
3262,
13,
27530,
13,
29988,
11799,
1330,
... | 3.25 | 100 |
from psutil import virtual_memory, swap_memory
from src.utils.convertutils import byte_to_mb | [
6738,
26692,
22602,
1330,
7166,
62,
31673,
11,
16075,
62,
31673,
198,
198,
6738,
12351,
13,
26791,
13,
1102,
1851,
26791,
1330,
18022,
62,
1462,
62,
2022
] | 3.444444 | 27 |
from flask import current_app as app
from backend.app.models.product import Product
| [
6738,
42903,
1330,
1459,
62,
1324,
355,
598,
198,
6738,
30203,
13,
1324,
13,
27530,
13,
11167,
1330,
8721,
628
] | 4.25 | 20 |
#!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
##################################################################
# Documentation
"""Package providing discourse segmenter for Mate dependency graphs.
Attributes:
__all__ (List[str]): list of sub-modules exported by this package
__author__ (str): packa... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
4235,
25,
21015,
26,
19617,
25,
3384,
69,
12,
23,
26,
532,
9,
12,
198,
198,
29113,
29113,
2235,
198,
2,
43925,
198,
37811,
27813,
4955,
18129,
10618,
263,
329,
24787... | 3.095361 | 388 |
#!/usr/bin/env python
# pylint: disable=R0902,R0913
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2021
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Pu... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
279,
2645,
600,
25,
15560,
28,
49,
2931,
2999,
11,
49,
2931,
1485,
198,
2,
198,
2,
317,
5888,
326,
3769,
257,
11361,
7071,
284,
262,
50203,
18579,
7824,
198,
2,
15069,
357,
34,
... | 2.573665 | 2,172 |
import os
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from ..utils.plotter_helper import PlotterHelper
from ..utils.data_aggregator import DataAggregator
from ..utils.signal_properties import SignalProperties
from ..patient.patient_data_loader import PatientDataLoader
... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
384,
397,
1211,
355,
3013,
82,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
11485,
26791,
13,
29487,
... | 3.343434 | 99 |
from subprocess import Popen, PIPE
import sys
| [
6738,
850,
14681,
1330,
8099,
268,
11,
350,
4061,
36,
198,
11748,
25064,
198
] | 3.285714 | 14 |
#!/usr/bin/env python3
"""
TAP reporter
https://testanything.org/
"""
import logging
import os
from megalinter import Reporter, config, utils
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
51,
2969,
9095,
198,
5450,
1378,
9288,
49459,
13,
2398,
14,
198,
37811,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
6738,
502,
13528,
3849,
1330,
25869,
11,
4566,
1... | 3.2 | 45 |
#
# author: Jungtaek Kim (jtkim@postech.ac.kr)
# last updated: September 24, 2020
#
"""test_utils_logger"""
import logging
import pytest
import numpy as np
from bayeso.utils import utils_logger as package_target
| [
2,
198,
2,
1772,
25,
27134,
8326,
988,
6502,
357,
73,
30488,
320,
31,
7353,
3055,
13,
330,
13,
38584,
8,
198,
2,
938,
6153,
25,
2693,
1987,
11,
12131,
198,
2,
198,
37811,
9288,
62,
26791,
62,
6404,
1362,
37811,
198,
198,
11748,
... | 2.905405 | 74 |
from __future__ import absolute_import, unicode_literals, print_function, division
import os
import os.path
import sys
import json
import sublime
import sublime_plugin
SUBLIMEREPL_DIR = None
SUBLIMEREPL_USER_DIR = None
PY2 = False
if sys.version_info[0] == 2:
SUBLIMEREPL_DIR = os.getcwdu()
SUBLIMEREPL_USER_D... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
28000,
1098,
62,
17201,
874,
11,
3601,
62,
8818,
11,
7297,
198,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
11748,
25064,
198,
11748,
33918,
198,
11748,
41674,
198,
11748,
416... | 2.675 | 160 |
# coding: utf-8
"""
Ketra Lighting API
Control your Ketra lights # noqa: E501
The version of the OpenAPI document: 1.4.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from aioketraapi.configuration import Configuration
class PublishBegin(obje... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
43092,
430,
43150,
7824,
628,
220,
220,
220,
6779,
534,
43092,
430,
7588,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
383,
2196,
286,
262,
4946,
1... | 2.275955 | 2,225 |
import os
import shutil
from matrix.common import etl
from matrix.common.aws.redshift_handler import RedshiftHandler
from matrix.common.etl.transformers import MetadataToPsvTransformer
from matrix.common.logging import Logging
logger = Logging.get_logger(__name__)
| [
11748,
28686,
198,
11748,
4423,
346,
198,
198,
6738,
17593,
13,
11321,
1330,
2123,
75,
198,
6738,
17593,
13,
11321,
13,
8356,
13,
445,
30846,
62,
30281,
1330,
2297,
30846,
25060,
198,
6738,
17593,
13,
11321,
13,
316,
75,
13,
35636,
36... | 3.392405 | 79 |
#!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2020 CNRS
# 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 ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
2,
383,
17168,
13789,
357,
36393,
8,
198,
198,
2,
15069,
357,
66,
8,
12131,
31171,
6998,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
... | 2.577434 | 1,808 |
from flask import Flask, redirect, url_for, session, request, jsonify
from flask import render_template, flash
from twython import Twython
import markovify
import os
@app.route('/page1')
| [
6738,
42903,
1330,
46947,
11,
18941,
11,
19016,
62,
1640,
11,
6246,
11,
2581,
11,
33918,
1958,
198,
6738,
42903,
1330,
8543,
62,
28243,
11,
7644,
198,
6738,
665,
7535,
1330,
1815,
7535,
198,
11748,
1317,
709,
1958,
198,
11748,
28686,
... | 3.54717 | 53 |
"""Project-wide constants."""
import re
from pathlib import Path
from traiter.const import CLOSE, COMMA, DASH, FLOAT_TOKEN_RE, OPEN, PLUS, SLASH
from traiter.terms.csv_ import Csv
BASE_DIR = Path.cwd().resolve().parts[-1]
BASE_DIR = Path.cwd() if BASE_DIR.find('floras') > -1 else Path.cwd().parent
DATA_DIR = BASE_D... | [
37811,
16775,
12,
4421,
38491,
526,
15931,
198,
198,
11748,
302,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
1291,
2676,
13,
9979,
1330,
7852,
14058,
11,
9440,
5673,
11,
360,
11211,
11,
9977,
46,
1404,
62,
10468,
43959,
62,
22... | 2.671141 | 1,043 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Experimental way to access to Notes matching model id, Field name and value
#-------------------------------------------------------------------------------
#sudo pip3 install ankisync2
... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
10097,
24305,
198,
2,
220,
32286,
835,
284,
1895,
284,
11822,
12336,
2746,
4686,
11,
7663,
1438,
290,
... | 2.566729 | 1,611 |
"""Core pandera schema class definitions."""
import json
import pandas as pd
from typing import List, Optional, Union
from . import errors, constants, dtypes
from .checks import Check
N_INDENT_SPACES = 4
class DataFrameSchema(object):
"""A light-weight pandas DataFrame validator."""
def __init__(
... | [
37811,
14055,
279,
4066,
64,
32815,
1398,
17336,
526,
15931,
198,
198,
11748,
33918,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
19720,
1330,
7343,
11,
32233,
11,
4479,
198,
198,
6738,
764,
1330,
8563,
11,
38491,
11,
28... | 2.081593 | 8,236 |
#!/usr/bin/env python
import sys
import gfal2
if(len(sys.argv) < 2):
print("Usage %s [URL]"%(sys.argv[0]))
exit(1)
ctxt = gfal2.creat_context()
r = ctxt.listdir(sys.argv[1])
map(lambda y: sys.stdout.write(("%s\n")%(y)), r)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
11748,
308,
42932,
17,
628,
198,
361,
7,
11925,
7,
17597,
13,
853,
85,
8,
1279,
362,
2599,
198,
197,
4798,
7203,
28350,
4064,
82,
685,
21886,
30866,
4,
7,
1... | 2.044248 | 113 |
import ssl
from xml.etree.ElementTree import fromstring
from .connection import Connection
from .endpoint import LocalEndpoint
from .listener import Listener
from .securityParameters import SecurityParameters
from .transportProperties import TransportProperties
from .transports import *
from .yang_validate import *
l... | [
11748,
264,
6649,
198,
6738,
35555,
13,
316,
631,
13,
20180,
27660,
1330,
422,
8841,
198,
198,
6738,
764,
38659,
1330,
26923,
198,
6738,
764,
437,
4122,
1330,
10714,
12915,
4122,
198,
6738,
764,
4868,
877,
1330,
7343,
877,
198,
6738,
... | 2.259744 | 3,361 |
import pandas
import json
import io
import requests
from datetime import datetime
current_date = datetime.today().strftime('%Y-%m-%d')
response = requests.post(
'https://accounts.spotify.com/api/token',
data={'grant_type': 'client_credentials'},
headers={
'Authoriza... | [
11748,
19798,
292,
198,
11748,
33918,
198,
11748,
33245,
198,
11748,
7007,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
14421,
62,
4475,
796,
4818,
8079,
13,
40838,
22446,
2536,
31387,
10786,
4,
56,
12,
4,
76,
12,
4,
67,
11537,
... | 2.135878 | 1,965 |
from typing import List, Tuple
import tensorflow as tf
| [
6738,
19720,
1330,
7343,
11,
309,
29291,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
628
] | 3.5625 | 16 |
import argparse
import os
from multiprocessing import Pool
from pathlib import Path
from subprocess import call
from tqdm import tqdm
parser = argparse.ArgumentParser(description="Convert audio file to wav format.")
parser.add_argument('-i', dest='src', help="Input directory")
parser.add_argument('-if', des... | [
11748,
1822,
29572,
201,
198,
11748,
28686,
201,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
201,
198,
6738,
3108,
8019,
1330,
10644,
201,
198,
6738,
850,
14681,
1330,
869,
201,
198,
201,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36... | 2.676768 | 396 |
import pickle
import random
import os
import cv2
import ImgProcessing as moduleIP
import FeatureExtraction as moduleFE
# imgInput = cv2.imread(img)
# batch_extractor('Data') | [
11748,
2298,
293,
198,
11748,
4738,
198,
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
1846,
70,
18709,
278,
355,
8265,
4061,
198,
11748,
27018,
11627,
7861,
355,
8265,
15112,
198,
198,
2,
33705,
20560,
796,
269,
85,
17,
13,
320,... | 3.125 | 56 |
from django.test import TestCase
from django.template import Template, RequestContext
from django.test.client import RequestFactory
from django.test.utils import setup_test_environment
setup_test_environment()
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
28243,
1330,
37350,
11,
19390,
21947,
198,
6738,
42625,
14208,
13,
9288,
13,
16366,
1330,
19390,
22810,
198,
6738,
42625,
14208,
13,
9288,
13,
26791,
1330,
9058... | 4.018868 | 53 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# #########################################################################
# Copyright (c) 2020, UChicago Argonne, LLC. All rights reserved. #
# #
# Copyright 2020. UChicago Argonne, LLC. This ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
1303,
29113,
29113,
7804,
198,
2,
15069,
357,
66,
8,
12131,
11,
471,
25705,
49974,
710,
11,
11419,
13,
1439,
2489,... | 2.228228 | 1,665 |
"""
Copyright 2015 Malte Splietker
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 writing, software
... | [
37811,
198,
15269,
1853,
4434,
660,
13341,
1155,
6122,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
1... | 2.552083 | 1,536 |
#This script will be periodically run to load in lawmakers to the leg_tracker system.
#Probably need to think through the workflow
#When is this run? Automatically or manually?
#Do we keep lawmakers in the database if they're no longer active?
#maybe with the active boolean?
#
#
# usage:
# export DJANGO_SETTINGS_MODULE... | [
2,
1212,
4226,
481,
307,
26034,
1057,
284,
3440,
287,
10191,
284,
262,
1232,
62,
2213,
10735,
1080,
13,
198,
2,
34784,
761,
284,
892,
832,
262,
30798,
198,
2,
2215,
318,
428,
1057,
30,
17406,
4142,
393,
14500,
30,
198,
2,
5211,
35... | 3.058036 | 224 |
from fastapi import APIRouter
from .cleanleave import router as cleanleave_router
from .todo import router as todo_router
router = APIRouter(prefix="/services")
router.include_router(cleanleave_router)
router.include_router(todo_router)
| [
6738,
3049,
15042,
1330,
3486,
4663,
39605,
198,
198,
6738,
764,
27773,
47408,
1330,
20264,
355,
3424,
47408,
62,
472,
353,
198,
6738,
764,
83,
24313,
1330,
20264,
355,
284,
4598,
62,
472,
353,
198,
198,
472,
353,
796,
3486,
4663,
396... | 3.037975 | 79 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack, LLC
# 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/... | [
2,
43907,
25,
7400,
11338,
28,
19,
6482,
10394,
28,
19,
2705,
8658,
11338,
28,
19,
198,
198,
2,
15069,
2321,
4946,
25896,
11,
11419,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
... | 3.142361 | 288 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------------------------
# - Generated by tools/entrypoint_co... | [
2,
16529,
1783,
10541,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
2,
16529,
1783,
10541,
198,
2,
532,
2980,
515,
416,
4899,
14,
13000,
4122,
62,
5589,
5329,
1... | 3.195076 | 1,056 |
import sklearn
import torch
from torch.utils.data import TensorDataset, DataLoader
import torch.nn.functional as F
from torch_geometric.utils import negative_sampling, remove_self_loops, add_self_loops
from torch_geometric.nn.inits import reset
from torch_geometric.nn import GCNConv, BatchNorm
from .utils import cluste... | [
11748,
1341,
35720,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
309,
22854,
27354,
292,
316,
11,
6060,
17401,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
62,
469,
16996,
13,
26791,
1330,
4633... | 2.396875 | 960 |
import pprint
import sys
import os
#sys.ps1 = "\033[0;34m>>> \033[0m"
#sys.ps2 = "\033[1;34m... \033[0m"
# Turn on pretty printing.
# Python 2.7 docs: https://docs.python.org/2/library/pprint.html
# Python 3.7 docs: https://docs.python.org/3/library/pprint.html
sys.displayhook = pprint.pprint
# Add clear screen func... | [
11748,
279,
4798,
198,
11748,
25064,
198,
11748,
28686,
198,
198,
2,
17597,
13,
862,
16,
796,
37082,
44427,
58,
15,
26,
2682,
76,
33409,
3467,
44427,
58,
15,
76,
1,
198,
2,
17597,
13,
862,
17,
796,
37082,
44427,
58,
16,
26,
2682,
... | 2.762821 | 156 |
import txaio
txaio.use_asyncio()
from os import environ
from answer_service.answer_component import AnswerComponent
from autobahn_autoreconnect import ApplicationRunner
if __name__ == '__main__':
runner = ApplicationRunner(
environ.get("WAMP_ROUTER_URL", u"ws://wamp_router:8080/ws"),
environ.get... | [
11748,
27765,
64,
952,
198,
17602,
64,
952,
13,
1904,
62,
292,
13361,
952,
3419,
198,
198,
6738,
28686,
1330,
551,
2268,
198,
6738,
3280,
62,
15271,
13,
41484,
62,
42895,
1330,
23998,
21950,
198,
6738,
1960,
672,
15386,
62,
2306,
382,... | 2.766497 | 197 |
import os
import numpy as np
def create_file(path):
"""return a new file object ready to write to"""
print("creating file {}".format(path))
return open(path, 'w')
if __name__ == "__main__":
num_file = 50
#src_file = "../dataset/agaricus_127d_train.libsvm"
#dst_dir = ... | [
11748,
28686,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
201,
198,
201,
198,
4299,
2251,
62,
7753,
7,
6978,
2599,
201,
198,
220,
220,
220,
37227,
7783,
257,
649,
2393,
2134,
3492,
284,
3551,
284,
37811,
201,
198,
2... | 2.13617 | 235 |
import os
import mock
import pytest
from absql import Runner
@pytest.fixture(autouse=True)
@pytest.fixture
| [
11748,
28686,
198,
11748,
15290,
198,
11748,
12972,
9288,
198,
6738,
2352,
13976,
1330,
21529,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
2306,
1076,
28,
17821,
8,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
628,
198
] | 2.875 | 40 |
__author__ = 'arobres'
# -*- coding: utf-8 -*-
from commons.rest_utils import RestUtils
from nose.tools import assert_true, assert_false
import commons.assertions as Assertions
import commons.fabric_utils as Fabutils
from commons.constants import URL, MODULE_NAME, REPOSITORY
from lettuce import step, world, before
... | [
834,
9800,
834,
796,
705,
283,
672,
411,
6,
198,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
36523,
13,
2118,
62,
26791,
1330,
8324,
18274,
4487,
198,
6738,
9686,
13,
31391,
1330,
6818,
62,
7942,... | 3.191257 | 183 |
# This file should be used to test app credentials
# once it runs successfully, you can be sure that
# AWS with DeepL translation is set up correctly on this machine
import __init__
from api.translate import deepl_translate as translate
from test_framework import test
if __name__ == "__main__":
main()
| [
2,
770,
2393,
815,
307,
973,
284,
1332,
598,
18031,
198,
2,
1752,
340,
4539,
7675,
11,
345,
460,
307,
1654,
326,
198,
2,
30865,
351,
10766,
43,
11059,
318,
900,
510,
9380,
319,
428,
4572,
198,
11748,
11593,
15003,
834,
198,
6738,
... | 3.746988 | 83 |
"""
This tutorial shows you how to use Model Predictive Control
with the true model.
"""
from stable_baselines.common import set_global_seeds
from causal_world.envs.causalworld import CausalWorld
from causal_world.dynamics_model import SimulatorModel
from causal_world.utils.mpc_optimizers import \
CrossEntropyMetho... | [
37811,
198,
1212,
11808,
2523,
345,
703,
284,
779,
9104,
14322,
45279,
6779,
198,
4480,
262,
2081,
2746,
13,
198,
37811,
198,
6738,
8245,
62,
12093,
20655,
13,
11321,
1330,
900,
62,
20541,
62,
325,
5379,
198,
6738,
26558,
62,
6894,
13... | 3.175 | 200 |
from typing import Any, List, Literal, TypedDict
from .FHIR_CodeableConcept import FHIR_CodeableConcept
from .FHIR_dateTime import FHIR_dateTime
from .FHIR_Element import FHIR_Element
from .FHIR_string import FHIR_string
from .FHIR_Timing_Repeat import FHIR_Timing_Repeat
# Specifies an event that may occur multiple t... | [
6738,
19720,
1330,
4377,
11,
7343,
11,
25659,
1691,
11,
17134,
276,
35,
713,
198,
198,
6738,
764,
44602,
4663,
62,
10669,
540,
3103,
984,
1330,
376,
39,
4663,
62,
10669,
540,
3103,
984,
198,
6738,
764,
44602,
4663,
62,
4475,
7575,
1... | 3.859008 | 766 |
import json
from io import StringIO
from html.parser import HTMLParser
import torch
class MLStripper(HTMLParser):
"""
Class for stripping away HTML stuff.
"""
def strip_tags(html):
"""
Function which takes a string and returns a string
without html tags such as <br>.
"""
s = MLStrippe... | [
11748,
33918,
198,
6738,
33245,
1330,
10903,
9399,
198,
6738,
27711,
13,
48610,
1330,
11532,
46677,
198,
198,
11748,
28034,
198,
198,
4871,
10373,
1273,
380,
2848,
7,
28656,
46677,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
50... | 2.328829 | 444 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: protos/public/modeldb/Job.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_dat... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
1237,
418,
14,
11377,
14,
14171,
335,
65,
14,
33308,
13,
1676,
1462,
198... | 2.315342 | 10,468 |
from enum import Enum
import pandas as pd
START_RAS_LINE = "*RAS_DATA_START\n" # Begins every file.
END_RAS_LINE = "*RAS_DATA_END\n"
END_FILE_LINE = "*DSC_DATA_END\n" # Meaning of this tag is rather obscure.
START_HEADER_LINE = "*RAS_HEADER_START\n"
END_HEADER_LINE = "*RAS_HEADER_END\n"
START_INT_LINE = "*RAS_INT_STAR... | [
6738,
33829,
1330,
2039,
388,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
2257,
7227,
62,
49,
1921,
62,
24027,
796,
366,
9,
49,
1921,
62,
26947,
62,
2257,
7227,
59,
77,
1,
1303,
48139,
790,
2393,
13,
198,
10619,
62,
49,
1921,
... | 2.159664 | 238 |
import cv2
import numpy as np
import torch
from time import *
from light_openpose.models.with_mobilenet import PoseEstimationWithMobileNet
from light_openpose.modules.keypoints import extract_keypoints, group_keypoints
from light_openpose.modules.load_state import load_state
from light_openpose.modules.pose import Pose... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
640,
1330,
1635,
198,
6738,
1657,
62,
9654,
3455,
13,
27530,
13,
4480,
62,
76,
25898,
268,
316,
1330,
37557,
22362,
18991,
3152,
17066,
7934,
198,
6... | 3.235632 | 174 |
from engine.config import *
import subprocess
| [
6738,
3113,
13,
11250,
1330,
1635,
198,
11748,
850,
14681,
628
] | 4.272727 | 11 |
import os
from compas.datastructures import Mesh
import logging
import compas_slicer.utilities as utils
from compas_slicer.slicers import InterpolationSlicer
from compas_slicer.post_processing import simplify_paths_rdp_igl
from compas_slicer.pre_processing import InterpolationSlicingPreprocessor
from compas_slicer.prin... | [
11748,
28686,
198,
6738,
552,
292,
13,
19608,
459,
1356,
942,
1330,
47529,
198,
11748,
18931,
198,
11748,
552,
292,
62,
82,
677,
263,
13,
315,
2410,
355,
3384,
4487,
198,
6738,
552,
292,
62,
82,
677,
263,
13,
82,
677,
364,
1330,
4... | 2.980198 | 404 |
import operator
from functools import reduce
from django.db.models import Q
from rest_framework import viewsets
| [
11748,
10088,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
6738,
1334,
62,
30604,
1330,
5009,
1039,
628,
198
] | 3.931034 | 29 |
''' Darendeli Non-linear Properties for Equivalent-Linear Ground Response Analyses
DESCRIPTION:
This module contains functions related to the non-linear dynamic properties of
soils, specifically geared towards use in equivalent-linear ground response
analyses. The curves specified by Darendeli (2001) are coded here an... | [
7061,
6,
45981,
358,
43733,
8504,
12,
29127,
24946,
329,
7889,
29540,
12,
14993,
451,
13706,
18261,
1052,
43710,
198,
30910,
40165,
25,
198,
1212,
8265,
4909,
5499,
3519,
284,
262,
1729,
12,
29127,
8925,
6608,
286,
198,
568,
4487,
11,
... | 2.483377 | 3,850 |
# -*- coding: utf-8 -*-
__author__ = 'joko'
"""
@author:joko
@time: 16/11/8 下午2:52
"""
import platform
import subprocess
import re
from time import sleep
import time
import os
import random
PATH = lambda p: os.path.abspath(p)
# 判断系统类型,windows使用findstr,linux使用grep
system = platform.system()
if system is "Windows":
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
834,
9800,
834,
796,
705,
73,
16044,
6,
198,
198,
37811,
198,
31,
9800,
25,
73,
16044,
198,
31,
2435,
25,
1467,
14,
1157,
14,
23,
220,
10310,
233,
39355,
230,
17,
... | 1.564547 | 17,708 |
#!/usr/bin/env python3
#
# pre_commit.py
"""
Sphinx extension to show examples of ``.pre-commit-config.yaml`` configuration.
.. versionadded:: 1.6.0
.. extensions:: sphinx_toolbox.pre_commit
Usage
------
.. rst:directive:: pre-commit
Directive which shows an example snippet of ``.pre-commit-config.yaml``.
.. r... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
220,
662,
62,
41509,
13,
9078,
198,
37811,
198,
50,
746,
28413,
7552,
284,
905,
6096,
286,
7559,
13,
3866,
12,
41509,
12,
11250,
13,
88,
43695,
15506,
8398,
13,
198,... | 2.772963 | 2,700 |
"""Test for autocomplete module, taken from Code Wars website."""
import pytest
from autocomplete import Autocomplete
short_dictionary = ['fix', 'fax', 'fit', 'fist', 'full', 'finch', 'final', 'finial']
long_dictionary = ['airplane', 'apple', 'air', 'avenue', 'airport',
'adamantium', 'awkwardn... | [
37811,
14402,
329,
1960,
42829,
6677,
8265,
11,
2077,
422,
6127,
6176,
3052,
526,
15931,
198,
198,
11748,
12972,
9288,
198,
6738,
1960,
42829,
6677,
1330,
5231,
42829,
6677,
628,
198,
19509,
62,
67,
14188,
796,
37250,
13049,
3256,
705,
... | 2.191893 | 4,169 |
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
def eeg_rereference(eeg, reference="average", robust=False, **kwargs):
"""EEG Rereferencing
This function can be used for arrays as well as MNE objects.
EEG recordings measure differences in electrical potentials between two points, which me... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
628,
198,
4299,
304,
1533,
62,
260,
35790,
7,
1453,
70,
11,
4941,
2625,
23913,
1600,
12373,
28,
25... | 2.87032 | 1,095 |
import os
from gears.compilers import ExecCompiler
| [
11748,
28686,
198,
6738,
28713,
13,
5589,
34393,
1330,
8393,
7293,
5329,
628
] | 4 | 13 |
"""
This is a variant of calc example using dynamically added properties to
classes created by textx.
"""
from __future__ import unicode_literals
import sys
from textx import metamodel_from_str
if sys.version < '3':
text = unicode # noqa
else:
text = str
grammar = '''
Calc: assignments*=Assignment expression... | [
37811,
198,
1212,
318,
257,
15304,
286,
42302,
1672,
1262,
32366,
2087,
6608,
284,
198,
37724,
2727,
416,
2420,
87,
13,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
25064,
198,
6738,
2420,
87,... | 2.832714 | 269 |
import pytest
import copy
from rasa.nlu.classifiers.keyword_intent_classifier import KeywordIntentClassifier
# TODO: add tests for other classifers
# from rasa.nlu.classifiers.mitie_intent_classifier import MitieIntentClassifier
from rasa.nlu.training_data.formats.rasa import RasaReader
from rasa.nlu.training_data im... | [
11748,
12972,
9288,
198,
11748,
4866,
198,
198,
6738,
374,
15462,
13,
77,
2290,
13,
4871,
13350,
13,
2539,
4775,
62,
48536,
62,
4871,
7483,
1330,
7383,
4775,
5317,
298,
9487,
7483,
198,
198,
2,
16926,
46,
25,
751,
5254,
329,
584,
13... | 3.03321 | 271 |
from .metadata import collect_metadata, print_intro_table
__all__ = ["print_intro_table", "collect_metadata"]
| [
6738,
764,
38993,
1330,
2824,
62,
38993,
11,
3601,
62,
600,
305,
62,
11487,
198,
198,
834,
439,
834,
796,
14631,
4798,
62,
600,
305,
62,
11487,
1600,
366,
33327,
62,
38993,
8973,
198
] | 3.264706 | 34 |
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright SAS Institute
#
# 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 b... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
2,
198,
2,
15069,
35516,
5136,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
13789,
1776,
198,
2,
22... | 2.47902 | 3,551 |
"""
==============================================================
Compute real-time power spectrum density with FieldTrip client
==============================================================
Please refer to `ftclient_rt_average.py` for instructions on
how to get the FieldTrip connector working in MNE-Python.
This e... | [
37811,
198,
10052,
4770,
25609,
855,
198,
7293,
1133,
1103,
12,
2435,
1176,
10958,
12109,
351,
7663,
51,
5528,
5456,
198,
10052,
4770,
25609,
855,
198,
198,
5492,
3522,
284,
4600,
701,
16366,
62,
17034,
62,
23913,
13,
9078,
63,
329,
7... | 2.075758 | 1,518 |
"""
pytest "fixture" providing an easy interface for running a Pyright typecheck and snapshot-testing
its output.
See test_type_ui_testing_fixture.py for examples.
"""
import os
import os.path
from typing import Optional, Set
import pytest
from pytest import FixtureRequest
from pytest_snapshot.plugin import Snapshot... | [
37811,
198,
9078,
9288,
366,
69,
9602,
1,
4955,
281,
2562,
7071,
329,
2491,
257,
350,
4766,
2099,
9122,
290,
27479,
12,
33407,
198,
896,
5072,
13,
198,
198,
6214,
1332,
62,
4906,
62,
9019,
62,
33407,
62,
69,
9602,
13,
9078,
329,
6... | 3.059406 | 202 |
import os
from setuptools import setup
install_requires = []
install_requires.extend(open(
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'requirements.txt')
).read().split())
setup(
name='django-issues-errors',
version='0.1.1',
description='Special python logging handler for send errors to ... | [
11748,
28686,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
17350,
62,
47911,
796,
17635,
198,
17350,
62,
47911,
13,
2302,
437,
7,
9654,
7,
198,
220,
220,
220,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
... | 2.628176 | 433 |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | [
2,
15069,
1584,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.91453 | 234 |
#!/usr/bin/env python
import sys
# sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
import socket
import numpy as np
import cv2
import os
import time
import struct
# DEPRECATED CAMERA CLASS FOR REALSENSE WITH ROS
# ----------------------------------------------
# import rospy
# from realsense_came... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
2,
25064,
13,
6978,
13,
28956,
10786,
14,
8738,
14,
4951,
14,
5116,
5139,
14,
8019,
14,
29412,
17,
13,
22,
14,
17080,
12,
43789,
11537,
198,
11748,
17802,
198... | 2.183798 | 1,148 |
from unittest.mock import patch
from pre_commit_dbt.dbt_deps import main
from pre_commit_dbt.dbt_deps import prepare_cmd
| [
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
6738,
662,
62,
41509,
62,
9945,
83,
13,
9945,
83,
62,
10378,
82,
1330,
1388,
198,
6738,
662,
62,
41509,
62,
9945,
83,
13,
9945,
83,
62,
10378,
82,
1330,
8335,
62,
28758,
62... | 2.717391 | 46 |
#!/usr/bin/env python
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198
] | 2.444444 | 9 |
from typing import Sequence, Tuple, List, Any
import numpy.typing as npt
a: Sequence[int]
b: Sequence[Sequence[int]]
c: Sequence[Sequence[Sequence[int]]]
d: Sequence[Sequence[Sequence[Sequence[int]]]]
e: Sequence[bool]
f: Tuple[int, ...]
g: List[int]
h: Sequence[Any]
reveal_type(func(a)) # E: None
reveal_type(func(b... | [
6738,
19720,
1330,
45835,
11,
309,
29291,
11,
7343,
11,
4377,
198,
11748,
299,
32152,
13,
774,
13886,
355,
299,
457,
198,
198,
64,
25,
45835,
58,
600,
60,
198,
65,
25,
45835,
58,
44015,
594,
58,
600,
11907,
198,
66,
25,
45835,
58,... | 2.358744 | 223 |
import os
from renderer import Renderer
from throw_out_your_templates_3_core_visitor_map import VisitorMap
from throw_out_your_templates_4_core_default_visitors import default_visitors_map
VISITOR_MAP = VisitorMap(parent_map=default_visitors_map)
@VISITOR_MAP.register(Script)
""" Disabled content
"""
| [
11748,
28686,
198,
198,
6738,
9851,
11882,
1330,
28703,
11882,
198,
6738,
3714,
62,
448,
62,
14108,
62,
11498,
17041,
62,
18,
62,
7295,
62,
4703,
2072,
62,
8899,
1330,
6911,
2072,
13912,
198,
6738,
3714,
62,
448,
62,
14108,
62,
11498,... | 3 | 104 |
"""
Project Name: COVID-19 Tracker
Project Developer:
- Vishesh Dvivedi (TheSpecialCoder)
Project Description:
This project uses tkinter and matplotlib library to create an application that can create graphs of 'confirmed cases', 'confirmed deaths' and
'confirmed recoveries' of COVID-19 patients acros... | [
37811,
201,
198,
16775,
6530,
25,
7375,
11008,
12,
1129,
26885,
201,
198,
16775,
23836,
25,
201,
198,
220,
220,
220,
532,
569,
5614,
71,
360,
85,
1572,
72,
357,
464,
13409,
34,
12342,
8,
201,
198,
16775,
12489,
25,
201,
198,
220,
... | 2.882002 | 3,017 |
import_command = "import groovy.json.JsonSlurper \n"
| [
11748,
62,
21812,
796,
366,
11748,
7128,
27796,
13,
17752,
13,
41,
1559,
11122,
333,
525,
3467,
77,
1,
628
] | 2.7 | 20 |
# SPDX-FileCopyrightText: (c) 2021 Artëm IG <github.com/rtmigo>
# SPDX-License-Identifier: BSD-3-Clause
import signal
# based on https://stackoverflow.com/a/49567288
| [
2,
30628,
55,
12,
8979,
15269,
8206,
25,
357,
66,
8,
33448,
3683,
26689,
76,
35336,
1279,
12567,
13,
785,
14,
17034,
76,
14031,
29,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
347,
10305,
12,
18,
12,
2601,
682,
198,
198,
... | 2.521739 | 69 |
from rbtree import *
import bisect
dataList = [
Interval(10, 20),
Interval(10, 50),
Interval(30, 50),
Interval(30, 40),
Interval(30, 90),
Interval(40, 90),
Interval(0, 30),
Interval(50, 128),
Interval(40, 50),
Interval(70, 80),
]
deleteList = [
Interval(30... | [
6738,
374,
18347,
631,
1330,
1635,
201,
198,
11748,
47457,
478,
201,
198,
201,
198,
7890,
8053,
796,
685,
201,
198,
220,
220,
220,
4225,
2100,
7,
940,
11,
1160,
828,
201,
198,
220,
220,
220,
4225,
2100,
7,
940,
11,
2026,
828,
201,... | 2.174 | 500 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2017, Cabral, Juan; Sanchez, Bruno & Berois, Martín
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of sourc... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
357,
66,
8,
1584,
12,
5539,
11,
15976,
1373,
11,
16852,
26,
21909,
11,
31045,
1222,
347,
3529,
271,
... | 4.103306 | 484 |
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See LICENSE
import unittest
from random import choice
from typing import Union
from unittest.mock import MagicMock, PropertyMock, patch
import frappe
from frappe.desk.form.load import run_onload
from frappe.email.doctype.newsletter.ex... | [
2,
15069,
357,
66,
8,
33448,
11,
39313,
27768,
21852,
18367,
83,
13,
12052,
13,
290,
25767,
669,
198,
2,
17168,
13789,
13,
4091,
38559,
24290,
198,
198,
11748,
555,
715,
395,
198,
6738,
4738,
1330,
3572,
198,
6738,
19720,
1330,
4479,
... | 3.053232 | 263 |
import helpers
from keras.applications.nasnet import preprocess_input
| [
11748,
49385,
198,
6738,
41927,
292,
13,
1324,
677,
602,
13,
24716,
3262,
1330,
662,
14681,
62,
15414,
198
] | 3.684211 | 19 |
from collections import Counter
| [
6738,
17268,
1330,
15034,
198,
220,
220,
220,
220,
198
] | 3.7 | 10 |
print('---='*20)
print('Analisador de Triângulo')
print('---='*20)
r1 = int(input('Tamanho da reta a: '))
r2 = int(input('Tamanho da reta b: '))
r3 = int(input('Tamanho da reta c: '))
if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2:
print('Esses segmentos podem formar triângulo ', end='')
if r1 == r2 == r... | [
4798,
10786,
6329,
11639,
9,
1238,
8,
198,
4798,
10786,
2025,
27315,
7079,
390,
7563,
22940,
782,
43348,
11537,
198,
4798,
10786,
6329,
11639,
9,
1238,
8,
198,
81,
16,
796,
493,
7,
15414,
10786,
51,
10546,
8873,
12379,
1005,
64,
257,
... | 2.011364 | 264 |
#!/usr/bin/env python3
from pwn import *
binary = context.binary = ELF('./oversight')
while True:
if args.REMOTE:
p = remote('pwn-2021.duc.tf', 31909)
libc = ELF('./libc-2.27.so')
libc_start_main_offset = 231
else:
p = process(binary.path)
libc = ELF('/lib/x86_64-linux-gnu/libc.so.6')
libc_start_main_o... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
279,
675,
1330,
1635,
198,
198,
39491,
796,
4732,
13,
39491,
796,
17852,
37,
7,
4458,
14,
13801,
432,
11537,
198,
198,
4514,
6407,
25,
198,
197,
361,
26498,
13,
40726,... | 2.119923 | 517 |
# Prints all distinct permutations
# in str[0..n-1]
findPermutations(list("***||"),0,5) | [
220,
198,
2,
12578,
82,
477,
7310,
9943,
32855,
198,
2,
287,
965,
58,
15,
492,
77,
12,
16,
60,
220,
198,
198,
19796,
5990,
21973,
602,
7,
4868,
7203,
8162,
15886,
12340,
15,
11,
20,
8
] | 2.459459 | 37 |
import torch
import torch.nn.functional as F
from torch.distributions.multinomial import Multinomial
def one_hot(sequence, n_states):
"""
Given a list of integers and the maximal number of unique values found
in the list, return a one-hot encoded tensor of shape (m, n)
where m is sequence length and n ... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
13,
17080,
2455,
507,
13,
16680,
259,
49070,
1330,
7854,
259,
49070,
198,
198,
4299,
530,
62,
8940,
7,
43167,
11,
299,
62,
27219,
2599,
198,
220,
220,
... | 2.713889 | 1,800 |
import json, sys, os
x = json.load(sys.stdin)
# Reducers %v
try:
print(json.dumps(x))
except:
print(json.dumps(list(x)))
| [
11748,
33918,
11,
25064,
11,
28686,
198,
87,
796,
33918,
13,
2220,
7,
17597,
13,
19282,
259,
8,
198,
198,
2,
2297,
1229,
364,
4064,
85,
198,
198,
28311,
25,
198,
220,
220,
220,
3601,
7,
17752,
13,
67,
8142,
7,
87,
4008,
198,
163... | 2.112903 | 62 |