content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from project.server.config import RAIDER_CONFIG from project.server.shop.actions import track_payment, perform_post_complete_actions
[ 6738, 1628, 13, 15388, 13, 11250, 1330, 37450, 1137, 62, 10943, 16254, 201, 198, 6738, 1628, 13, 15388, 13, 24643, 13, 4658, 1330, 2610, 62, 37301, 11, 1620, 62, 7353, 62, 20751, 62, 4658, 201, 198, 201, 198 ]
3.605263
38
#$Header: /nfs/slac/g/glast/ground/cvs/GlastRelease-scons/EbfWriter/EbfWriterLib.py,v 1.3 2009/11/13 23:20:55 jrb Exp $
[ 29953, 39681, 25, 1220, 77, 9501, 14, 6649, 330, 14, 70, 14, 4743, 459, 14, 2833, 14, 66, 14259, 14, 9861, 459, 26362, 12, 1416, 684, 14, 36, 19881, 34379, 14, 36, 19881, 34379, 25835, 13, 9078, 11, 85, 352, 13, 18, 3717, 14, 11...
2.105263
57
import os os.makedirs('./img/', exist_ok=True) IMAGE_URL = "https://mofanpy.com/static/img/description/learning_step_flowchart.png" urllib_download() print('download image1') request_download() print('download image2') chunk_download() print('download image3')
[ 11748, 28686, 198, 418, 13, 76, 4335, 17062, 7, 4458, 14, 9600, 14, 3256, 2152, 62, 482, 28, 17821, 8, 198, 198, 3955, 11879, 62, 21886, 796, 366, 5450, 1378, 76, 1659, 272, 9078, 13, 785, 14, 12708, 14, 9600, 14, 11213, 14, 40684...
2.821053
95
from rdflib import Graph, Namespace from rdflib.namespace import RDF import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent)) import owlrl RELS = Namespace("http://example.org/relatives#")
[ 6738, 374, 67, 2704, 571, 1330, 29681, 11, 28531, 10223, 198, 6738, 374, 67, 2704, 571, 13, 14933, 10223, 1330, 371, 8068, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 17597, 13, 6978, 13, 33295, 7, 2536, 7, 15235,...
2.96
75
# -*- coding: utf-8 -*- from model.contact import Contact import random
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 2746, 13, 32057, 1330, 14039, 198, 11748, 4738, 198 ]
3
24
from argparse import ArgumentDefaultsHelpFormatter from collections import OrderedDict from os.path import expanduser, isfile from sys import exit as system_exit, argv from virtual_box_tools.custom_argument_parser import CustomArgumentParser from virtual_box_tools.yaml_config import YamlConfig from yaml import load, d...
[ 6738, 1822, 29572, 1330, 45751, 7469, 13185, 22087, 8479, 1436, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 28686, 13, 6978, 1330, 4292, 7220, 11, 318, 7753, 198, 6738, 25064, 1330, 8420, 355, 1080, 62, 37023, 11, 1822, 85,...
3.823529
85
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 from survey.features.page_objects.base import PageObject from survey.features.page_objects.root import AboutPage, HomePage from lettuce.django import django_url
[ 2, 43907, 25, 257, 72, 40379, 28, 19, 39747, 28, 19, 2123, 1509, 28, 19, 21004, 28, 40477, 12, 23, 198, 6738, 5526, 13, 40890, 13, 7700, 62, 48205, 13, 8692, 1330, 7873, 10267, 198, 6738, 5526, 13, 40890, 13, 7700, 62, 48205, 13, ...
3.215385
65
# Credits # "faces" icon created by Vector Valley, PK from the Noun Project # https://thenounproject.com/term/faces/4127357/ import sys, mood_db, json from datetime import datetime from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox, QWidget from PyQt5.QtGui import QIcon, QPalette, QColor from interfac...
[ 2, 29501, 198, 2, 366, 32186, 1, 7196, 2727, 416, 20650, 6916, 11, 29673, 422, 262, 399, 977, 4935, 198, 2, 3740, 1378, 8524, 977, 16302, 13, 785, 14, 4354, 14, 32186, 14, 19, 16799, 27277, 14, 198, 198, 11748, 25064, 11, 10038, 6...
2.517241
435
# -*- coding: utf-8 -*- """ HeteroCL Tutorial : K-Nearest-Neighbor Digit Recognition ======================================================== **Author**: Yi-Hsiang Lai (seanlatias@github) HeteroCL is a domain-specific language (DSL) based on TVM that supports heterogeneous backend devices. Moreover, HeteroCL also sup...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 39, 2357, 78, 5097, 36361, 1058, 509, 12, 8199, 12423, 12, 46445, 2865, 7367, 270, 31517, 653, 198, 10052, 4770, 2559, 198, 198, 1174, 13838, 1174, 25, 26463...
2.981607
4,132
from utils.mnist_reader import * import pca import lda import numpy as np from sklearn.neighbors import KNeighborsClassifier Xtrain_m, Ytrain = load_mnist('data/fashion', kind='train') Xtest_m, Ytest = load_mnist('data/fashion', kind='t10k') classifier = KNeighborsClassifier(n_neighbors=...
[ 6738, 220, 3384, 4487, 13, 10295, 396, 62, 46862, 1330, 1635, 220, 198, 11748, 279, 6888, 198, 11748, 300, 6814, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 509, 46445, 32289, 9487, 7483, 198, ...
2.437659
393
from random import choice from time import sleep from sys import exit print('''Suas opções: \033[30m[ 1 ] PEDRA [ 2 ] PAPEL [ 3 ] TESOURA\33[m''') jogada = int(input('Qual a sua jogada? ')) if jogada == 1: jogada = 'PEDRA' elif jogada == 2: jogada = 'PAPEL' elif jogada == 3: jogada = 'TESOURA' ...
[ 6738, 4738, 1330, 3572, 201, 198, 6738, 640, 1330, 3993, 201, 198, 6738, 25064, 1330, 8420, 201, 198, 4798, 7, 7061, 6, 5606, 292, 1034, 16175, 127, 113, 274, 25, 201, 198, 59, 44427, 58, 1270, 76, 58, 352, 2361, 350, 1961, 3861, ...
1.907441
551
chars_to_remove = [',', '.', '!', ':', ';', '-', ' ', '?'] if __name__ == '__main__': tests = [ "", # false "lotion", # false "racecar", # true "Racecar", # true "Step on no p ets", # true "No lemon no melons", # false "Eva - can I see bees in a cave?", #...
[ 354, 945, 62, 1462, 62, 28956, 796, 685, 3256, 3256, 705, 2637, 11, 705, 0, 3256, 705, 25, 3256, 705, 26, 3256, 705, 12, 3256, 705, 46083, 705, 8348, 60, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354...
2.05641
390
import json from django.contrib.auth import get_user_model from rest_framework.test import APITestCase, APIClient from oauth2_provider.models import AccessToken, Application from django.utils import timezone from .models import Currency, Debtor, Transaction, CurrencyOwner from rest_framework.reverse import reverse from...
[ 11748, 33918, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2043, 395, 20448, 11, 3486, 2149, 75, 1153, 198, 6738, 267, 18439, 17, 62, 15234, 1304,...
3.373984
246
#!/usr/bin/env python # -*- coding: utf-8 -*- """Localization_1D.py: Localizing robot in Two dimensional space""" __author__ ="Gunasekar Jabbala" __credits__ =["Daniel Ingram", "Udacity", " AtsushiSakai"] import random import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animatio...
[ 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, 14565, 1634, 62, 16, 35, 13, 9078, 25, 10714, 2890, 9379, 287, 4930, 38517, 2272, 37811, 198, 834, 9800, ...
2.212048
415
# tut_mission_B737.py # # Created: Aug 2014, SUAVE Team # Modified: Aug 2017, SUAVE Team # Mar 2020, E. Botero # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- # General Python Imports import numpy...
[ 2, 9732, 62, 3411, 62, 33, 22, 2718, 13, 9078, 198, 2, 220, 198, 2, 15622, 25, 220, 2447, 1946, 11, 13558, 32, 6089, 4816, 198, 2, 40499, 25, 2447, 2177, 11, 13558, 32, 6089, 4816, 198, 2, 220, 220, 220, 220, 220, 220, 220, 22...
2.99885
13,040
from __future__ import division import binascii import base64 from six import int2byte, b, integer_types, text_type # SEQUENCE([1, STRING(secexp), cont[0], OBJECT(curvename), cont[1], BINTSTRING) # signatures: (from RFC3279) # ansi-X9-62 OBJECT IDENTIFIER ::= { # iso(1) member-body(2) us(84...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 9874, 292, 979, 72, 198, 11748, 2779, 2414, 198, 6738, 2237, 1330, 493, 17, 26327, 11, 275, 11, 18253, 62, 19199, 11, 2420, 62, 4906, 628, 628, 628, 628, 628, 628, 628, 628, 628,...
2.138493
491
# add your enums here from enum import Enum
[ 2, 751, 534, 551, 5700, 994, 198, 198, 6738, 33829, 1330, 2039, 388, 198 ]
3.214286
14
# -*- coding: utf-8 -*- import phone_transducer as pt import itertools def phone_substitution_transducer(add_meta_arc=True): """Substitute similar phones (optionally).""" max_node = 0 t = pt.Transducer() for l in pt.abc.ALL_SYMS: t.add_arc(0, 0, l, l) for s_ar, s_sw, subst_cost in pt.abc.AR_SW_SIMILA...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 3072, 62, 7645, 646, 2189, 355, 42975, 198, 11748, 340, 861, 10141, 198, 198, 4299, 3072, 62, 7266, 301, 2738, 62, 7645, 646, 2189, 7, 2860, 62, 28961, 62,...
2.017013
3,997
import pika, sys # Inicia a conexão e cria o canal de conexao connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() # Cria a fila se ela não existir channel.queue_declare(queue='task_queue', durable=True) message = ' '.join(sys.argv[1:]) or 'Hello World...' chan...
[ 11748, 279, 9232, 11, 25064, 198, 198, 2, 554, 33577, 257, 369, 1069, 28749, 304, 269, 7496, 267, 29365, 390, 369, 1069, 5488, 198, 38659, 796, 279, 9232, 13, 3629, 8629, 32048, 7, 79, 9232, 13, 32048, 48944, 10786, 36750, 6, 4008, ...
2.318519
270
"""The test for the version sensor platform.""" from __future__ import annotations from typing import Any from unittest.mock import patch from pyhaversion import HaVersionChannel, HaVersionSource from pyhaversion.exceptions import HaVersionException import pytest from homeassistant.components.version.const import ( ...
[ 37811, 464, 1332, 329, 262, 2196, 12694, 3859, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 4377, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 12972, 3099, 9641, 1330, 9398, ...
2.222739
1,935
#!/bin/python3 import os import itertools as it # Complete the substrCount function below. if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') n = int(input()) s = input() result = substrCount(n, s) fptr.write(str(result) + '\n') fptr.close()
[ 2, 48443, 8800, 14, 29412, 18, 201, 198, 201, 198, 11748, 28686, 201, 198, 11748, 340, 861, 10141, 355, 340, 201, 198, 201, 198, 2, 13248, 262, 47294, 12332, 2163, 2174, 13, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834,...
2.143836
146
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for KISS Classes.""" import logging import random import unittest import aprs from .context import kiss from . import constants __author__ = 'Greg Albrecht W2GMD <oss@undef.net>' # NOQA pylint: disable=R0801 __copyright__ = 'Copyright 2017 Greg Albrecht and ...
[ 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, 51, 3558, 329, 509, 16744, 38884, 526, 15931, 198, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 555, 71...
2.482702
607
"""The Base module of the `cpp_linter` package. This holds the objects shared by multiple modules.""" import io import os import logging FOUND_RICH_LIB = False try: from rich.logging import RichHandler FOUND_RICH_LIB = True logging.basicConfig( format="%(name)s: %(message)s", handlers=[Ri...
[ 37811, 464, 7308, 8265, 286, 262, 4600, 20322, 62, 2815, 353, 63, 5301, 13, 770, 6622, 262, 5563, 4888, 416, 198, 48101, 13103, 526, 15931, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 18931, 198, 198, 37, 15919, 62, 49, 20739, 6...
2.56564
1,234
# -*- coding: Utf-8 -* from .text import Text from .window import Window
[ 2, 532, 9, 12, 19617, 25, 7273, 69, 12, 23, 532, 9, 198, 198, 6738, 764, 5239, 1330, 8255, 198, 6738, 764, 17497, 1330, 26580, 198 ]
2.846154
26
import datetime from aioftx.http import PaginatedRequest, PaginatedResponse from pydantic import BaseModel, Field """ Option Volume """ """ Option Interest """
[ 11748, 4818, 8079, 198, 198, 6738, 257, 952, 701, 87, 13, 4023, 1330, 31525, 3898, 18453, 11, 31525, 3898, 31077, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 7663, 198, 198, 37811, 16018, 14701, 37227, 628, 628, 628, 628, 198, ...
3.591837
49
## jgi_metagenome_scraping """ Scrape individual metagenome EC numbers from JGI. `scrape_metagenomes_from_jgi` is the only function meant to be called directly. Usage: scrape_metagenomes_from_jgi.py SAVE_DIR scrape_metagenomes_from_jgi.py SAVE_DIR [--database=<db>] scrape_metagenomes_from_jgi.py SAVE_DIR [--home...
[ 2235, 474, 12397, 62, 4164, 11286, 462, 62, 1416, 2416, 278, 198, 37811, 198, 3351, 13484, 1981, 1138, 11286, 462, 13182, 3146, 422, 449, 18878, 13, 198, 63, 1416, 13484, 62, 4164, 11286, 2586, 62, 6738, 62, 73, 12397, 63, 318, 262, ...
2.707247
3,836
#!/usr/bin/env python3 from collections import defaultdict, deque import sys import re #from dataclasses import dataclass if __name__ == '__main__': sys.exit(main(sys.argv))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 17268, 1330, 4277, 11600, 11, 390, 4188, 198, 11748, 25064, 198, 11748, 302, 198, 2, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 361, 11593, 3672, 834, 662...
2.857143
63
from django.shortcuts import render from django.http import HttpResponse from fullcalendar.models import CalendarEvent from fullcalendar.util import events_to_json, calendar_options # This is just an example for this demo. You may get this value # from a separate file or anywhere you want OPTIONS = """{ timeFormat:...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 1336, 9948, 9239, 13, 27530, 1330, 26506, 9237, 198, 6738, 1336, 9948, 9239, 13, 22602, 1330, 2995, 62, 1462, 62, 1...
1.809219
781
import urllib.request import urllib.parse import re import asyncio import aiohttp from lib.base import * if __name__ == '__main__': main('hubu.edu.cn')
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 2956, 297, 571, 13, 29572, 198, 11748, 302, 198, 11748, 30351, 952, 198, 11748, 257, 952, 4023, 198, 6738, 9195, 13, 8692, 1330, 1635, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834,...
2.711864
59
""" JAYA Algorithm """ import random import numpy from solution import solution
[ 37811, 449, 4792, 32, 978, 42289, 37227, 198, 198, 11748, 4738, 198, 11748, 299, 32152, 198, 6738, 4610, 1330, 4610, 198 ]
3.857143
21
""" News provider for the site rtve.es Checks specifically the Alzheimer tag. Only checks news, not videos or audios """ from datetime import datetime from textwrap import dedent from lxml import html from lxml.cssselect import CSSSelector import requests URL = 'http://www.rtve.es/temas/alzheimer/1060/' SITE...
[ 37811, 198, 220, 220, 220, 3000, 10131, 329, 262, 2524, 374, 83, 303, 13, 274, 628, 220, 220, 220, 47719, 5734, 262, 22434, 7621, 13, 5514, 8794, 1705, 11, 407, 5861, 393, 2709, 4267, 198, 37811, 198, 198, 6738, 4818, 8079, 1330, 48...
2.57384
711
#calculate the extinction between two bands #from Rieke & Lebofsky 1985 Table 3 import argparse parser=argparse.ArgumentParser( prog = 'CalcMIRExtinction', formatter_class=argparse.RawDescriptionHelpFormatter, description='''Calculate the MIR extinction and flux ratios between two wavelengths or bands based on Rie...
[ 2, 9948, 3129, 378, 262, 21935, 1022, 734, 11760, 198, 2, 6738, 371, 494, 365, 1222, 1004, 65, 1659, 15688, 12863, 8655, 513, 198, 198, 11748, 1822, 29572, 198, 198, 48610, 28, 853, 29572, 13, 28100, 1713, 46677, 7, 198, 197, 1676, ...
2.485549
1,557
import json import os from io import StringIO from unittest import TestCase from unittest.mock import patch from freezegun import freeze_time import ruterstop
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 1479, 89, 1533, 403, 1330, 16611, 62, 2435, 198, 198...
3.395833
48
from analytic_diffuse import integrators, models, get_model, get_solution import pytest import numpy as np @pytest.mark.parametrize( 'model,kwargs', [('cosza', {}), ('polydome', {}), ('projgauss', {'a': 0.01}), ('projgauss', {'a': 2}), ('gauss_zenith', {'a': 0.01}), ('gauss_zenith', {...
[ 6738, 49166, 62, 26069, 1904, 1330, 4132, 18942, 11, 4981, 11, 651, 62, 19849, 11, 651, 62, 82, 2122, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198...
2.041667
192
""" Copyright 2022 Objectiv B.V. """ import pytest from sql_models.model import escape_format_string pytestmark = [pytest.mark.db_independent] # mark all tests here as database independent. def assert_escape_compare_value(value): """ helper for test__escape_value. Assert that the escaped value, after formatting...
[ 37811, 198, 15269, 33160, 9515, 452, 347, 13, 53, 13, 198, 37811, 198, 11748, 12972, 9288, 198, 198, 6738, 44161, 62, 27530, 13, 19849, 1330, 6654, 62, 18982, 62, 8841, 198, 198, 9078, 9288, 4102, 796, 685, 9078, 9288, 13, 4102, 13, ...
3.36478
159
number_of_workers = 4 config_SAC = { # "gamma": 0.5, # === Model === # Use two Q-networks (instead of one) for action-value estimation. # Note: Each Q-network will have its own target network. "twin_q": True, # Use a e.g. conv2D state preprocessing network before concatenating the # result...
[ 198, 17618, 62, 1659, 62, 22896, 796, 604, 198, 198, 11250, 62, 50, 2246, 796, 1391, 198, 220, 220, 220, 1303, 366, 28483, 2611, 1298, 657, 13, 20, 11, 198, 220, 220, 220, 1303, 24844, 9104, 24844, 198, 220, 220, 220, 1303, 5765, ...
2.830813
4,959
import requests import json import argparse import sys import os.path import urlparse import urllib base_url = "http://localhost:8080/catgenome/restapi/{0}/register" file_types = { 'vcf': "vcf", 'vcf.gz': "vcf", 'gff': "gene", 'gtf': "gene", 'gff.gz': "gene", 'gtf.gz': "gene", 'gff3': "gene", 'gff3.gz': "gene"...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 11748, 19016, 29572, 198, 11748, 2956, 297, 571, 198, 198, 8692, 62, 6371, 796, 366, 4023, 1378, 36750, 25, 1795, 1795, 14, 92...
1.952756
254
#keithley2400.py #Controls Keithley 2400 SourceMeter through RS232 #Assumes COM3, 9600 Baud, line feed as termination character #Uses pyserial #Dillon Wong 11/03/2018 import serial import time #Make decorator? #Run voltage to 0 V in the event of an emergency.
[ 2, 365, 342, 1636, 1731, 405, 13, 9078, 198, 2, 15988, 82, 14926, 1636, 48548, 8090, 44, 2357, 832, 19340, 24339, 198, 2, 8021, 8139, 9440, 18, 11, 860, 8054, 347, 3885, 11, 1627, 3745, 355, 19883, 2095, 198, 2, 5842, 274, 279, 89...
3.044944
89
from KENN2.layers.residual.KnowledgeEnhancer import KnowledgeEnhancer from KENN2.layers.Kenn import Kenn from KENN2.layers.RelationalKENN import RelationalKENN def unary_parser(knowledge_file, activation=lambda x: x, initial_clause_weight=0.5, save_training_data=False, **kwargs): """ Takes in input the knowle...
[ 6738, 509, 34571, 17, 13, 75, 6962, 13, 411, 312, 723, 13, 23812, 2965, 35476, 8250, 1330, 20414, 35476, 8250, 198, 6738, 509, 34571, 17, 13, 75, 6962, 13, 39324, 1330, 7158, 198, 6738, 509, 34571, 17, 13, 75, 6962, 13, 6892, 864, ...
2.556522
1,150
#!/usr/bin/env python # -*- coding: UTF-8 -*- """__init__.py: Basic requirements for the module.""" __license__ = "MIT" __author__ = "José Fonseca" __copyright__ = "Copyright (c) 2020 José F. R. Fonseca" # ===================================================================================================...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 37811, 834, 15003, 834, 13, 9078, 25, 14392, 5359, 329, 262, 8265, 526, 15931, 198, 198, 834, 43085, 834, 220, 220, ...
3.923445
209
from typing import Union import numpy as np import pandas as pd genres_cols = [f'feature{i + 1}' for i in range(18)] def get_control_items(ratings, user_profiles=None, user_ids=None): """ Get control items of test users for evaluation purposes. :param ratings: pd.DataFrame with columns <userId, movie...
[ 6738, 19720, 1330, 4479, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 5235, 411, 62, 4033, 82, 796, 685, 69, 6, 30053, 90, 72, 1343, 352, 92, 6, 329, 1312, 287, 2837, 7, 1507, 15437, 628, 628...
2.656463
588
"""Autocomplete fields for django-queryset-sequence and django-generic-m2m.""" from dal_genericm2m.fields import GenericM2MFieldMixin from dal_queryset_sequence.fields import QuerySetSequenceModelMultipleField class GenericM2MQuerySetSequenceField(GenericM2MFieldMixin, QuerySet...
[ 37811, 16541, 42829, 6677, 7032, 329, 42625, 14208, 12, 10819, 893, 316, 12, 43167, 290, 42625, 14208, 12, 41357, 12, 76, 17, 76, 526, 15931, 198, 198, 6738, 288, 282, 62, 41357, 76, 17, 76, 13, 25747, 1330, 42044, 44, 17, 44, 15878...
2.700637
157
import numpy as np def direction_to_tuple(direction): """Returns the tuple coordinate offset from the start hexagon given a certain direction""" return { 'n' : (0, -1), 'ne' : (1, -1), 'se' : (1, 0), 's' : (0, 1), 'sw' : (-1, 1), 'nw' : (-1, 0) }[direct...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4299, 4571, 62, 1462, 62, 83, 29291, 7, 37295, 2599, 198, 220, 220, 220, 37227, 35561, 262, 46545, 20435, 11677, 422, 262, 923, 198, 220, 220, 220, 17910, 1840, 1813, 257, 1728, 4571, 37811, 19...
2.209184
392
import sys sys.path.insert(0, '../../') import numpy as np import time from sde_gp import SDEGP import approximate_inference as approx_inf import priors import likelihoods import pickle from sklearn.preprocessing import StandardScaler plot_intermediate = False print('loading data ...') D = np.loadtxt('../heteroscedas...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 40720, 40720, 11537, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 6738, 264, 2934, 62, 31197, 1330, 9834, 7156, 47, 198, 11748, 27665, 62, 259, 4288, 355, 556...
2.367133
1,144
from absl import flags FLAGS = flags.FLAGS FLAGS(['train_smac.py'])
[ 201, 198, 6738, 2352, 75, 1330, 9701, 201, 198, 38948, 50, 796, 9701, 13, 38948, 50, 201, 198, 38948, 50, 7, 17816, 27432, 62, 5796, 330, 13, 9078, 6, 12962, 201, 198 ]
2.28125
32
# Copyright (c) 2015, Oliver Jowett <oliver@mutability.co.uk> # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # THE SOFTWARE IS PROVIDED "AS IS" AND T...
[ 2, 15069, 357, 66, 8, 1853, 11, 15416, 449, 322, 3087, 1279, 349, 1428, 31, 21973, 1799, 13, 1073, 13, 2724, 29, 198, 198, 2, 2448, 3411, 284, 779, 11, 4866, 11, 13096, 11, 290, 14, 273, 14983, 428, 3788, 329, 597, 198, 2, 4007,...
3.290625
320
A, B = input().split(' ') A = float(A) B = float(B) rate = B * 100 result_rate = rate / A print('{:.2f}%'.format(result_rate-100))
[ 32, 11, 347, 796, 5128, 22446, 35312, 10786, 705, 8, 198, 32, 796, 12178, 7, 32, 8, 198, 33, 796, 12178, 7, 33, 8, 198, 198, 4873, 796, 347, 1635, 1802, 198, 20274, 62, 4873, 796, 2494, 1220, 317, 198, 4798, 10786, 90, 25, 13, ...
2.258621
58
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: seven Description : Author : joe date: 2019-07-23 ------------------------------------------------- Change Activity: 2019-07-23: -------------------------------------------------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 47232, 12, 198, 220, 220, 9220, 6530, 171, 120, 248, 220, 220, 220, 220, 3598, 198, 220, 220, 12489, 1058, 198, 220, 220, 6434, 1058, 220, 220, 220, 220, ...
1.183502
4,158
from rest_framework.generics import ListCreateAPIView from utils.rest_framework.generics import RetrieveUpdateDestroy from apps.shop import models as shop_models from apps.shop.rest import serializers as shop_serializers
[ 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 7343, 16447, 2969, 3824, 769, 198, 198, 6738, 3384, 4487, 13, 2118, 62, 30604, 13, 8612, 873, 1330, 4990, 30227, 10260, 49174, 198, 6738, 6725, 13, 24643, 1330, 4981, 355, 6128, 62, 27530, 1...
3.862069
58
from django.shortcuts import get_object_or_404 from gbe.forms import ProfileAdminForm from gbe.functions import validate_perms from gbe.models import ( Profile, UserMessage, ) from gbetext import admin_note from gbe.views import EditProfileView
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 308, 1350, 13, 23914, 1330, 13118, 46787, 8479, 198, 6738, 308, 1350, 13, 12543, 2733, 1330, 26571, 62, 525, 907, 198, 6738, 308, 1350, 13, 275...
3.21519
79
# 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 * class PyPyrsistent(PythonPackage): """Pyrsistent is a number of persistent collections (b...
[ 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.644231
312
""" Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Use 35 hours and a rate of 2.75 per hour to test the program (the pay should be 96.25). You should use input to read a string and float() to convert the string to a number. Do not worry about error checking or bad us...
[ 37811, 198, 16594, 257, 1430, 284, 6152, 262, 2836, 329, 2250, 290, 2494, 583, 1711, 1262, 5128, 284, 24061, 10319, 1414, 13, 220, 198, 11041, 3439, 2250, 290, 257, 2494, 286, 362, 13, 2425, 583, 1711, 284, 1332, 262, 1430, 357, 1169,...
3.554745
137
# provides *examples* of add adding node attributes using the python API # hence does *not* represent a real suite definition from ecflow import * if __name__ == "__main__": # adding variables suite = Suite("s1"); suite.add_variable(Variable("ECF_HOME", "/tmp/")) suite.add_variable("ECF_URL_CMD",...
[ 2, 3769, 1635, 1069, 12629, 9, 286, 751, 4375, 10139, 12608, 1262, 262, 21015, 7824, 198, 2, 12891, 857, 1635, 1662, 9, 2380, 257, 1103, 18389, 6770, 198, 6738, 9940, 11125, 1330, 1635, 198, 220, 220, 220, 220, 198, 361, 11593, 3672, ...
2.259623
2,546
''' OnionPerf Authored by Rob Jansen, 2015 See LICENSE for licensing information ''' import sys, os, socket, logging, random, re, shutil, datetime, urllib.request, urllib.parse, urllib.error, gzip, lzma from threading import Lock from io import StringIO from abc import ABCMeta, abstractmethod LINEFORMATS = "k-,...
[ 7061, 6, 198, 220, 34733, 5990, 69, 198, 220, 26828, 1850, 416, 3851, 449, 33807, 11, 1853, 198, 220, 4091, 38559, 24290, 329, 15665, 1321, 198, 7061, 6, 198, 198, 11748, 25064, 11, 28686, 11, 17802, 11, 18931, 11, 4738, 11, 302, 11...
2.562249
1,245
# Copyright 2019-2021 Huawei Technologies Co., Ltd # # 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 agre...
[ 2, 15069, 13130, 12, 1238, 2481, 43208, 21852, 1766, 1539, 12052, 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...
2.56343
1,143
import datetime from pathlib import Path import pytest from blackbox.exceptions import MissingFields from blackbox.handlers.databases import Redis @pytest.fixture def mock_valid_redis_config(): """Mock valid Redis config.""" return {"password": "citrus", "host": "localhost", "port": "5432", "id"...
[ 11748, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2042, 3524, 13, 1069, 11755, 1330, 25639, 15878, 82, 198, 6738, 2042, 3524, 13, 4993, 8116, 13, 19608, 18826, 1330, 2297, 271, 628, 198...
2.616487
558
# -*- coding: utf-8 -*- # # Copyright (c) 2019 SUNET # 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 # noti...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 35329, 2767, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 220, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, ...
3.16546
967
from django_ical.views import ICalFeed from events.models import Event from events import utils
[ 6738, 42625, 14208, 62, 605, 13, 33571, 1330, 314, 9771, 18332, 198, 6738, 2995, 13, 27530, 1330, 8558, 198, 6738, 2995, 1330, 3384, 4487, 628 ]
3.88
25
from ..remote import RemoteModel from infoblox_netmri.utils.utils import check_api_availability class SettingsAuthAuditLogGridRemote(RemoteModel): """ | ``id:`` none | ``attribute type:`` string | ``created_at:`` none | ``attribute type:`` string | ``user_name:`` none...
[ 6738, 11485, 47960, 1330, 21520, 17633, 198, 6738, 1167, 45292, 1140, 62, 3262, 76, 380, 13, 26791, 13, 26791, 1330, 2198, 62, 15042, 62, 47274, 628, 198, 4871, 16163, 30515, 16353, 270, 11187, 41339, 36510, 7, 36510, 17633, 2599, 198, ...
1.938879
589
# Generated by Django 3.1.3 on 2020-12-13 13:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 12131, 12, 1065, 12, 1485, 1511, 25, 2780, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.017857
56
from cyder.base.tests import ModelTestMixin, TestCase from cyder.cydhcp.vlan.models import Vlan
[ 6738, 3075, 1082, 13, 8692, 13, 41989, 1330, 9104, 14402, 35608, 259, 11, 6208, 20448, 198, 6738, 3075, 1082, 13, 948, 34985, 13155, 13, 85, 9620, 13, 27530, 1330, 569, 9620, 628 ]
3.03125
32
#!/usr/bin/env python # -*- coding: utf-8 -*- """ update_mullvad.py Description of update_mullvad.py. """ import requests import platform from bs4 import BeautifulSoup from pprint import pprint from urllib.parse import urlparse from urllib.parse import urljoin def main(): """docstring for main""" url = "https:...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 19119, 62, 76, 724, 85, 324, 13, 9078, 198, 11828, 286, 4296, 62, 76, 724, 85, 324, 13, 9078, 13, 198, ...
2.394687
527
# coding: utf-8 """ Hydrogen Integration API The Hydrogen Integration API # noqa: E501 OpenAPI spec version: 1.2.1 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Identification(ob...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 15084, 8648, 38410, 7824, 628, 220, 220, 220, 383, 15084, 8648, 38410, 7824, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 4946, 17614, 1020, 2196, 25...
2.24614
3,433
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2014-2016 pocsuite developers (https://seebug.org) See the file 'docs/COPYING' for copying permission """ import os import time import shutil import tempfile from textwrap import dedent from pocsuite.lib.core.settings import REPORT_HTMLBASE from pocsuite...
[ 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, 15269, 357, 66, 8, 1946, 12, 5304, 279, 420, 2385, 578, 6505, 357, 5450, 1378, 325, 1765, 1018, 13, ...
2.345291
1,561
import os, django import sys path = os.path.dirname(os.path.abspath(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(path) # print(sys.path) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") django.setup() import requests import datetime from state import models import re...
[ 11748, 28686, 11, 42625, 14208, 201, 198, 11748, 25064, 201, 198, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, ...
2.384236
203
from .direction_mapper import DirectionMapper from .key_mapper import KeyMapper from .mouse_handler import MouseHandler
[ 6738, 764, 37295, 62, 76, 11463, 1330, 41837, 44, 11463, 198, 6738, 764, 2539, 62, 76, 11463, 1330, 7383, 44, 11463, 198, 6738, 764, 35888, 62, 30281, 1330, 21839, 25060, 198 ]
3.870968
31
# tree
[ 2, 5509, 628 ]
2.666667
3
import qrcode from django import template register = template.Library() # qr = generateQR() import cv2 import time @register.simple_tag(name='scan')
[ 11748, 10662, 6015, 1098, 198, 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 198, 2, 10662, 81, 796, 7716, 48, 49, 3419, 198, 198, 11748, 269, 85, 17, 198, 11748, 640, 628, 198, 31, 30238, ...
2.962963
54
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import os...
[ 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 16529, 35937, 198, 1...
4.787402
127
import os app_key = os.getenv('HL3_APP_KEY') app_secret = os.getenv('HL3_APP_SECRET') access_token = os.getenv('HL3_ACCESS_TOKEN') refresh_token = os.getenv('HL3_REFRESH_TOKEN')
[ 11748, 28686, 198, 198, 1324, 62, 2539, 796, 28686, 13, 1136, 24330, 10786, 6581, 18, 62, 24805, 62, 20373, 11537, 198, 1324, 62, 21078, 796, 28686, 13, 1136, 24330, 10786, 6581, 18, 62, 24805, 62, 23683, 26087, 11537, 198, 15526, 62, ...
2.265823
79
import requests if __name__ == "__main__": movielist = input("Enter movies seprated by comma(,) - ").split(",") recommendation_limit = input("Enter the limit of of recommended movies - ") recommended_Movies = get_sorted_recommendations(movielist, recommendation_limit) for movies in recommended_M...
[ 11748, 7007, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1409, 8207, 396, 796, 5128, 7203, 17469, 6918, 384, 1050, 515, 416, 39650, 7, 35751, 532, 366, 737, 35312, 7, 2430, 8...
2.925373
134
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 27 11:00:02 2019 @author: marzio """ from tensorflow import keras from tensorflow.keras import utils as tfku import numpy as np import os import glob import pandas as pd import talos from CryptoNet import mnist_model from CryptoNet import util ve...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 5267, 2681, 1367, 25, 405, 25, 2999, 13130, 198, 198, 31, 9800, 25, 1667, 89, 952, ...
2.264103
390
from __future__ import unicode_literals import logging from xml.dom.minidom import parseString from django import forms from django.utils import six from django.utils.six.moves.urllib.error import HTTPError, URLError from django.utils.translation import ugettext_lazy as _, ugettext from reviewboard.hostingsvcs.error...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 18931, 198, 6738, 35555, 13, 3438, 13, 1084, 312, 296, 1330, 21136, 10100, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 1330, ...
2.10159
8,741
""" Used to create loggers for modules within the namespace. These loggers are the standard python.logging loggers which can be adapted/changed via the standard methods. """ import logging import logging.handlers import os from directories import LOG_DIR # Default logging format FUNSPACE_LOG_FORMAT = '%(asctime)s %(...
[ 37811, 198, 38052, 284, 2251, 2604, 5355, 329, 13103, 1626, 262, 25745, 13, 198, 4711, 2604, 5355, 389, 262, 3210, 21015, 13, 6404, 2667, 2604, 5355, 543, 460, 307, 16573, 14, 40985, 2884, 262, 3210, 5050, 13, 198, 37811, 198, 198, 11...
2.651176
1,700
import argparse import json import os import re import socket import sqlite3 import sys from datetime import datetime from typing import List import psutil from psutil._common import sconn def get_processes_by_name(name: str) -> List[psutil.Process]: """ 根据进程名,获取进程列表 """ res = [] for proc in psu...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 17802, 198, 11748, 44161, 578, 18, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 26692, 22...
2.008799
1,591
CERTIFICATION = ''' -----BEGIN CERTIFICATE----- MIIDSDCCAjCgAwIBAgIUPMKpJ/j10eQrcQBNnkImIaOYHakwDQYJKoZIhvcNAQEL BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIxMDgwNTAwMzU1NloXDTIyMDgw NTAwMzU1NlowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAxe/ZseXgOTVoF7uTjX5Leknk95jIoyGc+VlxA8BhzGOr r4u6VNQZRCMq...
[ 34, 17395, 30643, 6234, 796, 705, 7061, 198, 30934, 33, 43312, 327, 17395, 30643, 6158, 30934, 198, 8895, 2389, 10305, 4093, 32, 73, 34, 70, 23155, 40, 4339, 70, 44958, 5868, 42, 79, 41, 14, 73, 940, 68, 48, 6015, 48, 15766, 77, 7...
1.347635
909
# this is an embedded Python script it's really on GitHub # and this is only a reference - so when it changes people # will see the change on the webpage .. GOODTIMES ! pid = Runtime.start("pid","PID")
[ 2, 428, 318, 281, 14553, 11361, 4226, 340, 338, 1107, 319, 21722, 198, 2, 290, 428, 318, 691, 257, 4941, 532, 523, 618, 340, 2458, 661, 198, 2, 481, 766, 262, 1487, 319, 262, 35699, 11485, 21090, 51, 3955, 1546, 5145, 198, 198, 35...
3.740741
54
# possible exceptions caused by the API calls from datetime import datetime from typing import Optional from xrpc.util import time_now # a callable raised an exception # the call was made to a point that does not support given arguments
[ 2, 1744, 13269, 4073, 416, 262, 7824, 3848, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 2124, 81, 14751, 13, 22602, 1330, 640, 62, 2197, 628, 628, 628, 198, 220, 220, 220, 1303, 257, 869, ...
3.907692
65
""" This util package provides utility functions that are used across the different gglsbl3 modules e.g. string formatting """ from .format_utils import prettify_seconds, format_max_len from .network_utils import int_to_ip, ip_to_int
[ 37811, 198, 1212, 7736, 5301, 3769, 10361, 5499, 198, 5562, 389, 973, 1973, 262, 1180, 308, 4743, 82, 2436, 18, 13103, 198, 68, 13, 70, 13, 4731, 33313, 198, 37811, 198, 6738, 764, 18982, 62, 26791, 1330, 46442, 1958, 62, 43012, 11, ...
3.545455
66
from .main import Spys __all__ = [ 'Spys' ]
[ 6738, 764, 12417, 1330, 1338, 893, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 4561, 893, 6, 198, 60, 198 ]
2.041667
24
# -*- coding: utf-8 -*- """ Tests for volt.utils ~~~~~~~~~~~~~~~~~~~~ """ # (c) 2012-2020 Wibowo Arindrarto <contact@arindrarto.dev> from pathlib import Path import pytest from pendulum.tz import local_timezone from pendulum.tz.timezone import Timezone from volt import exceptions as exc from volt.utils impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 30307, 329, 13161, 13, 26791, 198, 220, 220, 220, 220, 27156, 8728, 198, 198, 37811, 198, 2, 357, 66, 8, 2321, 12, 42334, 370, 571, 322, 7...
2.036643
846
import torch.nn as nn from .util import init, get_clones """MLP modules."""
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 764, 22602, 1330, 2315, 11, 651, 62, 565, 1952, 198, 198, 37811, 5805, 47, 13103, 526, 15931, 198 ]
2.851852
27
import numpy as np import matplotlib.pyplot as plt from prettytable import PrettyTable from sklearn.datasets import make_blobs, make_swiss_roll from src.ndforest import NDForest from sklearn import datasets ct = 0.1 # DATASETS -----------------------------------------------------------------------------------------...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2495, 11487, 1330, 20090, 10962, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 787, 62, 2436, 8158, 11, 787, 62, 2032, 747, ...
2.962312
398
## https://scikit-optimize.github.io/notebooks/bayesian-optimization.html import numpy as np import matplotlib.pyplot as plt from skopt import gp_minimize ## Implemented in /home/sbn/anaconda2/lib/python2.7/site-packages/skopt/optimizer/base.py ## Implemented in /home/sbn/anaconda2/lib/python2.7/site-packages/skopt/...
[ 2235, 220, 3740, 1378, 36216, 15813, 12, 40085, 1096, 13, 12567, 13, 952, 14, 11295, 12106, 14, 24406, 35610, 12, 40085, 1634, 13, 6494, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, ...
2.520696
1,667
import sys import time #Predefined ==================================================================== #caption------------------------------------------------------------------------ caption = ''' ____ ____ ____________ ____________________ ___ | \ / | | ______ \ |_______...
[ 11748, 25064, 198, 11748, 640, 198, 198, 2, 39156, 18156, 38093, 18604, 198, 2, 6888, 1159, 10097, 982, 198, 6888, 1159, 796, 705, 7061, 198, 1427, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1427, 220, 220, 220, 220, 220, 220...
1.72744
3,801
"""Top-level package for gym-gridverse.""" __author__ = """Andrea Baisero""" __email__ = 'andrea.baisero@gmail.com' __version__ = '0.0.1' import gym_gridverse.gym # noqa: F401
[ 37811, 9126, 12, 5715, 5301, 329, 11550, 12, 25928, 4399, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 1870, 21468, 8999, 271, 3529, 37811, 198, 834, 12888, 834, 796, 705, 392, 21468, 13, 7012, 271, 3529, 31, 14816, 13, 785, 6, ...
2.486111
72
#!/usr/bin/env python # encoding: utf-8 import numpy as np CHAR_TYPE = { u'กขฃคฆงจชซญฎฏฐฑฒณดตถทธนบปพฟภมยรลวศษสฬอ': 'c', u'ฅฉผฟฌหฮ': 'n', u'ะาำิีืึุู': 'v', # า ะ ำ ิ ี ึ ื ั ู ุ u'เแโใไ': 'w', u'่้๊๋': 't', # วรรณยุกต์ ่ ้ ๊ ๋ u'์ๆฯ.': 's', # ์ ๆ ฯ . u'0123456789๑๒๓๔๕๖๗๘๙': 'd', u'"'...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 11748, 299, 32152, 355, 45941, 628, 198, 38019, 62, 25216, 796, 1391, 198, 220, 220, 220, 334, 6, 19567, 223, 19567, 224, 19567, 225, 19567, 226,...
1.533019
2,120
import collections import os.path as osp import sys import PIL.Image import numpy as np import torch from torch.utils import data from .transforms import ImageTransformType, FlipType, apply_transform
[ 11748, 17268, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 25064, 198, 198, 11748, 350, 4146, 13, 5159, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 1330, 1366, 198, 198, 6738, 764, 764...
3.759259
54
import os import sys import numpy as np import macro
[ 11748, 28686, 201, 198, 11748, 25064, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 11748, 15021, 201, 198 ]
2.652174
23
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from django.conf import settings
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198 ]
4.125
8
import subprocess import pytest import os import shutil import time from rl_baselines.student_eval import OnPolicyDatasetGenerator, mergeData, trainStudent ENV_NAME = 'OmnirobotEnv-v0' PATH_SRL = "srl_zoo/data/" DEFAULT_SRL_TEACHERS = "ground_truth" DEFAULT_SRL_STUDENT = "raw_pixels" NUM_TIMESTEP = 25000 NUM_CPU = 4...
[ 11748, 850, 14681, 198, 11748, 12972, 9288, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 640, 198, 198, 6738, 374, 75, 62, 12093, 20655, 13, 50139, 62, 18206, 1330, 1550, 36727, 27354, 292, 316, 8645, 1352, 11, 20121, 6601, 11,...
2.514706
136
from app import app, db from flask import jsonify, request from flask_cors import cross_origin from app.models.score import Score, ScoreSchema from app.models.event import Event from flask_jwt_extended import jwt_required @app.route('/api/score', methods=['POST']) @jwt_required() @cross_origin() @app.route('/api/scor...
[ 6738, 598, 1330, 598, 11, 20613, 198, 6738, 42903, 1330, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 66, 669, 1330, 3272, 62, 47103, 198, 6738, 598, 13, 27530, 13, 26675, 1330, 15178, 11, 15178, 27054, 2611, 198, 6738, 598, 13, 27530...
2.858025
162
import unittest import falcon from falcon.testing import helpers import mock from jumpgate.network.drivers.sl import subnets SUBNET_DICT = {'id': 10, 'networkIdentifier': '9.0.3.192', 'tenant_id': '6', 'cidr': 28, 'networkVlanId': 5, 'gateway...
[ 11748, 555, 715, 395, 198, 198, 11748, 24215, 1102, 198, 6738, 24215, 1102, 13, 33407, 1330, 49385, 198, 11748, 15290, 198, 198, 6738, 4391, 10494, 13, 27349, 13, 36702, 13, 6649, 1330, 850, 45938, 198, 198, 50, 10526, 12884, 62, 35, ...
1.821918
219
#!/usr/bin/env python3 # # Copyright 2020 IBM # 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 t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 12131, 19764, 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, 1...
3.451957
281
import time import allure from selenium.webdriver.support import expected_conditions as ec from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait
[ 11748, 640, 198, 11748, 477, 495, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 1330, 2938, 62, 17561, 1756, 355, 9940, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 198, 6738, 384, 11925, ...
3.555556
54
from msp import msp, simtools import time import math import numpy as np DATAFILE = "runs/Aerobraking.csv" ATMOSPHEREDATA = "densityModels/MarsDensity.csv" SPEED = 2000 # __ times speed RUNTIME = 300000 print("Total runtime will be:", RUNTIME, "s or:", RUNTIME/3600, "hours or:", RUNTIME/86400, "days") # USE km AS ST...
[ 6738, 285, 2777, 1330, 285, 2777, 11, 985, 31391, 198, 11748, 640, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 198, 35, 1404, 8579, 41119, 796, 366, 48381, 14, 32, 263, 672, 430, 3364, 13, 40664, 1, 198, 1404, 44, 26...
2.534959
615
# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 2, 15069, 357, 66, 8, 2211, 2297, 10983, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.401674
239
mark = float(input('Mark?')) outof = float(input('Out of?')) print('Your mark is:',mark/outof*100,'%')
[ 4102, 796, 12178, 7, 15414, 10786, 9704, 8348, 4008, 201, 198, 448, 1659, 796, 12178, 7, 15414, 10786, 7975, 286, 8348, 4008, 201, 198, 4798, 10786, 7120, 1317, 318, 25, 3256, 4102, 14, 448, 1659, 9, 3064, 4032, 4, 11537, 201, 198, ...
2.142857
56
'''Returns a fact to indicate if this machine can be upgraded to macOS 12 Monterey''' # Based on # https://github.com/hjuutilainen/adminscripts/blob/master/ # check-10.12-sierra-compatibility.py # sysctl function by Michael Lynn # https://gist.github.com/pudquick/581a71425439f2cf8f09 # IOKit bindings by Mich...
[ 7061, 6, 35561, 257, 1109, 284, 7603, 611, 428, 4572, 460, 307, 17955, 284, 40017, 1105, 5575, 48023, 7061, 6, 198, 198, 2, 13403, 319, 198, 2, 3740, 1378, 12567, 13, 785, 14, 71, 14396, 22602, 391, 268, 14, 324, 42951, 6519, 82, ...
2.020719
4,537