content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright 2009-2012 Yelp and Contributors # Copyright 2014 Ed Schofield # Copyright 2015 Yelp # # 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 ...
[ 2, 15069, 3717, 12, 6999, 44628, 290, 25767, 669, 198, 2, 15069, 1946, 1717, 3059, 1659, 1164, 198, 2, 15069, 1853, 44628, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, ...
3.666667
228
import json import subprocess import requests from agent import WindowsAgent
[ 11748, 33918, 201, 198, 11748, 850, 14681, 201, 198, 201, 198, 11748, 7007, 201, 198, 201, 198, 6738, 5797, 1330, 3964, 36772, 201, 198, 201, 198 ]
3.346154
26
import os from cryptography import fernet from cryptography.fernet import Fernet from binascii import Error import string from ctypes import windll from glob import glob from github import Github from uuid import getnode as get_mac from os import path import sys k="_________________________YOUR_KEY___________________...
[ 11748, 28686, 198, 6738, 45898, 1330, 277, 1142, 316, 198, 6738, 45898, 13, 69, 1142, 316, 1330, 38982, 316, 198, 6738, 9874, 292, 979, 72, 1330, 13047, 198, 11748, 4731, 198, 6738, 269, 19199, 1330, 2344, 297, 198, 6738, 15095, 1330, ...
1.868163
713
"""CSI Controller Identity RPC tests.""" from pytest_bdd import ( given, scenario, then, when, ) import pytest import docker import subprocess import csi_pb2 as pb from common.csi import CsiHandle from common.deployer import Deployer from common.apiclient import ApiClient @pytest.fixture(scope="modu...
[ 37811, 7902, 40, 22741, 27207, 39400, 5254, 526, 15931, 198, 6738, 12972, 9288, 62, 65, 1860, 1330, 357, 198, 220, 220, 220, 1813, 11, 198, 220, 220, 220, 8883, 11, 198, 220, 220, 220, 788, 11, 198, 220, 220, 220, 618, 11, 198, 8,...
3.267516
628
DATA_ID = 61
[ 26947, 62, 2389, 796, 8454, 198 ]
2.166667
6
import torch.nn as nn import torch as tr
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 355, 491, 628, 198 ]
3.071429
14
"""This module contains dust features.""" import os import sncosmo as snc import sfdmap from snsim import __snsim_dir_path__ import glob import requests import tarfile def check_files_and_dowload(): """Check if sdfmap files are here and download if not. Returns ------- None No return, just d...
[ 37811, 1212, 8265, 4909, 8977, 3033, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 3013, 6966, 5908, 355, 3013, 66, 198, 11748, 264, 16344, 8899, 198, 6738, 3013, 14323, 1330, 11593, 82, 5907, 320, 62, 15908, 62, 6978, 834, 198, 11748...
2.132948
1,557
#!/usr/env/bin python # -*- encoding: utf-8 -*- __author__ = 'Nb'
[ 2, 48443, 14629, 14, 24330, 14, 8800, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 45, 65, 6, 198 ]
2.030303
33
from flask import Flask, redirect, render_template, request import db import message import random import read import delete import addressbook import sent as sent_ app = Flask(__name__) @app.route("/", methods=['GET', 'POST']) @app.route("/sent/", methods=['GET', 'POST']) @app.route("/read/<id>") @app.route("/add...
[ 6738, 42903, 1330, 46947, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 198, 11748, 20613, 198, 11748, 3275, 198, 11748, 4738, 198, 11748, 1100, 198, 11748, 12233, 198, 11748, 2209, 2070, 198, 11748, 1908, 355, 1908, 62, 198, 198, 1324, 796...
2.693878
196
import math from typing import Callable, Tuple import numpy as np import torch import torch.nn as nn from loguru import logger from tqdm import tqdm from alexander.dqn.buffer import ReplayBuffer from alexander.dqn.hiv_patient import HIVPatient from alexander.dqn.q_agent import Agent from dataclasses import dataclass ...
[ 11748, 10688, 198, 6738, 19720, 1330, 4889, 540, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 2604, 14717, 1330, 49706, 198, 6738, 256, 80, 36020, 133...
3.087719
114
from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint from starlette.requests import Request from starlette.responses import Response from kami.database import Pages
[ 6738, 3491, 21348, 13, 27171, 1574, 13, 8692, 1330, 7308, 6535, 51, 5868, 2509, 1574, 11, 19390, 31077, 12915, 4122, 198, 6738, 3491, 21348, 13, 8897, 3558, 1330, 19390, 198, 6738, 3491, 21348, 13, 16733, 274, 1330, 18261, 198, 198, 673...
4.083333
48
#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ Module for statistics calculation side of the ui""" from PyQt5.QtWidgets import QVBoxLayout, QWidget, QLabel, QPushButton, QFileDialog class GUIStatisticsCalculation(QWidget): """ Right side of UI, ie. the statistics calculation settings and parameters.""" d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 19937, 329, 7869, 17952, 1735, 286, 262, 334, 72, 37811, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54...
2.555016
618
import pytest import numpy as np from awkward import JaggedArray from fast_carpenter import expressions @pytest.mark.parametrize('input, expected', [ ("Muon.Px > 30", ("Muon__DOT__Px > 30", {'Muon__DOT__Px': 'Muon.Px'})), ("events.Muon.Px > 30", ("events__DOT__Muon__DOT__Px > 30", ...
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 13006, 1330, 449, 14655, 19182, 198, 6738, 3049, 62, 66, 5117, 9255, 1330, 14700, 628, 628, 628, 628, 198, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 10...
1.933526
346
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
[ 2, 15069, 33448, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 198, 2, 921, 743, 407, 779, 428, 2393, ...
3.337165
261
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from openapi_server.models.base_model_ import Model from openapi_server.models.free_style_build import FreeStyleBuild from openapi_server.models.free_style_projectactio...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 220, 1303, 645, 20402, 25, 376, 21844, 198, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 220...
2.44462
9,471
#!/usr/bin/python import monkDebug as debug import monkModule as module access_list = ['private', 'protected', 'public'] genericUID = 0 ## ## @ brief only for namespace : ## ## ## ## @brief Get the list of all specify type ## @param[in] type Type requested ['namespace', 'class', 'struct', 'methode',...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 27266, 27509, 355, 14257, 198, 11748, 27266, 26796, 355, 8265, 198, 198, 15526, 62, 4868, 796, 37250, 19734, 3256, 705, 24326, 3256, 705, 11377, 20520, 198, 198, 41357, 27586, 796, 657, ...
2.976471
170
''' File: 110.py File Created: 2021-01-12 13:48:32 -08:00 Author: Taowyoo (caoyxsh@outlook.com) Brief: https://leetcode.com/problems/balanced-binary-tree/ ----- Last Modified: 2021-01-12 13:48:41 -08:00 Modified By: Taowyoo (caoyxsh@outlook.com>) ----- Copyright 2020 - 2021 ''' # Definition for a binary tree node. # c...
[ 7061, 6, 198, 8979, 25, 9796, 13, 9078, 198, 8979, 15622, 25, 33448, 12, 486, 12, 1065, 1511, 25, 2780, 25, 2624, 532, 2919, 25, 405, 198, 13838, 25, 11940, 322, 88, 2238, 357, 6888, 726, 87, 1477, 31, 448, 5460, 13, 785, 8, 198...
2.417625
261
#hardware platform: pyboard V1.1 import pyb import ssd1306 i2c=pyb.I2C(1,pyb.I2C.MASTER,baudrate=100000) #Init i2c lcd=ssd1306.SSD1306_I2C(128,64,i2c) #create LCD object,Specify width and height lcd.text("DFRobot",0,0) #set "DFRobot" at (0,0) lcd.text("chengdu",24,16) ...
[ 2, 10424, 1574, 3859, 25, 12972, 3526, 569, 16, 13, 16, 198, 198, 11748, 12972, 65, 198, 11748, 264, 21282, 12952, 21, 198, 198, 72, 17, 66, 28, 9078, 65, 13, 40, 17, 34, 7, 16, 11, 9078, 65, 13, 40, 17, 34, 13, 31180, 5781, ...
1.609272
302
# 223000000 sm.warp(220000000, 26)
[ 2, 30299, 10535, 198, 5796, 13, 86, 5117, 7, 1828, 24598, 11, 2608, 8, 198 ]
2.333333
15
# Generated by Django 3.2.5 on 2021-07-10 22:36 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 20, 319, 33448, 12, 2998, 12, 940, 2534, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
2.926829
41
from selenium.webdriver import Chrome from selenium.webdriver import ChromeOptions from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from webdriver_manager.chrome import ChromeDriverManager if __name__ == '__main__': main()
[ 6738, 384, 11925, 1505, 13, 12384, 26230, 1330, 13282, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 1330, 13282, 29046, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 15271, 1330, 4809, 198, 6738, 384, 11925, 1505, 13, ...
3.481481
81
from to_send_a_fax import E, f import unittest if __name__ == '__main__': unittest.main()
[ 6738, 284, 62, 21280, 62, 64, 62, 23560, 1330, 412, 11, 277, 198, 11748, 555, 715, 395, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.375
40
import json from utils.os_utils import create_python_files, create_results_dir from utils.strings_util import snake_case_to_camel_case
[ 11748, 33918, 198, 198, 6738, 3384, 4487, 13, 418, 62, 26791, 1330, 2251, 62, 29412, 62, 16624, 11, 2251, 62, 43420, 62, 15908, 198, 6738, 3384, 4487, 13, 37336, 62, 22602, 1330, 17522, 62, 7442, 62, 1462, 62, 66, 17983, 62, 7442, 6...
3.111111
45
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.contrib.auth.views import redirect_to_login from django.core.urlresolvers import reverse from wagtail.utils.compat import user_is_authenticated from wagtail.wagtailcore import hooks from wagtail.wagtailcore.models im...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 33571, 1330, 18941, 62, 1462, 62, 38235, 198, ...
2.575058
866
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import platform class Vecgeom(CMakePackage): """The vectorized geometry library for particle-de...
[ 2, 15069, 2211, 12, 42334, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
2.326957
575
# This module is in charge of managing files import csv import json from pathlib import Path import os home = Path(__file__).parents[0] #write configuration information
[ 2, 770, 8265, 318, 287, 3877, 286, 11149, 3696, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 28686, 198, 198, 11195, 796, 10644, 7, 834, 7753, 834, 737, 23743, 58, 15, 60, 628, 198, 2, 1...
3.73913
46
"""Redirecting writing If using a library that can print messages to the console, editing the library by replacing `print()` with `tqdm.write()` may not be desirable. In that case, redirecting `sys.stdout` to `tqdm.write()` is an option. To redirect `sys.stdout`, create a file-like class that will write any input st...
[ 37811, 7738, 1060, 278, 3597, 198, 198, 1532, 1262, 257, 5888, 326, 460, 3601, 6218, 284, 262, 8624, 11, 12857, 262, 5888, 198, 1525, 220, 13586, 4600, 4798, 3419, 63, 351, 4600, 83, 80, 36020, 13, 13564, 3419, 63, 743, 407, 307, 18...
2.920424
377
"""Here is a thing"""
[ 37811, 4342, 318, 257, 1517, 37811 ]
3.5
6
import numpy as np from scipy.special import eval_hermite, factorial def hermite_functions(n, x, all_n=True, move_axes=(), method="recursive"): """ Calculate the Hermite functions up to the nth order at position x, psi_n(x). For details see: https://en.wikipedia.org/wiki/Hermite_polynomials#Hermite_f...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 20887, 1330, 5418, 62, 372, 32937, 11, 1109, 5132, 628, 198, 4299, 607, 32937, 62, 12543, 2733, 7, 77, 11, 2124, 11, 477, 62, 77, 28, 17821, 11, 1445, 62, 897, 274, 16193...
2.022117
2,532
''' SYNBIOCHEM-DB (c) University of Manchester 2015 SYNBIOCHEM-DB is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' from sbcdb.enzyme_utils import EnzymeManager class ReactionManager(object): '''Class to implement a manag...
[ 7061, 6, 198, 23060, 45, 3483, 46, 3398, 3620, 12, 11012, 357, 66, 8, 2059, 286, 9502, 1853, 198, 198, 23060, 45, 3483, 46, 3398, 3620, 12, 11012, 318, 11971, 739, 262, 17168, 13789, 13, 198, 198, 2514, 1570, 257, 4866, 286, 428, ...
1.961159
1,519
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Contains AS_Rank_V2 which parses AS Rank data using the Restful API In contrast to the previous parser this also gets organization, rank, and links to other ASNs""" __author__ = "Nicholas Shpetner" __credits__ = ["Nicholas Shpetner", "Abhinna Adhikari", "Justin Furun...
[ 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, 37811, 4264, 1299, 7054, 62, 27520, 62, 53, 17, 543, 13544, 274, 7054, 10916, 1366, 1262, 262, 8324, 913, 78...
2.034067
1,409
max_theoretical_welfare = 1000000 number_of_citizens = int(input()) total_money_spent = 0 max_welfare = 0 for current_welfare in map(int, input().split()): total_money_spent += (max_theoretical_welfare - current_welfare) if current_welfare > max_welfare: max_welfare = current_welfare print(total_mon...
[ 9806, 62, 1169, 9997, 605, 62, 86, 27122, 796, 1802, 2388, 198, 198, 17618, 62, 1659, 62, 46801, 796, 493, 7, 15414, 28955, 198, 198, 23350, 62, 26316, 62, 2777, 298, 796, 657, 198, 9806, 62, 86, 27122, 796, 657, 198, 198, 1640, 1...
2.655405
148
# Copyright 2016 GoDaddy. # # 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, 1584, 1514, 48280, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 220, ...
3.174935
383
from django.shortcuts import render, redirect from .models import Lead, Agent from .forms import LeadModelForm, LeadForm from django.views.generic import TemplateView # The newest implementation supporting model forms
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 764, 27530, 1330, 20116, 11, 15906, 198, 6738, 764, 23914, 1330, 20116, 17633, 8479, 11, 20116, 8479, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680...
4.326923
52
#!/usr/bin/env python # -*- coding: utf-8 -*- """ # Visual Studio cl options reference: # https://msdn.microsoft.com/en-us/library/610ecb4h.aspx # "Options are specified by either a forward slash (/) or a dash (–)." # Here we use "-" better than "/" that produces invalid escaped chars using A...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 220, 220, 220, 1303, 15612, 11733, 537, 3689, 4941, 25, 198, 220, 220, 220, 1303, 220, 220, 3740, 13...
2.360305
1,310
import logging from pathlib import Path from typing import Optional import typer from . import __app_name__, __version__ from .utils import make_html, resize_image app = typer.Typer() logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) @app.callback() @app.command() def image( image: str = t...
[ 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 1259, 525, 198, 198, 6738, 764, 1330, 11593, 1324, 62, 3672, 834, 11, 11593, 9641, 834, 198, 6738, 764, 26791, 1330, 787, 62, 6494, 11, ...
2.221889
1,334
# coding: utf-8 import os from ..crawlable import Crawlable
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 6738, 11485, 66, 13132, 540, 1330, 327, 13132, 540, 220 ]
2.772727
22
""" Collection of utility functions """ import numpy as np import functools from scipy import sparse from patsy import dmatrix from tqdm import tqdm import pyia import matplotlib.pyplot as plt from astropy import units from astropy.time import Time from astropy.timeseries import BoxLeastSquares @functools.lru_cach...
[ 37811, 198, 36307, 286, 10361, 5499, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1257, 310, 10141, 198, 198, 6738, 629, 541, 88, 1330, 29877, 198, 6738, 279, 1381, 88, 1330, 288, 6759, 8609, 198, 6738, 256, 80, 36...
2.068329
5,854
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Functions for creating an Android.mk from already created dictionaries. """ import os def write_group(f, name, items, append): """Helper function to list all n...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 1946, 3012, 3457, 13, 198, 2, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 239...
2.824103
3,485
import numpy as np import time import os import os.path as osp import roboverse from roboverse.policies import policies import argparse from tqdm import tqdm import h5py from roboverse.utils import get_timestamp EPSILON = 0.1 def dump2h5(traj, path, image_rendered): """Dumps a collected trajectory to HDF5 file...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 686, 2127, 4399, 198, 6738, 686, 2127, 4399, 13, 79, 4160, 444, 1330, 4788, 198, 11748, 1822, 29572, 198, 6738, ...
2.52648
963
from django.contrib import admin from django.urls import path, include from django.views.generic.base import RedirectView from rest_framework_swagger import renderers from rest_framework import exceptions from rest_framework.permissions import AllowAny from rest_framework.renderers import CoreJSONRenderer from rest_fr...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 8692, 1330, 2297, 1060, 7680, 198, 198, 6738, 1334, 62, 30604, 62, 2032, 7...
2.963178
516
#!_PYTHONLOC # # (C) COPYRIGHT 2014 Ahasuerus # ALL RIGHTS RESERVED # # The copyright notice above does not evidence any actual or # intended publication of such source code. # # Version: $Revision$ # Date: $Date$ import cgi import sys import os import string import MySQLdb from localdefs ...
[ 2, 0, 62, 47, 56, 4221, 1340, 29701, 198, 2, 198, 2, 220, 220, 220, 220, 357, 34, 8, 27975, 38162, 9947, 1946, 220, 220, 7900, 292, 15573, 385, 198, 2, 220, 220, 220, 220, 220, 220, 11096, 371, 34874, 15731, 1137, 53, 1961, 198,...
2.216641
637
# -*- coding: utf-8 -*- """A collection of model combination functionalities. """ # Author: Yue Zhao <zhaoy@cmu.edu> # License: BSD 2 clause from __future__ import division from __future__ import print_function import numpy as np from numpy.random import RandomState from sklearn.utils import check_array from sklearn....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 32, 4947, 286, 2746, 6087, 10345, 871, 13, 198, 37811, 198, 2, 6434, 25, 32854, 29436, 1279, 89, 3099, 726, 31, 11215, 84, 13, 15532, 29, 198, 2, 13789, 25, 3...
2.433816
4,004
from des import DES des = DES(key=193) number = 123456 ciphertext = des.encrypt_number(number) decrypted = des.decrypt_number(ciphertext) print('Number:', number) print('Encrypted:', ciphertext) print('Decrypyed', decrypted)
[ 6738, 748, 1330, 22196, 628, 198, 8906, 796, 22196, 7, 2539, 28, 24943, 8, 198, 17618, 796, 17031, 29228, 198, 66, 10803, 5239, 796, 748, 13, 12685, 6012, 62, 17618, 7, 17618, 8, 198, 12501, 15109, 796, 748, 13, 12501, 6012, 62, 176...
2.886076
79
import sys import warnings import numpy as np from progressbar import progressbar from lib.config import Config from utils.evaluator import Evaluator warnings.simplefilter('ignore', np.RankWarning) if __name__ == "__main__": cfg = Config(sys.argv[1] if len(sys.argv) > 1 else 'config.yaml') dataset = cfg.g...
[ 11748, 25064, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4371, 5657, 1330, 4371, 5657, 198, 198, 6738, 9195, 13, 11250, 1330, 17056, 198, 6738, 3384, 4487, 13, 18206, 84, 1352, 1330, 26439, 84, 1352, 198, 198...
2.325806
310
import resnet_v1_101_rcnn import resnet_v1_101_rcnn_dcn import resnet_v1_101_rcnn_dcn_dense
[ 11748, 581, 3262, 62, 85, 16, 62, 8784, 62, 6015, 20471, 201, 198, 11748, 581, 3262, 62, 85, 16, 62, 8784, 62, 6015, 20471, 62, 17896, 77, 201, 198, 11748, 581, 3262, 62, 85, 16, 62, 8784, 62, 6015, 20471, 62, 17896, 77, 62, 67,...
1.979167
48
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='jdma_control', version='0.2.27', ...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 4480, 1280, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 15675, 11682, 13, 9132, 6, 4008, 355, 1100, 1326, 25, 198, ...
2.293243
740
import os import csv from tqdm.autonotebook import tqdm csv_file = open("ecmwf_cca_scratch.csv", "w") writer = csv.writer(csv_file) writer.writerow(['mip_era','activity_id','institution_id','source_id','experiment_id','member_id','table_id','variable_id','grid_label','version','dcpp_start_year','time_range','nc_path']...
[ 11748, 28686, 198, 11748, 269, 21370, 198, 6738, 256, 80, 36020, 13, 2306, 261, 1258, 2070, 1330, 256, 80, 36020, 198, 198, 40664, 62, 7753, 796, 1280, 7203, 721, 76, 86, 69, 62, 13227, 62, 1416, 36722, 13, 40664, 1600, 366, 86, 494...
2.29979
477
""" url: https://leetcode.com/problems/longest-univalue-path/ * 가장 긴 동일 값의 경로 동일한 값을 지닌 가장 긴 경로를 찾아라. - Example 1 Input : 5 / \ 4 5 / \ \ 1 1 5 Output : 2 Explaination : 루트에서 오른쪽 노드 끝까지 5->5->5로 가장 긴 이동 거리가 2이다. - Example 2 Input : 1 / \ 4 5 ...
[ 37811, 198, 6371, 25, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 6511, 395, 12, 403, 2473, 518, 12, 6978, 14, 198, 9, 220, 166, 108, 222, 168, 252, 98, 220, 166, 116, 112, 31619, 237, 247, 35975, 120, 220, 166, 10...
1.093923
905
#!/usr/bin/env python import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() version = '1.0.0' setup(name='python-draytonwiser-api', version=version, d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 1233, 26791, 1...
2.455319
235
from setuptools import setup setup( name='flowsa', version='0.0.1', packages=['flowsa'], package_dir={'flowsa': 'flowsa'}, package_data={'flowsa': [ "data/*.*", "output/*.*"]}, include_package_data=True, install_requires=[ 'fedelemflowlist @ git+https://github.com/USEPA/Fede...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 44041, 64, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 16, 3256, 198, 220, 220, 220, 10392, 28, 17816, 44041, 64, 6, 4357, 198, 2...
2.106498
554
# -*- coding:utf-8 -*- """ author comger@gmail.com Consisten hash """ from hashlib import md5 from bisect import bisect_right class ConsistentHash(object): """ 算法思路: 1. 在N个机器中、每台M个节点、N*M 个节点形成节点环 2. 计算每个机器拥有的节点Node 3. 新内容key添加时,get_node(key)获取key被分配的node;及get_host(key)获取key 被分配到的机器 ...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 1772, 401, 1362, 31, 14816, 13, 785, 198, 220, 220, 220, 3515, 396, 268, 12234, 220, 198, 37811, 198, 6738, 12234, 8019, 1330, 45243, 20, 198, ...
1.642959
703
import sys import operator func_by_op = { '*': operator.mul, '+': operator.add } if __name__ == '__main__': print(solve(sys.stdin.read()))
[ 11748, 25064, 198, 11748, 10088, 198, 198, 20786, 62, 1525, 62, 404, 796, 1391, 198, 220, 705, 9, 10354, 10088, 13, 76, 377, 11, 198, 220, 705, 10, 10354, 10088, 13, 2860, 198, 92, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, ...
2.370968
62
# # COPYRIGHT: # The Leginon software is Copyright 2003 # The Scripps Research Institute, La Jolla, CA # For terms of the license agreement # see http://ami.scripps.edu/software/leginon-license # from leginon import leginondata import event import threading import node import project import gu...
[ 2, 198, 2, 27975, 38162, 9947, 25, 198, 2, 220, 220, 220, 220, 220, 220, 383, 1004, 1655, 261, 3788, 318, 15069, 5816, 198, 2, 220, 220, 220, 220, 220, 220, 383, 1446, 14602, 82, 4992, 5136, 11, 4689, 449, 33011, 11, 7257, 198, ...
2.815126
119
import numpy as np from numpy.linalg import norm from shapely.geometry import Polygon from copy import deepcopy import open3d from tofnet.pointcloud.utils import rotate, transform_with_conf from tofnet.pointcloud.visualize import visualize_pointcloud from tofnet.annotations.segmentation import find_segmentation, find_...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 2593, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 12280, 14520, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 1280, 18, 67, 198, 198, 6738, 284, 69, 3262,...
2.240686
2,040
from django.contrib import messages from django.db.models import ( Case, When, IntegerField, Count, F, Sum, Prefetch, ) from django.shortcuts import render, redirect from django.urls import reverse_lazy from trainings.filters import ( TraineeFilter, ) from trainings.forms import ( T...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 357, 198, 220, 220, 220, 8913, 11, 198, 220, 220, 220, 1649, 11, 198, 220, 220, 220, 34142, 15878, 11, 198, 220, 220, 220, 2764, 11, ...
2.857585
323
# Metric for kilonova detectability based on GW170817 SED used in Scolnic et # al. 2018 and Setzer et al. 2019. The chosen detection criteria are related to # those used in the LSST DESC white paper detectability work and the two # references above. # # Contact for this code: # christian.setzer@fysik.su.se from pathlib...
[ 2, 3395, 1173, 329, 8769, 261, 10071, 4886, 1799, 1912, 319, 27164, 1558, 2919, 1558, 311, 1961, 973, 287, 1446, 349, 6988, 2123, 198, 2, 435, 13, 2864, 290, 5345, 9107, 2123, 435, 13, 13130, 13, 383, 7147, 13326, 9987, 389, 3519, 2...
2.604545
1,100
#!/usr/bin/env python3.3 # -*- coding: utf-8 -*- # # Read configuration file or return default values # # Copyright (c) 2015 NorthernSec # Copyright (c) 2015 Pieter-Jan Moreels # This software is licensed under the Original BSD License # Imports import os runpath=os.path.dirname(os.path.realpath(__file__)) import con...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 4149, 8398, 2393, 393, 1441, 4277, 3815, 198, 2, 198, 2, 15069, 357, 66, 8, 1853, 197, 404...
2.946429
112
n = 1000 a = list(range(n)) b = dict.fromkeys(range(n)) n = 10 items = range(n) o_one(items) # 1 operation o_n(items) # n operations o_n_squared(items) # n*n = 10 * 10 = 100 operations
[ 77, 796, 8576, 198, 64, 796, 1351, 7, 9521, 7, 77, 4008, 198, 65, 796, 8633, 13, 6738, 13083, 7, 9521, 7, 77, 4008, 198, 198, 77, 796, 838, 198, 23814, 796, 2837, 7, 77, 8, 198, 78, 62, 505, 7, 23814, 8, 197, 2, 352, 4905, ...
2.308642
81
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import time import threading from nose.tools import assert_equals, assert_raises from ..backends.base import BackendBase from ..apps.base import AppBase from ..router import Router
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 257, 72, 40379, 28, 19, 39747, 28, 19, 2123, 1509, 28, 19, 628, 198, 11748, 640, 198, 11748, 4704, 278, 198, 6738, 9686, 13, 31391, 1330, 6818, 62, 4853, 874, 11, 681...
3.090909
77
""" IOPing plugin for Diamond. Author: Antti Jaakkola #### Dependencies * ioping Create /usr/share/diamond/collectors/ioping directory and copy this plugin to it. mkdir /usr/share/diamond/collectors/ioping cp ioping/ioping.py /usr/share/diamond/collectors/ioping/ Create config file /etc/diamond/collectors/IOPi...
[ 198, 37811, 198, 198, 40, 3185, 278, 13877, 329, 13566, 13, 198, 198, 13838, 25, 3738, 20259, 13790, 461, 74, 5708, 198, 198, 4242, 37947, 3976, 198, 1635, 1312, 15816, 628, 198, 16447, 1220, 14629, 14, 20077, 14, 67, 8446, 14, 33327,...
3.007042
142
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # 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 applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 3012, 4992, 46665, 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, ...
2.92054
667
from __future__ import absolute_import, division, print_function from spotfinder.applications.wrappers import DistlOrganizer "Later go back and refactor this module and signal_strength to avoid code duplication."
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 6738, 4136, 22805, 13, 1324, 677, 602, 13, 29988, 11799, 1330, 4307, 75, 26121, 7509, 198, 198, 1, 18602, 467, 736, 290, 1006, 11218, 428, 8265, 290, ...
4.196078
51
import json import os import numpy from torch.utils.data import DataLoader from config import DEVICE, ATT_PATH from logger.training import predict from modules.nn.dataloading import WordDataset, CharDataset from utils.nlp import twitter_preprocess from utils.train import load_embeddings, get_pipeline def predictio...
[ 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 198, 6738, 4566, 1330, 5550, 27389, 11, 26195, 62, 34219, 198, 6738, 49706, 13, 34409, 1330, 4331, 198, 6738, 1...
1.996441
1,124
import math import torch import torch.nn as nn import torch.nn.functional as F """ modified to fit dataset size """ class ResNeXtBottleneck(nn.Module): """ RexNeXt bottleneck type C (https://github.com/facebookresearch/ResNeXt/blob/master/models/resnext.lua) """ def __init__(self, in_channels, out...
[ 11748, 10688, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198, 37811, 198, 41771, 284, 4197, 27039, 2546, 198, 37811, 628, 198, 4871, 1874, 8199, 55, 83, 28653, ...
1.89595
2,864
import argparse import logging import os import platform import shutil import subprocess logging.getLogger(__name__).addHandler(logging.NullHandler()) if __name__ == '__main__': _main_cmdline()
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 628, 198, 6404, 2667, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 737, 2860, 25060, 7, 6404, 2667, 13, 35067, 25060...
3.058824
68
from __future__ import print_function import unittest import doctest import os import commands import cPickle from StringIO import StringIO import vcf from vcf import utils suite = doctest.DocTestSuite(vcf) suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestGatkOutput)) sui...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 555, 715, 395, 198, 11748, 10412, 395, 198, 11748, 28686, 198, 11748, 9729, 198, 11748, 269, 31686, 293, 198, 6738, 10903, 9399, 1330, 10903, 9399, 198, 198, 11748, 410, 12993, ...
2.858347
593
from utils import * import subprocess import copy from project import Project from codegen.caravel_codegen import generate_openlane_files from codegen.allocator import allocate_macros REQUIRED_KEYS_GROUP = ["projects", "caravel", "lvs"] class Collection(object): """ * generate an index.md with ...
[ 6738, 3384, 4487, 1330, 1635, 198, 11748, 850, 14681, 198, 11748, 4866, 198, 6738, 1628, 1330, 4935, 198, 6738, 2438, 5235, 13, 66, 3301, 626, 62, 8189, 5235, 1330, 7716, 62, 9654, 33533, 62, 16624, 198, 6738, 2438, 5235, 13, 32332, 1...
3.054878
164
from .ctc_loss import get_loss
[ 6738, 764, 310, 66, 62, 22462, 1330, 651, 62, 22462, 198 ]
2.818182
11
from wagtail.wagtailcore.permission_policies import OwnershipPermissionPolicy from wagtail.wagtaildocs.models import Document, get_document_model permission_policy = OwnershipPermissionPolicy( get_document_model(), auth_model=Document, owner_field_name='uploaded_by_user' )
[ 6738, 266, 363, 13199, 13, 86, 363, 13199, 7295, 13, 525, 3411, 62, 79, 4160, 444, 1330, 33147, 1056, 5990, 3411, 36727, 198, 6738, 266, 363, 13199, 13, 86, 363, 8326, 688, 420, 82, 13, 27530, 1330, 16854, 11, 651, 62, 22897, 62, ...
2.969072
97
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
3.391459
281
# Task 02. Party person = input() party = Party() while not person == "End": party.people.append(person) person = input() print(f"Going: {', '.join(party.people)}") print(f"Total: {len(party.people)}")
[ 2, 15941, 7816, 13, 3615, 628, 198, 6259, 796, 5128, 3419, 198, 10608, 796, 3615, 3419, 198, 198, 4514, 407, 1048, 6624, 366, 12915, 1298, 198, 220, 220, 220, 2151, 13, 15332, 13, 33295, 7, 6259, 8, 198, 220, 220, 220, 1048, 796, ...
2.721519
79
# Your TwoSum object will be instantiated and called as such: # obj = TwoSum() # obj.add(number) # param_2 = obj.find(value)
[ 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 2, 3406, 4930, 13065, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 198, 2, 26181, 796, 4930, 13065, 3419, 198, 2, 26181, 13, 2860, 7, 17618, 8, 198, 2, 5772, 62, 17, 796...
2.615385
52
import requests import os from pathlib import Path import settings
[ 11748, 7007, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 6460, 628 ]
4.3125
16
""" Crystal Well Headless execution. Should not be called directly but via headless_execution.py. """ import os import sys from blvcw.crystal_well_components import CrystalWellSettings, CrystalWellLoader from blvcw.crystal_well_simulation import CrystalWellSimulator class __CrystalWellHeadlessExecution: """ ...
[ 37811, 198, 43752, 3894, 7123, 1203, 9706, 13, 198, 19926, 407, 307, 1444, 3264, 475, 2884, 1182, 1203, 62, 18558, 1009, 13, 9078, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 698, 28435, 86, 13, 20470, 7757, ...
3.155263
380
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ 2, 15069, 357, 66, 8, 33448, 532, 1944, 1220, 47986, 32707, 11, 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,...
3.131579
266
import re
[ 11748, 302, 628, 198 ]
3
4
import logging from device.models import Device from device import connection from device.connection.gci import GCI from defs import DeviceRequest LOGGER = logging.getLogger(__name__) """ This module provides functions for sending requests to a device. """ def capability(device: Device): """ Sends a capab...
[ 11748, 18931, 198, 198, 6738, 3335, 13, 27530, 1330, 16232, 198, 6738, 3335, 1330, 4637, 198, 6738, 3335, 13, 38659, 13, 70, 979, 1330, 20145, 40, 198, 6738, 825, 82, 1330, 16232, 18453, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 1...
3.43949
157
""" Module to handle an user crontab file. """ import os import pwd from jadi import component from aj.api.http import url, HttpPlugin from aj.api.endpoint import endpoint, EndpointError from .manager import CronManager from reconfigure.items.crontab import CrontabNormalTaskData, CrontabSpecialTaskData, CrontabEnvSet...
[ 37811, 198, 26796, 284, 5412, 281, 2836, 1067, 756, 397, 2393, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 279, 16993, 198, 6738, 474, 9189, 1330, 7515, 198, 198, 6738, 257, 73, 13, 15042, 13, 4023, 1330, 19016, 11, 367, 29281...
3.352381
105
#!/usr/bin/env python from optparse import OptionParser from PIL import Image if __name__ == "__main__": usage = "usage: %prog [options] arg1 arg2" parser = OptionParser(usage=usage) parser.add_option("-c", "--carrier", dest="carrier", help="The filename of the image used as the...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 6738, 2172, 29572, 1330, 16018, 46677, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 220, 220, 220, 220, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201,...
2.411024
635
#script to plot results from 1_full_process.py #science advances figure guidelines. Preferably 2.5, 5.0, or 7.3 inches wide #and no more than 11.0 inches high. Miminum line width of 0.5 pt. 9 pt and #bold for e.g. A, B, C, etc. #Robert Law, Scott Polar Research Institute, University of Cambridge, 2020. rl491@cam.ac.uk...
[ 2, 12048, 284, 7110, 2482, 422, 352, 62, 12853, 62, 14681, 13, 9078, 198, 2, 16801, 14901, 3785, 9949, 13, 3771, 2232, 1346, 362, 13, 20, 11, 642, 13, 15, 11, 393, 767, 13, 18, 8331, 3094, 198, 2, 392, 645, 517, 621, 1367, 13, ...
2.168323
10,064
from __future__ import annotations import itertools import math from functools import lru_cache from typing import ( Any, Callable, Collection, Dict, Hashable, Iterable, Iterator, KeysView, List, Mapping, Optional, Sequence, Set, Tuple, Union, ) from warnings...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 340, 861, 10141, 198, 11748, 10688, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 4377, 11, 198, 220, 220, 220, 4889, 54...
2.413294
7,116
from authUser.models import CustomAccount from interestsProfile.models import InterestProfile, AlgoIDToUserID from interestsProfile.matching_algo import MatchingAlgo from profileUser.interests_list import length
[ 6738, 6284, 12982, 13, 27530, 1330, 8562, 30116, 198, 6738, 5353, 37046, 13, 27530, 1330, 12033, 37046, 11, 978, 2188, 2389, 2514, 12982, 2389, 198, 6738, 5353, 37046, 13, 15699, 278, 62, 282, 2188, 1330, 13225, 278, 2348, 2188, 198, 67...
4.176471
51
from __future__ import absolute_import from __future__ import print_function from __future__ import division import numpy as np from gym import spaces from gym_brt.envs.qube_base_env import QubeBaseEnv """ Description: A pendulum is attached to an un-actuated joint to a horizontal arm, which is ac...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11550, 1330, 9029, 198, 6738, 11550, 62, 1...
2.464555
663
""" Input/output with the CHO_K1 model files. """ import os import subprocess def gunzip(path, keep=True): """ Check if file is gzipped, in which case extract it (replacing output). Returns original path. """ if os.path.exists(path + '.gz'): if keep: subprocess.call(['gunzip'...
[ 37811, 198, 20560, 14, 22915, 351, 262, 49143, 62, 42, 16, 2746, 3696, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 850, 14681, 628, 198, 4299, 2485, 13344, 7, 6978, 11, 1394, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, ...
2.262873
369
# -*- coding: utf-8 -*- """ """ from __future__ import unicode_literals from __future__ import print_function import logging import threading from time import sleep from unittest import TestCase, SkipTest from unittest.mock import MagicMock from PyQt5.QtCore import QCoreApplication, QEventLoop from qgis_plutil.threa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 18931, 198, 11748,...
3.109195
174
# +-----------------------------------------------------------------------------+ # | Copyright 2019-2020 IBM Corp. All Rights Reserved. | # | | # | Licensed under the Apache License, Version 2.0 (the "License"); ...
[ 2, 1343, 10097, 10541, 19529, 198, 2, 930, 220, 15069, 13130, 12, 42334, 19764, 11421, 13, 1439, 6923, 33876, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
2.354286
1,400
from .fs import FileSystemResultsImporter, BinResultsImporter, JsonResultsImporter
[ 6738, 764, 9501, 1330, 9220, 11964, 25468, 3546, 26634, 11, 20828, 25468, 3546, 26634, 11, 449, 1559, 25468, 3546, 26634, 198 ]
3.952381
21
import os import tensorflow as tf from tensorflow.keras.layers import ( BatchNormalization, Conv2D, Conv2DTranspose, Dense, Flatten, Input, Layer, LeakyReLU, ReLU, Reshape, ) from tensorflow.keras.models import Model from tqdm import tqdm from awesome_gans.losses import discrim...
[ 11748, 28686, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 357, 198, 220, 220, 220, 347, 963, 26447, 1634, 11, 198, 220, 220, 220, 34872, 17, 35, 11, 198, 220, 220,...
2.718919
185
from bs4 import BeautifulSoup import datetime import unicodedata def fetch_timeline(response): ''' Fetch latest COVID-19 news. Input: HTML content fetched from the web. Return ( unix_timestamp, list of paragraphs (unicode NFKC normalized) ) ''' soup = BeautifulS...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 28000, 9043, 1045, 201, 198, 201, 198, 4299, 21207, 62, 16514, 4470, 7, 26209, 2599, 201, 198, 220, 220, 220, 705, 7061, 201, 198, 220, 220, 22...
2.492537
402
import setuptools REQUIRED_PACKAGES = [] PACKAGE_NAME = 'my_alice_pipeline' PACKAGE_VERSION = '1.0.0' setuptools.setup( name=PACKAGE_NAME, version=PACKAGE_VERSION, description='Alice in Wonderland pipeline', url="https://github.com/horns-g/DataPipelines", author="Gabriele Corni", author_email=...
[ 11748, 900, 37623, 10141, 628, 198, 2200, 10917, 37819, 62, 47, 8120, 25552, 796, 17635, 198, 47, 8120, 11879, 62, 20608, 796, 705, 1820, 62, 282, 501, 62, 79, 541, 4470, 6, 198, 47, 8120, 11879, 62, 43717, 796, 705, 16, 13, 15, 1...
2.443182
176
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
[ 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 2, 1398, 12200, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2124, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2100, 796, 2124, 1...
2.175676
74
from .config import Config from flask import g, request import traceback from piperci.gman import client as gman_client
[ 6738, 764, 11250, 1330, 17056, 198, 198, 6738, 42903, 1330, 308, 11, 2581, 198, 11748, 12854, 1891, 198, 198, 6738, 279, 9346, 979, 13, 70, 805, 1330, 5456, 355, 308, 805, 62, 16366, 628, 198 ]
3.542857
35
from django.core.validators import RegexValidator from django.db import models from django.utils.translation import ugettext_lazy as _ from dry_rest_permissions.generics import authenticated_users from results.mixins.change_log import LogChangesMixing from results.models.organizations import Organization class Event...
[ 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 797, 25636, 47139, 1352, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 5894...
2.829991
1,147
import os import pandas import PIL.Image as pil import numpy import shutil from sklearn.model_selection import train_test_split as holdout from sklearn.model_selection import StratifiedKFold as fold from keras.preprocessing.image import ImageDataGenerator as idg strOutputPath = "Output/" try: os.makedirs(strOutputP...
[ 11748, 28686, 198, 11748, 19798, 292, 198, 11748, 350, 4146, 13, 5159, 355, 5560, 198, 11748, 299, 32152, 198, 11748, 4423, 346, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 355, 1745, 448, 198, 6738, ...
2.541099
2,421
nome = str(input("Nome: ")).strip() print('o nome tem silva {}'.format('silva' in nome.lower()))
[ 77, 462, 796, 965, 7, 15414, 7203, 45, 462, 25, 366, 29720, 36311, 3419, 198, 4798, 10786, 78, 299, 462, 2169, 3313, 6862, 23884, 4458, 18982, 10786, 18217, 6862, 6, 287, 299, 462, 13, 21037, 3419, 4008, 198 ]
2.552632
38
# coding:utf-8 from django.contrib.auth.models import AbstractUser, Permission from django.db import models # 部门 # 用户管理模块models # class PermissionRead(models.Model): # read_permission = models.OneToOneField(Permission, verbose_name='子模块权限') # 全站管理models # 配置管理分组
[ 2, 19617, 25, 40477, 12, 23, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 11, 2448, 3411, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 2, 16268, 225, 101, 29785, 101, 628, 198, 2, 133...
1.912752
149
# encoding='utf-8' ''' /** * This is the solution of No. 66 problem in the LeetCode, * the website of the problem is as follow: * https://leetcode-cn.com/problems/plus-one * <p> * The description of problem is as follow: * ==========================================================================================...
[ 2, 21004, 11639, 40477, 12, 23, 6, 198, 198, 7061, 6, 198, 35343, 198, 1635, 770, 318, 262, 4610, 286, 1400, 13, 7930, 1917, 287, 262, 1004, 316, 10669, 11, 198, 1635, 262, 3052, 286, 262, 1917, 318, 355, 1061, 25, 198, 1635, 3740...
1.555556
684
#!/usr/local/bin/python # -*- coding: utf-8 -*- # # RFID Read # import os,sys import json import time import rfidiot from RFIDapi import * import array from ola.ClientWrapper import ClientWrapper import config barSignal = 0 dmxwrapper = ClientWrapper() dmxuniverse = 1 readerid = config.settings['readerID'] print re...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 2, 198, 2, 20445, 2389, 4149, 198, 2, 198, 198, 11748, 28686, 11, 17597, 198, 11748, 33918, 198, 11748, 640,...
2.048839
1,249
import os
[ 11748, 28686, 198, 220, 220, 198, 220, 220, 198, 220, 220, 198 ]
1.583333
12