content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" (C) Copyright 2020 Scott Wiederhold, s.e.wiederhold@gmail.com https://community.openglow.org SPDX-License-Identifier: MIT """ import logging import os from typing import Union from gfhardware._common import * logger = logging.getLogger(LOGGER_NAME) cnc = _CNC() __all__ = ['cnc']
[ 37811, 198, 7, 34, 8, 15069, 12131, 198, 19040, 370, 798, 263, 2946, 11, 264, 13, 68, 13, 86, 798, 263, 2946, 31, 14816, 13, 785, 198, 5450, 1378, 28158, 13, 404, 1516, 9319, 13, 2398, 198, 4303, 36227, 12, 34156, 12, 33234, 7483,...
2.663636
110
from django.test import TestCase import json from .models import User, Event
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 11748, 33918, 198, 6738, 764, 27530, 1330, 11787, 11, 8558 ]
4
19
""" A role has to have a name to be defined. >>> grok.testing.grok(__name__) Traceback (most recent call last): martian.error.GrokError: A role needs to have a dotted name for its id. Use grok.name to specify one. """ # noqa: E501 import grok
[ 37811, 198, 32, 2597, 468, 284, 423, 257, 1438, 284, 307, 5447, 13, 628, 220, 13163, 7128, 74, 13, 33407, 13, 27333, 74, 7, 834, 3672, 834, 8, 198, 220, 34912, 1891, 357, 1712, 2274, 869, 938, 2599, 198, 220, 11277, 666, 13, 18224...
2.953488
86
# -*- coding: utf-8 -*- """ Created on Fri Jun 21 00:01:50 2019 @author: f.divruno """ import numpy as np import astropy.constants as const import pyproj as pyproj import astropy.units as u ms = 1e-3 us = 1e-6 MHz = 1e6 GHz = 1e9 km = 1e3 minute = 60 hr = 60*minute km_h = km/hr k_bolt = 1.38e-23 ecef = pyproj.Proj(...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 7653, 2310, 3571, 25, 486, 25, 1120, 13130, 198, 198, 31, 9800, 25, 277, 13, 7146, 5143, 78, 198, 37811, 198, 11748, 299, 32152, 355, 45...
2.366516
221
from .common import * # config.json 会随时变化,获取值应当是即时的 # 检测配置文件是否存在,不存在则新建 if os.path.exists(CONFIG_PATH) and os.path.isdir(CONFIG_PATH): os.mkdir(CONFIG_PATH) def UrlsPath()->str: """根路由的路径""" PROJECT_CONFIG = get_configs(CONFIG_PATH) PROJECT_BASE_DIR = PROJECT_CONFIG['dirname'] return os.path.join...
[ 6738, 764, 11321, 1330, 1635, 198, 198, 2, 4566, 13, 17752, 220, 27670, 21253, 248, 237, 33768, 114, 20998, 246, 44293, 244, 171, 120, 234, 164, 236, 115, 20998, 244, 161, 222, 120, 41753, 242, 37605, 241, 42468, 39355, 111, 33768, 11...
1.727273
484
import torch import torch.nn as nn import torch.nn.functional as F import dgl from scipy import sparse as sp from scipy.sparse.linalg import norm from ogb.graphproppred.mol_encoder import AtomEncoder, BondEncoder """ GatedGCN and GatedGCN-LSPE """ from layers.gatedgcn_layer import GatedGCNLayer from laye...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 288, 4743, 198, 198, 6738, 629, 541, 88, 1330, 29877, 355, 599, 198, 6738, 629, 541, 88, 13, 82, 29572, 13...
2.701299
154
# def changeProduct(self, newName, newPrice, newQuantity): # self.name = newName # self.price = newPrice # self.quantity = newQuantity # Create a class Dog. Make sure it has the attributes name, breed, color, gender. Create a function that will print all attributes of the class. Create ...
[ 628, 220, 220, 220, 1303, 825, 1487, 15667, 7, 944, 11, 649, 5376, 11, 649, 18124, 11, 649, 31208, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 2116, 13, 3672, 796, 649, 5376, 198, 220, 220, 220, 1303, 220, 220, 220, 220, ...
3.614118
425
from setuptools import find_packages, setup from amset import __version__ with open("README.md", "r") as file: long_description = file.read() if __name__ == "__main__": setup( name="amset", version=__version__, description="AMSET is a tool to calculate carrier transport properties " ...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 6738, 716, 2617, 1330, 11593, 9641, 834, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 2393, 25, 198, 220, 220, 220, 890, 62, 11213, ...
1.765244
1,640
from django.conf import settings from django.db.models import Q from django.shortcuts import get_object_or_404 from django.contrib.auth import get_user_model from rest_framework.pagination import PageNumberPagination from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from rest...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439,...
3.653846
260
"""Dataset Base Class""" from torch.utils.data import Dataset from .download_utils import download_dataset class BaseDataset(Dataset): """ Abstract Dataset Base Class All subclasses must define __getitem__() and __len__() """
[ 37811, 27354, 292, 316, 7308, 5016, 37811, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 198, 6738, 764, 15002, 62, 26791, 1330, 4321, 62, 19608, 292, 316, 628, 198, 4871, 7308, 27354, 292, 316, 7, 27354, 292...
2.928571
84
import turtle s = input("enter s") t = turtle.Pen() t.speed(10) for x in range(100): t.forward(2*x) t.left(90)
[ 11748, 28699, 198, 198, 82, 796, 5128, 7203, 9255, 264, 4943, 628, 198, 83, 796, 28699, 13, 25553, 3419, 198, 83, 13, 12287, 7, 940, 8, 198, 198, 1640, 2124, 287, 2837, 7, 3064, 2599, 198, 197, 83, 13, 11813, 7, 17, 9, 87, 8, ...
2.185185
54
# -*- coding: utf-8 -*- # 2.6-3 应用案例 import plotly as py import plotly.graph_objs as go pyplt = py.offline.plot # Stacked Bar Chart trace_1 = go.Bar( x = ['华夏新经济混合', '华夏上证50', '嘉实新机遇混合', '南方消费活力混合','华泰柏瑞'], y = [0.7252, 0.9912, 0.5347, 0.4436, 0.9911], name = '股票投资' ) trace_2 = go.Bar( x = ['华夏新经济混合',...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 362, 13, 21, 12, 18, 10263, 118, 242, 18796, 101, 162, 94, 230, 160, 122, 233, 198, 11748, 7110, 306, 355, 12972, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457,...
1.220568
739
import json import logging import os import time from argparse import ArgumentParser import datetime import sys from finrl.config import config if __name__ == "__main__": main()
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 4818, 8079, 198, 11748, 25064, 198, 6738, 957, 45895, 13, 11250, 1330, 4566, 628, 628, 220, 220, 220, 220, 220, ...
3.180328
61
from django.contrib import admin from .models import * @admin.register(Post) admin.site.register(Comments) admin.site.register(ReplyToComment) admin.site.register(ReplyToReply)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 1635, 198, 198, 31, 28482, 13, 30238, 7, 6307, 8, 198, 198, 28482, 13, 15654, 13, 30238, 7, 23903, 8, 198, 28482, 13, 15654, 13, 30238, 7, 36875, 2514, 213...
3.236364
55
""" @author: Chenhao Lu <luchenhao@zhejianglab.com> @author: Yizhang Wang <1739601638@qq.com> """ import oneflow.experimental as flow
[ 37811, 198, 31, 9800, 25, 12555, 23778, 6026, 1279, 75, 1229, 831, 23778, 31, 89, 258, 39598, 23912, 13, 785, 29, 198, 31, 9800, 25, 575, 528, 33255, 15233, 1279, 1558, 34107, 27037, 2548, 31, 38227, 13, 785, 29, 198, 37811, 198, 11...
2.647059
51
import lib.pip_path # noqa import lib.servo as servo servo1 = servo.servo1 servo2 = servo.servo2 servo3 = servo.servo3 servo4 = servo.servo4
[ 11748, 9195, 13, 79, 541, 62, 6978, 1303, 645, 20402, 198, 11748, 9195, 13, 3168, 78, 355, 1113, 78, 198, 3168, 78, 16, 796, 1113, 78, 13, 3168, 78, 16, 198, 3168, 78, 17, 796, 1113, 78, 13, 3168, 78, 17, 198, 3168, 78, 18, 79...
2.203125
64
from random import randint # Subprogramas if __name__ == '__main__': # Programa Principal qtd_numeros = int(input('A Lista deve ter quantos valores?: ')) minimo = int(input('Menor valor da faixa: ')) maximo = int(input('Maior valor da faixa: ')) numeros = [] preencher(numeros, qtd_numeros, m...
[ 6738, 4738, 1330, 43720, 600, 628, 198, 2, 3834, 23065, 292, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 6118, 64, 32641, 198, 220, 220, 220, 10662, 8671, 62, 77, 6975, 418, 796, 493...
2.408163
147
#!/usr/bin/env python # coding=utf-8 # pylint: disable=missing-docstring,too-many-lines ################################################################################ # # Description: Grammar based generation/fuzzer # # Portions Copyright 2014 BlackBerry Limited # # Licensed under the Apache License, Version 2.0 (the...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 11, 18820, 12, 21834, 12, 6615, 198, 29113, 29113, 14468, 198, 2, 198, 2, 12489, 25, 201...
2.569169
4,489
from .base_challenge import * # noqa: F401, F403 from .debugging import * # noqa: F401, F403
[ 6738, 764, 8692, 62, 36747, 3540, 1330, 1635, 220, 1303, 645, 20402, 25, 376, 21844, 11, 376, 31552, 198, 6738, 764, 24442, 2667, 1330, 1635, 220, 1303, 645, 20402, 25, 376, 21844, 11, 376, 31552, 198 ]
2.638889
36
# (C) Datadog, Inc. 2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) from .functions import parse_metric_family # noqa: F401
[ 2, 357, 34, 8, 16092, 324, 519, 11, 3457, 13, 1584, 198, 2, 1439, 2489, 10395, 198, 2, 49962, 739, 45157, 1431, 347, 10305, 13789, 357, 3826, 38559, 24290, 8, 198, 198, 6738, 764, 12543, 2733, 1330, 21136, 62, 4164, 1173, 62, 17989,...
3.117647
51
'''Setup Web App''' import os import sys from flask import Blueprint, render_template, request, flash, redirect, url_for from sqlalchemy import create_engine from passlib.hash import sha256_crypt sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/../') from ipmon import db, config, app from ipmon.databas...
[ 7061, 6, 40786, 5313, 2034, 7061, 6, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 2581, 11, 7644, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 1839...
3.195652
184
# -*- coding: utf-8 -*- """Top-level package for chaostoolkit-azure.""" import contextlib from typing import List from azure.mgmt.compute import ComputeManagementClient from azure.mgmt.resourcegraph import ResourceGraphClient from chaoslib.discovery import initialize_discovery_result, \ discover_actions, discover...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 9126, 12, 5715, 5301, 329, 17792, 455, 970, 15813, 12, 1031, 495, 526, 15931, 198, 11748, 4732, 8019, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 35560, 49...
2.943554
1,559
import os import praw print('__file__={0:<35} | __name__={1:<20} | __package__={2:<20}'.format(__file__,__name__,str(__package__))) duplicate_comments = 'duplicate_comments.txt' duplicate_titles = 'duplicate_titles.txt'
[ 11748, 28686, 198, 11748, 279, 1831, 198, 4798, 10786, 834, 7753, 834, 34758, 15, 25, 27, 2327, 92, 930, 11593, 3672, 834, 34758, 16, 25, 27, 1238, 92, 930, 11593, 26495, 834, 34758, 17, 25, 27, 1238, 92, 4458, 18982, 7, 834, 7753, ...
2.434783
92
import os import sys import pandas as pd import glob default_name = "combined.csv" if __name__ == '__main__': if len(sys.argv) < 2: print(f'USE: .py csv_files_dir new_csv(optional, default = {default_name}') exit(1) dfs = [] os.chdir(sys.argv[1]) if len(sys.argv) <= 2: name =...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 15095, 198, 198, 12286, 62, 3672, 796, 366, 24011, 1389, 13, 40664, 1, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 22...
1.796368
771
from representations.sequentialembedding import SequentialEmbedding """ Example showing how to load a series of historical embeddings and compute similarities over time. Warning that loading all the embeddings into main memory can take a lot of RAM """ if __name__ == "__main__": fiction_embeddings = SequentialEmb...
[ 6738, 24612, 13, 3107, 1843, 20521, 12083, 1330, 24604, 1843, 31567, 6048, 278, 198, 198, 37811, 198, 16281, 4478, 703, 284, 3440, 257, 2168, 286, 6754, 11525, 67, 654, 290, 24061, 20594, 625, 640, 13, 198, 20361, 326, 11046, 477, 262, ...
2.901602
437
import numpy as np from litebo.utils.start_smbo import create_smbo config_dict = { "optimizer": "SMBO", "parameters": { "x1": { "type": "float", "bound": [-5, 10], "default": 0 }, "x2": { "type": "float", "bound": [0, 15] ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 300, 578, 2127, 13, 26791, 13, 9688, 62, 82, 2022, 78, 1330, 2251, 62, 82, 2022, 78, 628, 198, 198, 11250, 62, 11600, 796, 1391, 198, 220, 220, 220, 366, 40085, 7509, 1298, 366, 12310, 8202,...
1.851735
317
# Copyright (c) 2017 Thierry Kleist # # MIT License # # 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, modify, merg...
[ 2, 15069, 357, 66, 8, 2177, 536, 959, 563, 15983, 396, 198, 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2, 257, 4866, 286, 428, 3788, 290, 3917, 103...
3.644699
349
from django.shortcuts import render from django.shortcuts import get_object_or_404 def detail(request, asset_id): """ 以显示服务器类型资产详细为例,安全设备、存储设备、网络设备等参照此例。 :param request: :param asset_id: :return: """ asset = get_object_or_404(models.Asset, id=asset_id) return render(request, 'assets/d...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 628, 198, 198, 4299, 3703, 7, 25927, 11, 11171, 62, 312, 2599, 198, 220, 220, 220, 37227, 198, 220,...
1.70297
202
from typing import Any, Dict, List, Tuple from django.conf import settings from django.db.models.query import QuerySet from django.http import HttpRequest, HttpResponse from django.shortcuts import render from analytics.views.activity_common import ( format_date_for_activity_reports, get_user_activity_summary...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 309, 29291, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 22766, 1330, 43301, 7248, 198, 6738, 42625, 14208, 13, 4023, 1330, ...
3.173077
156
import string import numpy as np import os from torch.utils.data import Dataset from Bio.PDB import PDBParser # # read A3M and convert letters into # # integers in the 0..20 range # def parse_a3m(filename): # seqs = [] # table = str.maketrans(dict.fromkeys(string.ascii_lowercase)) # # # read file lin...
[ 11748, 4731, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 16024, 13, 5760, 33, 1330, 350, 11012, 46677, 628, 628, 628, 198, 198, 2, 1303, 1100, 317, 18...
2.009811
1,427
from .inference import compute_quantitative_and_qualitative_inference
[ 6738, 764, 259, 4288, 1330, 24061, 62, 40972, 12464, 62, 392, 62, 13255, 12464, 62, 259, 4288 ]
4.058824
17
"""Constants for Ferroamp""" import re CONF_INTERVAL = "interval" CONF_PRECISION_BATTERY = "precision_battery" CONF_PRECISION_CURRENT = "precision_current" CONF_PRECISION_ENERGY = "precision_energy" CONF_PRECISION_FREQUENCY = "precision_frequency" CONF_PRECISION_TEMPERATURE = "precision_temperature" CONF_PRECISION_VOL...
[ 37811, 34184, 1187, 329, 12880, 305, 696, 37811, 198, 11748, 302, 198, 198, 10943, 37, 62, 41358, 23428, 796, 366, 3849, 2100, 1, 198, 10943, 37, 62, 47, 38827, 42446, 62, 47379, 5781, 56, 796, 366, 3866, 16005, 62, 65, 16296, 1, 19...
2.880052
767
# author: Bartlomiej "furas" Burek (https://blog.furas.pl) # date: 2022.02.23 # [Uploading to anonfiles API with curl in python - Stack Overflow](https://stackoverflow.com/questions/71243221/uploading-to-anonfiles-api-with-curl-in-python/) import requests files = { 'file': ('file.txt', open('file.txt', 'rb')), }...
[ 2, 1772, 25, 13167, 75, 296, 494, 73, 366, 69, 17786, 1, 347, 495, 74, 357, 5450, 1378, 14036, 13, 69, 17786, 13, 489, 8, 198, 2, 3128, 25, 33160, 13, 2999, 13, 1954, 198, 2, 685, 41592, 278, 284, 281, 261, 16624, 7824, 351, 2...
2.659218
179
from .. import types, functions from ... import utils
[ 6738, 11485, 1330, 3858, 11, 5499, 198, 6738, 2644, 1330, 3384, 4487, 220, 198 ]
3.928571
14
# -*- coding: utf-8 -*- from __future__ import absolute_import def concatenate_path_pk(path, *args): """ Receive path and args and concatenate to create the path needed for an object query. Make sure parameters are plugged in in the right order. It must be aligned with the Bexio API, so the endpo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 628, 198, 4299, 1673, 36686, 378, 62, 6978, 62, 79, 74, 7, 6978, 11, 1635, 22046, 2599, 198, 220, 220, 220, 37227, 198,...
3.034146
205
# # Copyright (C) 2020 Arm Mbed. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # """Helpers for logging errors according to severity of the exception.""" from typing import Type, Optional, cast from types import TracebackType import logging from mbed_tools.lib.exceptions import ToolsError LOGGING_FORMAT =...
[ 2, 198, 2, 15069, 357, 34, 8, 12131, 7057, 337, 3077, 13, 1439, 2489, 10395, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 37811, 12621, 19276, 329, 18931, 8563, 1864, 284, 19440, 286, ...
2.688406
1,104
import pyrealsense2 as rs import numpy as np import cv2 import open3d as o3d import argparse import os from time import strftime #from cv_track import track import zipfile parser = argparse.ArgumentParser() parser.add_argument('--all_filters', type=bool, default=False, help='Enables all post-processing filters to enha...
[ 11748, 12972, 260, 874, 1072, 17, 355, 44608, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 1280, 18, 67, 355, 267, 18, 67, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 640, 1330, 965, 31387, 198, ...
2.398615
5,055
import numpy as np import tensorflow as tf
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 628 ]
3.285714
14
import os from unittest import TestCase from nose.tools import eq_ import tempfile import shutil import gzip from leisure import shuffle, disco from leisure.path import makedirs
[ 11748, 28686, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 9686, 13, 31391, 1330, 37430, 62, 198, 11748, 20218, 7753, 198, 11748, 4423, 346, 198, 11748, 308, 13344, 198, 198, 6738, 24638, 1330, 36273, 11, 4655, 198, 6738, 246...
3.714286
49
# MrNetTek # eddiejackson.net/blog # 10/14/2019 # free for public use # free to claim as your own import tkinter as tk import webbrowser # FUNCTION # FORM SETUP root = tk.Tk() root.geometry("350x300")# X Y root.resizable(0,0) root.title("") # button button = tk.Button(root, ...
[ 2, 1770, 7934, 51, 988, 201, 198, 2, 1225, 11979, 19650, 1559, 13, 3262, 14, 14036, 201, 198, 2, 838, 14, 1415, 14, 23344, 201, 198, 2, 1479, 329, 1171, 779, 220, 201, 198, 2, 1479, 284, 1624, 355, 534, 898, 201, 198, 201, 198, ...
1.934109
258
import os import sys import shutil from ne import Host from ne import Container from os.path import expanduser root = os.path.join(os.path.dirname(os.path.abspath(__file__))) data = os.path.join(root, 'data') HOME = expanduser("~") DEFAULT_CONFIGURATION_PATH = os.path.join(HOME, ".ndocker") @_verify_host_cfg ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 6738, 497, 1330, 14504, 198, 6738, 497, 1330, 43101, 198, 6738, 28686, 13, 6978, 1330, 4292, 7220, 198, 198, 15763, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15...
2.6875
128
# coding=utf-8 from .alerts import twilio_alert, email_alert, beep_alert, msgbox_alert import os try: # >3.2 from configparser import ConfigParser except ImportError: # python27 # Refer to the older SafeConfigParser as ConfigParser from ConfigParser import SafeConfigParser as ConfigParser from iot...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 764, 44598, 82, 1330, 665, 346, 952, 62, 44598, 11, 3053, 62, 44598, 11, 307, 538, 62, 44598, 11, 31456, 3524, 62, 44598, 198, 11748, 28686, 198, 28311, 25, 198, 220, 220, 220, 1303, 18...
3.390071
141
# -*- coding: utf-8 -*- from collections import OrderedDict import theano import theano.tensor as T import numpy as np # Ours from ..layers import dropout, tanh, get_new_layer from ..defaults import INT, FLOAT from ..nmtutils import norm_weight from ..iterators.mnmt import MNMTIterator from .attention import Model ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 262, 5733, 198, 11748, 262, 5733, 13, 83, 22854, 355, 309, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, ...
3.887218
133
from .logic import main main()
[ 6738, 764, 6404, 291, 1330, 1388, 198, 198, 12417, 3419 ]
3.1
10
import common lines = common.read_file('2015/18/data.txt').splitlines() initial_state = [] for line in lines: row = [] for c in line: val = 1 if c == '#' else 0 row.append(val) initial_state.append(row) w = len(initial_state[0]) h = len(initial_state) current = initial_state steps = 100...
[ 11748, 2219, 198, 198, 6615, 796, 2219, 13, 961, 62, 7753, 10786, 4626, 14, 1507, 14, 7890, 13, 14116, 27691, 35312, 6615, 3419, 198, 198, 36733, 62, 5219, 796, 17635, 198, 198, 1640, 1627, 287, 3951, 25, 198, 220, 220, 220, 5752, 7...
2.47561
246
from PyQt5 import QtWidgets as QtW class TvException(Exception): """ docstring """
[ 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 355, 33734, 54, 198, 198, 4871, 309, 85, 16922, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2205, 8841, 198, 220, 220, 220, 37227 ]
2.5
38
#!/bin/python3 # Twitter 2019 Internship Coding Interview Round s = "I am using HackerRank to improve programming" t = "am HackerRank to improve" missingWords(s, t)
[ 2, 48443, 8800, 14, 29412, 18, 198, 2, 3009, 13130, 2445, 6720, 327, 7656, 19371, 10485, 628, 198, 82, 796, 366, 40, 716, 1262, 34399, 27520, 284, 2987, 8300, 1, 198, 83, 796, 366, 321, 34399, 27520, 284, 2987, 1, 198, 45688, 37117,...
3.408163
49
#!/usr/bin/env python import socket import thread print 'Setting up server...' server_port = 12000 server_name = 'localhost' handshake_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) handshake_socket.bind((server_name, server_port)) handshake_socket.listen(50) print 'Server address =', handshake_socket....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 17802, 198, 11748, 4704, 198, 198, 4798, 705, 34149, 510, 4382, 986, 6, 198, 198, 15388, 62, 634, 796, 1105, 830, 198, 15388, 62, 3672, 796, 705, 36750, 6, 198, 198, 4993...
3.087719
171
import json import logging import threading import time from qqbot import QQBot from qqbot.qqfeed import QQFeed from robot_ctl.singleton import Singleton loginQQBots = {} loginQRcode = {} logger = logging.getLogger(__name__)
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 11748, 640, 198, 198, 6738, 10662, 80, 13645, 1330, 1195, 48, 20630, 198, 6738, 10662, 80, 13645, 13, 38227, 12363, 1330, 1195, 48, 18332, 198, 198, 6738, 9379, 62, 34168, 13,...
2.974359
78
from app import db verify = input("are you sure you want to drop all tables? [y/n]") if verify == 'y': db.drop_all()
[ 6738, 598, 1330, 20613, 198, 198, 332, 1958, 796, 5128, 7203, 533, 345, 1654, 345, 765, 284, 4268, 477, 8893, 30, 685, 88, 14, 77, 60, 4943, 198, 361, 11767, 6624, 705, 88, 10354, 198, 220, 220, 220, 20613, 13, 14781, 62, 439, 341...
2.711111
45
from .intrinsics import * from .abs import * from .prescr import *
[ 6738, 764, 600, 81, 1040, 873, 1330, 1635, 198, 6738, 764, 8937, 1330, 1635, 198, 6738, 764, 18302, 6098, 1330, 1635, 198 ]
3.045455
22
import argparse import collections import glob import json import multiprocessing import os.path if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 17268, 198, 11748, 15095, 198, 11748, 33918, 198, 11748, 18540, 305, 919, 278, 198, 11748, 28686, 13, 6978, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220...
3.181818
44
import os import math from os import listdir from os.path import isfile, join import shutil import matplotlib.pyplot as plt import numpy as np import pandas as pd HPCDir = '/groups/achilli/EPRI/' localDir = os.getcwd() deployPath = localDir + '/deploy/' dataPath = deployPath + '/data/' meshPath = deployPath + '/assets...
[ 11748, 28686, 198, 11748, 10688, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 11748, 4423, 346, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 35...
2.396072
1,222
import testinfra import pytest @pytest.fixture()
[ 11748, 1332, 10745, 430, 198, 11748, 12972, 9288, 198, 198, 31, 9078, 9288, 13, 69, 9602, 3419, 198 ]
2.777778
18
import unittest import m10 test_jolts1 = '''\ 16 10 15 5 1 11 7 19 6 12 4''' test_jolts2 = '''\ 28 33 18 42 31 14 46 20 48 47 24 23 49 45 19 38 39 11 1 32 25 35 8 17 7 9 4 2 34 10 3'''
[ 11748, 555, 715, 395, 198, 11748, 285, 940, 198, 198, 9288, 62, 73, 349, 912, 16, 796, 705, 7061, 59, 198, 1433, 198, 940, 198, 1314, 198, 20, 198, 16, 198, 1157, 198, 22, 198, 1129, 198, 21, 198, 1065, 198, 19, 7061, 6, 198, ...
1.553719
121
from swagger_server.models.model_info import ModelInfo # noqa: E501 import six def list_models_get(): # noqa: E501 """Reruns list of models from model storage # noqa: E501 :rtype: List[ModelInfo] """ return 'do some magic!'
[ 6738, 1509, 7928, 62, 15388, 13, 27530, 13, 19849, 62, 10951, 1330, 9104, 12360, 220, 1303, 645, 20402, 25, 412, 33548, 198, 11748, 2237, 198, 198, 4299, 1351, 62, 27530, 62, 1136, 33529, 220, 1303, 645, 20402, 25, 412, 33548, 198, 22...
2.642105
95
from django.conf import settings from django.contrib.auth import get_user_model from django.core.mail import EmailMultiAlternatives from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth.models import Group from django.template.loader import render_to_string from dj...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 9570, 29800, 23081, 2929, 198, 6738, 42625, 14208, 13, 9945...
2.772876
612
syntax = r'^(?:\%|\+eval )(?P<statement>.+)$' eval.safe = False eval.complete = True
[ 1837, 41641, 796, 374, 6, 61, 7, 30, 7479, 4, 91, 59, 10, 18206, 1267, 7, 30, 47, 27, 26090, 28401, 28988, 3, 6, 198, 198, 18206, 13, 21230, 796, 10352, 198, 18206, 13, 20751, 796, 6407, 198 ]
2.263158
38
# ***************************************************************************** # Copyright 2017 Karl Einar Nelson # # 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...
[ 2, 41906, 17174, 4557, 35625, 198, 2, 220, 220, 15069, 2177, 15415, 412, 22050, 12996, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, ...
3.89083
229
"""Tests for d_n method""" import ad import pytest import numpy as np from math import pi
[ 37811, 51, 3558, 329, 288, 62, 77, 2446, 37811, 198, 11748, 512, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 10688, 1330, 31028, 628, 198 ]
3.172414
29
import pathlib as pl import json import click import kml2geojson.main as m @click.command(short_help="Convert KML to GeoJSON") @click.argument('kml_path', type=click.Path(exists=True)) @click.argument('output_dir') @click.option('-st', '--style-type', type=click.Choice(m.STYLE_TYPES), default=None) @click.option('...
[ 11748, 3108, 8019, 355, 458, 198, 11748, 33918, 198, 198, 11748, 3904, 198, 198, 11748, 479, 4029, 17, 469, 13210, 1559, 13, 12417, 355, 285, 628, 198, 31, 12976, 13, 21812, 7, 19509, 62, 16794, 2625, 3103, 1851, 509, 5805, 284, 32960...
2.774286
700
""" Copyright 2012-2019 Ministerie van Sociale Zaken en Werkgelegenheid 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...
[ 37811, 198, 15269, 2321, 12, 23344, 4139, 494, 5719, 5483, 68, 1168, 1685, 551, 370, 9587, 469, 1455, 268, 28420, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 40...
2.531561
1,505
from contextlib import suppress FACTOR = (24*60*60) + (39*60) + 35.244 if __name__ == '__main__': with suppress(ValueError): marsdays = int(input("geef het aantal Marsdagen(sol):\n")) #reken het ingevoerde aantal sol dagen om naar seconden op aarde earth_seconds = marsdays * FACTOR ...
[ 6738, 4732, 8019, 1330, 18175, 198, 37, 10659, 1581, 796, 357, 1731, 9, 1899, 9, 1899, 8, 1343, 357, 2670, 9, 1899, 8, 1343, 3439, 13, 25707, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, ...
2.234375
384
from translation_manager import utils def get_dirname_from_lang(lang): "Converts lang in format en-gb to format en_GB" return lang def get_lang_from_dirname(dirname): "Converts lang in format en_GB to format en-gb" return dirname utils.get_dirname_from_lang = get_dirname_from_lang utils.get_lang...
[ 6738, 11059, 62, 37153, 1330, 3384, 4487, 628, 198, 4299, 651, 62, 15908, 3672, 62, 6738, 62, 17204, 7, 17204, 2599, 198, 220, 220, 220, 366, 3103, 24040, 42392, 287, 5794, 551, 12, 22296, 284, 5794, 551, 62, 4579, 1, 628, 220, 220,...
2.763359
131
# Generated by Django 3.0.3 on 2020-08-13 16:53 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 18, 319, 12131, 12, 2919, 12, 1485, 1467, 25, 4310, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import nltk from nltk.stem import WordNetLemmatizer lemmatizer = WordNetLemmatizer() import pickle import numpy as np from datetime import datetime from keras.models import load_model model = load_model('chatbot_model.h5') #Load trained model output from train_chatbot.py as an input to chatgui.py import json import ra...
[ 11748, 299, 2528, 74, 198, 6738, 299, 2528, 74, 13, 927, 1330, 9678, 7934, 43, 368, 6759, 7509, 198, 293, 3020, 265, 7509, 796, 9678, 7934, 43, 368, 6759, 7509, 3419, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 6...
2.722304
677
# encoding: utf-8 from sys import path from os.path import dirname as dir path.append(dir(path[0])) from configurations import bot_config from . import mongo_connection as mongo
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 25064, 1330, 3108, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 355, 26672, 198, 198, 6978, 13, 33295, 7, 15908, 7, 6978, 58, 15, 60, 4008, 198, 198, 6738, 25412, 1330, 10214, 62, 11250, ...
3.272727
55
# Copyright (c) 2018, INRIA # Copyright (c) 2018, University of Lille # 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 must retain the above copyright notice, thi...
[ 2, 15069, 357, 66, 8, 2864, 11, 3268, 49, 3539, 198, 2, 15069, 357, 66, 8, 2864, 11, 2059, 286, 406, 8270, 198, 2, 1439, 2489, 10395, 13, 198, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, ...
2.919969
2,574
# Copyright 2010 Fluidinfo 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 writing, ...
[ 2, 15069, 3050, 1610, 27112, 10951, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 198, 2, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 220, ...
3.897233
253
import enum from typing import Optional from flask import current_app from itsdangerous import TimedJSONWebSignatureSerializer from werkzeug.security import generate_password_hash, check_password_hash from utils.sql import AwareDateTime, tz_aware_now, ResourceMixin from world_manager.extensions import db
[ 11748, 33829, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 663, 38537, 516, 1330, 5045, 276, 40386, 13908, 11712, 1300, 32634, 7509, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, ...
3.662791
86
import math x = float(input('Nhập x: ')) y = float(input('Nhập y: ')) z = float(input('Nhập z: ')) F = (x + y + z)/(x**2 + y**2 + 1) - abs(x - z * math.cos(y)) print(f'F = {round(F,3)}')
[ 11748, 10688, 201, 198, 201, 198, 87, 796, 12178, 7, 15414, 10786, 45, 71, 157, 118, 255, 79, 2124, 25, 705, 4008, 201, 198, 88, 796, 12178, 7, 15414, 10786, 45, 71, 157, 118, 255, 79, 331, 25, 705, 4008, 201, 198, 89, 796, 1217...
1.743363
113
from django.shortcuts import render from rest_framework.viewsets import ModelViewSet from rest_framework.authentication import TokenAuthentication from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from rest_framework.permissions import IsAuthenticated from acco...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1334, 62, 30604, 13, 1177, 28709, 1330, 9104, 7680, 7248, 198, 6738, 1334, 62, 30604, 13, 41299, 3299, 1330, 29130, 47649, 3299, 198, 6738, 1334, 62, 30604, 13, 18439, 30001, ...
4.462185
119
# Copyright 2020 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 12131, 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.892384
604
import numpy as np from scrawl.utils import get_percentile if __name__ == '__main__': test_plims(np.random.randn(1000))
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 629, 13132, 13, 26791, 1330, 651, 62, 25067, 576, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1332, 62, 489, 12078, 7, 37659, 13, 25120, ...
2.612245
49
#!/usr/bin/env python3 # # Copyright 2018 Trend Micro and contributors. # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 2864, 22836, 4527, 290, 20420, 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,...
2.582243
2,523
from django.conf.urls import url from timepiece.contracts import views urlpatterns = [ # Contracts url(r'^contract/$', views.ContractList.as_view(), name='list_contracts'), url(r'^contract/(?P<contract_id>\d+)/$', views.ContractDetail.as_view(), name='view_contract'), ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 640, 12239, 13, 28484, 82, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 1303, 49199, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 28484, ...
2.068759
669
#!/usr/bin/env python3 import setuptools setuptools.setup()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 900, 37623, 10141, 628, 198, 2617, 37623, 10141, 13, 40406, 3419, 198 ]
2.625
24
from typing import * from grapl_analyzerlib.nodes.comparators import IntCmp, _int_cmps, StrCmp from grapl_analyzerlib.nodes.process_node import ProcessView from grapl_analyzerlib.nodes.types import PropertyT from grapl_analyzerlib.nodes.viewable import EdgeViewT, ReverseEdgeView from grapl_analyzerlib.prelude import D...
[ 6738, 19720, 1330, 1635, 198, 198, 6738, 7933, 489, 62, 38200, 9107, 8019, 13, 77, 4147, 13, 785, 1845, 2024, 1330, 2558, 34, 3149, 11, 4808, 600, 62, 11215, 862, 11, 4285, 34, 3149, 198, 6738, 7933, 489, 62, 38200, 9107, 8019, 13, ...
3.004808
208
""" tinygame A verylightweight educational library for creating simple text based games. It is intended to be useful while being fully understandable in terms of the details on how it works. Games can be programmed making use of CharacterMaps and CharacterDisplays (See character_map.py and character_display.py) as wel...
[ 37811, 198, 44152, 6057, 198, 32, 845, 2971, 6551, 9856, 5888, 329, 4441, 2829, 2420, 1912, 1830, 13, 198, 1026, 318, 5292, 284, 307, 4465, 981, 852, 3938, 21977, 287, 2846, 286, 262, 3307, 319, 703, 340, 2499, 13, 198, 24474, 460, ...
3.228655
3,420
from django.shortcuts import render, redirect from django.http import HttpResponse from django.template import loader from django.contrib import messages from .forms import OfficerForm
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 28243, 1330, 40213, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 198, 6738, ...
4.065217
46
'''============================================================= c:/1work/Python/djcode/pjtk2/migration/Django_sqlite_to_pg.py Created: 15 Nov 2013 14:38:55 DESCRIPTION: This scripts uses the django orm to migrate data from an sqlite database to postgres. It essentailly emulates the scripts that migrates data from ...
[ 7061, 6, 10052, 4770, 25609, 28, 198, 66, 14079, 16, 1818, 14, 37906, 14, 28241, 8189, 14, 79, 73, 30488, 17, 14, 76, 4254, 14, 35, 73, 14208, 62, 25410, 578, 62, 1462, 62, 6024, 13, 9078, 198, 41972, 25, 1315, 5267, 2211, 1478, ...
2.293239
4,955
import time import numpy as np import tensorflow as tf import ops from config import config from mac_cell import MACCell """ The MAC network model. It performs reasoning processes to answer a question over knowledge base (the image) by decomposing it into attention-based computational steps, each perform by a recur...
[ 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 11748, 39628, 198, 6738, 4566, 1330, 4566, 198, 6738, 8352, 62, 3846, 1330, 20582, 28780, 628, 198, 37811, 198, 464, 20582, 3127, ...
3.207599
2,895
from chatbot_lib import *
[ 6738, 8537, 13645, 62, 8019, 1330, 1635, 198, 220, 220, 220, 220, 628, 628, 628, 628, 628, 628, 628 ]
2.315789
19
import random from textblob import TextBlob from textblob.np_extractors import ConllExtractor extractor = ConllExtractor() random_responses = ["That is quite interesting, please tell me more.", "I see. Do go on.", "Why do you say that?", "Funny weather we'v...
[ 11748, 4738, 198, 6738, 2420, 2436, 672, 1330, 8255, 3629, 672, 198, 6738, 2420, 2436, 672, 13, 37659, 62, 2302, 974, 669, 1330, 1482, 297, 11627, 40450, 198, 198, 2302, 40450, 796, 1482, 297, 11627, 40450, 3419, 628, 198, 25120, 62, ...
2.155977
686
import pathlib from setuptools import setup exec(open('typo/version.py').read()) # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE/"README.md").read_text() setup( name='typo', version=__version__, description='A python package to simul...
[ 11748, 3108, 8019, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 18558, 7, 9654, 10786, 774, 7501, 14, 9641, 13, 9078, 27691, 961, 28955, 198, 198, 2, 383, 8619, 7268, 428, 2393, 198, 39, 9338, 796, 3108, 8019, 13, 15235, 7, 8...
2.814332
307
from math import sqrt, fsum, pi, exp, cos, sin, floor, isclose from decimal import Decimal import io import pickle as pk import matplotlib.pyplot as plt import numpy as np import cmath as cm from mpl_toolkits.mplot3d import Axes3D import matplotlib.animation as animation import h5py as h5 import sys import traceback fr...
[ 6738, 10688, 1330, 19862, 17034, 11, 277, 16345, 11, 31028, 11, 1033, 11, 8615, 11, 7813, 11, 4314, 11, 318, 19836, 198, 6738, 32465, 1330, 4280, 4402, 198, 11748, 33245, 198, 11748, 2298, 293, 355, 279, 74, 198, 11748, 2603, 29487, 8...
1.944245
3,067
"""OCP09 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based v...
[ 37811, 4503, 47, 2931, 10289, 28373, 198, 198, 464, 4600, 6371, 33279, 82, 63, 1351, 11926, 32336, 284, 5009, 13, 1114, 517, 1321, 3387, 766, 25, 198, 220, 220, 220, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268...
2.540795
956
""" Author : Abdullah Al Masud\n email : abdullahalmasud.buet@gmail.com\n LICENSE : MIT License """ import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name="msdlib", version=parse_version(), author="Abdullah Al Masud", author_ema...
[ 37811, 201, 198, 13838, 1058, 26804, 978, 11066, 463, 59, 77, 201, 198, 12888, 1058, 450, 23969, 282, 5356, 463, 13, 11110, 316, 31, 14816, 13, 785, 59, 77, 201, 198, 43, 2149, 24290, 1058, 17168, 13789, 201, 198, 37811, 201, 198, 2...
2.522599
354
# Copyright 2012 Google Inc. All Rights Reserved. """A script that symbolizes perf.data files.""" import optparse import os import shutil from subprocess import call from subprocess import PIPE from subprocess import Popen from cros_utils import misc GSUTIL_CMD = 'gsutil cp gs://chromeos-image-archive/%s-release/%s/de...
[ 2, 15069, 2321, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 37811, 32, 4226, 326, 6194, 4340, 23035, 13, 7890, 3696, 526, 15931, 198, 11748, 2172, 29572, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 850, 14681, 1330, 869, 198, ...
2.702545
1,375
#!/usr/bin/env python # -*- coding: latin-1 -*- # # @module towers.core # @version 0.1 # @copyright (c) 2017-present Francis Horsman.
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3042, 259, 12, 16, 532, 9, 12, 198, 2, 198, 2, 2488, 21412, 18028, 13, 7295, 198, 2, 2488, 9641, 657, 13, 16, 198, 2, 2488, 22163, 4766, 357, 66, 8, ...
2.436364
55
# -*- coding: utf-8 -*- """ 加载测试用例并测试 :create: 2018/9/23 :copyright: smileboywtu """ import sys import time import unittest from io import StringIO from unittest import TextTestRunner def load_tests(dir_name): """ 从文件夹中加载测试用例 :param dir_name: 文件夹名字 :return: """ return unittest.TestL...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 198, 27950, 254, 164, 121, 121, 38184, 233, 46237, 243, 18796, 101, 160, 122, 233, 33176, 35050, 113, 233, 46237, 243, 198, 198, 25, 17953, 25, 2864, ...
1.984127
252
# -*- coding: utf-8 -*- from app.marshmallow import fields from app.schemas import BaseSchema
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 598, 13, 76, 5406, 42725, 1330, 7032, 198, 6738, 598, 13, 1416, 4411, 292, 1330, 7308, 27054, 2611, 628 ]
2.794118
34
from flask import * from . import db from .models import * import datetime student = Blueprint('student',__name__) @student.route('/',methods=["GET"]) @student.route('/course',methods=["GET"]) @student.route('/exam',methods=["GET","POST"]) @student.route('/question',methods=["GET","POST"])
[ 6738, 42903, 1330, 1635, 198, 6738, 764, 1330, 20613, 198, 6738, 764, 27530, 1330, 1635, 198, 11748, 4818, 8079, 198, 50139, 796, 39932, 10786, 50139, 3256, 834, 3672, 834, 8, 198, 198, 31, 50139, 13, 38629, 10786, 14, 3256, 24396, 82, ...
2.882353
102
from browser import document import brySVG.transformcanvas as SVG canvas = SVG.CanvasObject("95vw", "100%", "cyan") document["demo3"] <= canvas canvas.mouseMode = SVG.MouseMode.TRANSFORM tiles = [SVG.ClosedBezierObject([((-100,50), (50,100), (200,50)), ((-100,50), (50,0), (200,50))]), SVG.GroupObject([SVG.Pol...
[ 6738, 6444, 1330, 3188, 198, 11748, 275, 563, 50, 43490, 13, 35636, 5171, 11017, 355, 45809, 198, 198, 5171, 11017, 796, 45809, 13, 6090, 11017, 10267, 7203, 3865, 85, 86, 1600, 366, 3064, 4, 1600, 366, 948, 272, 4943, 198, 22897, 146...
2.078505
535
import sys import time import os import multiprocessing def worker(): """worker function""" for n in range(5): print "waiting" + "." * n time.sleep(1) if __name__ == '__main__': sys.executable = sys.executable.replace("maya.exe", "mayapy.exe") sys.exec_prefix = os.path.dirname(sys.e...
[ 11748, 25064, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 18540, 305, 919, 278, 628, 198, 4299, 8383, 33529, 198, 220, 220, 220, 37227, 28816, 2163, 37811, 198, 220, 220, 220, 329, 299, 287, 2837, 7, 20, 2599, 198, 220, 220, 220, ...
2.285714
273
# Copyright (c) 2016 Red Hat Inc # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # General networking tools that may be used by all modules from __future__ import (absolute_import, division, print_function) __metaclass__ = type import re from struct import p...
[ 2, 15069, 357, 66, 8, 1584, 2297, 10983, 3457, 198, 2, 45157, 1431, 347, 10305, 13789, 357, 3826, 16625, 14, 14323, 489, 1431, 62, 1443, 67, 13, 14116, 393, 3740, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 21800, 12, 17, 12, ...
2.443675
1,589
import pathlib import datetime import json from runrex.post.variable_builder import build_variables def main(file, metafile, output_directory=None, extra_condition=None, variable_file=None): """ :param extra_condition: :param variable_file: :param file: :param metafile: :param output_directo...
[ 11748, 3108, 8019, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 198, 6738, 1057, 21510, 13, 7353, 13, 45286, 62, 38272, 1330, 1382, 62, 25641, 2977, 628, 198, 4299, 1388, 7, 7753, 11, 1138, 1878, 576, 11, 5072, 62, 34945, 28, 14202...
2.42316
924
a = A([2, 4]) for z in a: print(z) for z in b([2, 4]): print(z)
[ 198, 198, 64, 796, 317, 26933, 17, 11, 604, 12962, 198, 1640, 1976, 287, 257, 25, 198, 220, 220, 220, 3601, 7, 89, 8, 198, 198, 1640, 1976, 287, 275, 26933, 17, 11, 604, 60, 2599, 198, 220, 220, 220, 3601, 7, 89, 8, 198 ]
1.666667
45
from dataclasses import dataclass import pytest from django.conf import settings from django.contrib.auth.models import AnonymousUser, Group, User from guardian.shortcuts import get_perms from grandchallenge.cases.permissions import ImagePermission from tests.algorithms_tests.factories import AlgorithmJobFactory from...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 19200, 12982, 11, 4912, 11, 11787, 198, 67...
3.299435
177
import ast from ..converter import VKScriptConverter @VKScriptConverter.register(ast.Dict) @VKScriptConverter.register(ast.List) @VKScriptConverter.register(ast.Tuple) @VKScriptConverter.register(ast.Num) @VKScriptConverter.register(ast.Str) @VKScriptConverter.register(ast.Constant) @VKScriptConverter.re...
[ 11748, 6468, 198, 198, 6738, 11485, 1102, 332, 353, 1330, 45917, 7391, 3103, 332, 353, 628, 198, 31, 47191, 7391, 3103, 332, 353, 13, 30238, 7, 459, 13, 35, 713, 8, 628, 198, 31, 47191, 7391, 3103, 332, 353, 13, 30238, 7, 459, 13,...
2.738095
126