content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 # -*-coding:utf-8 -*- import os import time from colorama import init from termcolor import cprint init()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 3124, 1689, 1330, 2315, 198, 6738, 3381, 8043, 1330, 269, 4798, 628, 198,...
2.808511
47
# Import the rebound module import sys import matplotlib; matplotlib.use("pdf") import matplotlib.pyplot as plt from matplotlib import ticker from matplotlib.colors import LogNorm import rebound import numpy as np import time from rebound.interruptible_pool import InterruptiblePool import warnings Ngrid = 500 #3dt = 1...
[ 2, 17267, 262, 23623, 8265, 198, 11748, 25064, 198, 11748, 2603, 29487, 8019, 26, 2603, 29487, 8019, 13, 1904, 7203, 12315, 4943, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 4378, 26...
2.335294
1,020
from typing import Any, Dict, Optional import torch import numpy as np from theseus.base.metrics.metric_template import Metric class DiceScore(Metric): """ Dice score metric for segmentation num_classes: `int` number of classes eps: `float` epsilon to avoid zero division thresh: `float...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 32233, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 777, 385, 13, 8692, 13, 4164, 10466, 13, 4164, 1173, 62, 28243, 1330, 3395, 1173, 198, 198, 4871, 34381, 26595, 7, 917...
2.240909
660
""" monodromy/io/lrcalc.py Extracts quantum Littlewood-Richardson coefficients from the package `lrcalc`. This package is cumbersome to install, so we provide a prebaked copy of this table in `qlr_table.py`. """ from copy import copy import lrcalc def qlr(r, k, a, b): """ Computes the quantum Littlewood-R...
[ 37811, 198, 2144, 375, 50228, 14, 952, 14, 75, 6015, 282, 66, 13, 9078, 198, 198, 11627, 974, 82, 14821, 7703, 3822, 12, 14868, 1371, 261, 44036, 422, 262, 5301, 4600, 75, 6015, 282, 66, 44646, 198, 198, 1212, 5301, 318, 44491, 284,...
2.142018
1,021
import pandas as pd import numpy as np import datetime import os import re from os import listdir from os.path import isfile, join import matplotlib.pyplot as plt import seaborn as sns @profile def date_time_converter(date_time_list): """ This function gets the numpy array with date_time in matlab format ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 11748, 260...
2.489472
2,707
# -*- coding: utf-8 -*- from gi.repository import GObject as gobject, Gst as gst, Gtk as gtk, GdkX11, GstVideo import platform import logging log = logging.getLogger(__name__)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 402, 10267, 355, 48484, 752, 11, 402, 301, 355, 308, 301, 11, 402, 30488, 355, 308, 30488, 11, 402, 34388, 55, 1157, ...
2.557143
70
import unittest import requests_mock import rxv FAKE_IP = '10.0.0.0' DESC_XML = 'http://%s/YamahaRemoteControl/desc.xml' % FAKE_IP CTRL_URL = 'http://%s/YamahaRemoteControl/ctrl' % FAKE_IP
[ 11748, 555, 715, 395, 198, 11748, 7007, 62, 76, 735, 198, 11748, 374, 87, 85, 198, 198, 7708, 7336, 62, 4061, 796, 705, 940, 13, 15, 13, 15, 13, 15, 6, 198, 30910, 34, 62, 55, 5805, 796, 705, 4023, 1378, 4, 82, 14, 56, 321, ...
2.232558
86
# Copyright (c) 2016 CEF Python, see the Authors file. # All rights reserved. Licensed under BSD 3-clause license. # Project website: https://github.com/cztomczak/cefpython """Create Table of contents (TOC) for a single .md file or for a directory. Usage: toc.py FILE toc.py DIR To ignore file when generating...
[ 2, 15069, 357, 66, 8, 1584, 18671, 37, 11361, 11, 766, 262, 46665, 2393, 13, 198, 2, 1439, 2489, 10395, 13, 49962, 739, 347, 10305, 513, 12, 565, 682, 5964, 13, 198, 2, 4935, 3052, 25, 3740, 1378, 12567, 13, 785, 14, 26691, 39532,...
2.15522
2,912
from mythic_payloadtype_container.MythicCommandBase import * import json
[ 6738, 7918, 291, 62, 15577, 2220, 4906, 62, 34924, 13, 41444, 291, 21575, 14881, 1330, 1635, 198, 11748, 33918, 628, 198 ]
3.571429
21
''' jpg.py <alexmichael@uchicago.edu> Description: Prototype of polyglot generator. TODO: - [ ] Build the least significant bit layer injector ''' import struct import re import random if __name__ == '__main__': main() # read() # test()
[ 7061, 6, 198, 9479, 13, 9078, 198, 27, 1000, 87, 76, 40302, 31, 794, 4549, 13, 15532, 29, 198, 198, 11828, 25, 48954, 286, 7514, 4743, 313, 17301, 13, 198, 198, 51, 3727, 46, 25, 198, 197, 12, 685, 2361, 10934, 262, 1551, 2383, ...
2.788889
90
'''Winny Node. ''' # # Copyright (c) 2006 Pyny Project. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list...
[ 7061, 6, 16643, 3281, 19081, 13, 198, 7061, 6, 198, 2, 198, 2, 15069, 357, 66, 8, 4793, 350, 2047, 88, 4935, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 3...
2.410115
1,819
# This is the program to run ping test on local network # XC.Li @ Apr.10 2018 # read in ping_list and ping_config ping_list, ping_config = start_up("ping_list.txt", "ping_config.txt") print(ping_list) print(ping_config)
[ 2, 770, 318, 262, 1430, 284, 1057, 29400, 1332, 319, 1957, 3127, 201, 198, 2, 1395, 34, 13, 32304, 2488, 2758, 13, 940, 2864, 201, 198, 201, 198, 201, 198, 2, 1100, 287, 29400, 62, 4868, 290, 29400, 62, 11250, 201, 198, 201, 198, ...
2.593407
91
import sys from schools3.config import base_config config = base_config.Config() config.num_features = 10 sys.modules[__name__] = config
[ 11748, 25064, 198, 6738, 4266, 18, 13, 11250, 1330, 2779, 62, 11250, 198, 198, 11250, 796, 2779, 62, 11250, 13, 16934, 3419, 198, 198, 11250, 13, 22510, 62, 40890, 796, 838, 198, 198, 17597, 13, 18170, 58, 834, 3672, 834, 60, 796, 4...
3.181818
44
#!/usr/bin/env python import argparse import math import sys from concurrent.futures import ThreadPoolExecutor, as_completed import boto3 from tqdm.auto import tqdm client = boto3.client("s3") objects = [] parser = argparse.ArgumentParser(description="Delete files from S3") parser.add_argument("--bucket", help="The...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 10688, 198, 11748, 25064, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 11, 355, 62, 785, 16838, 198, 198, 11748, 275, 2069, ...
2.3922
1,359
#!/usr/bin/env python3 import configparser import getpass import logging import os import sys from dataclasses import InitVar, dataclass from datetime import date, datetime, timedelta from pathlib import Path import pandas as pd import pyodbc from prometheus_client import CollectorRegistry, Gauge, push_to_gateway fro...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 4566, 48610, 198, 11748, 651, 6603, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 4818, 330, 28958, 1330, 44707, 19852, 11, 4818, 330, 31172, 198, 6...
3.052209
249
# -*- coding: utf-8 -*- """ This module is used for testing the functions within the pyhpeimc.plat.system module. """ from unittest import TestCase from pyhpeimc.plat.system import * from test_machine import auth # get_system_category # get_system_device_models # get_system_series # Section deals with devic...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1212, 8265, 318, 973, 329, 4856, 262, 5499, 1626, 262, 12972, 71, 431, 320, 66, 13, 489, 265, 13, 10057, 8265, 13, 198, 198, 37811, 198, 198, 6738, 555, ...
2.350769
650
import argparse import math import os import subprocess if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 850, 14681, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.911765
34
from flask import Flask, render_template, redirect, url_for, flash from flask_bootstrap import Bootstrap from flask_ckeditor import CKEditor from flask_login import login_user, LoginManager, current_user, logout_user, login_required from werkzeug.security import generate_password_hash, check_password_hash from dotenv i...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 7644, 198, 6738, 42903, 62, 18769, 26418, 1330, 18892, 26418, 198, 6738, 42903, 62, 694, 35352, 1330, 327, 7336, 67, 2072, 198, 6738, 42903, 62, 38235, ...
2.745234
577
#coding: utf-8 from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.support.ui import WebDriverWait fro...
[ 2, 66, 7656, 25, 3384, 69, 12, 23, 201, 198, 201, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 6738, 3992, 26230, 62, 37153, 13, 46659, 1330, 13282, 32103, 13511, 201, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, ...
2.913525
451
from functools import partial from unittest import TestCase, main from expects import expect, equal from questions_three.exceptions import InvalidConfiguration from twin_sister.expects_matchers import complain from twin_sister import open_dependency_context from questions_three.module_cfg.module_cfg import ModuleCfg ...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 11, 1388, 198, 198, 6738, 13423, 1330, 1607, 11, 4961, 198, 6738, 2683, 62, 15542, 13, 1069, 11755, 1330, 17665, 38149, 198, 6738, 15203, 62, 82, 1694, ...
3.518519
108
# 找到字符串中所有字母异位词
[ 2, 10545, 231, 122, 26344, 108, 27764, 245, 163, 105, 99, 10310, 110, 40792, 33699, 222, 17312, 231, 27764, 245, 162, 107, 235, 28156, 224, 19526, 235, 46237, 235 ]
0.517241
29
import torch import torch.nn as nn import torch.nn.functional as F # from pytorch_pretrained_bert import BertModel from transformers.modeling_bert import BertModel from accuracy_tool import single_label_top1_accuracy #20200621, bert -> dropout -> conv -> linear -> bn -> softmax: acc=14.42
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 2, 422, 12972, 13165, 354, 62, 5310, 13363, 62, 4835, 1330, 22108, 17633, 198, 6738, 6121, 364, 13, 4666, 10809, 62, 483...
3.280899
89
"""Redis Semaphore lock.""" import os import time SYSTEM_LOCK_ID = 'SYSTEM_LOCK' class Semaphore(object): """Semaphore lock using Redis ZSET.""" def __init__(self, redis, name, lock_id, timeout, max_locks=1): """ Semaphore lock. Semaphore logic is implemented in the lua/semaphore.l...
[ 37811, 7738, 271, 12449, 6570, 382, 5793, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 640, 198, 198, 23060, 25361, 62, 36840, 62, 2389, 796, 705, 23060, 25361, 62, 36840, 6, 628, 198, 4871, 12449, 6570, 382, 7, 15252, 2599, 198, 2...
2.307692
1,365
__title__ = 'htms_low_api' __version__ = '2.3.1' __author__ = 'Arslan Aliev' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright (c) 2018-2021 Arslan S. Aliev' from .htms_par_low import ( PAGESIZE1, NUMPAGES1, MAXSTRLEN1, PAGESIZE2, NUMPAGES2, SERVER_IP_DNS, MAIN_SERVER_PORT, HTDB_ROOT,...
[ 198, 834, 7839, 834, 796, 705, 4352, 907, 62, 9319, 62, 15042, 6, 198, 834, 9641, 834, 796, 705, 17, 13, 18, 13, 16, 6, 198, 834, 9800, 834, 796, 705, 3163, 6649, 272, 978, 11203, 6, 198, 834, 43085, 834, 796, 705, 25189, 4891, ...
1.9125
640
import re from datetime import date, datetime import scrapy from gazette.items import Gazette from gazette.spiders.base import BaseGazetteSpider
[ 11748, 302, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 198, 198, 11748, 15881, 88, 198, 198, 6738, 308, 1031, 5857, 13, 23814, 1330, 38772, 198, 6738, 308, 1031, 5857, 13, 2777, 4157, 13, 8692, 1330, 7308, 38, 1031, 5857, 4129...
3.44186
43
# # Copyright (c) 2021 Takeshi Yamazaki # This software is released under the MIT License, see LICENSE. # import json import os from device_check import get_device_id, get_format, get_device_list import gst_builder
[ 2, 198, 2, 15069, 357, 66, 8, 33448, 33687, 5303, 14063, 32276, 198, 2, 770, 3788, 318, 2716, 739, 262, 17168, 13789, 11, 766, 38559, 24290, 13, 198, 2, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 3335, 62, 9122, 1330, 651...
2.471154
104
#Escreva um programa que leia dois números inteiros e compare-os # indicando qual o maior número, menor ou se são iguais num1 = int(input('Digite um número: ')) num2 = int(input('Digite outro número: ')) if num1 > num2: print(f'O número {num1} é maior que o número {num2}') elif num2 > num1: print(f'O número: ...
[ 2, 47051, 260, 6862, 23781, 1430, 64, 8358, 443, 544, 466, 271, 299, 21356, 647, 418, 493, 20295, 4951, 304, 8996, 12, 418, 198, 2, 2699, 25440, 4140, 267, 17266, 1504, 299, 21356, 647, 78, 11, 1450, 273, 267, 84, 384, 264, 28749, ...
2.172973
185
import torch, argparse, sys from torch import nn, optim from torchvision import datasets, transforms, models from my_model import MyClassifier, save_checkpoint parser = argparse.ArgumentParser(description='IMAGE CLASSIFICATION TRAINER, PLEASE PROVIDE DIRECTORY WITH IMAGE DATA') parser.add_argument('data_dir', type=str...
[ 11748, 28034, 11, 1822, 29572, 11, 25064, 198, 6738, 28034, 1330, 299, 77, 11, 6436, 198, 6738, 28034, 10178, 1330, 40522, 11, 31408, 11, 4981, 198, 6738, 616, 62, 19849, 1330, 2011, 9487, 7483, 11, 3613, 62, 9122, 4122, 198, 198, 486...
2.687465
1,779
"""The package indicator for serve.push.search."""
[ 37811, 464, 5301, 16916, 329, 4691, 13, 14689, 13, 12947, 526, 15931, 628 ]
4
13
"""empty message Revision ID: fd05599e10a6 Revises: 8a04dc559206 Create Date: 2017-08-22 14:26:50.486659 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'fd05599e10a6' down_revision = '8a04dc559206' branch_labels = None depends_on = None
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 277, 67, 2713, 43452, 68, 940, 64, 21, 198, 18009, 2696, 25, 807, 64, 3023, 17896, 38605, 22136, 198, 16447, 7536, 25, 2177, 12, 2919, 12, 1828, 1478, 25, 2075, 25, 1120, 13, 2780...
2.533898
118
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
[ 37811, 198, 15269, 357, 66, 8, 33160, 43208, 21852, 1766, 1539, 43, 8671, 13, 198, 198, 9654, 35389, 1046, 318, 11971, 739, 17996, 272, 6599, 43, 410, 17, 13, 198, 1639, 460, 779, 428, 3788, 1864, 284, 262, 2846, 290, 3403, 286, 262...
1.788632
563
from flask_restplus import reqparse from flask_restplus import fields from server import api from server.status import APIStatus, to_http_status request_parser = reqparse.RequestParser() request_parser.add_argument('token', type=str, required=True, location='headers') request_token = api.expect(request_parser, vali...
[ 6738, 42903, 62, 2118, 9541, 1330, 43089, 29572, 198, 6738, 42903, 62, 2118, 9541, 1330, 7032, 198, 198, 6738, 4382, 1330, 40391, 198, 6738, 4382, 13, 13376, 1330, 7824, 19580, 11, 284, 62, 4023, 62, 13376, 628, 198, 198, 25927, 62, 4...
3.637363
91
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to list file entries.""" import abc import argparse import logging import sys from dfvfs.analyzer import analyzer from dfvfs.analyzer import fvde_analyzer_helper from dfvfs.helpers import command_line from dfvfs.helpers import volume_scanner from dfvfs.lib impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 7391, 284, 1351, 2393, 12784, 526, 15931, 198, 198, 11748, 450, 66, 198, 11748, 1822, 29572, 198, 11748, 18931, ...
2.684562
4,042
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. YOUR DESCRIPTION HERE This is a breakout game. """ from campy.gui.events.timer import pause from breakoutgraphics import BreakoutGraphics FRAME_RATE = 1000 / 120 # 120 frames per second NU...
[ 37811, 198, 14192, 10669, 12243, 448, 4935, 198, 48003, 276, 422, 7651, 10918, 338, 12243, 448, 416, 198, 31056, 6592, 5030, 12, 40728, 11, 39859, 494, 449, 518, 11, 8047, 38774, 11, 198, 392, 13075, 406, 13481, 13, 198, 198, 56, 1169...
3.117188
128
from typing import Dict import json from beagle.logging import timer @timer
[ 6738, 19720, 1330, 360, 713, 198, 11748, 33918, 198, 6738, 307, 19345, 13, 6404, 2667, 1330, 19781, 628, 198, 198, 31, 45016, 198 ]
3.434783
23
#! /usr/bin/python #M3 -- Meka Robotics Robot Components #Copyright (c) 2010 Meka Robotics #Author: edsinger@mekabot.com (Aaron Edsinger) #M3 is free software: you can redistribute it and/or modify #it under the terms of the GNU Lesser General Public License as published by #the Free Software Foundation, either versi...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 198, 2, 44, 18, 1377, 337, 38001, 47061, 16071, 36109, 198, 2, 15269, 357, 66, 8, 3050, 337, 38001, 47061, 198, 2, 13838, 25, 1225, 82, 3889, 31, 76, 988, 397, 313, 13, 785, 357, 3445...
2.94311
791
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from logging import Logger from typing import NamedTuple, Optional from idb.grpc.idb_grpc import CompanionServiceStub...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, ...
3.617978
89
import math from datetime import datetime, timedelta from django.shortcuts import get_object_or_404, render from django.http import Http404, HttpResponse, HttpResponseRedirect, HttpResponseForbidden from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.contr...
[ 11748, 10688, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 220, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 11, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429...
3.057114
998
# Copyright (c) OpenMMLab. All rights reserved. import os import platform import numpy as np import pytest import torch import torch.distributed as dist from mmcv.cnn.bricks import ConvModule from mmcv.cnn.utils import revert_sync_batchnorm if platform.system() == 'Windows': import regex as re else: import r...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 28686, 198, 11748, 3859, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 11748, 28034, 13, 17080, 6169, 355, 1...
3.118519
135
from typing import Union import numpy as np def hamming_from_elements( array: np.ndarray, elements: np.ndarray, weight: Union[float, int, np.ndarray] = 1 ) -> np.ndarray: """Return an array of array made of the hamming distances between each element and each of the specified points. The hamming dist...
[ 6738, 19720, 1330, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 8891, 2229, 62, 6738, 62, 68, 3639, 7, 198, 220, 220, 220, 7177, 25, 45941, 13, 358, 18747, 11, 4847, 25, 45941, 13, 358, 18747, 11, 3463, 25, 4479, ...
2.937098
1,399
import os import time os.system("clear") print("################################") print(" ") print(" Bozkurt Ftp Bf Toolu ") print(" ") print("################################") print() print("1.Ftp Brute Force") print("2.Kullanım ...
[ 11748, 28686, 201, 198, 11748, 640, 201, 198, 201, 198, 418, 13, 10057, 7203, 20063, 4943, 201, 198, 201, 198, 4798, 7203, 29113, 4943, 201, 198, 4798, 7203, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.934343
396
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # create Noah-MP case # author: Hui ZHENG import os.path import string import shutil NOAHMP_NML = 'namelist.hrldas.template' NOAHMP_TBLS = ['GENPARM.TBL', 'MPTABLE.TBL', 'SOILPARM.TBL', 'VEGPARM.TBL'] NOAHMP_EXE = 'noahmp_hrldas.exe' import argparse import dateutil.pa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2251, 18394, 12, 7378, 1339, 198, 198, 2, 1772, 25, 367, 9019, 1168, 39, 26808, 198, 198, 11748, 28686, ...
2.143407
1,039
TEST_SSO_SETTINGS = { "enable_sso": True, "sso_private_key": "priv1", "sso_public_key": "fakeSsoPublicKey", "sso_url": "http://example.com/server/", }
[ 51, 6465, 62, 5432, 46, 62, 28480, 51, 20754, 796, 1391, 198, 220, 220, 220, 366, 21633, 62, 82, 568, 1298, 6407, 11, 198, 220, 220, 220, 366, 82, 568, 62, 19734, 62, 2539, 1298, 366, 13776, 16, 1600, 198, 220, 220, 220, 366, 82...
2.061728
81
import functools from typing import List import pytest from sqlalchemy.orm import Session from nonbonded.backend.database import models from nonbonded.backend.database.crud.datasets import DataSetCRUD from nonbonded.backend.database.crud.projects import BenchmarkCRUD, OptimizationCRUD from nonbonded.backend.database....
[ 11748, 1257, 310, 10141, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 12972, 9288, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 198, 198, 6738, 1729, 65, 623, 276, 13, 1891, 437, 13, 48806, 1330, 4981, 198, 6738, 1729, 65, 62...
2.971326
558
# coding=utf-8 from django.conf.urls import url from modules.finance.social_security_audit.code.add_social_security_audit import * from modules.finance.social_security_audit.code.del_social_security_audit import * from modules.finance.social_security_audit.code.edit_social_security_audit import * from modules.finance....
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 13103, 13, 69, 14149, 13, 14557, 62, 12961, 62, 3885, 270, 13, 8189, 13, 2860, 62, 14557, 62, 12961, 62, 3885, 270, 1330, ...
2.675603
373
import sys from PyQt5 import QtWidgets as qtw from PyQt5 import QtCore as qtc from PyQt5 import QtGui as qtg from PyQt5 import QtSql as qts """ TODO: - Adding new reviews and new coffees """ class CoffeeForm(qtw.QWidget): """Form to display/edit all info about a coffee""" if __name__ == '__main__': ap...
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 355, 10662, 4246, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 355, 10662, 23047, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 8205, 72, 355, 10662, 25297, 198, ...
2.663158
190
#!/usr/bin/env python3.5 import asyncio import logging import sys sys.path.append("lib") from charms.layer.basic import activate_venv # noqa: E402 activate_venv() from aiosmtpd.controller import Controller # noqa: E402 from aiosmtpd.handlers import Message # noqa: E402 from aiozmq import rpc # noqa: E402 from cha...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 20, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7203, 8019, 4943, 198, 6738, 41700, 13, 29289, 13, 35487, 1330, 15155, 62, 57...
2.432099
405
# BSD 3-Clause License # # Copyright (c) 2020, Boris FX # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list...
[ 2, 347, 10305, 513, 12, 2601, 682, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 11, 25026, 19534, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198...
3.325044
563
from typing import List import numpy from grid.Servicepoint import Servicepoint from grid.Configuration import Configuration import tensorflow as tf from utils.utils import Utils, Storage
[ 6738, 19720, 1330, 7343, 198, 11748, 299, 32152, 198, 6738, 10706, 13, 16177, 4122, 1330, 4809, 4122, 198, 6738, 10706, 13, 38149, 1330, 28373, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 3384, 4487, 13, 26791, 1330, 7273, 4487,...
4.318182
44
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 628, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198 ]
2.166667
36
from . import interpreter, network, process def ufw_reset(): """Reset UFW rules.""" network.ufw_reset() def main(): """Entry point for the application script.""" # We only allow a single instance process.ensure_single_instance('velarium') interpreter.run()
[ 6738, 764, 1330, 28846, 11, 3127, 11, 1429, 628, 198, 4299, 334, 44482, 62, 42503, 33529, 198, 220, 220, 220, 37227, 4965, 316, 471, 24160, 3173, 526, 15931, 198, 220, 220, 220, 3127, 13, 3046, 86, 62, 42503, 3419, 628, 198, 4299, 1...
3.075269
93
# Web processing errors # User Actions
[ 2, 5313, 7587, 8563, 628, 198, 2, 11787, 24439, 628 ]
4.2
10
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 15069, 2177, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.474886
219
from django.contrib.auth import get_user_model from rest_framework import serializers from datetime import datetime import re from ..models import SwitchGameUS, SwitchGame
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 302, 198, 198, 6738, 11485, 27530, 1330, 14645,...
3.744681
47
# ---------------------------------------------------------------------------- # Title: Scientific Visualisation - Python & Matplotlib # Author: Nicolas P. Rougier # License: BSD # ---------------------------------------------------------------------------- import numpy as np import matplotlib.pyplot as plt import m...
[ 2, 16529, 10541, 198, 2, 11851, 25, 220, 220, 22060, 15612, 5612, 532, 11361, 1222, 6550, 29487, 8019, 198, 2, 6434, 25, 220, 29737, 350, 13, 13876, 70, 959, 198, 2, 13789, 25, 347, 10305, 198, 2, 16529, 10541, 198, 11748, 299, 3215...
1.554239
3,881
#!/usr/bin/python # -*-coding:utf-8 -* import os import pickle from random import choice from data import *
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 532, 9, 198, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 6738, 4738, 1330, 3572, 198, 6738, 1366, 1330, 1635, 628 ]
2.820513
39
from model_test import TransformerNet import torch.nn.functional as F from PIL import Image from tqdm import tqdm from utils import * import torch import argparse import os import time import math import sys sys.path.append("..") from tools import unpadding, preprocess from thumb_instance_norm import init_thumbnail_in...
[ 6738, 2746, 62, 9288, 1330, 3602, 16354, 7934, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 3384, 4487, 1330, 1635, 198, 11748, 28034, ...
2.27525
1,802
import os import pandas as pd from glob import glob import pickle from fbprophet import Prophet from matplotlib import pyplot as plt import seaborn as sns import pickle import numpy as np from tslearn.utils import to_time_series_dataset from tslearn.preprocessing import TimeSeriesScalerMeanVariance from tslearn.clus...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 15095, 1330, 15095, 198, 11748, 2298, 293, 198, 6738, 277, 65, 22930, 3202, 1330, 13583, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 384, 397...
2.038884
1,183
#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2014-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 770, 2393, 318, 636, 286, 44081, 647, 11, 3740, 1378, 12567, 13, 785, 14, 67, 571, 12, 23912, 14, 14636, 647, 47454, 290, 318, 198, 2, 15069, 357, 34, 8, 1946, 12, 4626, 11,...
3.28125
576
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import json import numpy as np import os from collections import defaultdict import cv2 import tqdm from fvcore.common.file_io import PathManager from detectron2.data import DatasetCatalog, MetadataCatalog fro...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686...
2.517271
1,158
import logging from fnmatch import fnmatch import six from nose.plugins.base import Plugin from nose.selector import Selector log = logging.getLogger(__name__) class MockPlugins(object): '''Mock "plugins" that does nothing to avoid infinite recursion calls from Selector''' class NoseSelectPlugin(Plu...
[ 198, 11748, 18931, 198, 6738, 24714, 15699, 1330, 24714, 15699, 198, 198, 11748, 2237, 198, 198, 6738, 9686, 13, 37390, 13, 8692, 1330, 42636, 198, 6738, 9686, 13, 19738, 273, 1330, 9683, 273, 198, 198, 6404, 796, 18931, 13, 1136, 11187...
2.232112
1,146
import os from argparse import ArgumentParser import h5py root_dir = os.path.dirname(os.path.realpath(__file__)) root_parser = ArgumentParser(add_help=False) root_parser.add_argument('--hdf5_file', type=str, required=True, help='path to the datasets to combine', action="append") root_parser.add_argument('--save_file...
[ 11748, 28686, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, 11748, 289, 20, 9078, 198, 198, 15763, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 198, 15763, ...
2.475676
370
# -*- coding: utf-8 -*- # # Cipher/DES3.py : DES3 # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, #...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 44334, 14, 30910, 18, 13, 9078, 1058, 22196, 18, 198, 2, 198, 2, 38093, 855, 198, 2, 383, 10154, 286, 428, 2393, 389, 7256, 284, 262, 1171, 7386, 1...
2.923077
1,755
from __future__ import absolute_import from ipyvolume._version import __version__ from ipyvolume import styles from ipyvolume import examples from ipyvolume import datasets from ipyvolume import embed from ipyvolume.widgets import (Mesh, Scatter, Volume, ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 20966, 88, 29048, 13557, 9641, 1330, 11593, 9641, 834, 198, 6738, 20966, 88, 29048, 1330, 12186, 198, 6738, 20966, 88, 29048, 1330, 6096, 198, 6738, 20966, 88, 29048, 1330, ...
1.377721
1,562
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt plt.rcParams["font.family"] = 'NanumBarunGothic' plt.rcParams["font.size"] = 12 mpl.rcParams['axes.unicode_minus'] = False # 모든 상태의 개수 (종료 상태 제외) N_STATES = 19 # 감가율 GAMMA = 1 # 종료 상태를 제외한 모든 상태 STATES = np.arange(1, N_STATES + 1) # 초기 상태 ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 489, 83, 13, 6015, 10044, 4105, 14692, 10331, 13, 17989, 8973, 796, 705, 45, 272, 388...
1.099554
673
''' Author: Shuailin Chen Created Date: 2021-05-18 Last Modified: 2021-05-19 content: adapt from Song Hui's matlab code ''' import os.path as osp import numpy as np from mylib import polSAR_utils as psr def determinant(A): ''' Calculate determinant of a C3 matrix Args: A (ndarray): PolSAR data ...
[ 7061, 6, 198, 13838, 25, 32344, 603, 259, 12555, 198, 41972, 7536, 25, 33448, 12, 2713, 12, 1507, 198, 5956, 40499, 25, 33448, 12, 2713, 12, 1129, 198, 197, 11299, 25, 6068, 422, 10940, 367, 9019, 338, 2603, 23912, 2438, 198, 7061, ...
1.883598
1,890
from evosoro.tools.utils import xml_format import numpy as np # TODO: classes should hold dictionaries of variables, vxa tags and values # TODO: remove most of the hard coded text from read_write_voxelyze.py and replace with a few loops # TODO: add method to VoxCadParams for organizing (nested) subsections in vxa fil...
[ 6738, 819, 418, 16522, 13, 31391, 13, 26791, 1330, 35555, 62, 18982, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 16926, 46, 25, 6097, 815, 1745, 48589, 3166, 286, 9633, 11, 410, 27865, 15940, 290, 3815, 198, 2, 16926, 46, 25, 4...
2.413975
1,517
from django.db.models import F from django.utils import timezone from rest_framework.viewsets import ModelViewSet, ViewSet from rest_framework.decorators import list_route, detail_route from rest_framework.response import Response from rest_framework.mixins import RetrieveModelMixin from api.models import ScheduledTest...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 376, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 1334, 62, 30604, 13, 1177, 28709, 1330, 9104, 7680, 7248, 11, 3582, 7248, 198, 6738, 1334, 62, 30604, 13, 12501, 273, ...
3.946429
112
from sklearn.kernel_ridge import KernelRidge from sklearn.grid_search import GridSearchCV import numpy as np import csv rawData = np.zeros((4104,4)) with open('Processed Time Dependent Data.csv', 'rb') as f: reader = csv.reader(f) labels = reader.next() i = 0 for row in reader: for j in range...
[ 6738, 1341, 35720, 13, 33885, 62, 12818, 1330, 32169, 49, 3130, 198, 6738, 1341, 35720, 13, 25928, 62, 12947, 1330, 24846, 18243, 33538, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 21370, 198, 198, 1831, 6601, 796, 45941, 13, 9...
2.303719
484
import sys import attr import parse from contextlib import redirect_stdout original_stdout = sys.stdout @attr.s() def parse_stdout(patterns, *callbacks): """Parses each stdout line in line with `patterns` argument and sequentially calls callbacks Args: patterns: tuple of patterns compatible with `pa...
[ 11748, 25064, 198, 11748, 708, 81, 198, 11748, 21136, 198, 6738, 4732, 8019, 1330, 18941, 62, 19282, 448, 198, 198, 14986, 62, 19282, 448, 796, 25064, 13, 19282, 448, 198, 198, 31, 35226, 13, 82, 3419, 198, 198, 4299, 21136, 62, 19282...
2.325021
1,203
import unittest import pathlib from diary_tool_main.diary_tool import set_questions_file_path if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 3108, 8019, 198, 6738, 26339, 62, 25981, 62, 12417, 13, 67, 8042, 62, 25981, 1330, 900, 62, 6138, 507, 62, 7753, 62, 6978, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 19...
2.716981
53
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function, division import logging import numpy as np from astropy.io import fits from astropy.wcs import WCS __all__ = ['CWT'] def gauss_kernel(radius, n_sigmas=8): """Normalized 2D gauss kernel array. """ sizex ...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6468, ...
2.231087
2,908
import numpy as np import tensorflow as tf
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 628 ]
3.384615
13
#################################### # Driftwood 2D Game Dev. Suite # # widgettree.py # # Copyright 2014-2017 # # Michael D. Reiley & Paul Merrill # #################################### # ********** # Permission is hereby granted, free of charge, to any person obtaining a copy # of ...
[ 29113, 4242, 198, 2, 39819, 3822, 362, 35, 3776, 6245, 13, 26264, 220, 220, 220, 220, 1303, 198, 2, 26295, 21048, 13, 9078, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, ...
2.02853
7,571
"""Downloading the images from Firefox based on the search term specified This scripts scrapes Firefox and downloads Google images of different images Typical usage example from command line: python -m cli --nums 10 --search "oyster mushrooms" "crimini mushrooms" "amanita mushrooms" --opp "search" """...
[ 37811, 10002, 278, 262, 4263, 422, 16802, 1912, 319, 262, 2989, 3381, 7368, 628, 220, 220, 220, 770, 14750, 15881, 274, 16802, 290, 21333, 3012, 4263, 286, 1180, 4263, 628, 220, 220, 220, 48752, 8748, 1672, 422, 3141, 1627, 25, 198, 2...
3.079823
451
import os import ssl import collections from typing import AsyncIterator, NamedTuple, Dict, List import aiomysql from dffml.base import BaseConfig from dffml.repo import Repo from dffml.source.source import BaseSourceContext, BaseSource from dffml.util.cli.arg import Arg from dffml.util.entrypoint import entrypoint ...
[ 11748, 28686, 198, 11748, 264, 6649, 198, 11748, 17268, 198, 6738, 19720, 1330, 1081, 13361, 37787, 11, 34441, 51, 29291, 11, 360, 713, 11, 7343, 198, 198, 11748, 257, 29005, 893, 13976, 198, 198, 6738, 288, 487, 4029, 13, 8692, 1330, ...
3.214953
107
import abc import typing from karp.domain.models.resource import Resource from typing import Optional, Callable, TypeVar, List, Dict, Tuple import logging import attr import pydantic from karp.domain import errors, model from karp.domain.errors import ConfigurationError from karp.domain.models.query import Query fro...
[ 11748, 450, 66, 198, 11748, 19720, 198, 6738, 479, 5117, 13, 27830, 13, 27530, 13, 31092, 1330, 20857, 198, 6738, 19720, 1330, 32233, 11, 4889, 540, 11, 5994, 19852, 11, 7343, 11, 360, 713, 11, 309, 29291, 198, 11748, 18931, 198, 198,...
3.34375
128
""" This file contains commands related to user configuration and management. """ from discord.ext import commands, tasks import discord import errors import turnipCalculator import datetime
[ 37811, 198, 1212, 2393, 4909, 9729, 3519, 284, 2836, 8398, 198, 392, 4542, 13, 198, 37811, 198, 6738, 36446, 13, 2302, 1330, 9729, 11, 8861, 198, 11748, 36446, 198, 11748, 8563, 198, 11748, 1210, 541, 9771, 3129, 1352, 198, 11748, 4818,...
4.386364
44
import sys import logging import argparse import os from matchreporter.analysis.analyser import analyse from matchreporter.collect import scxmlformatter, gaamatchformatter from matchreporter.db.analysis_db import write_report_data from matchreporter.helpers.filehelper import load_data_from_file SPORTS_CODE = 'SportsC...
[ 11748, 25064, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 6738, 2872, 260, 26634, 13, 20930, 13, 272, 26266, 263, 1330, 39552, 198, 6738, 2872, 260, 26634, 13, 33327, 1330, 629, 19875, 687, 1436, 11, 31986, ...
2.734694
245
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import dace import numpy as np import pytest @dace.program @dace.program @dace.program if __name__ == "__main__": test_linalg_inv() test_linalg_solve() test_linalg_cholesky()
[ 2, 15069, 13130, 12, 1238, 2481, 35920, 43412, 290, 262, 9637, 34, 68, 7035, 13, 1439, 2489, 10395, 13, 198, 11748, 288, 558, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 628, 628, 198, 198, 31, 67, 558, 13, 23065, 6...
2.495495
111
""" This file tests retrieval of values from the user list. The user list replaces one cell in the waveform editor for episodic files. Instead of using a value and a delta, the user can provide a list of values to apply by sweep. """ import sys import pytest import numpy as np try: # this ensures pyABF is import...
[ 37811, 198, 1212, 2393, 5254, 45069, 286, 3815, 422, 262, 2836, 1351, 13, 198, 198, 464, 2836, 1351, 24020, 530, 2685, 287, 262, 6769, 687, 5464, 329, 48177, 29512, 3696, 13, 198, 13193, 286, 1262, 257, 1988, 290, 257, 25979, 11, 262,...
2.170034
594
usa_elections([('m', 13), ('o', 76), ('m', 54), ('m', 7)]) usa_elections2([('m', 13), ('o', 76), ('m', 54), ('m', 7)]) usa_elections3([('m', 13), ('o', 76), ('m', 54), ('m', 7)])
[ 628, 198, 198, 22064, 62, 9509, 507, 26933, 10786, 76, 3256, 1511, 828, 19203, 78, 3256, 8684, 828, 19203, 76, 3256, 7175, 828, 19203, 76, 3256, 767, 8, 12962, 198, 22064, 62, 9509, 507, 17, 26933, 10786, 76, 3256, 1511, 828, 19203, ...
2.127907
86
""" Current Limitations: - A member cannot transition from a monthly to a punchcard without losing the remainder of their time """ import sys import pprint import hashlib from datetime import datetime, date, time, timedelta import time from tinydb import * from tinydb.operations import decrement import re im...
[ 37811, 198, 11297, 7576, 20597, 25, 198, 220, 220, 220, 532, 317, 2888, 2314, 6801, 422, 257, 9651, 284, 257, 10862, 9517, 1231, 6078, 262, 17675, 286, 511, 640, 628, 198, 37811, 628, 198, 198, 11748, 25064, 198, 11748, 279, 4798, 198...
2.511136
1,796
import pandas as pd import numpy as np from mimic3benchmark.readers import InHospitalMortalityReader HEADERS = [ "Index", "Hours", "Capillary refill rate", "Diastolic blood pressure", "Fraction inspired oxygen", "Glascow coma scale eye opening", "Glascow coma scale motor response", "Glascow coma scale to...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 26332, 18, 26968, 4102, 13, 961, 364, 1330, 554, 39, 3531, 44, 28337, 33634, 198, 198, 37682, 4877, 796, 685, 198, 220, 220, 220, 366, 15732, 1600, ...
2.316456
711
"""User model.""" # Django from django.db import models from django.contrib.auth.models import AbstractUser # Utils from weight.utils.models import WeightModel class User(WeightModel, AbstractUser): """User model. Extend from Django abstract user, change the username field to email and add some extra i...
[ 37811, 12982, 2746, 526, 15931, 198, 198, 2, 37770, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 198, 198, 2, 7273, 4487, 198, 6738, 3463, 13, 26791, ...
2.543909
353
from enum import Enum from typing import Type from fastapi.param_functions import Depends, Path, Query from fastapi.routing import APIRouter, HTTPException from kanon.units.radices import BasedReal, IllegalBaseValueError from kanon_api.core.calculations.parser import parse from kanon_api.utils import safe_radix rout...
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 5994, 198, 198, 6738, 3049, 15042, 13, 17143, 62, 12543, 2733, 1330, 2129, 2412, 11, 10644, 11, 43301, 198, 6738, 3049, 15042, 13, 81, 13660, 1330, 3486, 4663, 39605, 11, 14626, 1692...
2.624
250
n = int(input()) coelhos = 0 ratos = 0 sapos = 0 for i in range(n): quantia, tipo = input().split() quantia = int(quantia) if tipo == 'C': coelhos += quantia elif tipo == 'R': ratos += quantia else: sapos += quantia total = coelhos + ratos + sapos print(f"Total: {total}...
[ 77, 220, 796, 493, 7, 15414, 28955, 198, 198, 1073, 417, 71, 418, 796, 657, 198, 10366, 418, 796, 657, 198, 82, 499, 418, 796, 657, 198, 198, 1640, 1312, 287, 2837, 7, 77, 2599, 198, 220, 220, 220, 5554, 544, 11, 8171, 78, 796, ...
2.123711
291
import textwrap from async_asgi_testclient import TestClient from a2wsgi import WSGIMiddleware import pytest import unittest.mock as mock ##__________________________________________________________________|| @pytest.fixture(autouse=True) ##__________________________________________________________________|| @pyt...
[ 11748, 2420, 37150, 198, 6738, 30351, 62, 292, 12397, 62, 9288, 16366, 1330, 6208, 11792, 198, 198, 6738, 257, 17, 18504, 12397, 1330, 25290, 38, 3955, 2509, 1574, 198, 198, 11748, 12972, 9288, 198, 11748, 555, 715, 395, 13, 76, 735, ...
4.823529
85
from typing import Union, Tuple import torch from torch import Tensor, device as Device from utils import embeddings_concat from backbones import ResNet18,ResNet50, WideResNet50, EfficientNetB5 from utils.visualizer import Visualizer class BaseModel: """The embedding backbone shared by PaDiM and PaDiMSVDD "...
[ 6738, 19720, 1330, 4479, 11, 309, 29291, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 309, 22854, 11, 3335, 355, 16232, 198, 198, 6738, 3384, 4487, 1330, 11525, 67, 654, 62, 1102, 9246, 198, 6738, 736, 35095, 1330, 1874, 7934, 1507, ...
2.939655
116
# process local states local = range(24) # L states L = {"x0" : [0, 12], "x1" : [1, 13], "q0" : [14], "q1" : [15], "qb" : [20]} # receive variables rcv_vars = ["nr0", "nr1", "nrq0", "nrq1"] # initial states initial = [0, 1, 12, 13, 18, 19] # rules rules = [] rules.append({'idx': 0, 'from': 0, 'to': 2, 'guard': "(and ...
[ 2, 1429, 1957, 2585, 198, 12001, 796, 2837, 7, 1731, 8, 198, 2, 406, 2585, 198, 43, 796, 19779, 87, 15, 1, 1058, 685, 15, 11, 1105, 4357, 366, 87, 16, 1, 1058, 685, 16, 11, 1511, 4357, 366, 80, 15, 1, 1058, 685, 1415, 4357, ...
2.341339
2,165
$NetBSD: patch-Lib_ctypes_macholib_dyld.py,v 1.1 2021/06/23 18:30:24 schmonz Exp $ darwin20 support, via MacPorts. --- Lib/ctypes/macholib/dyld.py.orig 2021-06-22 19:20:28.000000000 +0000 +++ Lib/ctypes/macholib/dyld.py @@ -7,6 +7,12 @@ from framework import framework_info from dylib import dylib_info from itertool...
[ 3, 7934, 21800, 25, 8529, 12, 25835, 62, 310, 9497, 62, 76, 620, 349, 571, 62, 9892, 335, 13, 9078, 11, 85, 352, 13, 16, 33448, 14, 3312, 14, 1954, 1248, 25, 1270, 25, 1731, 5513, 2144, 89, 5518, 720, 198, 198, 27455, 5404, 1238...
2.18578
436
# -*- coding: utf-8 -*- # cython: language_level=3 # Copyright (c) 2021-present VincentRPS # 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 t...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 3075, 400, 261, 25, 3303, 62, 5715, 28, 18, 198, 2, 15069, 357, 66, 8, 33448, 12, 25579, 18653, 49, 3705, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 2...
3.735736
333
from Algorithms import *
[ 6738, 978, 7727, 907, 1330, 1635, 198 ]
3.571429
7
# flask_app.py - a minimal flsk application # import flask module from flask import Flask, render_template # initiate application app = Flask(__name__) # define route @app.route("/") # attach a function to that route using render_template # from the flask module
[ 2, 42903, 62, 1324, 13, 9078, 532, 257, 10926, 781, 8135, 3586, 198, 198, 2, 1330, 42903, 8265, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 198, 198, 2, 22118, 3586, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 2...
3.657534
73
import pygame from pygame.sprite import Sprite class Alien(Sprite): ''' Uma classe que representa um único alienígena da frota. ''' def __init__(self, ai_settings, screen): ''' Inicializa o alienígina e define sua posição inicial. ''' super(Alien, self).__init__() self.screen = screen...
[ 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 34975, 578, 1330, 33132, 198, 198, 4871, 17610, 7, 38454, 578, 2599, 198, 220, 220, 220, 705, 7061, 471, 2611, 537, 21612, 8358, 2380, 64, 23781, 6184, 118, 77, 3713, 8756, 8836, 5235, 6...
2.294423
771
import gnuradio from gnuradio import gr from gnuradio import blocks as grblocks import sys if __name__ == '__main__': duration = float(sys.argv[1]) tb = gr.top_block() src = gr.null_source(8) b0 = gr.copy(8) b1 = grblocks.sub_cc() b2 = gr.copy(8) b3 = grblocks.divide_cc() b4 = gr.copy...
[ 11748, 19967, 333, 324, 952, 198, 6738, 19967, 333, 324, 952, 1330, 1036, 198, 6738, 19967, 333, 324, 952, 1330, 7021, 355, 1036, 27372, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, ...
2.107011
271
import rand, crypto, SSL, tsafe from version import __version__
[ 11748, 43720, 11, 21473, 11, 25952, 11, 256, 21230, 198, 6738, 2196, 1330, 11593, 9641, 834 ]
3.9375
16
# Generated by Django 3.1.13 on 2021-11-05 12:31 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 1485, 319, 33448, 12, 1157, 12, 2713, 1105, 25, 3132, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
import os import sys import time from datetime import datetime import requests ICONS = { "01d": "", # clear sky "02d": "", # few clouds "03d": "", # scattered clouds "04d": "", # broken clouds "09d": "", # shower rain "10d": "", # rain "11d": "", # thunderstorm "13d": ""...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 7007, 198, 198, 2149, 19213, 796, 1391, 198, 220, 220, 220, 366, 486, 67, 1298, 366, 170, 234, 235, 1600, 220, 1303, 1598, 676...
1.966957
575
import tensorflow as tf import os # os.environ["TF_CPP_MIN_LOG_LEVEL"]='3' #----以下是答案部分 begin----# # 定义placeholder 开始 keeProb = tf.placeholder(tf.float32, shape=()) batchImgInput = tf.placeholder(tf.float32, shape=(None, 224, 224, 3)) labels = tf.placeholder(tf.float32, shape=(None, 4)) # 第一层卷积+归一化+池化 开始 conv1 = tf.l...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 28686, 198, 2, 28686, 13, 268, 2268, 14692, 10234, 62, 8697, 47, 62, 23678, 62, 25294, 62, 2538, 18697, 8973, 11639, 18, 6, 198, 2, 650, 20015, 98, 10310, 233, 42468, 163, 18433, 162, ...
1.674015
1,497