content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from .entity import EntityType, Entity from .validator import PropertyValidator from .endpoint import EndpointType # Endpoint Payload EndpointPayload = _endpoint_payload()
[ 6738, 764, 26858, 1330, 20885, 6030, 11, 20885, 198, 6738, 764, 12102, 1352, 1330, 14161, 47139, 1352, 198, 6738, 764, 437, 4122, 1330, 5268, 4122, 6030, 628, 198, 2, 5268, 4122, 7119, 2220, 628, 628, 198, 198, 12915, 4122, 19197, 2220,...
3.6
50
# -*- coding: utf-8 -*- """ Created on Tue Sep 28 23:39:31 2021 @author: qizhe """ # Definition for a binary tree node. if __name__ == '__main__': solu = Solution() input_Str = str('{[]{}()}') # input_list = input_List = [90] input_int = 200 n1 = TreeNode(15) n2 = TreeNode(7) n3 = T...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 8621, 2579, 2242, 25, 2670, 25, 3132, 33448, 198, 198, 31, 9800, 25, 10662, 528, 258, 198, 37811, 198, 198, 2, 30396, 329, 257, 13934, 5...
2.007937
378
# -*- coding: utf-8 -*- __author__ = "苦叶子" """ 公众号: 开源优测 Email: lymking@foxmail.com """ import os import sys import codecs import requests from app import create_app, db from app.utils.trigger import Trigger from app.models import User, Role from flask_script import Manager, Shell from flask_migrate import Migrat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 366, 164, 233, 99, 20998, 114, 36310, 1, 198, 198, 37811, 198, 198, 17739, 105, 27670, 245, 20998, 115, 25, 10263, 120, 222, 162, 118, 238, ...
2.600567
353
#!/usr/bin/env python3 import sys if len(sys.argv) != 2: print("""\ Usage: print_status.py STATUS_FILENAME STATUS_FILENAME contains one line with an integer status.""" ) sys.exit(1) with open(sys.argv[1], 'r') as status_in: status = int(status_in.readline()) print('{} with status {}'.format( "...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 220, 220, 3601, 7203, 15931, 59, 198, 28350, 25, 3601, 62, 13376, 13, 9078, 15486, 2937, ...
2.390533
169
from ignition.model.progress_events import ResourceTransitionProgressEvent from collections import OrderedDict class PlaybookResultEvent(AnsibleEvent): """ To report the stats of a playbook execution """ progress_event_type = 'ansible/PlaybookResult' class PlayMatchedNoNoHostsEvent(AnsibleEvent): ...
[ 6738, 37594, 13, 19849, 13, 33723, 62, 31534, 1330, 20857, 8291, 653, 32577, 9237, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 4871, 3811, 2070, 23004, 9237, 7, 2025, 82, 856, 9237, 2599, 198, 220, 220, 220, 37227, 198, 22...
3.096415
809
AVATAR = dict() AVATAR['START'] = "avatar_saludo.mp4" AVATAR['BAS1'] = "avatar_basico.mp4" AVATAR['BAS2'] = "avatar_basico2.mp4" AVATAR['END'] = "avatar_final.mp4"
[ 10116, 1404, 1503, 796, 8633, 3419, 198, 198, 10116, 1404, 1503, 17816, 2257, 7227, 20520, 796, 366, 615, 9459, 62, 21680, 12003, 13, 3149, 19, 1, 198, 10116, 1404, 1503, 17816, 33, 1921, 16, 20520, 796, 366, 615, 9459, 62, 12093, 371...
1.941176
85
# -*- coding: utf-8 -*- """ ======================= eudat.accounting.client ======================= Command line handling """ import argparse import logging import sys from eudat.accounting.client import __version__, LOG, utils def main(argv=sys.argv): """Main function called from console command """ l...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 4770, 1421, 18604, 198, 68, 463, 265, 13, 23317, 278, 13, 16366, 198, 4770, 1421, 18604, 198, 198, 21575, 1627, 9041, 198, 37811, 198, 198, 11748, 1822, 2957...
2.48169
355
# -*- coding: utf-8 -*- """ Created on Mon Sep 7 17:47:42 2020 @author: Abhishek Mukherjee """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 8621, 220, 767, 1596, 25, 2857, 25, 3682, 12131, 201, 198, 201, 198, 31, 9800, 25, 2275, 14363, 258, 74, 31509, 372, 34589, 201...
1.830769
65
import numpy as np import scipy as sp from zipline.api import ( continuous_future, schedule_function, date_rules, time_rules, record, order_target_percent, set_benchmark, set_commission, commission, set_slippage, slippage )
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 355, 599, 198, 6738, 1976, 24705, 500, 13, 15042, 1330, 357, 198, 220, 220, 220, 12948, 62, 37443, 11, 198, 220, 220, 220, 7269, 62, 8818, 11, 198, 220, 220, 220, 3128, 62, ...
2.371681
113
# -*- coding: utf-8 -*- import mock from django import test from django import http from django.conf import settings from django.utils import timezone from django_cradmin import cradmin_testhelpers from model_mommy import mommy from devilry.devilry_account import models as account_models from devilry.apps.core impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 15290, 198, 6738, 42625, 14208, 1330, 1332, 198, 6738, 42625, 14208, 1330, 2638, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 2...
3.368421
323
def benchmark_delete_key(): """ http://docs.python.org/2/library/collections.html """ import timeit code = """ results = {'A': 1, 'B': 2, 'C': 3} del results['A'] del results['B'] """ print timeit.timeit(code, number=100000) code = """ results = {'A': 1, 'B': 2, 'C':...
[ 198, 198, 4299, 18335, 62, 33678, 62, 2539, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2638, 1378, 31628, 13, 29412, 13, 2398, 14, 17, 14, 32016, 14, 4033, 26448, 13, 6494, 628, 220, 220, 220, 37227, 628, 220, 220, 220, ...
2.127315
432
import requests import numpy as np import hashlib import json import pandas as pd import time from multiprocessing import Pool ## Test Helper Functions (from snippets - may be old. See snippets for up-to-date functions.) def generate_id(record): """Generate ID returns a repeatable hash of a given record. pa...
[ 11748, 7007, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 640, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 198, 2235, 6208, 5053, 525, 40480, 35...
2.455984
3,033
# # (c) Copyright 2021 Micro Focus or one of its affiliates. # import unittest import pytest import json from unittest.mock import patch, MagicMock from vcli.cmd.dns_command import DNSCommand from vcli.util.static_params import ( VAAS_MODULES ) from vcli.constant import RETURN_CODE_SUCCESS class DNSCommandTest...
[ 2, 198, 2, 220, 357, 66, 8, 15069, 33448, 4527, 17061, 393, 530, 286, 663, 29116, 13, 198, 2, 198, 198, 11748, 555, 715, 395, 198, 11748, 12972, 9288, 198, 11748, 33918, 198, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, ...
2.477218
417
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Fourth Paradigm Development, Inc. # # Licensed under the Apache License, Version 2.0 (the "Licen...
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 198, 2, 15069, 2813, 1578, 1829, 5070, 355, 7997, 416, 262, 198, 2, 22998, 286, 262, 2351, 15781, 261, 2306, 873, 290, 4687, 8694, 13, 198, 2,...
2.79901
1,010
#!/usr/bin/python """ NAME shuffle-merge -- shuffle-merge text files SYNOPSIS %(progname)s [OPTIONS] <File Name Prefix> DESCRIPTION shuffle-merge merges a number of text files. The order of merging is selected with a random policy. OPTIONS: Arguments: --help Print a summary of th...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 37811, 198, 20608, 628, 220, 220, 220, 36273, 12, 647, 469, 1377, 36273, 12, 647, 469, 2420, 3696, 198, 198, 23060, 45, 30737, 1797, 198, 220, 220, 220, 4064, 7, 1676, 70, 3672, 8, 8...
2.053444
1,684
import argparse import csv from imbDRL.agents.ddqn import TrainDDQN from imbDRL.data import get_train_test_val from imbDRL.metrics import classification_metrics, network_predictions from imbDRL.utils import imbalance_ratio from sklearn.model_selection import train_test_split from tensorflow import keras from tensorflo...
[ 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 198, 6738, 33966, 7707, 43, 13, 49638, 13, 1860, 80, 77, 1330, 16835, 16458, 48, 45, 198, 6738, 33966, 7707, 43, 13, 7890, 1330, 651, 62, 27432, 62, 9288, 62, 2100, 198, 6738, 33966, ...
2.579494
1,541
# Copyright 2021 Sony Semiconductors Israel, 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 b...
[ 2, 15069, 33448, 10184, 311, 5314, 12920, 669, 2692, 11, 3457, 13, 1439, 2489, 10395, 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, ...
2.742444
1,522
# ============================================================================================================== # MIT License # Copyright (c) 2020 Pradeep Kumar # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), t...
[ 2, 38093, 10052, 25609, 28, 201, 198, 2, 17168, 13789, 201, 198, 2, 15069, 357, 66, 8, 12131, 1736, 671, 538, 26105, 201, 198, 201, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 2...
2.417609
2,476
import asyncio import pytest import awaitwhat.wait import awaitwhat.blocker from awaitwhat.stack import task_get_stack @pytest.mark.xfail(reason="asyncio.wait support incomplete #6") @pytest.mark.xfail(reason="asyncio.wait support incomplete #6")
[ 11748, 30351, 952, 198, 11748, 12972, 9288, 198, 11748, 25507, 10919, 13, 17077, 198, 11748, 25507, 10919, 13, 9967, 263, 198, 6738, 25507, 10919, 13, 25558, 1330, 4876, 62, 1136, 62, 25558, 628, 628, 198, 198, 31, 9078, 9288, 13, 4102,...
3.135802
81
from conifer.sources.schema_utils import iter_schema
[ 6738, 369, 7087, 13, 82, 2203, 13, 15952, 2611, 62, 26791, 1330, 11629, 62, 15952, 2611, 628 ]
3.176471
17
import cv2 import matplotlib.pyplot as plt img = cv2.imread(r'D:\TONG\PycharmProjects\Unet-US\data\membrane\train\label\0.png') # R = img[:, :, 2] # cv2.imshow("img", img) # cv2.waitKey(0) plt.imshow(img) plt.show() plt.hist(img.ravel(), 256, [0, 256]) plt.show()
[ 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 9600, 796, 269, 85, 17, 13, 320, 961, 7, 81, 6, 35, 7479, 11357, 38, 59, 20519, 354, 1670, 16775, 82, 59, 3118, 316, 12, 2937, 59, 7890,...
1.992537
134
from IPython.core.display import HTML service_mapping = { "odp" : "opendap" }
[ 6738, 6101, 7535, 13, 7295, 13, 13812, 1330, 11532, 628, 198, 15271, 62, 76, 5912, 796, 1391, 198, 220, 220, 220, 366, 375, 79, 1, 1058, 366, 404, 437, 499, 1, 198, 92, 628 ]
2.5
34
from bs4 import BeautifulSoup import requests import csv import pandas as pd
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 269, 21370, 198, 11748, 19798, 292, 355, 279, 67 ]
3.454545
22
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from tqdm import tqdm import teams_and_flags import os import subprocess as sp BASE_PORT = 36000 if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 3466, 62, 392, 62, 3315...
2.414634
82
""" Utility functions for working with regions. See Also -------- :func:`locan.data.filter.select_by_region` :func:`locan.data.properties.misc.distance_to_region` :func:`locan.data.properties.misc.distance_to_region_boundary` """ from shapely.ops import unary_union from locan.data.region import EmptyRegion, Region, ...
[ 37811, 198, 198, 18274, 879, 5499, 329, 1762, 351, 7652, 13, 198, 198, 6214, 4418, 198, 982, 198, 25, 20786, 25, 63, 17946, 272, 13, 7890, 13, 24455, 13, 19738, 62, 1525, 62, 36996, 63, 198, 25, 20786, 25, 63, 17946, 272, 13, 7890...
2.845865
1,064
from requests.auth import _basic_auth_str SYNC_ADMIN = "syncman" SYNC_ADMIN_PASSWORD = "pw1234" USER = "eggs" USER_PASSWORD = "secret" USER_CLIENT_ENV = "intregationtest"
[ 6738, 7007, 13, 18439, 1330, 4808, 35487, 62, 18439, 62, 2536, 198, 198, 23060, 7792, 62, 2885, 23678, 796, 366, 27261, 805, 1, 198, 23060, 7792, 62, 2885, 23678, 62, 47924, 54, 12532, 796, 366, 79, 86, 1065, 2682, 1, 198, 198, 2990...
2.355263
76
import os import pytest import flask_resize from flask_resize._compat import boto3 from ._mocking import mock_s3 from .decorators import requires_boto3 @mock_s3 @requires_boto3
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 42903, 62, 411, 1096, 198, 6738, 42903, 62, 411, 1096, 13557, 5589, 265, 1330, 275, 2069, 18, 198, 198, 6738, 47540, 76, 8629, 1330, 15290, 62, 82, 18, 198, 6738, 764, 12501...
2.731343
67
import math import torch
[ 11748, 10688, 198, 11748, 28034, 628 ]
4.333333
6
import math import operator if __name__ == '__main__': testInstance = [[0.51, 0.50], [0.1, 0.9], [0.4, 0.3]] k = 3 # AND GATE trainSetAND_GATE = [[0.0, 0.0, 0], [1.0, 1.0, 1], [0.0, 1.0, 0], [1.0, 0.0, 0]] print("<-......................By applying AND Gate.....................
[ 11748, 10688, 201, 198, 11748, 10088, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 1332, 33384...
1.992883
281
from ddtrace import Pin from flask import abort, Blueprint, render_template_string from .limiter import limiter # Create a new Blueprint bp = Blueprint('bp', __name__, url_prefix='/bp/') # Just showing that we can override the service set for this blueprint Pin.override(bp, service='flask-bp', app='flask', app_type...
[ 6738, 49427, 40546, 1330, 13727, 198, 6738, 42903, 1330, 15614, 11, 39932, 11, 8543, 62, 28243, 62, 8841, 198, 198, 6738, 764, 2475, 2676, 1330, 1761, 2676, 628, 198, 2, 13610, 257, 649, 39932, 198, 46583, 796, 39932, 10786, 46583, 3256...
3.355556
315
#!/usr/bin/env python3
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198 ]
2.3
10
''' Modify binary.py to create a program kary.py that takes i and k as command-line arguments and converts i to base k. Assume that k is an integer between 2 and 16. For bases greater than 10, use the letters A through F to represent the 11th through 16th digits, respectively. ''' # convert i to base k import sys i = f...
[ 7061, 6, 198, 5841, 1958, 13934, 13, 9078, 284, 2251, 257, 1430, 479, 560, 13, 9078, 326, 2753, 1312, 290, 479, 355, 3141, 12, 1370, 7159, 290, 26161, 1312, 284, 2779, 479, 13, 2195, 2454, 326, 479, 318, 281, 18253, 1022, 362, 290, ...
2.578778
311
# -*- coding: utf-8 -*- """ Created on Mon Mar 15 14:10:52 2021 @author: leyuan reference: https://github.com/ShangtongZhang/reinforcement-learning-an-introduction/blob/master/chapter05/blackjack.py https://github.com/dennybritz/reinforcement-learning/blob/master/lib/envs/blackjack.py """ import time import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 1526, 1315, 1478, 25, 940, 25, 4309, 33448, 198, 198, 31, 9800, 25, 443, 88, 7258, 198, 198, 35790, 25, 220, 198, 220, 220, 220, 3740, ...
2.069767
4,988
from django.apps import AppConfig from . import models
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 764, 1330, 4981, 628 ]
4
14
from django.views.generic import ListView, DetailView, CreateView, \ DeleteView, UpdateView from baseapp.models import Block from django.contrib import auth, messages
[ 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 11, 42585, 7680, 11, 13610, 7680, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
2.576471
85
import pandas as pd import datatable as dt import zipfile import re import os import time from datetime import timedelta import sys def directory(directory_path): """Puts you in the right directory. Gives you list of files in path""" os.chdir(re.findall("^(.*[\\\/])", directory_path)[0]) csv_files = os.l...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 4818, 21156, 355, 288, 83, 198, 11748, 19974, 7753, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 11748, 25064, 628, 198, 198, 4299, 861...
1.684597
4,220
import math import time A = HeapClass() buildMaxHeap(A) # A is a max priorityQueue while(A.heapsize >= 1): sleepTime = heapExtractMax(A) if(time != None): print("Task with duration: ", sleepTime, " is in progress") time.sleep(sleepTime) print("All tasks finished");
[ 11748, 10688, 201, 198, 11748, 640, 201, 198, 201, 198, 32, 796, 679, 499, 9487, 3419, 201, 198, 11249, 11518, 1544, 499, 7, 32, 8, 201, 198, 2, 317, 318, 257, 3509, 8475, 34991, 201, 198, 4514, 7, 32, 13, 258, 1686, 1096, 18189, ...
2.448
125
from sotd_indicators.indicators import * from arcgis.gis import GIS from arcgis.geometry import Geometry, filters import configparser import time import datetime import shutil import ssl ssl._create_default_https_context = ssl._create_unverified_context
[ 6738, 264, 313, 67, 62, 521, 44549, 13, 521, 44549, 1330, 1635, 198, 198, 6738, 10389, 70, 271, 13, 70, 271, 1330, 402, 1797, 198, 6738, 10389, 70, 271, 13, 469, 15748, 1330, 2269, 15748, 11, 16628, 198, 198, 11748, 4566, 48610, 198...
3.222222
81
description = 'Virtual SPODI detector' group = 'lowlevel' devices = dict( mon = device('nicos.devices.generic.VirtualCounter', description = 'Simulated MON1', fmtstr = '%d', type = 'monitor', visibility = (), ), tim1 = device('nicos.devices.generic.VirtualTimer', de...
[ 11213, 796, 705, 37725, 6226, 3727, 40, 31029, 6, 198, 198, 8094, 796, 705, 9319, 5715, 6, 198, 198, 42034, 796, 8633, 7, 198, 220, 220, 220, 937, 796, 3335, 10786, 6988, 418, 13, 42034, 13, 41357, 13, 37725, 31694, 3256, 198, 220, ...
2.203804
1,104
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import errno import os import sys import didkit flags = os.O_CREAT | os.O_EXCL | os.O_WRONLY def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'python_django.settings') try: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 35, 73, 14208, 338, 3141, 12, 1370, 10361, 329, 11553, 8861, 526, 15931, 198, 11748, 11454, 3919, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 750, 15813, 198, 33152, 796, 28...
2.351598
438
# -*- coding: utf-8 -*- import logging from django.contrib.contenttypes import fields from django.contrib.contenttypes.models import ContentType from django.db import models from django.urls import reverse from django.utils.encoding import python_2_unicode_compatible from model_utils.models import TimeStampedModel f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 1330, 7032, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, ...
3.161074
149
""" Description: !!!ROCK!!! ###PAPERS### ***SCISSORS*** s beats p beats r, r beats s Usage: >>Enter your choice : rock You Choose: rock Computer Choose: paper Computer wins User total win count is : 0 Computer total win count is : 1 >>Enter your choice: """ from random import randint print("@@@ Welcome @@@ \n !!!ROCK!...
[ 37811, 198, 11828, 25, 198, 10185, 49, 11290, 10185, 198, 21017, 47, 2969, 4877, 21017, 198, 8162, 6173, 16744, 20673, 8162, 198, 82, 17825, 279, 17825, 374, 11, 374, 17825, 264, 198, 28350, 25, 198, 4211, 17469, 534, 3572, 1058, 3881, ...
2.316647
859
import time from greww.data import MysqlPen as M from zilean.data.basics import ZileanCache def cachemove(module=None, _class=None): """ Decorator to zilean intern function except .zileancache """ return wrap_func
[ 11748, 640, 198, 6738, 10536, 1383, 13, 7890, 1330, 337, 893, 13976, 25553, 355, 337, 198, 6738, 1976, 576, 272, 13, 7890, 13, 12093, 873, 1330, 1168, 576, 272, 30562, 198, 198, 4299, 40428, 4411, 659, 7, 21412, 28, 14202, 11, 4808, ...
2.75
84
import os import keras from keras.models import Sequential from keras.layers import Dense from keras.applications.vgg16 import VGG16 import keras.preprocessing.image import numpy as np from util import TRAIN_PATH, TEST_PATH, OUTPUT_PATH, labels, all_labels, list_images width = 224 height = 224 if __name__ == "...
[ 11748, 28686, 198, 198, 11748, 41927, 292, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 198, 6738, 41927, 292, 13, 1324, 677, 602, 13, 85, 1130, 1433, 1330, 569, 11190, 143...
2.92623
122
from __future__ import absolute_import, unicode_literals from django.conf.urls import url, include from . import views, api_urls urlpatterns = [ url(r'^api/', include(api_urls, namespace='api')) ]
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 198, 6738, 764, 1330, 5009, 11, 40391, 62, 6371, 82, 198, 198, 6371, ...
2.794521
73
from .. import cost_handling def test_cost_of_wind(): ''' This function tests the cost_of_wind(turbines) function to make sure that the result is of the correct type and matches the known value for 3 turbines. ''' test = cost_handling.cost_of_wind(3) result = 3900000.0 assert type(tes...
[ 6738, 11485, 1330, 1575, 62, 4993, 1359, 628, 198, 4299, 1332, 62, 15805, 62, 1659, 62, 7972, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 770, 2163, 5254, 262, 1575, 62, 1659, 62, 7972, 7, 83, 5945, 1127, 8, 2163, 28...
2.621687
415
#!/usr/bin/env python import math import os import pygame import numpy as np from scipy.io import wavfile pygame.mixer.init(44100, -16, 2, 4096) keyNumbers = [89,90,91,92,93,94,95,96,97,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,4...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 12972, 6057, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 952, 1330, 266, 615, 7753, 198, 198, 9078, 6057, 13, 19816, 2...
1.746282
1,143
import sys ROM = { "ROM" : [ { "startAddr" : 0x0000, "endAddr" : 0x07ff }, { "startAddr" : 0x0800, "endAddr" : 0x0fff }, { "startAddr" : 0x1000, "endAddr" : 0x17ff }, { "startAddr" : 0x1800, "endAddr" : 0x...
[ 198, 11748, 25064, 628, 198, 33676, 796, 1391, 198, 1, 33676, 1, 1058, 198, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 9688, 4550, 81, 1, 10...
1.502092
478
import numpy as np import torch from rlbot.agents.base_agent import BaseAgent, SimpleControllerState from rlbot.utils.structures.game_data_struct import GameTickPacket from rlgym_compat import GameState from agent import Agent from necto_obs import NectoObsBuilder KICKOFF_CONTROLS = ( 11 * 4 * [SimpleControll...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 374, 75, 13645, 13, 49638, 13, 8692, 62, 25781, 1330, 7308, 36772, 11, 17427, 22130, 9012, 198, 6738, 374, 75, 13645, 13, 26791, 13, 7249, 942, 13, 6057, 62, 7890, 62, 7249,...
2.455
400
from kitsune.inproduct.models import Redirect from kitsune.sumo.tests import with_save @with_save def redirect(**kwargs): """Return an inproduct redirect.""" defaults = {'target': 'home'} defaults.update(kwargs) return Redirect(**defaults)
[ 6738, 19183, 1726, 13, 259, 11167, 13, 27530, 1330, 2297, 1060, 198, 6738, 19183, 1726, 13, 16345, 78, 13, 41989, 1330, 351, 62, 21928, 628, 198, 31, 4480, 62, 21928, 198, 4299, 18941, 7, 1174, 46265, 22046, 2599, 198, 220, 220, 220, ...
2.943182
88
import os from pathlib import Path import pandas as pd from sklearn.model_selection import train_test_split pd.options.display.max_columns = 100 SEED = 2 ROOT_DIR = Path('./') RAW_DATA_DIR = ROOT_DIR / 'data/raw_data/bank_marketing' PROCESSED_DATA_DIR = ROOT_DIR / 'data/processed_data/bank_marketing' if not os.path...
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 30094, 13, 25811, 13, 13812, 13, 9806, 62, 28665, 82...
2.398352
364
#040_Aquele_classico_de_media.py n1 = float(input("1º nota: ")) n2 = float(input("2ª nota: ")) n3 = float(input("3ª nota: ")) m1 = (n1 + n2 + n3) / 3 if (0 < m1 < 4): print(f"A média é {m1:.2f} e o aluno está REPROVADO") elif (4 <= m1 < 7): print(f"A média é {m1:.2f} e o aluno deverá fazer a PROVA FINAL") ...
[ 2, 36676, 62, 32, 4188, 293, 62, 4871, 3713, 62, 2934, 62, 11431, 13, 9078, 198, 198, 77, 16, 796, 12178, 7, 15414, 7203, 16, 36165, 407, 64, 25, 366, 4008, 198, 77, 17, 796, 12178, 7, 15414, 7203, 17, 126, 103, 407, 64, 25, 3...
1.814925
335
#!/usr/bin/env python """ This example uses Tornado's gen_. .. _gen: http://www.tornadoweb.org/documentation/gen.html """ from __future__ import print_function import os import tornado.web import tornado.ioloop import tornado.options from tornado import gen import tornado.httpserver import momoko db_database = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 1212, 1672, 3544, 48970, 338, 2429, 44807, 198, 198, 492, 4808, 5235, 25, 2638, 1378, 2503, 13, 45910, 4584, 1765, 13, 2398, 14, 22897, 341, 14, 5235, 13, 6494, 198, ...
2.495536
448
from typing import List import typing_inspect from injectable.autowiring.autowiring_utils import sanitize_if_forward_ref
[ 6738, 19720, 1330, 7343, 198, 198, 11748, 19720, 62, 1040, 806, 198, 6738, 8677, 540, 13, 2306, 322, 3428, 13, 2306, 322, 3428, 62, 26791, 1330, 5336, 270, 1096, 62, 361, 62, 11813, 62, 5420, 628 ]
3.416667
36
#Fetch art from the Metropolitan Museum of Art API import urllib.request as urlreq import json import random apiurl = "https://collectionapi.metmuseum.org/public/collection/v1/objects" #This version only fetches European paintings
[ 2, 37, 7569, 1242, 422, 262, 21609, 9594, 286, 3683, 7824, 201, 198, 201, 198, 11748, 2956, 297, 571, 13, 25927, 355, 19016, 42180, 201, 198, 11748, 33918, 201, 198, 11748, 4738, 201, 198, 201, 198, 15042, 6371, 796, 366, 5450, 1378, ...
3.283784
74
# Copyright (c) 2015 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
[ 2, 15069, 357, 66, 8, 1853, 34198, 10442, 3457, 13, 198, 2, 220, 198, 2, 7102, 37, 25256, 12576, 5357, 4810, 3185, 7112, 2767, 13153, 198, 2, 220, 198, 2, 770, 670, 318, 2810, 366, 1921, 3180, 1, 290, 2426, 284, 262, 34198, 37709,...
2.304292
2,330
from nose.plugins.attrib import attr from test.integration.base import DBTIntegrationTest, FakeArgs
[ 6738, 9686, 13, 37390, 13, 1078, 822, 1330, 708, 81, 198, 6738, 1332, 13, 18908, 1358, 13, 8692, 1330, 360, 19313, 34500, 1358, 14402, 11, 33482, 42035, 628 ]
3.607143
28
# # @lc app=leetcode id=116 lang=python # # [116] Populating Next Right Pointers in Each Node # # https://leetcode.com/problems/populating-next-right-pointers-in-each-node/description/ # # algorithms # Medium (36.78%) # Likes: 1013 # Dislikes: 87 # Total Accepted: 246.7K # Total Submissions: 648.8K # Testcase Exa...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 18298, 42392, 28, 29412, 198, 2, 198, 2, 685, 18298, 60, 8099, 8306, 7406, 6498, 7695, 20193, 287, 5501, 19081, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, ...
2.778698
845
# Copyright 2018 OpenStack Fundation # # 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 o...
[ 2, 15069, 2864, 4946, 25896, 7557, 341, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 35...
3.098246
285
# Software License Agreement (BSD License) # # Copyright (c) 2018, Fraunhofer FKIE/CMS, Alexander Tiderko # 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 source code mu...
[ 2, 10442, 13789, 12729, 357, 21800, 13789, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 11, 39313, 403, 71, 30288, 376, 42, 10008, 14, 34, 5653, 11, 10009, 309, 1304, 7204, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396...
2.625823
2,277
from pylab import * # spec_file = '/home/damundse/Spectral_files/sp_lw_dsa_arcc/sp_lw_350_dsa_arcc' spec_file = '/home/damundse/Spectral_files/sp_sw_dsa_ar/sp_sw_280_dsa_ar_trappist1' n_point = 1000 plot_on = False # Find number of spectral bands fin = open(spec_file, 'r') while True: line = fin.readline() if li...
[ 6738, 279, 2645, 397, 1330, 1635, 198, 198, 2, 1020, 62, 7753, 796, 31051, 11195, 14, 11043, 917, 325, 14, 49738, 1373, 62, 16624, 14, 2777, 62, 75, 86, 62, 9310, 64, 62, 283, 535, 14, 2777, 62, 75, 86, 62, 14877, 62, 9310, 64, ...
2.167102
766
import json import platform from socket import gethostname import psutil from dbus import Interface, SystemBus from dbus.exceptions import DBusException from fastapi import APIRouter router = APIRouter() def check_service_status(service): """ queries systemd through dbus to see if the service is running """ ...
[ 11748, 33918, 198, 11748, 3859, 198, 6738, 17802, 1330, 651, 4774, 3672, 198, 198, 11748, 26692, 22602, 198, 6738, 288, 10885, 1330, 26491, 11, 4482, 16286, 198, 6738, 288, 10885, 13, 1069, 11755, 1330, 360, 16286, 16922, 198, 6738, 3049,...
2.371232
1,161
import gym import numpy as np import pytest import tensorflow as tf from metarl.envs import normalize from metarl.experiment import deterministic, run_experiment from metarl.tf.algos import PPO from metarl.tf.baselines import GaussianMLPBaseline from metarl.tf.envs import TfEnv from metarl.tf.experiment import LocalTF...
[ 11748, 11550, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 1138, 7063, 13, 268, 14259, 1330, 3487, 1096, 198, 6738, 1138, 7063, 13, 23100, 3681, 1330, 2206, 49228,...
3.215116
172
""" Isogeometric analysis utilities. Notes ----- The functions :func:`compute_bezier_extraction_1d()` and :func:`eval_nurbs_basis_tp()` implement the algorithms described in [1]. [1] Michael J. Borden, Michael A. Scott, John A. Evans, Thomas J. R. Hughes: Isogeometric finite element data structures based on Bezie...
[ 37811, 198, 40, 568, 469, 16996, 3781, 20081, 13, 198, 198, 16130, 198, 30934, 198, 464, 5499, 1058, 20786, 25, 63, 5589, 1133, 62, 1350, 89, 959, 62, 2302, 7861, 62, 16, 67, 3419, 63, 290, 198, 25, 20786, 25, 63, 18206, 62, 77, ...
2.059476
13,518
# -*- coding: utf8 -*- # Copyright (c) 2020 Niklas Rosenstein # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, mo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 12131, 11271, 21921, 41916, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 4...
3.428325
579
import keras import keras.backend as K from keras.preprocessing import sequence from keras.datasets import imdb from keras.models import Sequential, Model from keras.layers import \ Dense, Activation, Conv2D, MaxPool2D, Dropout, Flatten, Input, Reshape, LSTM, Embedding, RepeatVector,\ TimeDistributed, Bidirect...
[ 11748, 41927, 292, 198, 198, 11748, 41927, 292, 13, 1891, 437, 355, 509, 198, 6738, 41927, 292, 13, 3866, 36948, 1330, 8379, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 545, 9945, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, ...
2.040044
1,798
# Ivan Carvalho # Solution to https://www.urionlinejudge.com.br/judge/problems/view/1103 #!/usr/bin/env python2.7 # encoding : utf-8 while True: a,b,c,d = [int(i) for i in raw_input().split(" ")] if a== 0 and b==0 and c== 0 and d == 0: break else : inicial = a*60 + b final = c*60 + d if final <= inicial: ...
[ 2, 21798, 1879, 2100, 8873, 198, 2, 28186, 284, 3740, 1378, 2503, 13, 40956, 1370, 10456, 469, 13, 785, 13, 1671, 14, 10456, 469, 14, 1676, 22143, 14, 1177, 14, 11442, 18, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, ...
2.286624
157
try: import simplejson as json except ImportError: import json import operator import traceback from datetime import datetime, timedelta from urlparse import urlparse import transaction from dateutil.tz import tzutc from jsonpointer import resolve_pointer from jsonschema import validate from pyramid.event...
[ 28311, 25, 198, 220, 220, 220, 1330, 2829, 17752, 355, 33918, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 33918, 198, 198, 11748, 10088, 198, 11748, 12854, 1891, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514...
2.17093
860
#!/usr/bin/env python3 # -*- coding: utf-8 -*- 'python内建模块' from datetime import datetime now = datetime.now() print(now) dt = datetime(2018, 12, 13, 18, 51, 26) print(dt) # 使用timestamp()获取的是小数,小数部分表示的是毫秒数 print(now.timestamp()) strptime = datetime.strptime('2018-12-13 15:26:25', '%Y-%m-%d %H:%M:%S') print(strptime) ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6, 29412, 37863, 227, 161, 119, 118, 162, 101, 94, 161, 251, 245, 6, 198, 6738, 4818, 8079, 1330, 4818, 8079, 1...
1.722488
209
import numpy as np #import scipy.stats as stats import matplotlib.pyplot as plt import seaborn as snb from numpy import matlib as mb #import nystrom import scipy as sp from sklearn.metrics.pairwise import rbf_kernel import editdistance
[ 11748, 299, 32152, 355, 45941, 198, 2, 11748, 629, 541, 88, 13, 34242, 355, 9756, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 65, 198, 6738, 299, 32152, 1330, 2603, 8019, 355, ...
2.940476
84
r"""Polynomials on an m-dimensional simplex T with values in :math:`\mathbb{R}^n`, expressed using the Lagrange basis. .. math:: l(x) = \sum_{\substack{\nu \in \mathbb{N}_0^m \\ |\nu| \leq r}} a_{\nu} l_{\nu, r}(x) = \sum_{\nu} a_{\nu} (\bar{l}_{\nu, r} \circ \Phi^{-1})(x), where :math:`a_{\nu} \in \mathbb{R...
[ 81, 37811, 34220, 26601, 8231, 319, 281, 285, 12, 19577, 2829, 87, 309, 351, 3815, 287, 1058, 11018, 25, 63, 59, 11018, 11848, 90, 49, 92, 61, 77, 47671, 6241, 1262, 262, 198, 43, 363, 9521, 4308, 13, 198, 198, 492, 10688, 3712, 6...
2.356293
14,126
import os import pyabf import numpy as np import mat4py as m4p import sys # Get directory containing folders for each experiment folder = sys.argv[1] # This is the list of experiment folders SubSubFolders = np.array(os.listdir(folder)) # Turn it into a full file path # SubFolders = np.core.defchararray.add(DataDirecto...
[ 11748, 28686, 198, 11748, 12972, 397, 69, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 19, 9078, 355, 285, 19, 79, 198, 11748, 25064, 198, 198, 2, 3497, 8619, 7268, 24512, 329, 1123, 6306, 198, 43551, 796, 25064, 13, 853, 85,...
2.198748
639
#!/usr/bin/env python # file_modified.py # takes input file or string and returns file modified date # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os.path, sys parent_dir = os.path.abspath...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 2393, 62, 41771, 13, 9078, 198, 2, 2753, 5128, 2393, 393, 4731, 290, 5860, 2393, 9518, 3128, 198, 198, 2, 16529, 32501, 198, 2, 1846, 3742, 198, 2, 16529, 32501, 198, 11748, 28686...
4.563063
222
"""Wrapper class for xrandr usage: xrandr [options] where options are: --display <display> or -d <display> --help -o <normal,inverted,left,right,0,1,2,3> or --orientation <normal,inverted,left,right,0,1,2,3> -q or --query -s <size>/<width>x<height> or --size <size>/<width>x<height> -r ...
[ 37811, 36918, 2848, 1398, 329, 2124, 25192, 81, 198, 198, 26060, 25, 2124, 25192, 81, 685, 25811, 60, 198, 220, 810, 3689, 389, 25, 198, 220, 1377, 13812, 1279, 13812, 29, 393, 532, 67, 1279, 13812, 29, 198, 220, 1377, 16794, 198, 2...
2.02444
982
from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras.layers import LeakyReLU import keras.backend as K import numpy as np import cv2 import json import matplotlib.pyplot as plt import datetime import load_data # gr...
[ 201, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 201, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 11, 14258, 448, 11, 1610, 41769, 201, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 34872, 17, 35, 11, 5436, 27201, 27...
2.19578
1,706
import base64 import json from splunktalib.common import log logger = log.Logs().get_logger("main") import splunktalib.modinput as modinput import splunktalib.conf_manager.ta_conf_manager as tcm import splunktalib.common.util as utils import splunktalib.hec_config as hc import google_ta_common.google_consts as ggc
[ 11748, 2779, 2414, 198, 11748, 33918, 198, 198, 6738, 4328, 2954, 39240, 571, 13, 11321, 1330, 2604, 198, 6404, 1362, 796, 2604, 13, 11187, 82, 22446, 1136, 62, 6404, 1362, 7203, 12417, 4943, 628, 198, 11748, 4328, 2954, 39240, 571, 13,...
2.962963
108
# coding=utf-8 from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde # Generated with OTLEnumerationCreator. To modify: extend, do not edit class KlSignalisatieReferentiepuntType(KeuzelijstField): """Een keuzelijst om het refe...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 440, 14990, 44, 3913, 13, 2394, 43, 17633, 13, 27354, 265, 9497, 13, 8896, 10277, 417, 2926, 301, 15878, 1330, 3873, 10277, 417, 2926, 301, 15878, 198, 6738, 440, 14990, 44, 3913, 13, 2394, 43...
1.861826
2,410
""" Methods for using the 'log' command """ import re from collections.abc import Coroutine, Iterator from datetime import datetime from pathlib import Path from typing import Any, Optional from .constants import EMPTY_REPO_RE, UNKNOWN_REV_RE from .datatypes import Log from .exceptions import (GitException, NoCommitsE...
[ 37811, 198, 46202, 329, 1262, 262, 705, 6404, 6, 3141, 198, 37811, 198, 11748, 302, 198, 6738, 17268, 13, 39305, 1330, 2744, 28399, 11, 40806, 1352, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738,...
2.531283
943
# Generated by Django 2.0.5 on 2018-10-02 21:32 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 20, 319, 2864, 12, 940, 12, 2999, 2310, 25, 2624, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
__author__ = 'sarangis' class Context: """ The main context for Spider JIT. This will hold all the global information needed for the module being built. """
[ 834, 9800, 834, 796, 705, 82, 283, 648, 271, 6, 198, 198, 4871, 30532, 25, 198, 220, 220, 220, 37227, 383, 1388, 4732, 329, 12648, 449, 2043, 13, 770, 481, 1745, 477, 262, 3298, 1321, 2622, 329, 262, 8265, 852, 3170, 13, 198, 220,...
3.510638
47
from struct import pack from math import ceil from binascii import unhexlify from dolreader import write_uint32
[ 6738, 2878, 1330, 2353, 220, 198, 6738, 10688, 1330, 2906, 346, 220, 198, 6738, 9874, 292, 979, 72, 1330, 555, 33095, 75, 1958, 198, 198, 6738, 288, 349, 46862, 1330, 3551, 62, 28611, 2624, 198, 220, 220, 220, 220, 198, 220, 220, 22...
1.771429
105
# Generated by Django 2.0.6 on 2018-06-14 19:53 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 21, 319, 2864, 12, 3312, 12, 1415, 678, 25, 4310, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/python import sys lst = sys.stdin.readlines() lst.sort() for item in lst: print (item[:-1])
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 198, 75, 301, 796, 25064, 13, 19282, 259, 13, 961, 6615, 3419, 198, 198, 75, 301, 13, 30619, 3419, 198, 198, 1640, 2378, 287, 300, 301, 25, 198, 197, 4798, 357, 91...
2.22449
49
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628 ]
3.4
20
import warnings import numpy as np
[ 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.7
10
from contextlib import contextmanager from unittest.mock import Mock from flask import current_app @contextmanager
[ 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 628, 198, 31, 22866, 37153, 198 ]
3.933333
30
# -*- coding:utf-8 -*- # &Author AnFany # 两层的Stacking分类 # 第一层6个模型:随机森林,AdaBoost,GBDT,LightGBM,XGBoost,CatBoost # 第二层模型:BP神经网络分类 # 引入数据文件 import adult_Stacking_Data as adult # 引入绘图库包 import matplotlib.pyplot as plt from pylab import mpl mpl.rcParams['font.sans-serif'] = ['FangSong'] # 中文字体名称 mpl...
[ 2, 532, 9, 12, 19617, 171, 120, 248, 40477, 12, 23, 532, 9, 12, 201, 198, 2, 1222, 13838, 220, 1052, 37, 1092, 201, 198, 201, 198, 2, 220, 10310, 97, 161, 109, 224, 21410, 1273, 5430, 26344, 228, 163, 109, 119, 201, 198, 201, ...
1.24047
4,171
#made by shivam patel from telethon import events import asyncio from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot import bot as newyear from telethon import events from userbot.cmdhelp import CmdHelp @newyear.on(admin_cmd(pattern=r"newyear")) @newyear.on(admin_cmd(pattern=r"happ...
[ 2, 9727, 416, 427, 452, 321, 279, 25791, 201, 198, 6738, 5735, 400, 261, 1330, 2995, 201, 198, 201, 198, 11748, 30351, 952, 201, 198, 201, 198, 6738, 20978, 10619, 33, 2394, 13, 26791, 1330, 13169, 62, 28758, 11, 4370, 62, 273, 62, ...
2.707317
123
import os import sys import pickle import argparse import numpy as np import torch import torch.nn as nn from utils import * from models import * from dataloader import DataLoader if __name__ == "__main__": args = get_args() main(args)
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 2298, 293, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 3384, 4487, 1330, 1635, 198, 6738, 4981, ...
3.024691
81
from flask import Flask, request, render_template,jsonify from flask_restful import Resource, Api import json import requests import os import requests ''' Sensor manager - 5050 Sensor Registration - 5051 Action Manager - 5052 Scheduler - 5053 Server LCM - 5054 Service LCM - 8080 Monitoring - 5055 Request Manager- 50...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 8543, 62, 28243, 11, 17752, 1958, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 5949, 72, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 7007, 628, 198, 7061, 6, 198, 47...
2.590106
283
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2018-10-28 11:40 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 19, 319, 2864, 12, 940, 12, 2078, 1367, 25, 1821, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.736842
57
# coding:utf-8 # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 15069, 357, 66, 8, 12131, 220, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 1, 198, 2...
3.742857
175
# -*- coding: utf-8 -*- import json from tempfile import NamedTemporaryFile from unittest.mock import MagicMock, patch, ANY import pytest from kubernetes.client.rest import ApiException from chaoslib.exceptions import ActivityFailed from chaosk8s.crd.actions import create_custom_object, \ create_cluster_custom_ob...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 11, 15529, 198, 198, 11748, ...
2.494311
791
# Parses Narrator voice lines (https://darkestdungeon.gamepedia.com/Narrator) and creates json database for use from bs4 import BeautifulSoup as beautifulSoup from urllib.request import (urlopen, urlparse, urlunparse, urlretrieve) import json import responses_constants as const if __name__ == '__main__': mai...
[ 2, 23042, 274, 28390, 1352, 3809, 3951, 357, 5450, 1378, 21953, 395, 67, 403, 6281, 13, 6057, 50235, 13, 785, 14, 45750, 1352, 8, 290, 8075, 33918, 6831, 329, 779, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 4950, 50, ...
3.19802
101
#!/usr/bin/env python3 import json import re length_re = re.compile(r'^\s*([0-9.]+)\s*miles\s*$') difficulties = ["Easy", "Moderate", "Difficult", "Strenuous"] trails = json.load(open('data.json')) for trail in trails: trail['length'] = float(length_re.match(trail['length']).group(1)) trail['difficulty'] = diffic...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 33918, 198, 11748, 302, 198, 198, 13664, 62, 260, 796, 302, 13, 5589, 576, 7, 81, 6, 61, 59, 82, 9, 26933, 15, 12, 24, 8183, 10, 19415, 82, 9, 76, 2915, 59, 82, 9, ...
2.700935
214
''' ginjinn new parser ''' import argparse from os.path import join, basename import pkg_resources import glob def setup_new_parser(subparsers): '''setup_new_parser Setup parser for the ginjinn new subcommand. Parameters ---------- subparsers An object returned by argparse.ArgumentParse...
[ 7061, 6, 39733, 73, 3732, 649, 30751, 198, 7061, 6, 198, 198, 11748, 1822, 29572, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 1615, 12453, 198, 198, 11748, 279, 10025, 62, 37540, 198, 11748, 15095, 198, 198, 4299, 9058, 62, 3605, 62, ...
2.596741
982
from __future__ import annotations import asyncio from typing import AsyncGenerator, NoReturn, Optional, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from hypercorn.typing import HTTPScope, WebsocketScope from werkzeug.datastructures import Headers from werkzeug.exceptions import InternalServe...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 6738, 19720, 1330, 1081, 13361, 8645, 1352, 11, 1400, 13615, 11, 32233, 11, 5345, 11, 4479, 198, 198, 11748, 12972, 9288, 198, 6738, 4808, 9078, 9288, 13, 49572, 17...
2.43399
1,371
from pytube import YouTube from tkinter import * #main download part #getting the link as string #window properties window = Tk() window.geometry("573x400") window.title("YouTube Downloader") window.configure(background="#e0db31") #logo set-up logo = PhotoImage(file="logo.png") l1 = Label(window,im...
[ 6738, 12972, 29302, 1330, 7444, 201, 198, 6738, 256, 74, 3849, 1330, 1635, 201, 198, 201, 198, 201, 198, 2, 12417, 4321, 636, 201, 198, 201, 198, 2, 37210, 262, 2792, 355, 4731, 201, 198, 201, 198, 2, 17497, 6608, 201, 198, 17497, ...
2.57508
313
#!/usr/bin/env python from __future__ import print_function import sys, os, json import arcpy from utils import dictlist """ See the README.md file for complete information! """ f2_hgt = max_height = 0 def get_frames(mxd): """ Return a list frames[] with the dataframes we need for this project. Side...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 201, 198, 11748, 25064, 11, 28686, 11, 33918, 201, 198, 11748, 10389, 9078, 201, 198, 6738, 3384, 4487, 1330, 8633, 4868, 201, 198, ...
2.072252
4,512
from nmigen import * from nmigen.cli import pysim from nmigen.back.pysim import Tick from nmigen.hdl.rec import Layout # Does not hit the "BOUNCE" state if the m.next = "NEXT" is hanging # second example has an m.Else() and it works as I expected if __name__ == "__main__": fsmw = FSM_weird() with pysim.Sim...
[ 6738, 28642, 9324, 1330, 1635, 198, 6738, 28642, 9324, 13, 44506, 1330, 279, 893, 320, 198, 6738, 28642, 9324, 13, 1891, 13, 79, 893, 320, 1330, 46093, 198, 6738, 28642, 9324, 13, 71, 25404, 13, 8344, 1330, 47639, 198, 198, 2, 8314, ...
2.300366
273