content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import os from discord.ext import tasks from ..constants import C3_ADDRESS, FRAX_DECIMALS, \ C3_DECIMALS, FRAX_C3_POOL from ..contract_info import token_supply, uni_v2_pool_price from ..utils import get_discord_client, get_eth_web3, \ get_polygon_web3, load_abi, \ ...
[ 11748, 28686, 198, 198, 6738, 36446, 13, 2302, 1330, 8861, 198, 198, 6738, 11485, 9979, 1187, 1330, 327, 18, 62, 2885, 7707, 7597, 11, 376, 3861, 55, 62, 41374, 3955, 23333, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.121951
328
from setuptools import setup setup( name='hx711', version='0.1', description='HX711 Python Library for Jetson Nano', py_modules=['hx711'], install_requires=['logzero'] )
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 71, 87, 22, 1157, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, 6764, 11639, 39, 55, 22, 1157, 11361, 10074, ...
2.448718
78
from models import User, Post # delete user from post, user where post.user_id = user.id query = (Post & User).delete(User) # mysql supports; sqlite3 dosenot support
[ 6738, 4981, 1330, 11787, 11, 2947, 198, 198, 2, 12233, 2836, 422, 1281, 11, 2836, 810, 1281, 13, 7220, 62, 312, 796, 2836, 13, 312, 198, 22766, 796, 357, 6307, 1222, 11787, 737, 33678, 7, 12982, 8, 220, 1303, 48761, 6971, 26, 44161,...
3.36
50
FacultyNameChoices = [ ('FAH','Arts And Humanities'),('FBA','Business Admin'), ('FEd','Education'),('FRS','Religous Studies'),('FOS','Science'), ('FIT','Information Technology'),('FON','Nursing')] CourseCategory = [ ('Core Course','Core Course'),('General Education Course','General Education Course'), ...
[ 47522, 10672, 5376, 22164, 1063, 796, 685, 198, 220, 220, 220, 19203, 7708, 39, 41707, 3163, 912, 843, 5524, 871, 33809, 10786, 37, 4339, 41707, 24749, 32053, 33809, 198, 220, 220, 220, 19203, 37, 7407, 41707, 41183, 33809, 10786, 37, 6...
2.982818
291
import xlrd from datetime import date from datetime import datetime import random workbook = xlrd.open_workbook('diagnose.xlsx') worksheet = workbook.sheet_by_name('Sheet1') file = open("diagnoseInsert.txt","w") empNum = 2 for x in range(0, 30884): year = random.choice(range(1990, 2018)) month = random....
[ 11748, 2124, 75, 4372, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 4738, 198, 198, 1818, 2070, 796, 2124, 75, 4372, 13, 9654, 62, 1818, 2070, 10786, 47356, 577, 13, 87, 7278, 87, 11537, 198,...
2.274809
393
# -*- coding: utf-8 -*- """ Created on Thu May 16 11:50:16 2019 @author: DiPu """ import mysql.connector con=mysql.connector.connect(user="diksha",password='diksha1702', host='db4free.net',database='diksha') c=con.cursor() c.execute("""CREATE TABLE student( name text, age i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 1737, 1467, 1367, 25, 1120, 25, 1433, 13130, 198, 198, 31, 9800, 25, 6031, 47, 84, 198, 37811, 198, 198, 11748, 48761, 13, 8443, 273, 19...
2.343085
376
from typing import List
[ 6738, 19720, 1330, 7343 ]
5.75
4
########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 Andreas Heger # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by ...
[ 29113, 29113, 7804, 2235, 198, 2, 198, 2, 220, 220, 337, 7397, 25503, 52, 22476, 864, 5215, 31994, 4912, 198, 2, 198, 2, 220, 220, 720, 7390, 3, 198, 2, 198, 2, 220, 220, 15069, 357, 34, 8, 3717, 33728, 679, 1362, 198, 2, 198, ...
2.660729
1,179
#!/usr/bin/env python import click import json import logging import os import requests import sys import prefect @click.group() def cli(): """ The Prefect CLI """ pass @cli.command() def make_user_config(): """ Generates a user configuration file """ user_config_path = prefect.con...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 11748, 3904, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 25064, 198, 11748, 662, 2309, 628, 198, 31, 12976, 13, 8094, 3419, 198, 4299, 537...
2.846787
607
from day1_func import get_fuel lines = open('../../data/day1_data.txt').read().strip().split('\n') fuels = [get_fuel(int(line)) for line in lines] print(f'Part 1: {sum(fuels)}') total_sum = 0 for line in lines: last_value = int(line) while True: last_value = get_fuel(last_value) if last_val...
[ 6738, 1110, 16, 62, 20786, 1330, 651, 62, 25802, 198, 198, 6615, 796, 1280, 10786, 40720, 40720, 7890, 14, 820, 16, 62, 7890, 13, 14116, 27691, 961, 22446, 36311, 22446, 35312, 10786, 59, 77, 11537, 198, 198, 20942, 1424, 796, 685, 11...
2.258242
182
from .PgSQL import PostgreSQL from .config_helpers import make_config_file, read_config_file, configurations from .geopandas_helpers import spatialize_point_dataframe from .raw_data import DataSource from .console import _console __VERSION__ = "0.2.2" # _console.print(":globe_showing_americas:", justify="left") # _c...
[ 6738, 764, 31743, 17861, 1330, 2947, 47701, 198, 6738, 764, 11250, 62, 16794, 364, 1330, 787, 62, 11250, 62, 7753, 11, 1100, 62, 11250, 62, 7753, 11, 25412, 198, 6738, 764, 469, 404, 392, 292, 62, 16794, 364, 1330, 21739, 1096, 62, ...
2.926554
177
from django.urls import path from .views import CreateDeliveryInfo, DeliveryInfoApi, ListDeliveryInfo app_name = 'delivery' urlpatterns = [ path('delivery-information/add', CreateDeliveryInfo.as_view(), name='add_delivery_info'), path('delivery-information/<int:pk>', DeliveryInfoApi.as_view(), name='delivery...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 13610, 33129, 12360, 11, 28682, 12360, 32, 14415, 11, 7343, 33129, 12360, 198, 198, 1324, 62, 3672, 796, 705, 12381, 6315, 6, 198, 198, 6371, 33279, 82, 7...
3.028571
140
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # day11.py # ------- # Solutions to Advent of Code 2020, day 11. # https://adventofcode.com/2020/day/11 # #======================================================================= import sys #----...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 23926, 1421, 18604, 198, 2, 198, 2, 1110, 1157, 13, 9078, 198, 2, 35656, 198, 2, 23555, 284, 33732, 286, 612...
7.102128
235
import unittest import gzip from edgestats import EdgeStats if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 308, 13344, 198, 6738, 1225, 3495, 1381, 1330, 13113, 29668, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.769231
39
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
[ 2, 19617, 28, 40477, 12, 23, 198, 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, 5964, 1321, 13, 19...
3.207967
4,669
import logging import json from urllib import error from pkg_resources import resource_filename, Requirement import pandas as pd from pvlib import iotools from requests.exceptions import HTTPError from solarforecastarbiter.datamodel import Observation, SolarPowerPlant from solarforecastarbiter.io.reference_observat...
[ 11748, 18931, 198, 11748, 33918, 198, 6738, 2956, 297, 571, 1330, 4049, 198, 6738, 279, 10025, 62, 37540, 1330, 8271, 62, 34345, 11, 9394, 24615, 628, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 279, 85, 8019, 1330, 1312, 313, 10...
2.454566
4,380
import os import sys # sys.path.insert(0, os.path.abspath('/home/jrodrigues/Documents/PhD/fulmar')) from fulmar.estimators import ( estimate_planet_mass, estimate_semi_amplitude ) from fulmar.utils import ( FulmarWarning ) import astropy.units as u import numpy as np import numpy.testing as npt from astro...
[ 11748, 28686, 198, 11748, 25064, 198, 2, 25064, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 397, 2777, 776, 10786, 14, 11195, 14, 73, 14892, 4359, 947, 14, 38354, 14, 2725, 35, 14, 913, 3876, 6, 4008, 198, 198, 6738, 4624...
2.308967
1,026
''' This data was automatically generated by script img2data.py. These images are part of the FAMFAMFAM silk icons set which is provided under a creative commons license. For more information see http://www.famfamfam.com/lab/icons/silk/ ''' data = { 'cancel': ''' R0lGODlhEAAQAPcAAAAAAAAAMwAAZgA...
[ 7061, 6, 201, 198, 1212, 1366, 373, 6338, 7560, 416, 4226, 33705, 17, 7890, 13, 9078, 13, 201, 198, 201, 198, 4711, 4263, 389, 636, 286, 262, 42129, 37, 2390, 37, 2390, 23938, 17149, 900, 543, 318, 201, 198, 41279, 739, 257, 7325, ...
1.422896
18,021
""" .. module:: create :synopsis: Import a Word `docx` document, define its metadata, cover and rights, and publish it as an EPUB3. .. moduleauthor:: Gavin Chait <github.com/turukawa> CreateWork ========== Publish a standards compliant EPUB3 creative work from a source Microsoft Word `docx` document, and define it...
[ 37811, 198, 492, 8265, 3712, 2251, 198, 220, 1058, 28869, 24608, 25, 17267, 257, 9678, 4600, 15390, 87, 63, 3188, 11, 8160, 663, 20150, 11, 3002, 290, 2489, 11, 290, 7715, 340, 355, 281, 412, 5105, 33, 18, 13, 198, 198, 492, 8265, ...
2.706205
12,587
from __future__ import unicode_literals import glob import pdb from builtins import range from imp import reload from io import open import numpy as np from dlinputs import tarrecords reload(tarrecords) # get_ipython().system(u'tar -ztvf testdata/imagenet-000000.tgz | sed 7q') # get_ipython().system(u'tar xvf tes...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 15095, 198, 11748, 279, 9945, 198, 6738, 3170, 1040, 1330, 2837, 198, 6738, 848, 1330, 18126, 198, 6738, 33245, 1330, 1280, 198, 198, 11748, 299, 32152, 355, 4...
2.783217
143
#!/usr/bin/python # # Copyright 2016 Canonical 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 agr...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 1584, 19507, 605, 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...
2.430063
16,958
"""Mid-level helper functions for AutoTS.""" import numpy as np import pandas as pd import datetime import json from hashlib import md5 from autots.evaluator.metrics import PredictionEval from autots.tools.transform import RandomTransform def seasonal_int(include_one: bool = False): """Generate a random integer o...
[ 37811, 22622, 12, 5715, 31904, 5499, 329, 11160, 4694, 526, 15931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 6738, 12234, 8019, 1330, 45243, 20, 198, 6738, ...
2.050615
32,777
from utils import get_input_lines pos_x = 0 pos_y = 0 waypoint_x = 10 waypoint_y = 1 for line in get_input_lines(__file__): action = line[0] n = int(line[1:]) # Handle actions if action == "N": waypoint_y += n elif action == "S": waypoint_y -= n elif action == "E": wa...
[ 6738, 3384, 4487, 1330, 651, 62, 15414, 62, 6615, 198, 198, 1930, 62, 87, 796, 657, 198, 1930, 62, 88, 796, 657, 198, 198, 1014, 4122, 62, 87, 796, 838, 198, 1014, 4122, 62, 88, 796, 352, 198, 198, 1640, 1627, 287, 651, 62, 1541...
1.915888
535
"""2019 - Day 13 Part 1: Care Package.""" from src.year2019.intcode import Computer def solve(task: str) -> int: """Count the number of blocks.""" computer = Computer() computer.load_program(task) computer.execute() return list(computer.stdout)[2::3].count(2)
[ 37811, 23344, 532, 3596, 1511, 2142, 352, 25, 7276, 15717, 526, 15931, 198, 6738, 12351, 13, 1941, 23344, 13, 600, 8189, 1330, 13851, 628, 198, 4299, 8494, 7, 35943, 25, 965, 8, 4613, 493, 25, 198, 220, 220, 220, 37227, 12332, 262, ...
2.9375
96
#!/usr/bin/env python 'FontForge: Demo script to add menu items to FF tools menu' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2014 SIL International (http://www.sil.org)' __license__ = 'Released under the MIT License (http://opensource.org/licenses/MIT)' __author__ = 'David Raymond' ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6, 23252, 19857, 25, 34588, 4226, 284, 751, 6859, 3709, 284, 18402, 4899, 6859, 6, 198, 834, 6371, 834, 796, 705, 4023, 1378, 12567, 13, 785, 14, 18217, 77, 3808, 72, 14, 79, 893, ...
3.453252
492
import math from copy import deepcopy from tensor2struct.utils import tree # Common routines for kernel functions #### # An extremely simple cache
[ 11748, 10688, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 11192, 273, 17, 7249, 13, 26791, 1330, 5509, 628, 220, 220, 220, 1303, 8070, 31878, 329, 9720, 5499, 628, 628, 628, 628, 198, 4242, 628, 220, 220, 220, 1303, 1052, 4457...
3.688889
45
import json from django.conf import settings from django.http import Http404 from django.utils import timezone from PIL import Image, ImageFilter from board.models import TelegramSync from board.modules.response import StatusDone, StatusError from modules.subtask import sub_task_manager from modules.telegram import T...
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 22417, 198, ...
4.054945
91
_chars = "あいうおえかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉゃゅょっー1234567890!?、。" chars = [c for c in _chars] print(data_load())
[ 62, 354, 945, 796, 366, 40948, 18566, 29557, 2515, 232, 2515, 230, 27370, 33778, 31917, 2515, 239, 46036, 43357, 22180, 33623, 2515, 249, 2515, 251, 25224, 2515, 94, 2515, 97, 28134, 30201, 26945, 28618, 2515, 105, 2515, 255, 5641, 31676,...
0.782828
198
# coding=utf-8 # Author: Jianghan LI # Question: 593.Valid_Square # Date: 2017-05-22
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 6434, 25, 40922, 6064, 24653, 198, 2, 18233, 25, 642, 6052, 13, 47139, 62, 48011, 198, 2, 7536, 25, 2177, 12, 2713, 12, 1828, 628 ]
2.606061
33
lines_count = int(input()) lines = [input() for _ in range(lines_count)] solve(lines)
[ 198, 198, 6615, 62, 9127, 796, 493, 7, 15414, 28955, 198, 198, 6615, 796, 685, 15414, 3419, 329, 4808, 287, 2837, 7, 6615, 62, 9127, 15437, 198, 198, 82, 6442, 7, 6615, 8 ]
2.69697
33
# Copyright 2021 Touca, Inc. Subject to Apache-2.0 License. import math from pathlib import Path from colorama import Style, Fore, Back, init init()
[ 2, 15069, 33448, 23359, 6888, 11, 3457, 13, 15540, 284, 24843, 12, 17, 13, 15, 13789, 13, 198, 198, 11748, 10688, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 3124, 1689, 1330, 17738, 11, 4558, 11, 5157, 11, 2315, 198, 198, 15003, ...
3.454545
44
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tools for accessing atmospheric and oceanic science data on remote servers.""" # Version import needs to come first so everyone else can pull on import from ._version imp...
[ 2, 15069, 357, 66, 8, 2211, 12, 4626, 311, 13323, 261, 25767, 669, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 347, 10305, 513, 12, 2601, 682, 13789, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 1...
3.716981
106
# B2025-输出字符菱形 print(" *") print(" ***") print("*****") print(" ***") print(" *")
[ 2, 347, 1238, 1495, 12, 164, 122, 241, 49035, 118, 27764, 245, 163, 105, 99, 164, 237, 109, 37605, 95, 201, 198, 4798, 7203, 220, 1635, 4943, 201, 198, 4798, 7203, 17202, 4943, 201, 198, 4798, 7203, 35625, 4943, 201, 198, 4798, 7203...
1.692308
52
import copy from .util import is_terminator, is_label, mklabel
[ 11748, 4866, 198, 198, 6738, 764, 22602, 1330, 318, 62, 23705, 1352, 11, 318, 62, 18242, 11, 33480, 18242, 628, 628, 198 ]
3.090909
22
from config import config from tests.pages import SignInPage from tests.test_utils import do_verify, do_email_auth_verify
[ 6738, 4566, 1330, 4566, 198, 6738, 5254, 13, 31126, 1330, 5865, 818, 9876, 198, 198, 6738, 5254, 13, 9288, 62, 26791, 1330, 466, 62, 332, 1958, 11, 466, 62, 12888, 62, 18439, 62, 332, 1958, 628, 628, 198 ]
3.342105
38
# rave's virtual file system. import os import io import re import threading import collections import rave.common import rave.log _log = rave.log.get(__name__) # Canonical path separator. PATH_SEPARATOR = '/' # Root. ROOT = '/' # Unnormalized path pattern. BAD_PATH_PATTERN = re.compile(r'(?:{0}{{2,}}|(?:{0}|^)\.+(...
[ 2, 46242, 338, 7166, 2393, 1080, 13, 198, 11748, 28686, 198, 11748, 33245, 198, 11748, 302, 198, 11748, 4704, 278, 198, 11748, 17268, 198, 198, 11748, 46242, 13, 11321, 198, 11748, 46242, 13, 6404, 198, 198, 62, 6404, 796, 46242, 13, ...
2.776888
874
#from django.http import HttpResponse #from django.http import response_redirect from django.shortcuts import render_to_response from django.views.generic import DetailView, CreateView, TemplateView from geogebra_applet.models import GeogebraApplet
[ 2, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 2, 6738, 42625, 14208, 13, 4023, 1330, 2882, 62, 445, 1060, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 198, 6738, 42625, 14208, 13, 33571, ...
3.652174
69
import os import sys import json import shutil import tempfile from os.path import isfile, join import pathlib import pytest import conda_mirror.diff_tar as dt EMPTY_MD5 = "d41d8cd98f00b204e9800998ecf8427e" @pytest.fixture
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 11748, 3108, 8019, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 1779, 64, ...
2.540816
98
# Generated by Django 3.0.2 on 2020-02-05 10:54 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 17, 319, 12131, 12, 2999, 12, 2713, 838, 25, 4051, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/python # -*- coding: utf-8 -*- import os from views.CmdView.tokenify import Tokenify from views.CmdView.command import Command
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 198, 6738, 5009, 13, 40109, 7680, 13, 30001, 1958, 1330, 29130, 1958, 198, 6738, 5009, 13, 40109, 7680, 13,...
2.916667
48
import numpy as np from scipy.misc import imread import torch import random #这里跳帧 #增加跳帧功能 #跳帧且加载gt
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 44374, 1330, 545, 961, 198, 11748, 28034, 198, 11748, 4738, 628, 198, 198, 2, 32573, 247, 34932, 234, 164, 115, 111, 30585, 100, 198, 198, 2, 161, 95, 252, 27950, 254, 164,...
1.544118
68
''' Created on 21 Feb 2017 @author: jkiesele ''' from TrainDataDeepJet import TrainData_Flavour, TrainData_simpleTruth, TrainData_fullTruth, fileTimeOut import numpy as np class TrainData_deepCSV(TrainData_Flavour, TrainData_simpleTruth): ''' same as TrainData_deepCSV but with 4 truth labels: B BB C UDSG ...
[ 7061, 6, 198, 41972, 319, 2310, 3158, 2177, 198, 198, 31, 9800, 25, 474, 43724, 11129, 198, 7061, 6, 198, 6738, 16835, 6601, 29744, 42273, 1330, 16835, 6601, 62, 7414, 29023, 11, 16835, 6601, 62, 36439, 38782, 11, 16835, 6601, 62, 128...
1.711765
2,380
#!/usr/bin/env python # -*- coding: utf-8 -*- from clover.gui import CloverApp, Clock # may want to consider bounding speed app = CloverApp(title="leo-demo")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 537, 2502, 13, 48317, 1330, 41154, 4677, 11, 21328, 628, 198, 198, 2, 743, 765, 284, 2074, 5421, 278, 2866...
2.688525
61
import docker from docker.errors import ContainerError import logging import pytest LOGGER = logging.getLogger(__name__) PYTHON_VERSION='3.9.5' NOTEBOOK_IMAGE_TAG=f'python-{PYTHON_VERSION}' @pytest.mark.parametrize( 'language,version_output', [ ('python', ['Python', '3.9.5\n']), ], ) def test...
[ 11748, 36253, 198, 6738, 36253, 13, 48277, 1330, 43101, 12331, 198, 198, 11748, 18931, 198, 198, 11748, 12972, 9288, 628, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 47, 56, 4221, 1340, 62, 43...
2.702032
443
""" Orka Discord Bot Copyright (c) 2017 William Bennett """ ########### # IMPORTS # ########### import discord import random import markovify from os import path, makedirs from scripts import * ################### # OTHER FUNCTIONS # ################### def add_msg(channel, text, mode='a+'): """ Appends ...
[ 37811, 198, 5574, 4914, 39462, 18579, 198, 15269, 357, 66, 8, 2177, 3977, 17468, 198, 37811, 198, 198, 7804, 21017, 198, 2, 30023, 33002, 1303, 198, 7804, 21017, 198, 198, 11748, 36446, 198, 11748, 4738, 198, 11748, 1317, 709, 1958, 198...
2.693798
258
# Copyright 2021 MosaicML. All Rights Reserved. """Callback to save checkpoints during training.""" from __future__ import annotations import logging import os import pathlib import textwrap from typing import Callable, List, Optional, Tuple, Union from composer.core import Event, State from composer.core.callback ...
[ 2, 15069, 33448, 5826, 18452, 5805, 13, 1439, 6923, 33876, 13, 198, 198, 37811, 47258, 284, 3613, 36628, 1141, 3047, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 3108, ...
2.728606
818
import torch from torch.autograd import Variable import numpy as np import torch.nn.functional as F import models # Return triplet of predictions, ground-truth and error
[ 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 4981, 198, 198, 2, 8229, 15055, 83, 286, 16277, 11, 2323, 12, 35310, ...
3.886364
44
# Faça um programa que tenha um função notas() que pode receber várias # notas de alunos e vai retornar um dicionário com as seguintes informações: # - Quantidade de notas; # - A maior nota; # - A menor nota; # - A média da turma; # - A situação(opcional); # Adicione também as docstrings da função. def notas(show=Fal...
[ 2, 18350, 50041, 23781, 1430, 64, 8358, 3478, 3099, 23781, 1257, 16175, 28749, 407, 292, 3419, 8358, 279, 1098, 1407, 527, 410, 6557, 380, 292, 198, 2, 407, 292, 390, 435, 403, 418, 304, 410, 1872, 1005, 1211, 283, 23781, 288, 47430, ...
1.94898
686
#!/usr/bin/env python3.6 # -*- coding: utf-8 -*- # # Copyright 2016 Alec Goliboda # # group.py from __future__ import print_function import logging import json import zlib # import markdown from datetime import datetime import tornado.options # import pymysql import hashlib import bcrypt i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 21, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 15069, 1584, 38285, 26849, 571, 11329, 201, 198, 2, 201, 198, 2, 1448, 13, ...
1.400899
6,897
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug # Copyright: (c) <spug.dev@gmail.com> # Released under the AGPL-3.0 License. import json from .utils import AttrDict # 自定义的解析异常 # 需要校验的参数对象 class Argument(object): """ :param name: name of option :param default: default value if t...
[ 2, 15069, 25, 357, 66, 8, 4946, 4561, 1018, 12275, 13, 3740, 1378, 12567, 13, 785, 14, 44813, 79, 1018, 14, 2777, 1018, 198, 2, 15069, 25, 357, 66, 8, 1279, 2777, 1018, 13, 7959, 31, 14816, 13, 785, 29, 198, 2, 28728, 739, 262, ...
2.091837
196
import re; from .cBugTranslation import cBugTranslation; aoBugTranslations = [ # ASan build related -> Ignored cBugTranslation( azs0rbAdditionalIrrelevantStackFrameSymbols = [ rb".*!`anonymous namespace'::Create", # Part of skia rb".*!base::debug::BreakDebugger", rb".*!base::debug::CollectGDI...
[ 11748, 302, 26, 198, 6738, 764, 66, 25624, 48313, 1330, 269, 25624, 48313, 26, 198, 198, 5488, 25624, 8291, 49905, 796, 685, 198, 220, 1303, 7054, 272, 1382, 3519, 4613, 16583, 1850, 198, 220, 269, 25624, 48313, 7, 198, 220, 220, 220,...
2.491493
1,587
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 628, 628, 220, 220, 220, 220, 628, 198, 220, 220, 220 ]
2.692308
26
from typing import Callable, Hashable, TypeVar, Iterable, Union from ._symbol import Symbol from .head import Head _T = TypeVar("_T", bound=Hashable) _A = TypeVar("_A") class Validator: """A validator class that will be used for Expr argument validation.""" def register(self, value: _T): """Register...
[ 6738, 19720, 1330, 4889, 540, 11, 21059, 540, 11, 5994, 19852, 11, 40806, 540, 11, 4479, 198, 6738, 47540, 1837, 23650, 1330, 38357, 198, 6738, 764, 2256, 1330, 7123, 198, 198, 62, 51, 796, 5994, 19852, 7203, 62, 51, 1600, 5421, 28, ...
2.544658
571
"""``cubi-tk archive prepare``: Prepare a project for archival""" import errno import os import re import shutil import sys import tempfile from cookiecutter.main import cookiecutter from logzero import logger from ..common import execute_shell_commands from ..isa_tpl import IsaTabTemplate from ..isa_tpl import load...
[ 37811, 15506, 66, 29603, 12, 30488, 15424, 8335, 15506, 25, 43426, 257, 1628, 329, 3934, 2473, 37811, 198, 198, 11748, 11454, 3919, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 20218, 7753, 198...
1.887411
1,128
import numpy as np import argparse from sklearn.decomposition import PCA from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler parser = argparse.ArgumentParser() parser.add_argument('-x', '--datapath', type=str, required=True) parser.add_argument('-y', '--labels', type=str, requ...
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, 198, 6738, 1341, 35720, 13, 79, 541, 4470, 1330, 787, 62, 79, 541, 4470, 198, 6738, 1341, 35720, 13, 3866, 3694...
2.833811
349
# -*- coding: utf-8 -*- """ Created on Thu Aug 13 09:14:32 2020 @author: Pante """ import os, features, time import numpy as np from sklearn.preprocessing import StandardScaler from array_helper import find_szr_idx, match_szrs, merge_close from build_feature_data import get_data, get_features_allch from sklearn.metric...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 2447, 1511, 7769, 25, 1415, 25, 2624, 12131, 198, 198, 31, 9800, 25, 11427, 68, 198, 37811, 198, 11748, 28686, 11, 3033, 11, 640, 198, 1...
2.288813
2,628
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 10662, 17721, 21282, 74, 7295, 13, 25927, 1330, 19390, 198 ]
2.576923
26
from cartography.intel.aws import ecr from tests.data.aws.ecr import GET_ECR_REPOSITORY_IMAGE_VULNS
[ 6738, 6383, 4867, 13, 48779, 13, 8356, 1330, 304, 6098, 198, 6738, 5254, 13, 7890, 13, 8356, 13, 721, 81, 1330, 17151, 62, 2943, 49, 62, 35316, 2640, 2043, 15513, 62, 3955, 11879, 62, 53, 6239, 8035, 628 ]
2.657895
38
from time import sleep, gmtime, mktime from datetime import datetime import logging import scrapy import redis import msgpack import xxhash import pymongo as pm import feedparser as fp from colorama import Back, Fore, Style from ..settings import MONGODB_URI, REDIS_HOST, REDIS_PORT, REDIS_PWD, REDIS_PENDING_QUEUE def...
[ 6738, 640, 1330, 3993, 11, 308, 76, 2435, 11, 33480, 2435, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 18931, 198, 11748, 15881, 88, 198, 11748, 2266, 271, 198, 11748, 31456, 8002, 198, 11748, 31383, 17831, 198, 11748, 279, 494...
2.840206
194
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 8 15:36:15 2020 dataset transform @author: minjie """ import albumentations as A from albumentations.pytorch import ToTensor as ToTensor_albu import cv2 import torch from multiprocessing import Pool from utils.parse_meta import parse_kpds import ...
[ 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, 2365, 220, 807, 1315, 25, 2623, 25, 1314, 12131, 198, 19608, 292, 316, 6121, 198, 3...
1.896923
650
''' Created on 1.12.2016 @author: Darren '''''' Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm? Expected runtime complexity is in O(log n) and the input is sorted. " '''
[ 7061, 6, 201, 198, 41972, 319, 352, 13, 1065, 13, 5304, 201, 198, 201, 198, 31, 9800, 25, 26203, 201, 198, 39115, 7061, 201, 198, 201, 201, 198, 7155, 510, 329, 367, 12, 15732, 25, 1867, 611, 262, 33499, 7177, 318, 23243, 287, 419...
2.849462
93
import numpy as np import threading import queue import imageio import os,time import math import visual_words import multiprocessing as mp def build_recognition_system(num_workers=2): ''' Creates a trained recognition system by generating training features from all training images. [input] * num_wo...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 4704, 278, 201, 198, 11748, 16834, 201, 198, 11748, 2939, 952, 201, 198, 11748, 28686, 11, 2435, 201, 198, 11748, 10688, 201, 198, 11748, 5874, 62, 10879, 201, 198, 11748, 18540, 305, 919,...
2.444186
2,150
from flask import Flask import gensim import re from gensim.models import LdaModel from gensim.test.utils import datapath from gensim import corpora, models from gensim.corpora import Dictionary from re import sub import os import string import codecs import nltk #from nltk.tokenize import RegexpTokenizer #from nlt...
[ 6738, 42903, 1330, 46947, 198, 198, 11748, 308, 641, 320, 198, 11748, 302, 198, 198, 6738, 308, 641, 320, 13, 27530, 1330, 406, 6814, 17633, 198, 6738, 308, 641, 320, 13, 9288, 13, 26791, 1330, 4818, 499, 776, 198, 6738, 308, 641, 3...
3.195652
138
from app.utils.str_utils import str_to_int
[ 6738, 598, 13, 26791, 13, 2536, 62, 26791, 1330, 965, 62, 1462, 62, 600, 628 ]
2.933333
15
import psycopg2 from config import config import datetime from textblob import TextBlob import nltk from nltk.corpus import stopwords def create_tables(): """ create tables in the PostgreSQL database""" params = config() # connect to the PostgreSQL server conn = psycopg2.connect(**params) cur = c...
[ 11748, 17331, 22163, 70, 17, 198, 6738, 4566, 1330, 4566, 198, 11748, 4818, 8079, 198, 6738, 2420, 2436, 672, 1330, 8255, 3629, 672, 198, 11748, 299, 2528, 74, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 198,...
2.571631
2,115
""" Defined code units and physical quantities The Python parts of Weltgeist use cgs VH1 uses units defined below Sam Geen, February 2018 """ import numpy as np # Physical quantities (base units in cgs) pc = 3.086e+18 mH = 1.66e-24 year = 3.154e+7 Myr = 1e6*year kB = 1.3806485279e-16 # in cgs G = 6.674...
[ 37811, 201, 198, 7469, 1389, 2438, 4991, 290, 3518, 17794, 201, 198, 464, 11361, 3354, 286, 370, 2120, 49782, 779, 269, 14542, 201, 198, 53, 39, 16, 3544, 4991, 5447, 2174, 201, 198, 16305, 2269, 268, 11, 3945, 2864, 201, 198, 37811, ...
2.328431
408
from rest_framework.response import Response from rest_framework.filters import SearchFilter from rest_framework.viewsets import ModelViewSet from interest.models import Interest from .serializers import InterestSerializer
[ 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 10379, 1010, 1330, 11140, 22417, 198, 6738, 1334, 62, 30604, 13, 1177, 28709, 1330, 9104, 7680, 7248, 198, 6738, 1393, 13, 27530, 1330, 12033, 198, 6738, 764...
4.645833
48
import re from django.contrib.gis.gdal import OGRException, OGRGeometry from django.contrib.gis.geos import GEOSGeometry from django.forms.widgets import Textarea from django.template.loader import render_to_string from django.utils import simplejson from django.conf import settings from django import forms # Def...
[ 11748, 302, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 21287, 282, 1330, 440, 28934, 87, 4516, 11, 440, 10761, 10082, 15748, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 469, 418, 1330, 22319, 2640, 10...
2.359661
2,127
#!/usr/local/bin/python3 def part1(data): """ >>> part1([199, 200, 208, 210, 200, 207, 240, 269, 260, 263]) 7 >>> part1(read_input()) 1581 """ previous = data[0] count = 0 for value in data[1:]: if value > previous: count += 1 previous = value re...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 628, 198, 198, 4299, 636, 16, 7, 7890, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13163, 636, 16, 26933, 19104, 11, 939, 11, 27121, 11, 20064, 11, 939, 11, 27791, 11, ...
2.084302
344
from SloppyCell.ReactionNetworks import * net = Network('Lee2003') net.add_compartment('extract') net.add_parameter('Dsh0', 100, name = r'Dsh^0') net.add_parameter('APC0', 100, name = r'APC^0') net.add_parameter('TCF0', 15, name = r'TCF^0') net.add_parameter('GSK0', 50, name = r'GSK^0') net.add_species('X2', 'extra...
[ 6738, 3454, 26696, 28780, 13, 3041, 2673, 7934, 5225, 1330, 1635, 198, 198, 3262, 796, 7311, 10786, 24338, 16088, 11537, 198, 198, 3262, 13, 2860, 62, 5589, 1823, 10786, 2302, 974, 11537, 198, 198, 3262, 13, 2860, 62, 17143, 2357, 10786...
1.958661
2,419
from omegaconf import DictConfig import pytorch_lightning as pl import torch from torch import nn import torchmetrics from .model import Model
[ 6738, 267, 28917, 7807, 69, 1330, 360, 713, 16934, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 4164, 10466, 198, 198, 6738, 764, 19849, 1330, 9104, 628, ...
3.5
42
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
[ 2, 17174, 17174, 4557, 1174, 198, 2, 9, 15069, 7, 66, 8, 7795, 12, 4967, 11, 8355, 8476, 29544, 379, 327, 28778, 11, 1439, 2489, 10395, 13, 1635, 198, 2, 9, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.709402
468
""" This is the root schema definition that combines individual applications' schemas into one. Each application that has queries or mutations exports them as either Query or Mutation from the application's schema module. No resolvers or type definitions should be included here. """ import graphene from django.conf imp...
[ 37811, 198, 1212, 318, 262, 6808, 32815, 6770, 326, 21001, 1981, 5479, 6, 198, 1416, 4411, 292, 656, 530, 13, 198, 10871, 3586, 326, 468, 20743, 393, 23005, 15319, 606, 355, 2035, 43301, 198, 273, 337, 7094, 422, 262, 3586, 338, 32815...
2.940568
774
# # Copyright 2013 The Regents of The University California # # 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, 198, 2, 15069, 2211, 383, 3310, 658, 286, 383, 2059, 3442, 198, 2, 220, 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, ...
3.2
470
# coding=utf-8 __author__ = 'André Meneghelli' """ /******************************************************************************* * Aluno: André Meneghelli Vale, Núm. USP: 4898948 * Curso: Bacharelado em Ciências da Computação * Aula 13 - Stone Pile * MAC0327 -- IME/USP, -- Prof. Cristina Gomes Fernandes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 834, 9800, 834, 796, 705, 1870, 29350, 6065, 1533, 12758, 72, 6, 198, 198, 37811, 198, 14, 17174, 17174, 46068, 8162, 198, 1635, 978, 36909, 25, 220, 843, 29350, 6065, 1533, 12758, 72, 31832, 11, 22...
3.28777
139
import csv import matplotlib.image as mpimg import pickle import numpy as np from keras.models import Sequential from keras.layers.core import Flatten,Lambda,Dense from keras.layers.convolutional import Cropping2D,Conv2D from keras import backend as K from keras.layers.core import Activation import matplotlib.image a...
[ 11748, 269, 21370, 198, 11748, 2603, 29487, 8019, 13, 9060, 355, 29034, 9600, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 13, ...
2.120958
835
#! /usr/bin/env python # -*- coding: utf-8 -*- import os from lab.environments import LocalEnvironment, BaselSlurmEnvironment import common_setup from common_setup import IssueConfig, IssueExperiment from relativescatter import RelativeScatterPlotReport DIR = os.path.dirname(os.path.abspath(__file__)) BENCHMARKS_DI...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 6738, 2248, 13, 268, 12103, 1330, 10714, 31441, 11, 6455, 417, 11122, 333, 76, 31441, ...
2.577465
639
"""Matplotlib science style""" from .core import available_styles, set_style, style_context # https://github.com/python-poetry/poetry/pull/2366#issuecomment-652418094 # https://github.com/python-poetry/poetry/issues/144#issuecomment-623927302 try: import importlib.metadata as importlib_metadata except ModuleNotFo...
[ 37811, 19044, 29487, 8019, 3783, 3918, 37811, 198, 198, 6738, 764, 7295, 1330, 1695, 62, 47720, 11, 900, 62, 7635, 11, 3918, 62, 22866, 198, 198, 2, 3740, 1378, 12567, 13, 785, 14, 29412, 12, 7501, 11973, 14, 7501, 11973, 14, 31216, ...
3.123457
162
from contextlib import suppress from pathlib import Path from typing import List from PyQt5.QtCore import Qt from PyQt5.QtGui import QColor from PyQt5.QtWidgets import QFileDialog, QListWidgetItem with suppress(ImportError): from appwindow import AppWindow from tools.settings import FinalCifSettings class Repor...
[ 6738, 4732, 8019, 1330, 18175, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 33734, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1195, 10258,...
3.261905
126
from guillotina import configure from guillotina.catalog.utils import parse_query from guillotina.interfaces import IResource from guillotina.utils import find_container from guillotina_cms.utils import get_search_utility import itertools from collections import Counter @configure.service( context=IResource, meth...
[ 6738, 915, 359, 313, 1437, 1330, 17425, 198, 6738, 915, 359, 313, 1437, 13, 9246, 11794, 13, 26791, 1330, 21136, 62, 22766, 198, 6738, 915, 359, 313, 1437, 13, 3849, 32186, 1330, 314, 26198, 198, 6738, 915, 359, 313, 1437, 13, 26791, ...
2.390995
422
import os from PIL import Image
[ 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 628 ]
3.666667
9
import numpy as np import pytest from gym import utils from more_itertools import last from gym_quickcheck.envs import RandomWalkEnv from tests.aux import assert_that, follows_contract, assert_obs_eq, unpack_reward, unpack_obs, unpack_done, until_done, \ run_example @pytest.fixture @pytest.fixture @pytest.fi...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 11550, 1330, 3384, 4487, 198, 6738, 517, 62, 270, 861, 10141, 1330, 938, 198, 198, 6738, 11550, 62, 24209, 9122, 13, 268, 14259, 1330, 14534, 35963, 4834, 85, 198, 6738,...
2.680233
172
from os import environ TOKEN = environ.get('AMIGOCLOUD_TOKEN') BROKER_URL = environ.get('BROKER_URL') PROJECT_URL = 'users/475/projects/13608' DATASET_ID = 79746
[ 6738, 28686, 1330, 551, 2268, 198, 198, 10468, 43959, 796, 551, 2268, 13, 1136, 10786, 2390, 3528, 4503, 43, 2606, 35, 62, 10468, 43959, 11537, 198, 11473, 11380, 1137, 62, 21886, 796, 551, 2268, 13, 1136, 10786, 11473, 11380, 1137, 62,...
2.295775
71
#!/usr/bin/env python import rospy from geometry_msgs.msg import Twist pub = rospy.Publisher("/diff_drive_controller/cmd_vel", Twist, queue_size = 10) if __name__ == '__main__': rospy.init_node('twist_remapper', anonymous=True) rospy.Subscriber("/cmd_vel", Twist, callback) rospy.spin()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 44088, 198, 198, 12984, 796, 686, 2777, 88, 13, 46471, 7203, 14, 26069, 62, 19472, 62, 36500, 14, 28758, 62, ...
2.564103
117
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 2177, 11, 2864, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, ...
3.061086
442
#!/usr/bin/python # -*- coding: utf-8 -*- import pywikibot
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 12972, 20763, 571, 313, 198 ]
2.068966
29
from __future__ import unicode_literals from inspect import cleandoc from genshi.filters import Transformer from flask_genshi import render_template from flatland.out.genshi import setup as flatland_setup from flatland import Form, String def test_applies_method_filters(app): """Method filters are applied for ...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 10104, 1330, 1190, 392, 420, 198, 198, 6738, 308, 641, 5303, 13, 10379, 1010, 1330, 3602, 16354, 198, 6738, 42903, 62, 70, 641, 5303, 1330, 8543, 62, 28243, 1...
2.401611
869
from django.db import models from django import forms from django.contrib.auth.models import User from .form_dynamic import NominationForm import json FIELD_TYPES = ( ('Short_answer', forms.CharField), ('Paragraph', forms.CharField), ('Integer', forms.IntegerField), ('ChoiceField', forms.ChoiceField)...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 764, 687, 62, 67, 28995, 1330, 21198, 1883, 8479, 198, 11748, 33918, 62...
2.972973
222
import numpy as np import torch, torchvision, math from torch.functional import F import os import PIL.Image as Image from functools import partial DATADIR = 'dataset/' load_celeba32 = partial(load_celeba, image_size=32) load_celeba64 = partial(load_celeba, image_size=64) load_celeba128 = partial(load_celeba, image_s...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 11, 28034, 10178, 11, 10688, 198, 6738, 28034, 13, 45124, 1330, 376, 198, 11748, 28686, 198, 11748, 350, 4146, 13, 5159, 355, 7412, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 35...
2.928571
112
""" Basis Theory API ## Getting Started * Sign-in to [Basis Theory](https://basistheory.com) and go to [Applications](https://portal.basistheory.com/applications) * Create a Basis Theory Server to Server Application * All permissions should be selected * Paste the API Key into the `BT-API-KEY` variable # noqa...
[ 37811, 198, 220, 220, 220, 6455, 271, 17003, 7824, 628, 220, 220, 220, 22492, 18067, 31026, 1635, 5865, 12, 259, 284, 685, 15522, 271, 17003, 16151, 5450, 1378, 12093, 396, 258, 652, 13, 785, 8, 290, 467, 284, 685, 41995, 16151, 5450,...
2.198209
18,652
"""Config flow for National Weather Service (NWS) integration.""" import logging import voluptuous as vol from nws_radar.nws_radar_mosaic import REGIONS from homeassistant import config_entries from . import unique_id # pylint: disable=unused-import from .const import ( CONF_LOOP, CONF_STATION, CONF_STY...
[ 37811, 16934, 5202, 329, 2351, 15615, 4809, 357, 45, 19416, 8, 11812, 526, 15931, 198, 11748, 18931, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 6738, 299, 18504, 62, 6335, 283, 13, 77, 18504, 62, 6335, 283, 62, 76, 8546, 291,...
2.074474
1,665
#!/usr/bin/env python # coding: utf-8 # @Author: lapis-hong # @Date : 2018/6/17 """This module contains the main algorithm for chinese word extraction. criterion 1: solid rate criterion 2: character entropy """ from __future__ import unicode_literals from __future__ import division import math from indexer i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 2488, 13838, 25, 14779, 271, 12, 71, 506, 198, 2, 2488, 10430, 220, 1058, 2864, 14, 21, 14, 1558, 198, 37811, 1212, 8265, 4909, 262, 1388, ...
2.655172
464
#! usr/bin/env python # -*- coding:utf-8 -*- """ 基础篇 """ from numpy import * ''' NumPy的主要对象是同种元素的多维数组。 这是一个所有的元素都是一种类型、通过一个正整数元组索引的元素表格(通常是元素是数字) ''' ''' NumPy中维度(dimensions)叫做轴(axes),轴的个数叫做秩(rank)。 ''' #eg: ''' 在3D空间一个点的坐标 [1,2,3] 是一个秩为1的数组,它只有一个轴,轴的长度为3 ''' #注意直接写,他的类型不是一个ndarray,是一个list,此处只是用于举例说明秩 arr2 = [[1,0,...
[ 2, 0, 514, 81, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 161, 253, 118, 163, 94, 222, 163, 107, 229, 198, 37811, 198, 6738, 299, 32152, 220, 1330, 1635, 198, 19...
0.875195
641
# -*- coding: utf-8 -*- ''' :codeauthor: :email: `Bo Maryniuk <bo@suse.de>` ''' # Import Python libs from __future__ import absolute_import import errno # Import Salt Testing libs from tests.support.mock import patch, Mock from tests.support.unit import TestCase # Import Salt libs from salt.ext.six.moves import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 220, 1058, 8189, 9800, 25, 1058, 12888, 25, 4600, 16635, 5335, 8461, 2724, 1279, 2127, 31, 82, 1904, 13, 2934, 29, 63, 198, 7061, 6, 198, 198...
2.213549
679
"""Prepare datasets Script that: - downloads, pre-processes, and saves base datasets from OpenML - computes meta-features - computes meta-targets (combining feature-importance measures and base models) - saves the meta-datasets Usage: python -m prepare_datasets --help """ import argparse import multiprocessing impor...
[ 37811, 37534, 533, 40522, 198, 198, 7391, 326, 25, 198, 12, 21333, 11, 662, 12, 14681, 274, 11, 290, 16031, 2779, 40522, 422, 4946, 5805, 198, 12, 552, 1769, 13634, 12, 40890, 198, 12, 552, 1769, 13634, 12, 83, 853, 1039, 357, 24011...
2.988827
1,074
#!/usr/bin/env python import signal import sys import tornado.ioloop import tornado.web import tornado.websocket import tornado.wsgi as myapp_wsgi from datetime import datetime import time import ast import random from datetime import date from models.model import Sites from models.model import Coordonnates from mode...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 6737, 198, 11748, 25064, 198, 11748, 33718, 13, 1669, 11224, 198, 11748, 33718, 13, 12384, 198, 11748, 33718, 13, 732, 1443, 5459, 198, 11748, 33718, 13, 18504, 12397, 355, 616, 1...
2.988814
447
import shutil import os import re from tkinter import * # Storage concat = "" assets = [] startclass = "" # Static config config = { "javapath": "java", "classpath": "class", "sourcetxt": "source.txt", "compilebat": "compile.bat", "startclass": "Main.class", "runbat": "run.bat", "copyassets": "true" } # Gett...
[ 11748, 4423, 346, 198, 11748, 28686, 198, 11748, 302, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 198, 2, 20514, 198, 1102, 9246, 796, 13538, 198, 19668, 796, 17635, 198, 9688, 4871, 796, 13538, 198, 198, 2, 36125, 4566, 198, 1125...
2.640541
370
#! /usr/bin/env python3 # -*- coding:utf-8 -*- ############################################################### # © kenwaldek MIT-license # # Title: multiprocessing 2 Version: 1.0 # Date: 30-12-16 Language: python3 # Description: multiprocessing dus m...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 220, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 29113, 14468, 7804, 4242, 21017, 198, 2, 10673, 479, 268, 21667, 988, 220, 220, 220, 220, 220, 220, 220, 220,...
2.443966
232
__author__ = 'shuai' l1 = ListNode(2) l1.next = ListNode(4) l1.next.next = ListNode(3) l2 = ListNode(5) l2.next = ListNode(6) l2.next.next = ListNode(4) sol = Solution() sol.addTwoNumbers(l1, l2)
[ 834, 9800, 834, 796, 705, 1477, 84, 1872, 6, 628, 198, 75, 16, 796, 7343, 19667, 7, 17, 8, 198, 75, 16, 13, 19545, 796, 7343, 19667, 7, 19, 8, 198, 75, 16, 13, 19545, 13, 19545, 796, 7343, 19667, 7, 18, 8, 198, 75, 17, 796, ...
2.084211
95
from module1.Class1 import Class1
[ 6738, 8265, 16, 13, 9487, 16, 1330, 5016, 16, 628 ]
3.5
10