content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- from weatherScraper.items import TempData from weatherScraper.items import InputData import scrapy
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 6193, 3351, 38545, 13, 23814, 1330, 24189, 6601, 198, 6738, 6193, 3351, 38545, 13, 23814, 1330, 23412, 6601, 198, 11748, 15881, 88, 628 ]
3.263158
38
""" This file contains a lambda function reacting to query update sqs event and sending notifications for large queries Currently only slack notifications are supported """ import json import logging from typing import Sequence from . import settings from .model import UnknownEventException from .notificators.notifi...
[ 37811, 198, 1212, 2393, 4909, 257, 37456, 2163, 33413, 284, 12405, 4296, 19862, 82, 1785, 290, 7216, 19605, 329, 1588, 20743, 198, 198, 21327, 691, 30740, 19605, 389, 4855, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 6738,...
3.018568
377
import logging from api.entryprocessor.wiki.en import ENWiktionaryProcessor as ENWiktionaryProcessor from redis_wikicache import RedisPage, RedisSite """ Requires RedisSite and RedisPage wrappers. All data must have been imported there. see redis_wikicache.py for more details. """ logger = logging.getLogger('process...
[ 11748, 18931, 198, 198, 6738, 40391, 13, 13000, 41341, 13, 15466, 13, 268, 1330, 12964, 33010, 5378, 560, 18709, 273, 355, 12964, 33010, 5378, 560, 18709, 273, 198, 6738, 2266, 271, 62, 20763, 291, 4891, 1330, 2297, 271, 9876, 11, 2297,...
3.006993
143
#!/user/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------ @Project : nightwalker @Time : 2020/10/13 11:18 @Auth : luozhongwen @Email : luozw@inhand.com.cn @File : __init__.py @IDE : PyCharm ------------------------------------ """
[ 2, 48443, 7220, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 3880, 650, 198, 31, 16775, 1058, 1755, 20783, 198, 31, 7575, 220, 220, 220, 1058, 12131, 14, 940, 14,...
2.564815
108
from gym.envs.registration import register register('NetHackChallengeBatched-v0', entry_point='nle_batched_env.NetHackChallengeBatchedEnv')
[ 6738, 11550, 13, 268, 14259, 13, 2301, 33397, 1330, 7881, 198, 198, 30238, 10786, 7934, 32833, 41812, 3540, 33, 14265, 12, 85, 15, 3256, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5726, 62, 4122, 11639, 77, 293...
2.610169
59
# The MIT License (MIT) # Copyright (c) 2018 Koki Saitoh # 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, modi...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 198, 2, 15069, 357, 66, 8, 2864, 509, 18228, 311, 4548, 1219, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 220, 198, 2, 286, 428, ...
3.849231
325
#!/usr/bin/python3 import pygame from classes.wall import Wall from classes.block import Block from classes.player import Player from classes.ghost import Ghost black = (0,0,0) white = (255,255,255) blue = (0,0,255) green = (0,255,0) red = (255,0,0) purple = (255,0,255) yellow = (255,255,0) # Commands print("") pri...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 12972, 6057, 198, 6738, 6097, 13, 11930, 1330, 5007, 198, 6738, 6097, 13, 9967, 1330, 9726, 198, 6738, 6097, 13, 7829, 1330, 7853, 198, 6738, 6097, 13, 38933, 1330, 9897, 198, 198,...
1.867093
1,407
from django.test import TestCase
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 628 ]
3.777778
9
# -*- coding: utf-8 -*- if __name__ == "__main__": main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
1.969697
33
# -*- coding: utf-8 -*- from amplify.agent.containers.abstract import AbstractCollector from amplify.agent.context import context from amplify.agent.nginx.config.config import ERROR_LOG_LEVELS from amplify.agent.nginx.log.error import NginxErrorLogParser from amplify.agent.util.tail import FileTail __author__ = "Mike ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 47366, 13, 25781, 13, 3642, 50221, 13, 397, 8709, 1330, 27741, 31337, 273, 198, 6738, 47366, 13, 25781, 13, 22866, 1330, 4732, 198, 6738, 47366, 13, 25781, 13, 782...
2.974619
197
import copy import re import numpy as np from plotly import colors from ..util import color_intervals, process_cmap # Constants # --------- # Trace types that are individually positioned with their own domain. # These are traces that don't overlay on top of each other in a shared subplot, # so they are positioned i...
[ 11748, 4866, 198, 11748, 302, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 7110, 306, 1330, 7577, 198, 198, 6738, 11485, 22602, 1330, 3124, 62, 3849, 12786, 11, 1429, 62, 66, 8899, 198, 198, 2, 4757, 1187, 198, 2, 45337, 198, ...
2.310794
9,598
from django.db import migrations from enumfields.fields import EnumIntegerField from ..enums import LogEntryKind
[ 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 6738, 33829, 25747, 13, 25747, 1330, 2039, 388, 46541, 15878, 198, 198, 6738, 11485, 268, 5700, 1330, 5972, 30150, 35854, 628 ]
3.833333
30
#!/usr/bin/env python3 # Author: Milos Buncic # Date: 2020/06/10 # Description: Generate main configuration file (hooks.json) for webhook service import os import sys import json # Webhook working directory WH_DIR = '/etc/webhook' # Webhook configuration file WH_CONFIG = '{}/hooks.json'.format(WH_DIR) def writefile...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 6434, 25, 4460, 418, 347, 19524, 291, 198, 2, 7536, 25, 12131, 14, 3312, 14, 940, 198, 2, 12489, 25, 2980, 378, 1388, 8398, 2393, 357, 25480, 82, 13, 17752, 8, 329, 3992, ...
2.772109
294
# define globals subdomainsList = []
[ 2, 8160, 15095, 874, 198, 7266, 3438, 1299, 8053, 796, 17635 ]
3.272727
11
import roslib; roslib.load_manifest('rcommander_web') import rcommander_web.rcommander_auto_server as rcs import sys import rospy rospy.init_node('rcommander_web_test') path = sys.argv[1] robot = MyRobotClass() rcs.run(robot, path)
[ 11748, 686, 6649, 571, 26, 686, 6649, 571, 13, 2220, 62, 805, 8409, 10786, 81, 9503, 4066, 62, 12384, 11537, 198, 11748, 374, 9503, 4066, 62, 12384, 13, 81, 9503, 4066, 62, 23736, 62, 15388, 355, 374, 6359, 198, 11748, 25064, 198, 1...
2.452632
95
# -*- coding:utf-8 -*- ''' 有一个XxY的网格,一个机器人只能走格点且只能向右或向下走,要从左上角走到右下角。请设计一个算法,计算机器人有多少种走法。注意这次的网格中有些障碍点是不能走的。 给定一个int[][] map(C++ 中为vector >),表示网格图,若map[i][j]为1则说明该点不是障碍点,否则则为障碍。另外给定int x,int y,表示网格的大小。请返回机器人从(0,0)走到(x - 1,y - 1)的走法数,为了防止溢出,请将结果Mod 1000000007。保证x和y均小于等于50 ''' # test case m = [[1,1,1,1],[1,1,1,1...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 7061, 6, 201, 198, 17312, 231, 31660, 10310, 103, 55, 87, 56, 21410, 163, 121, 239, 43718, 120, 171, 120, 234, 31660, 10310, 103, 17312, 118, 161, 247, 101, 21689, 2...
0.882353
544
from ms_deisotope.peak_set import DeconvolutedPeakSet from ms_deisotope.spectrum_graph import (PathFinder, amino_acids, MassWrapper) from brainpy import SimpleComposition H2O = SimpleComposition({"H": 2, "O": 1}) NH3 = SimpleComposition({"H": 3, "N": 1}) default_losses = [MassWrapper("-H2O", -H2O.mass()), MassWrapp...
[ 6738, 13845, 62, 2934, 271, 313, 3008, 13, 36729, 62, 2617, 1330, 4280, 261, 10396, 7241, 6435, 461, 7248, 198, 6738, 13845, 62, 2934, 271, 313, 3008, 13, 4443, 6582, 62, 34960, 1330, 357, 15235, 37, 5540, 11, 23206, 62, 330, 2340, ...
2.562963
135
# -*- coding: utf-8 -*- from celery import shared_task from django.http import HttpResponse import fitnesse.import_data @shared_task
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 18725, 1924, 1330, 4888, 62, 35943, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 11748, 4197, 2516, 325, 13, 11748, 62, 7890, 628, 198, 31...
2.854167
48
import os import time import magic import settings as cfg
[ 11748, 28686, 198, 11748, 640, 198, 11748, 5536, 198, 198, 11748, 6460, 355, 30218, 70, 198 ]
3.6875
16
""" BSAM CLI version """ __version__ = '0.7.12'
[ 37811, 198, 4462, 2390, 43749, 2196, 198, 37811, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 22, 13, 1065, 6, 198 ]
2.227273
22
# Slicable Set. # # @author Oktay Acikalin <oktay.acikalin@gmail.com> # @copyright Oktay Acikalin # @license MIT (LICENSE.txt) # from diamond.decorators import time
[ 2, 311, 677, 540, 5345, 13, 198, 2, 198, 2, 2488, 9800, 220, 220, 220, 6762, 83, 323, 317, 979, 74, 14414, 1279, 482, 83, 323, 13, 330, 1134, 14414, 31, 14816, 13, 785, 29, 198, 2, 2488, 22163, 4766, 6762, 83, 323, 317, 979, 7...
2.356164
73
DEBUG = True FLASK_ENV = 'development'
[ 30531, 796, 6407, 198, 3697, 1921, 42, 62, 1677, 53, 796, 705, 31267, 6, 198 ]
2.6
15
import time
[ 11748, 640, 628, 628, 198 ]
3.2
5
from .bot import CalcBot
[ 6738, 764, 13645, 1330, 2199, 66, 20630 ]
3.428571
7
import pytest from gaphor.ui.consolewindow import ConsoleWindow import gaphor.services.componentregistry @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 198, 6738, 308, 6570, 273, 13, 9019, 13, 41947, 17497, 1330, 24371, 27703, 198, 11748, 308, 6570, 273, 13, 30416, 13, 42895, 2301, 4592, 628, 198, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, ...
3.130435
46
if __name__ == '__main__': letra = letras() try: for i in range(ord('M')): print(next(letra)) if i == 'M': break except Exception as e: print(e)
[ 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1309, 430, 796, 1309, 8847, 3419, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 201, 198, 220, 220...
1.550296
169
import sys import os import json from datetime import datetime import argparse import pandas as pd import numpy as np from skimage import io, filters, measure, color, exposure, morphology, feature, img_as_float, img_as_uint import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt from scipy.optimi...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 9060, 1330, 33245, 11, 16628,...
3.408257
436
# Generated by Django 3.1.5 on 2021-02-21 13:29 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 2999, 12, 2481, 1511, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/env python3 import setuptools with open("README.rst", "r") as fh: long_description = fh.read() setuptools.setup( name="jclib", version="0.0.1", author="Joel Cross", author_email="joel@kazbak.co.uk", description="Reusable code", long_description=long_description, url="https:...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 81, 301, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 1...
2.390438
251
#!/usr/bin/python # Copyright 2020 Fluid Numerics LLC # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 12131, 1610, 27112, 399, 6975, 873, 11419, 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, ...
3.355102
245
import numpy as np import os from ctapipe.core.traits import Unicode, List, Int, Bool from ctapipe.calib.camera import CameraCalibrator from ctapipe.calib.camera.calibrator import integration_correction from ctapipe.image.reducer import DataVolumeReducer from ctapipe.image.extractor import ImageExtractor from ctapipe.i...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 269, 44335, 3757, 13, 7295, 13, 9535, 896, 1330, 34371, 11, 7343, 11, 2558, 11, 347, 970, 198, 6738, 269, 44335, 3757, 13, 9948, 571, 13, 25695, 1330, 20432, 9771, 2889, 135...
2.196379
4,695
# Main userName = "Admin" passWord = "Admin" print("What is the username?") passWord = input() print("what is the password?") passWord = input() test = checkPassword(userName, passWord) if test == True: print("Login successful") else: print("Login not successful")
[ 201, 198, 2, 8774, 201, 198, 7220, 5376, 796, 366, 46787, 1, 201, 198, 6603, 26449, 796, 366, 46787, 1, 201, 198, 4798, 7203, 2061, 318, 262, 20579, 1701, 8, 201, 198, 6603, 26449, 796, 5128, 3419, 201, 198, 4798, 7203, 10919, 318, ...
2.841584
101
from rest_framework import serializers from .models import NewsType, HelloNews from pictures.serializers import GroupSerializerDetail, MemberSerializerDetail
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 764, 27530, 1330, 3000, 6030, 11, 18435, 9980, 198, 6738, 5986, 13, 46911, 11341, 1330, 4912, 32634, 7509, 11242, 603, 11, 10239, 32634, 7509, 11242, 603, 628, 628, 628 ]
4.205128
39
""" Shared utility functions. """ import json def read_local_config(config_fname): ''' Read configs from local, non-git commited json file. ''' with open(config_fname) as fp: local_config = json.load(fp) return local_config
[ 37811, 198, 2484, 1144, 10361, 5499, 13, 198, 37811, 198, 11748, 33918, 628, 198, 4299, 1100, 62, 12001, 62, 11250, 7, 11250, 62, 69, 3672, 2599, 198, 220, 220, 220, 705, 7061, 4149, 4566, 82, 422, 1957, 11, 1729, 12, 18300, 725, 86...
2.631579
95
from TelegramBotAPI.types.type import Type from TelegramBotAPI.types.field import Field from TelegramBotAPI.types.primitive import Integer, String, Boolean, Float, InputFile from TelegramBotAPI.types.compound import ReplyKeyboardMarkup, ReplyKeyboardHide, ForceReply from TelegramBotAPI.types.compound import Update, Mes...
[ 6738, 50203, 20630, 17614, 13, 19199, 13, 4906, 1330, 5994, 198, 6738, 50203, 20630, 17614, 13, 19199, 13, 3245, 1330, 7663, 198, 6738, 50203, 20630, 17614, 13, 19199, 13, 19795, 1800, 1330, 34142, 11, 10903, 11, 41146, 11, 48436, 11, 2...
3.845361
97
from MCNPtools import calculate_materials # # Stainless Steel 316 # ss316=calculate_materials.mixture('SS316') ss316.mass_density=7.95 ss316.add_mixture( 'P' , 210.00, mode='mass') ss316.add_mixture( 'Mo' , 1990.00, mode='mass') ss316.add_mixture( 'Zn' , 12.00, mode='mass') ss316.add_mixture( 'Pb' , 40.0...
[ 6738, 13122, 22182, 31391, 1330, 15284, 62, 33665, 82, 198, 198, 2, 198, 2, 46540, 7851, 34131, 198, 2, 198, 824, 33400, 28, 9948, 3129, 378, 62, 33665, 82, 13, 76, 9602, 10786, 5432, 33400, 11537, 198, 824, 33400, 13, 22208, 62, 43...
2.118438
23,050
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 628 ]
3.6
25
# # Copyright 2018 Picovoice Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 2, 198, 2, 15069, 2864, 15085, 709, 2942, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13,...
2.466519
2,718
from os import environ from pymysql import connect, Error # Test if the connection is successful; print errors if it was not
[ 6738, 28686, 1330, 551, 2268, 198, 198, 6738, 279, 4948, 893, 13976, 1330, 2018, 11, 13047, 628, 198, 220, 220, 220, 1303, 6208, 611, 262, 4637, 318, 4388, 26, 3601, 8563, 611, 340, 373, 407, 198 ]
3.666667
36
'''Functional test for deferred.py''' import pytest import tempfile import uuid from hil import config, deferred, model, api from hil.model import db, Switch from hil.errors import SwitchError from hil.test_common import config_testsuite, config_merge, \ fresh_database from flask import F...
[ 7061, 6, 22203, 282, 1332, 329, 28651, 13, 9078, 7061, 6, 198, 198, 11748, 12972, 9288, 198, 11748, 20218, 7753, 198, 11748, 334, 27112, 198, 198, 6738, 289, 346, 1330, 4566, 11, 28651, 11, 2746, 11, 40391, 198, 6738, 289, 346, 13, ...
2.424502
2,914
import os import pytest from datadog_checks.dev.docker import docker_run from .common import DOCKER_DIR, ENDPOINT, URL, registry_file_path INSTANCE = { "stats_endpoint": ENDPOINT, "registry_file_path": registry_file_path("empty"), } @pytest.fixture(scope="session") @pytest.fixture
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 4818, 324, 519, 62, 42116, 13, 7959, 13, 45986, 1330, 36253, 62, 5143, 198, 198, 6738, 764, 11321, 1330, 360, 11290, 1137, 62, 34720, 11, 12964, 6322, 46, 12394, 11, 10289, 1...
2.660714
112
#!/usr/bin/env python3 import sys import os import math import copy MCELL_PATH = os.environ.get('MCELL_PATH', '') if MCELL_PATH: sys.path.append(os.path.join(MCELL_PATH, 'lib')) else: print("Error: variable MCELL_PATH that is used to find the mcell library was not set.") sys.exit(1) import mcell as m fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 10688, 198, 11748, 4866, 198, 198, 44, 5222, 3069, 62, 34219, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 44, 5222, 3069, 62, 3421...
2.816514
436
import matplotlib matplotlib.use('MACOSX') import matplotlib.pyplot as plt import numpy as np from metrics.full_face_vertex_deviation import compute_vertex_deviations_over_sequence, compute_vertex_deviations_for_actor, \ compute_vertex_deviations_for_all # d3dfacs_path = "/Users/Akash_Sengupta/Documents/Datasets...
[ 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 44721, 2640, 55, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 20731, 13, 12853, 62, 2550...
2.446429
336
# # Copyright (c) 2019-2020, NVIDIA CORPORATION. # # 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 ag...
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 12, 42334, 11, 15127, 23929, 44680, 6234, 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, ...
2.180625
3,809
import unittest import random import numpy as np from pyreinforce.memory import Memory, EpisodicMemory _seed = 123 _random = random.Random() _random.seed(_seed) if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 12972, 260, 259, 3174, 13, 31673, 1330, 14059, 11, 4551, 271, 29512, 30871, 628, 198, 62, 28826, 796, 17031, 198, 198, 62, 25120, 796, 47...
2.818182
77
import logging from dateutil.relativedelta import relativedelta from hdx.scraper.base_scraper import BaseScraper from hdx.utilities.dateparse import default_date, parse_date from hdx.utilities.dictandlist import dict_of_lists_add logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 3128, 22602, 13, 2411, 265, 1572, 12514, 1330, 48993, 1572, 12514, 198, 6738, 289, 34350, 13, 1416, 38545, 13, 8692, 62, 1416, 38545, 1330, 7308, 3351, 38545, 198, 6738, 289, 34350, 13, 315, 2410, 13, 4475,...
3.176471
85
from .discover_movies import * from .entry_points import * from .list_movies import * from .search_movies import *
[ 6738, 764, 67, 29392, 62, 76, 20526, 1330, 1635, 198, 6738, 764, 13000, 62, 13033, 1330, 1635, 198, 6738, 764, 4868, 62, 76, 20526, 1330, 1635, 198, 6738, 764, 12947, 62, 76, 20526, 1330, 1635, 198 ]
3.194444
36
''' Generates and samples the PDF from the Imagenet dataset. Data is expected to be imagefiles in 8bit png format. The probability values at arbitrary points are interpolated from the surrounding values by linear interpolation. Dumps a list per sample in a directory, containing [samples] or [samples, grid_samples], w...
[ 7061, 6, 198, 8645, 689, 290, 8405, 262, 12960, 422, 262, 1846, 11286, 316, 27039, 13, 6060, 318, 2938, 284, 307, 2939, 16624, 287, 807, 2545, 279, 782, 5794, 13, 220, 220, 198, 464, 12867, 3815, 379, 14977, 2173, 389, 39555, 515, 4...
3.475096
522
import re import requests import json if __name__ == '__main__': trainDate = "2018-05-21" fromStation = "西安" toStation = "成都" ltq = LeftTicketQuery() staticonNameCode = ltq.queryStation() stationCodeName = dict((v, k) for k, v in staticonNameCode.items()) leftTicketUrl = ltq.makeLeftTicke...
[ 11748, 302, 198, 11748, 7007, 198, 11748, 33918, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 4512, 10430, 796, 366, 7908, 12, 2713, 12, 2481, 1, 198, 220, 220, 220, 422, 12367, 796, 3...
1.754458
729
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 Yahoo! 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 220, 220, 220, 15069, 357, 34, 8, 1853, 16551, 0, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 2...
3.160535
299
from django.shortcuts import render
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 628, 198 ]
3.8
10
import youtube_dl import os import sys directory = (os.getcwd() + '/Downloads') ydl_opts = {} try: main() except IndexError: print('Não foi detectado nenhum URL!')
[ 11748, 35116, 62, 25404, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 201, 198, 34945, 796, 357, 418, 13, 1136, 66, 16993, 3419, 1343, 31051, 10002, 82, 11537, 201, 198, 5173, 75, 62, 404, 912, 796, 23884, 201, 198, 28311...
2.277108
83
#!/usr/bin/env python # Copyright 2017 Google LLC # # 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 2177, 3012, 11419, 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, ...
2.668831
1,078
from math import log
[ 6738, 10688, 1330, 2604, 628, 198 ]
3.833333
6
import apps.common.func.InitDjango from all_models.models import TbUser if __name__ == "__main__": print(UserService.getUsers()[0].loginname) print(UserService.getUserByLoginname(UserService.getUsers()[0].loginname))
[ 11748, 6725, 13, 11321, 13, 20786, 13, 31768, 35, 73, 14208, 198, 6738, 477, 62, 27530, 13, 27530, 1330, 309, 65, 12982, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 12982, 16177, 1...
2.848101
79
import numpy as np from ms2deepscore.plotting import create_confusion_matrix_plot
[ 11748, 299, 32152, 355, 45941, 198, 6738, 13845, 17, 22089, 26675, 13, 29487, 889, 1330, 2251, 62, 10414, 4241, 62, 6759, 8609, 62, 29487, 628 ]
3.32
25
from django.db import models from django.conf import settings from django.core.validators import RegexValidator from model_utils import Choices from helpers.models import TimestampedModel class ServiceKeyword(TimestampedModel): """ Model to keep track of service keywords. """ name = models.CharField...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 797, 25636, 47139, 1352, 198, 198, 6738, 2746, 62, 26791, 1330, 10031, 1063, 198, 198, 6...
1.963863
1,688
from __future__ import absolute_import from celery import shared_task @shared_task @shared_task
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 18725, 1924, 1330, 4888, 62, 35943, 628, 198, 31, 28710, 62, 35943, 628, 198, 31, 28710, 62, 35943, 198 ]
3.448276
29
# -*- coding: utf-8 -*- from __future__ import absolute_import from flask.ext.mail import Mail mail = Mail() from flask.ext.cors import CORS cors = CORS() from flask.ext.security import Security, SQLAlchemyUserDatastore from .models import User, Role, db datastore = SQLAlchemyUserDatastore(db, User, Role) securi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 628, 198, 198, 6738, 42903, 13, 2302, 13, 4529, 1330, 11099, 198, 4529, 796, 11099, 3419, 628, 198, 6738, 42903, 13, 2302...
2.934343
198
from wikidata.client import Client from urllib.parse import urlparse import wikipedia import requests from requests.adapters import HTTPAdapter from .ceimport import cache s = requests.Session() adapter = HTTPAdapter(max_retries=5, pool_connections=100, pool_maxsize=100) s.mount("https://", adapter) @cache.dict()...
[ 6738, 47145, 312, 1045, 13, 16366, 1330, 20985, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 11748, 47145, 11151, 198, 198, 11748, 7007, 198, 6738, 7007, 13, 324, 12126, 1330, 14626, 47307, 198, 198, 6738, 764, 344, 11...
2.531348
1,276
import json import os.path from datetime import date from rich import box from rich.console import Console from rich.table import Table from vika.config import NOTE_DEFAULT_PATH
[ 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 5527, 1330, 3091, 198, 6738, 5527, 13, 41947, 1330, 24371, 198, 6738, 5527, 13, 11487, 1330, 8655, 198, 198, 6738, 410, 9232, 13, 11250, 1330, 2455...
3.829787
47
#!/usr/bin/env python # -*- coding: utf8 -*- # Created by Xavier Yin on 2015/2/28 from modules.conf import Config from modules import run_as_post_receive import os import sys CURRENT_FILE_PATH = os.path.abspath(__file__) CURRENT_WORK_DIR = os.path.dirname(CURRENT_FILE_PATH) GIT_DIR = os.path.dirname(CURRENT_WORK_DIR...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 2, 15622, 416, 30825, 37201, 319, 1853, 14, 17, 14, 2078, 198, 198, 6738, 13103, 13, 10414, 1330, 17056, 198, 6738, 13103, ...
2.545126
277
import torch import torch.nn as nn import numpy as np from coordinated import configs
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 22080, 1330, 4566, 82, 198 ]
3.625
24
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_EXT_histogram' _p.unpack_constants( """GL_HISTOGRAM_EXT 0x8024 GL_PROXY_HISTOGRAM_EXT 0x8025 GL_HISTOGRAM_WIDTH_EXT 0x8026 GL_HISTOGRAM...
[ 7061, 6, 16541, 519, 877, 515, 416, 651, 62, 4743, 62, 2302, 5736, 4226, 11, 466, 407, 4370, 0, 7061, 6, 198, 6738, 30672, 1330, 3859, 355, 4808, 79, 11, 38491, 355, 4808, 6359, 11, 26515, 198, 6738, 30672, 13, 8763, 1330, 1278, 1...
2.112175
731
# -*- coding: UTF-8 -*- # Copyright 2014-2018 Luc Saffre # License: BSD (see file COPYING for details) """ Database models for this plugin. """ from __future__ import unicode_literals from builtins import str from django.utils.translation import ugettext_lazy as _ from lino.api import dd from lino.modlib.upload...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 15069, 1946, 12, 7908, 7598, 311, 2001, 260, 198, 2, 13789, 25, 347, 10305, 357, 3826, 2393, 27975, 45761, 329, 3307, 8, 628, 198, 37811, 198, 38105, 4981, 220, 329, 4...
2.620825
1,527
# Copyright 2021 IBM Corporation # # 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 i...
[ 2, 15069, 33448, 19764, 10501, 198, 2, 220, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 220, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 220, 198, ...
2.94027
519
import base64 import base58 import base91 b16table = '0123456789ABCDEF' b32table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567' b58table = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' b64table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' b85table = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZab...
[ 11748, 2779, 2414, 198, 11748, 2779, 3365, 198, 11748, 2779, 6420, 628, 198, 65, 1433, 11487, 796, 705, 486, 1954, 2231, 3134, 4531, 24694, 32988, 6, 198, 65, 2624, 11487, 796, 705, 24694, 32988, 17511, 23852, 42, 31288, 45, 3185, 48, ...
1.851145
262
# Copyright 2019 Google LLC # # 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, ...
[ 2, 15069, 13130, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.01275
14,824
# https://github.com/jeongukjae/terminal-palette/blob/master/README.md from terminal_palette import Palette pal = Palette() class Symbol: """ # Symbol An object that encapsulates properties of a symbol with color and decorator. """ def get(self, char=None, fg=None, bg=None, *decos): """...
[ 2, 3740, 1378, 12567, 13, 785, 14, 18015, 506, 2724, 73, 3609, 14, 23705, 282, 12, 18596, 5857, 14, 2436, 672, 14, 9866, 14, 15675, 11682, 13, 9132, 198, 198, 6738, 12094, 62, 18596, 5857, 1330, 3175, 5857, 198, 198, 18596, 796, 317...
1.997909
1,435
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # -*- encoding: utf-8 -*- # # Copyright (c) 2020 anqi.huang@outlook.com # # 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.apach...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 281, 4060...
3.087613
331
import unittest import dolphindb as ddb import numpy as np import pandas as pd from setup import HOST, PORT, WORK_DIR, DATA_DIR from numpy.testing import assert_array_equal, assert_array_almost_equal from pandas.testing import assert_series_equal from pandas.testing import assert_frame_equal if __name__...
[ 201, 198, 11748, 555, 715, 395, 201, 198, 11748, 288, 10196, 521, 65, 355, 288, 9945, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 9058, 1330, 367, 10892, 11, 350, 9863, 11, 309...
2.848
125
import jsonpickle from typing import Dict, Union, Optional, List, Type from Domain.entity import Entity from Repository.repository import Repository
[ 11748, 33918, 27729, 293, 198, 6738, 19720, 1330, 360, 713, 11, 4479, 11, 32233, 11, 7343, 11, 5994, 198, 198, 6738, 20021, 13, 26858, 1330, 20885, 198, 6738, 1432, 13264, 13, 260, 1930, 37765, 1330, 1432, 13264, 628 ]
3.973684
38
import sys import qtvscodestyle as qtvsc from qtvscodestyle.examples.widget_gallery.ui.main_ui import UI from qtvscodestyle.qtpy.QtCore import Qt, Slot from qtvscodestyle.qtpy.QtWidgets import QApplication, QColorDialog, QFileDialog, QMainWindow if __name__ == "__main__": app = QApplication(sys.argv) # Fix ...
[ 11748, 25064, 198, 198, 11748, 10662, 14981, 1416, 375, 10992, 355, 10662, 14981, 1416, 198, 6738, 10662, 14981, 1416, 375, 10992, 13, 1069, 12629, 13, 42655, 62, 24460, 13, 9019, 13, 12417, 62, 9019, 1330, 12454, 198, 6738, 10662, 14981,...
2.58885
287
import sys import numpy as np from PyQt5.QtWidgets import QWidget, QApplication, QPushButton, QColorDialog, QInputDialog, QMenu from PyQt5.QtGui import QPainter, QColor, QPen, QBrush from PyQt5.QtCore import Qt, QTimer if __name__ == '__main__': app = QApplication(sys.argv) ex = GameOfLife(70, 40, 15) ...
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 38300, 11, 1195, 23416, 11, 1195, 49222, 21864, 11, 1195, 10258, 44204, 11, 1195, 20560, 44204, 11, 1195, 2338...
2.47482
139
""" Created on 17 Jun 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) eth0: connected to Wired connection 1 "TP-LINK USB 10/100/1000 LAN" ethernet (r8152), 98:DE:D0:04:9B:CC, hw, mtu 1500 ip4 default inet4 192.168.1.88/24 inet6 fe80::131d:325a:f7bd:e3e/64 wlan0: connected to TP-Li...
[ 37811, 198, 41972, 319, 1596, 7653, 13130, 198, 198, 31, 9800, 25, 31045, 3944, 2364, 357, 1671, 36909, 13, 6667, 2364, 31, 35782, 1073, 5773, 4234, 13, 785, 8, 198, 198, 2788, 15, 25, 5884, 284, 39721, 4637, 352, 198, 220, 220, 220...
3.43705
556
# -*- coding: utf-8 -*- if __name__ == "__main__": main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
1.969697
33
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.9.1+dev # kernelspec: # display_name: Python [conda env:annorxiver] # language: python # nam...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11420, 198, 2, 474, 929, 88, 353, 25, 198, 2, 220, 220, 474, 929, 88, 5239, 25, 198, 2, 220, 220, 220, 220, 17519, 25, 20966, 2047, 65, 11, 9078, 198, 2, 220,...
2.222425
3,282
from django.urls import path, include urlpatterns = [ path('blog/', include('BlogManage.blog.urls')), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 14036, 14, 3256, 2291, 10786, 42383, 5124, 496, 13, 14036, 13, 6371, 82, 11537, 828, 198, 60, 198 ]
2.658537
41
import math if __name__ == "__main__": main()
[ 11748, 10688, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.409091
22
import logging import subprocess from collections import namedtuple import enum import functools from ssg.constants import MULTI_PLATFORM_MAPPING from ssg.constants import PRODUCT_TO_CPE_MAPPING from ssg.constants import FULL_NAME_TO_PRODUCT_MAPPING Scenario_run = namedtuple( "Scenario_run", ("rule_id", "scrip...
[ 11748, 18931, 198, 11748, 850, 14681, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 33829, 198, 11748, 1257, 310, 10141, 198, 6738, 37786, 70, 13, 9979, 1187, 1330, 337, 16724, 40, 62, 6489, 1404, 21389, 62, 44, 24805, 2751, 198,...
2.666667
225
# from flask import Flask import random from marshmallow import Schema, fields, pre_load, validate from flask_marshmallow import Marshmallow from datetime import datetime # from app import db from flask_sqlalchemy import SQLAlchemy from ..misc import funcs as funcs ma = Marshmallow() db = SQLAlchemy() # as a ...
[ 2, 422, 42903, 1330, 46947, 198, 11748, 4738, 198, 6738, 22397, 42725, 1330, 10011, 2611, 11, 7032, 11, 662, 62, 2220, 11, 26571, 198, 6738, 42903, 62, 76, 5406, 42725, 1330, 9786, 42725, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, ...
2.538803
451
#!/usr/bin/python # # Copyright (c) 2013 Mikkel Schubert <MikkelSch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights #...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 17722, 7750, 3059, 84, 4835, 1279, 44, 1134, 7750, 14874, 31, 14816, 13, 785, 29, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, ...
3.172144
639
from typing import Optional, Callable, Mapping, Any, List import abc import torch as tc from drl.agents.architectures.abstract import Architecture class StatelessArchitecture(Architecture, metaclass=abc.ABCMeta): """ Abstract class for stateless (i.e., memoryless) architectures. """ def __init__( ...
[ 6738, 19720, 1330, 32233, 11, 4889, 540, 11, 337, 5912, 11, 4377, 11, 7343, 198, 11748, 450, 66, 198, 198, 11748, 28034, 355, 37096, 198, 198, 6738, 1553, 75, 13, 49638, 13, 998, 5712, 942, 13, 397, 8709, 1330, 29778, 628, 198, 4871...
2.171906
1,018
"""A fast channel state information parser for Intel, Atheros and Nexmon.""" from . import _csiread class Intel(_csiread.Intel): """Parse CSI obtained using 'Linux 802.11n CSI Tool'. Args: file (str or None): CSI data file. If ``str``, ``read`` and ``readstp`` methods are allowed. If ``N...
[ 37811, 32, 3049, 6518, 1181, 1321, 30751, 329, 8180, 11, 27751, 4951, 290, 14786, 2144, 526, 15931, 198, 198, 6738, 764, 1330, 4808, 6359, 557, 324, 628, 198, 4871, 8180, 28264, 6359, 557, 324, 13, 24123, 2599, 198, 220, 220, 220, 372...
2.223987
9,947
import conftest # Add root path to sys.path import os import matplotlib.pyplot as plt from PathPlanning.WavefrontCPP import wavefront_coverage_path_planner wavefront_coverage_path_planner.do_animation = False if __name__ == '__main__': conftest.run_this_test(__file__)
[ 11748, 369, 701, 395, 220, 1303, 3060, 6808, 3108, 284, 25064, 13, 6978, 198, 11748, 28686, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 10644, 20854, 768, 13, 39709, 8534, 8697, 47, 1330, 6769, 8534, 62, 1...
2.81
100
# Markdown builder # # Starts the .R script for Markdown generation # # Inputs: # - Coverage_Track.tab # - regions.bed # - Non_synonymous_variants_summary.tab # # Output: # - Run_report.html # # Parameters: # None rule make_markdown : input: "Non_synonymous_variants_su...
[ 2, 2940, 2902, 27098, 198, 2, 198, 2, 220, 220, 50181, 262, 764, 49, 4226, 329, 2940, 2902, 5270, 198, 2, 198, 2, 220, 220, 23412, 82, 25, 198, 2, 220, 220, 220, 220, 220, 220, 532, 33998, 62, 24802, 13, 8658, 198, 2, 220, 220...
2.082596
339
import pygame as pg from screen import resource_path
[ 11748, 12972, 6057, 355, 23241, 198, 6738, 3159, 1330, 8271, 62, 6978 ]
4.333333
12
import datetime import enum import hashlib import pandas as pd from faker import Faker from sqlalchemy import BigInteger from sqlalchemy import Boolean from sqlalchemy import Column from sqlalchemy import create_engine from sqlalchemy import Date from sqlalchemy import DateTime from sqlalchemy import Float from sqlalc...
[ 11748, 4818, 8079, 198, 11748, 33829, 198, 11748, 12234, 8019, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 277, 3110, 1330, 376, 3110, 198, 6738, 44161, 282, 26599, 1330, 4403, 46541, 198, 6738, 44161, 282, 26599, 1330, 41146, ...
2.334744
4,254
from jinja2 import Environment, FileSystemLoader import jinja2_stringcase import stringcase import csv import openpyxl from gencode.internal import default import gencode.text_helpers as text_helpers import os # Config Loading # helper
[ 6738, 474, 259, 6592, 17, 1330, 9344, 11, 9220, 11964, 17401, 198, 11748, 474, 259, 6592, 17, 62, 8841, 7442, 198, 11748, 4731, 7442, 198, 11748, 269, 21370, 198, 11748, 1280, 9078, 87, 75, 198, 6738, 2429, 8189, 13, 32538, 1330, 4277...
3.402778
72
import tensorflow as tf from stagedml.imports.tf import ( Model, Layer, Tensor, Adam, LayerNormalization ) from stagedml.models.transformer.imports import ( transformer_loss, get_padding_bias, get_padding, get_position_encoding, get_decoder_self_attention_bias, sequence_beam_search, EOS_ID, LearningRateSch...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 23393, 4029, 13, 320, 3742, 13, 27110, 1330, 357, 9104, 11, 34398, 11, 309, 22854, 11, 7244, 11, 34398, 26447, 1634, 1267, 198, 198, 6738, 23393, 4029, 13, 27530, 13, 7645, 16354, 13, 3...
2.804175
1,006
# Copyright 2019 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 15069, 13130, 4946, 8090, 47061, 5693, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.694064
219
import sys def main(args): """main() will be run if you run this script directly""" parse_server_status( "protopy/vassal_engine/data/2021-03-vassal-players-month.txt", "server_status.csv", ) def run(): """Entry point for the runnable script.""" sys.exit(main(sys.argv[1:])) if ...
[ 11748, 25064, 628, 198, 198, 4299, 1388, 7, 22046, 2599, 198, 220, 220, 220, 37227, 12417, 3419, 481, 307, 1057, 611, 345, 1057, 428, 4226, 3264, 37811, 198, 220, 220, 220, 21136, 62, 15388, 62, 13376, 7, 198, 220, 220, 220, 220, 22...
2.372671
161
#!/usr/bin/env python # -*- coding: utf-8 -*- # @first_date 20140829 # @date # @version 0.0 # @brief stop dokuwiki Apache server import os import time import signal import subprocess os.chdir(r'server') print("Stop Apache Server") p = subprocess.Popen(["ApacheKill.exe"]) ### Replace "ApacheKill.e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 2488, 11085, 62, 4475, 220, 220, 220, 580, 26200, 1959, 198, 2, 220, 2488, 4475, 198, 2, 220, 2488, 9641, 2...
2.227564
312
#!/usr/bin/env python3 from collections import* n = int(input()) a = list(map(int, input().split())) l = [] r = [] for i, j in enumerate(a): l += [i + j] r += [i - j] c = 0 l = Counter(l) for r in r: c += l.get(r, 0) print(c)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 17268, 1330, 9, 198, 198, 77, 796, 493, 7, 15414, 28955, 198, 64, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 198, 75, 796, 17635, 198, 81, 796, ...
2.086957
115
# -*- coding: utf-8 -*- import requests import os, sys import pandas as pd import urllib.parse import logging #import asyncio import concurrent.futures from pathlib import Path ''' Script to download dataset from https://climateknowledgeportal.worldbank.org/api/data/get-download-data ''' DATASET_FOLDER = '../../dataset...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 7007, 198, 11748, 28686, 11, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2956, 297, 571, 13, 29572, 198, 11748, 18931, 198, 2, 11748, 30351, 952, 198...
2.48223
1,435
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 6127, 7560, 416, 5413, 357, 49, 8, 11160, 19452, 6127, 35986, 13, 198, 2, 19179, 743, 2728, 11491, 4069, 290, 481, 307, 2626, 611, 262, 2438, 318, 198, 2, 16935, 515, 13, ...
3.207729
621
#!/usr/bin/python3 # -*- coding: utf-8 -*- class CC1(object): """Docstring for CC1. """ def __init__(self): """TODO: to be defined1. """ # 这个类调用了CC1里面的方法, CC1与CC2并没有关系 class CC2(object): """Docstring for CC2. """ def __init__(self): """TODO: to be defined1. """ class CC3(CC1, CC2...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 4871, 12624, 16, 7, 15252, 2599, 628, 220, 220, 220, 37227, 23579, 8841, 329, 12624, 16, 13, 37227, 628, 220, 220, ...
1.891051
257
# External Libraries from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker Base = declarative_base()
[ 2, 34579, 46267, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 629, 19458, 62, 29891, 11,...
3.571429
56
from django.conf.urls.static import static from django.urls import include, path from . import settings urlpatterns = [ path('', include('frontend.urls')), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 11, 3108, 198, 6738, 764, 1330, 6460, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, ...
3.026316
76
from __future__ import print_function, unicode_literals import six, os, sys, time, bz2 signal = None try: import signal except ImportError: pass from zope.interface import implementer from twisted.internet import reactor, utils, defer from twisted.python import usage, procutils, filepath, log as tw_log from twi...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 11748, 2237, 11, 28686, 11, 25064, 11, 640, 11, 275, 89, 17, 198, 12683, 282, 796, 6045, 198, 28311, 25, 198, 220, 220, 220, 1330, 6737, 198, 16341...
2.887201
2,172