content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# seen = [] # while (True): # print (seen) # digits = self.getDigits(n) # total = 0 # print ("Digits: " + str(digits)) # for i in digits: # total += int(pow(i,2)) # if (total in seen): # return Fals...
[ 198, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1775, 796, 17635, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 981, 357, 17821, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 357, 15898, ...
1.56743
393
from dataclasses import dataclass, field from dataclazzes.track import Track
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 198, 6738, 4818, 37779, 8101, 274, 13, 11659, 1330, 17762, 628 ]
3.590909
22
#!/usr/bin/env python3 # pylint: disable=C0103 """ Dfinie la classe entity Permet de modeliser le personnage et des monstre """ from random import choice from vect import Vect from astar import calc_path_astart import chars def main(): """ Test unitaire """ if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 279, 2645, 600, 25, 15560, 28, 34, 486, 3070, 198, 37811, 198, 35, 15643, 494, 8591, 537, 21612, 9312, 198, 5990, 4164, 390, 2746, 5847, 443, 1048, 77, 496, 2123, 748, 937, ...
2.741379
116
import streamlit as st
[ 11748, 4269, 18250, 355, 336, 201, 198 ]
3.428571
7
import unittest import logging from varfilter import varfilter, filter if __name__ == '__main__': logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.DEBUG) unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 18931, 198, 6738, 1401, 24455, 1330, 1401, 24455, 11, 8106, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 18931, 13, 35487, 16934, 7, 18982, 11639, 4, 7,...
2.354167
96
"""Test cases for Arithmatex.""" from .. import util
[ 37811, 14402, 2663, 329, 943, 342, 9830, 87, 526, 15931, 198, 6738, 11485, 1330, 7736, 628, 628 ]
3.294118
17
# -*- coding: utf-8 -*- from setuptools import setup setup( name="UrRtde", packages=["rtde"], version=1.0, description="Real-Time Data Exchange (RTDE) python client + examples", )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 16692, 49, 83, 2934, 1600, 198, 220, 220, 220, 10392, 28, 14692, 17034, 2934, ...
2.525641
78
""" Task: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. Symbol Value I 1 (unus) V 5 (quinque) X 10 (decem) L 50 (quinquaginta) C 100 (centum) D 500 (quingenti) M 1,000 (mille) >>> roman_to_int("DCXXI") 621 >>> roman_to_int("VI") 6 >>> roman_to_int...
[ 37811, 198, 25714, 25, 198, 220, 220, 220, 11259, 257, 374, 5185, 997, 1691, 11, 10385, 340, 284, 281, 18253, 13, 198, 220, 220, 220, 23412, 318, 11462, 284, 307, 1626, 262, 2837, 422, 352, 284, 513, 17032, 13, 628, 198, 13940, 2365...
2.215247
223
import mock import pytest from rump import parser, Server, Upstream, Selection, exc
[ 11748, 15290, 198, 11748, 12972, 9288, 198, 198, 6738, 374, 931, 1330, 30751, 11, 9652, 11, 3205, 5532, 11, 29538, 11, 2859, 628, 628, 628, 198 ]
3.5
26
from django.contrib import admin from places.models import County, Constituency, Province, District from places.models import Division, Location, SubLocation, SchoolZone admin.site.register(County, CountyAdmin) admin.site.register(Province, ProvinceAdmin) admin.site.register(District, DistrictAdmin) admin.sit...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 4113, 13, 27530, 1330, 3418, 11, 4757, 34272, 1387, 11, 22783, 11, 5665, 198, 6738, 4113, 13, 27530, 1330, 7458, 11, 13397, 11, 3834, 14749, 11, 3961, 26961, 628, 628, 62...
3.644737
152
"""pyGEEMs: Geotechnical earthquake engineering models implemented in Python.""" import pathlib from pkg_resources import get_distribution import scipy.constants FPATH_DATA = pathlib.Path(__file__).parent / "data" KPA_TO_ATM = scipy.constants.kilo / scipy.constants.atm __author__ = "Albert Kottke" __copyright__ = "...
[ 37811, 9078, 8264, 3620, 82, 25, 2269, 1258, 1349, 605, 16295, 8705, 4981, 9177, 287, 11361, 526, 15931, 198, 11748, 3108, 8019, 198, 198, 6738, 279, 10025, 62, 37540, 1330, 651, 62, 17080, 3890, 198, 198, 11748, 629, 541, 88, 13, 997...
2.954545
176
from tkinter import * from tkinter.ttk import * # creando ventana tkinter root = Tk() # Agregando herramientas a la ventana Label(root, text = 'PuntosExtra', font =( 'Verdana', 15)).pack(side = TOP, pady = 10) # Insertando la imagen de login foto = PhotoImage(file = r"C:\Users\david\OneDrive\Imgenes\log...
[ 6738, 256, 74, 3849, 1330, 1635, 220, 198, 6738, 256, 74, 3849, 13, 926, 74, 1330, 1635, 198, 220, 220, 198, 2, 1126, 25440, 7435, 2271, 256, 74, 3849, 220, 198, 15763, 796, 309, 74, 3419, 220, 198, 220, 220, 198, 2, 2449, 2301, ...
2.458333
168
from django.conf.urls import patterns, url, include from corehq.apps.api.urls import CommCareHqApi from custom.ewsghana.resources.v0_1 import EWSLocationResource from custom.ewsghana.views import EWSConfigView, EWSGlobalStats, InputStockView, EWSUserExtensionView, \ DashboardRedirectReportView hq_api = CommCareHqA...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 11, 2291, 198, 6738, 4755, 71, 80, 13, 18211, 13, 15042, 13, 6371, 82, 1330, 1520, 17784, 39, 80, 32, 14415, 198, 6738, 2183, 13, 15515, 456, 2271, 13, 37540, 13, ...
2.540416
866
import numpy as np from scipy.spatial.distance import cdist import sys from plot_area import plot_area COLOR = ['tab:blue', 'tab:orange', 'tab:green']
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 2777, 34961, 13, 30246, 1330, 269, 17080, 198, 11748, 25064, 198, 198, 6738, 7110, 62, 20337, 1330, 7110, 62, 20337, 198, 198, 46786, 796, 37250, 8658, 25, 17585, 3256, 705, ...
3.019608
51
import sys from utils import * Discuss_Manager = DiscussManager()
[ 11748, 25064, 198, 6738, 3384, 4487, 1330, 1635, 628, 198, 198, 48873, 62, 13511, 796, 36691, 13511, 3419, 198 ]
3.631579
19
import math, sys, random, mcint from scipy import integrate import numpy as np gap = float(sys.argv[1]) lam = float(sys.argv[2]) print(gap, lam) ## calculate the yukawa force over a distributed test mass assumed to be cube D = 5 # diameter of bead (um) rhob = 2e3 # density bead (kg/m^3) rhoa = 19.3e3 # density attr...
[ 11748, 10688, 11, 25064, 11, 4738, 11, 36650, 600, 198, 6738, 629, 541, 88, 1330, 19386, 198, 11748, 299, 32152, 355, 45941, 198, 198, 43554, 796, 12178, 7, 17597, 13, 853, 85, 58, 16, 12962, 198, 2543, 796, 12178, 7, 17597, 13, 853...
2.361478
379
import logging from typing import ( Dict, Awaitable, Callable, Any, Set, List, Optional, TYPE_CHECKING) from opentrons.types import Mount, Point, Location from opentrons.config import feature_flags as ff from opentrons.hardware_control import ThreadManager, CriticalPoint from opentrons.protocol_api import labwa...
[ 11748, 18931, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 360, 713, 11, 5851, 4548, 540, 11, 4889, 540, 11, 4377, 11, 5345, 11, 7343, 11, 32233, 11, 198, 220, 220, 220, 41876, 62, 50084, 2751, 8, 198, 6738, 1034, 298, 12212, ...
2.682128
733
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.WGL import _types as _cs # End users want this... from OpenGL.raw.WGL._types import * from OpenGL.raw.WGL import _errors from OpenGL.constant import Constant as _C imp...
[ 7061, 6, 16541, 519, 877, 515, 416, 35555, 62, 8612, 378, 4226, 11, 466, 407, 4370, 0, 7061, 6, 201, 198, 6738, 30672, 1330, 3859, 355, 4808, 79, 11, 26515, 201, 198, 2, 6127, 5270, 3544, 428, 201, 198, 6738, 30672, 13, 1831, 13, ...
2.059242
422
from collections import namedtuple import inspect from django import forms FormFieldWarning = namedtuple("FormFieldWarning", ["message", "description"])
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 10104, 198, 6738, 42625, 14208, 1330, 5107, 628, 198, 8479, 15878, 20361, 796, 3706, 83, 29291, 7203, 8479, 15878, 20361, 1600, 14631, 20500, 1600, 366, 11213, 8973, 8, 628 ]
4.216216
37
print("Hello, World! Again!")
[ 4798, 7203, 15496, 11, 2159, 0, 6521, 2474, 8 ]
3.222222
9
from numpy import array, arange, argmax from numpy.random import choice from itertools import product from ai.NN import NN import pickle from random import random, randrange, randint from collections import deque from math import floor
[ 6738, 299, 32152, 1330, 7177, 11, 610, 858, 11, 1822, 9806, 198, 6738, 299, 32152, 13, 25120, 1330, 3572, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 257, 72, 13, 6144, 1330, 399, 45, 198, 11748, 2298, 293, 198, 6738, 4738, 1...
3.822581
62
print('=' * 12 + 'Desafio 49' + '=' * 12) numero = int(input('Digite o nmero para a tabuada: ')) print('=' * 13) print(f'Tabuada do {numero}') print('=' * 13) for i in range(1,11): print(f'{numero} x {i:2} = {numero * i}') print('=' * 13)
[ 4798, 10786, 11639, 1635, 1105, 1343, 705, 5960, 1878, 952, 5125, 6, 1343, 705, 11639, 1635, 1105, 8, 198, 22510, 3529, 796, 493, 7, 15414, 10786, 19511, 578, 267, 299, 647, 78, 31215, 257, 7400, 84, 4763, 25, 705, 4008, 198, 4798, ...
2.18018
111
import pretty_midi import sys import numpy as np from tqdm import tqdm from collections import Counter sys.path.append('..') from Pre_Production.Midi_Pre_Processor import * from Shared_Files.Global_Util import *
[ 11748, 2495, 62, 13602, 72, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 17268, 1330, 15034, 198, 17597, 13, 6978, 13, 33295, 10786, 492, 11537, 198, 198, 6738, 3771,...
3.261538
65
#!/usr/bin/env python # -*- coding: utf-8 -*- # # launches the unit testing # # Copyright (C) # Honda Research Institute Europe GmbH # Carl-Legien-Str. 30 # 63073 Offenbach/Main # Germany # # UNPUBLISHED PROPRIETARY MATERIAL. # ALL RIGHTS RESERVED. # # import os import tempfile import unittest from ToolBOSCo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 18617, 262, 4326, 4856, 198, 2, 198, 2, 220, 15069, 357, 34, 8, 198, 2, 220, 20059, 4992, 5136, 2...
2.578431
204
#!/usr/bin/env python # # Module for adding Google Calendar Functionality. # # by Peter Juett # References:https://developers.google.com/calendar/quickstart/python # # Copyright 2018 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 19937, 329, 4375, 3012, 26506, 15553, 1483, 13, 220, 198, 2, 198, 2, 416, 5613, 12585, 3087, 198, 2, 31458, 25, 5450, 1378, 16244, 364, 13, 13297, 13, 785, 14, 9948, 923...
3.364606
469
# -*- coding: utf-8 -*- """ For an example page see: http://www.jneurosci.org/content/23/10/4355.long#ref-list-1 Note that JNeuroscience seems to be part of a consortium with J Physiology, J Neurophysiology, PNS, etc perhaps check out HighWire Press? """ import requests from bs4 import BeautifulSoup
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1890, 281, 1672, 2443, 766, 25, 198, 4023, 1378, 2503, 13, 73, 710, 1434, 36216, 13, 2398, 14, 11299, 14, 1954, 14, 940, 14, 19, 28567, 13, 6511, 2, 5420...
2.886792
106
# coding: utf-8 from __future__ import annotations import re # noqa: F401 from datetime import date, datetime # noqa: F401 from typing import Any, Dict, List, Optional # noqa: F401 from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401 CreateMetric.update_forward_refs()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 302, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 220, 1303, 645, 20402, 25, 376, 21844, 1...
2.960396
101
from .la_initiator_bfm import *
[ 198, 6738, 764, 5031, 62, 259, 8846, 1352, 62, 19881, 76, 1330, 1635 ]
2.461538
13
#!/usr/bin/env python3 import h5py import numpy as np import argparse import os import seissolxdmf as sx import seissolxdmfwriter as sw # These 2 latter modules are on pypi (e.g. pip install seissolxdmf) def read_reshape2d(sx, dataname): """read seissol dataset and if there is only one time stamp create...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 384, 747, 349, 24954, 76, 69, 355, 264, 87, 198, 11748, 384, ...
2.223675
2,982
from django.urls import path from . import views urlpatterns = [ path('', views.home_P, name='home_P') ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 11195, 62, 47, 11, 1438, 11639, 11195, 62, 47, 11537, 198, 60, 198 ]
2.619048
42
max_bitlen = int(1<<31).bit_length() L, R = map(int, input().split()) ans = [(r - l) * 2 > (R - L + 1) for l, r in zip(count_bit_sum(L-1), count_bit_sum(R))] print(sum(x * (1 << i) for i, x in enumerate(ans)))
[ 9806, 62, 2545, 11925, 796, 493, 7, 16, 16791, 3132, 737, 2545, 62, 13664, 3419, 198, 198, 43, 11, 371, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 504, 796, 47527, 81, 532, 300, 8, 1635, 362, 1875, 357, 49, 532, 406, ...
2.197917
96
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # G...
[ 2, 15069, 2321, 3232, 10442, 5693, 11, 3457, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 22961, 8829, 198, 2, 198, 2, 22961, 8829, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 28...
3.823529
204
# -*- coding: utf8 -*- # announcement # helper class for toprace # Alfredo Martin 2021 import pygame version = 'announcement.v.1.0.0' if __name__ == '__main__': print(version)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 2, 8009, 198, 2, 31904, 1398, 329, 284, 1050, 558, 198, 2, 22044, 78, 5780, 33448, 198, 198, 11748, 12972, 6057, 198, 198, 9641, 796, 705, 1236, 8652, 434, 13, 85, 13, 1...
2.534247
73
""" Implement regularization policies here """ import torch import torch.nn as nn from policies.policy import PolicyBase import logging def build_reg_from_config(model, reg_config): """ This function build regularizer given the model (only need for weigths typically) and regularizer configuration. ""...
[ 37811, 198, 3546, 26908, 3218, 1634, 4788, 994, 198, 37811, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 4788, 13, 30586, 1330, 7820, 14881, 198, 198, 11748, 18931, 198, 198, 4299, 1382, 62, 2301, 62, ...
2.758621
522
from django.db import models from django.utils import timezone from stores.models import Store
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 7000, 13, 27530, 1330, 9363, 628 ]
3.88
25
#!/usr/bin/env python # encoding: utf-8 """ @author: zhanghe @software: PyCharm @file: inventory.py @time: 2018-06-28 00:22 """ from __future__ import unicode_literals from flask import jsonify, make_response from flask_restful import Resource, marshal, reqparse from web_api.bearings.outputs.inventory import field...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 31, 9800, 25, 1976, 33255, 258, 198, 31, 43776, 25, 9485, 1925, 1670, 198, 31, 7753, 25, 13184, 13, 9078, 198, 31, 2435, 25, ...
2.717143
350
#!/usr/bin/env python # from bob.bio.spear.database import AudioBioFile import bob.bio.base import bob.io.base import bob.io.video from bob.extension import rc from .common import SwanVideoFile, SwanAudioFile, SwanVideoDatabase # class SwanAudioBioFile(SwanAudioFile, AudioBioFile): # """SwanAudioBioFile are vide...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 422, 29202, 13, 65, 952, 13, 4125, 283, 13, 48806, 1330, 13491, 42787, 8979, 198, 11748, 29202, 13, 65, 952, 13, 8692, 198, 11748, 29202, 13, 952, 13, 8692, 198, 11748, 29202...
3.166667
108
from tokenizer import StringTokenizer from token import tokentype text = open('test.ex', 'r').read() t = StringTokenizer(text=text, tokentype=tokentype) token_generator = t.create_token_generator() print(token_generator)
[ 6738, 11241, 7509, 1330, 10903, 30642, 7509, 198, 6738, 11241, 1330, 284, 74, 298, 2981, 628, 198, 5239, 796, 1280, 10786, 9288, 13, 1069, 3256, 705, 81, 27691, 961, 3419, 198, 198, 83, 796, 10903, 30642, 7509, 7, 5239, 28, 5239, 11, ...
2.897436
78
#!/usr/bin/smilx '''========================================================================= The Software is copyright (c) Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. All rights reserved. Licensed under the CSIRO BSD 3-Clause License You may not use this file exc...
[ 2, 48443, 14629, 14, 8800, 14, 5796, 346, 87, 198, 7061, 6, 23926, 2559, 28, 198, 220, 383, 10442, 318, 6634, 357, 66, 8, 17165, 22060, 290, 19034, 4992, 30801, 357, 7902, 43708, 8, 198, 220, 9564, 45, 6073, 718, 5774, 15136, 18395,...
3.474048
578
expected_output ={ "lentry_label": { 24: { "aal": { "deagg_vrf_id": 0, "eos0": {"adj_hdl": "0xf9000002", "hw_hdl": "0x7f02737e2ca8"}, "eos1": {"adj_hdl": "0xf9000002", "hw_hdl": "0x7f02737e2a98"}, "id": 1996488716, "...
[ 40319, 62, 22915, 796, 90, 198, 220, 220, 220, 366, 75, 13000, 62, 18242, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 1987, 25, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 64, 282, 1298, 1391, ...
1.288976
5,343
#!/usr/bin/env python3 import nose.tools as nose from cachesimulator.bin_addr import BinaryAddress from cachesimulator.word_addr import WordAddress def test_get_bin_addr_unpadded(): """get_bin_addr should return unpadded binary address of word address""" nose.assert_equal( BinaryAddress(word_addr=Wo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 9686, 13, 31391, 355, 9686, 198, 198, 6738, 50177, 320, 8927, 13, 8800, 62, 29851, 1330, 45755, 20231, 198, 6738, 50177, 320, 8927, 13, 4775, 62, 29851, 1330, 9678, 202...
2.515679
1,435
def Negate(self): """ Negate(self: Vector) Negates this vector. The vector has the same magnitude as before,but its direction is now opposite. """ pass def Normalize(self): """ Normalize(self: Vector) Normalizes this vector. """ pass def ToString(self,provider=None): """...
[ 825, 13496, 378, 7, 944, 2599, 201, 198, 220, 37227, 201, 198, 220, 13496, 378, 7, 944, 25, 20650, 8, 201, 201, 198, 220, 220, 13496, 689, 428, 15879, 13, 383, 15879, 468, 262, 976, 14735, 355, 878, 11, 4360, 663, 220, 201, 201, ...
2.67007
1,567
import random import math from collections import OrderedDict
[ 11748, 4738, 198, 11748, 10688, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.2
40
def coding_problem_07(s): """ Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded. Examples: >>> coding_problem_07('111') # possible interpretations: 'aaa', 'ka', 'ak' 3 >>> coding_problem_07('2626') # 'zz', 'zbf', 'bfz', 'bfbf' 4...
[ 4299, 19617, 62, 45573, 62, 2998, 7, 82, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 11259, 262, 16855, 257, 796, 352, 11, 275, 796, 362, 11, 2644, 1976, 796, 2608, 11, 290, 281, 30240, 3275, 11, 954, 262, 1271, 286, 2842...
2.467181
259
# django imports from django.conf import settings from django.contrib.auth.decorators import permission_required from django.http import HttpResponse # lfs imports from lfs.core.utils import import_symbol
[ 2, 42625, 14208, 17944, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 7170, 62, 35827, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 198...
3.466667
60
# Generated by Django 3.1.7 on 2021-05-26 12:56 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 2713, 12, 2075, 1105, 25, 3980, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# COMO TRABALHAMOS MUITO COM ROTINAS, CRIAR UMA FUNO E CHAMA-LA NO CDIGO FACILITA MUITO NO TER QUE ESCREVER A MESMA LINHA VRIAS VEZES # USAMOS O COMANDO DEF PARA DECLARAR UMA FUNCAO, DEPOIS UM NOME PARA A FUNO EX: # def nomeDaFuncao(): # # BLOCO COM O CDIGO QUE DESEJA QUE SEJ EXECULTADO NA CHAMADA DA FUNO # pr...
[ 2, 9440, 46, 29125, 33, 1847, 33363, 2640, 25108, 2043, 46, 9440, 371, 2394, 1268, 1921, 11, 327, 7112, 1503, 471, 5673, 29397, 46, 412, 5870, 25087, 12, 13534, 8005, 6458, 3528, 46, 44216, 4146, 2043, 32, 25108, 2043, 46, 8005, 28994...
2.112412
427
''' Tests for seg2toph5 ''' import os import sys import unittest import logging from mock import patch from testfixtures import OutputCapture, LogCapture from ph5.utilities import seg2toph5, initialize_ph5 from ph5.core.tests.test_base import LogTestCase, TempDirTestCase,\ initialize_ex from ph5.core import ph5ap...
[ 7061, 6, 198, 51, 3558, 329, 384, 70, 17, 83, 2522, 20, 198, 7061, 6, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 11748, 18931, 198, 198, 6738, 15290, 1330, 8529, 198, 6738, 1332, 69, 25506, 1330, 25235, 49...
2.861538
130
from .dreamer import Dreamer
[ 6738, 764, 25966, 263, 1330, 7610, 263, 198 ]
3.625
8
import time from zcash.node import * node1 = Node(8002, "node 1") node1.start() # wait for string time.sleep(2) node1.print_blockchain() time.sleep(2) node2 = Node(8003, "node 2") node2.start() # wait for string time.sleep(2) node2.print_blockchain() node1.get_balance() node2.get_balance() # node1 mint and...
[ 11748, 640, 198, 198, 6738, 1976, 30350, 13, 17440, 1330, 1635, 198, 198, 17440, 16, 796, 19081, 7, 7410, 17, 11, 366, 17440, 352, 4943, 198, 198, 17440, 16, 13, 9688, 3419, 198, 198, 2, 4043, 329, 4731, 198, 2435, 13, 42832, 7, 1...
2.364839
529
from common_python.tellurium import util import pandas as pd import numpy as np import unittest if __name__ == '__main__': unittest.main()
[ 6738, 2219, 62, 29412, 13, 33331, 333, 1505, 1330, 7736, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354...
2.843137
51
# -*- coding: utf-8 -*- # 2017 Sunflower IT (http://sunflowerweb.nl) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import fields, models, api, _ from openerp.exceptions import Warning
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 2177, 3825, 25547, 7283, 357, 4023, 1378, 19155, 25547, 12384, 13, 21283, 8, 198, 2, 13789, 13077, 6489, 12, 18, 13, 15, 393, 1568, 357, 4023, 1378, 2503, 13, ...
2.794872
78
import configparser import logging import threading from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium import webdriver logger = logging.getLogger(__name__)
[ 11748, 4566, 48610, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 9019, 1330, 5313, 32103, 21321, ...
3.512195
82
#!/usr/bin/env python # -*- coding: utf-8 -*- # """The setup.py file.""" import os import sys from setuptools import find_packages, setup from setuptools.command.install import install VERSION = "0.3.15" URL = "https://github.com/zxdavb/evohome-async" with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.re...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 37811, 464, 9058, 13, 9078, 2393, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 900, ...
2.633197
488
#!/usr/bin/env python # Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 13130, 532, 383, 23652, 1523, 16588, 329, 21347, 1765, 78, 7035, 198, 2, 1114, 1321, 319, 262, 11756, 6634, 4870, 766, 262, 28536, 2393, 198, 2, 198, 2, 49962, ...
3.489676
339
#!/usr/bin/env python import rospy import numpy as np import pickle import time import socket from rospy.numpy_msg import numpy_msg from radbot_nuke.msg import detector_msg rospy.init_node('detServer', anonymous=False) pub = rospy.Publisher('/detector_data', detector_msg, queue_size=10) def send_ros_msg(ts, adc, de...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 640, 198, 11748, 17802, 198, 6738, 686, 2777, 88, 13, 77, 32152, 62, 19662, 1330, 299,...
2.23868
1,546
import re from itertools import chain from collections import defaultdict, namedtuple import pandas as pd from tqdm import tqdm Address = namedtuple('Address', ['to', 'kai', 'ku', 'mune', 'chome', 'ban', 'go', 'postal', 'endgo', 'tokens'])
[ 11748, 302, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 17268, 1330, 4277, 11600, 11, 3706, 83, 29291, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 20231, 796, 3706, 83, ...
2.350427
117
from setuptools import setup, find_packages with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') # get version from __version__ variable in vitalpbx/__init__.py from vitalpbx import __version__ as version setup( name='vitalpbx', version=version, description='Something', author='So...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 10786, 8897, 18883, 13, 14116, 11537, 355, 277, 25, 198, 197, 17350, 62, 47911, 796, 277, 13, 961, 22446, 36311, 22446, 35312, 10786, 59, 77, 11537, 198, ...
3.090909
154
for g in range(int(input())): n, k = [int(x) for x in input().split()] v = [1 for x in range(1, n+1)] m = 0 i = p = 1 while (m < n-1): if v[i] == 1: p += 1 if p == k: v[i] = 0 m += 1 p = 0 i += 1 if i == n: i = 0 i = 0 while...
[ 1640, 308, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 220, 220, 220, 299, 11, 479, 796, 685, 600, 7, 87, 8, 329, 2124, 287, 5128, 22446, 35312, 3419, 60, 198, 220, 220, 220, 410, 796, 685, 16, 329, 2124, 287, 2837, 7, 16, ...
1.663755
229
#!/usr/bin/env python3 # Copyright (c) 2020 Jarret Dyrbye # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php import time import sys import json import argparse from twisted.internet import reactor from twisted.internet.task import Loo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 12131, 15374, 1186, 360, 2417, 16390, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766, 262, 19249, 198, 2, 2393, 38559, 24290, 393, 2638, 1378, 250...
2.688229
943
#!/usr/bin/env python3 from __future__ import print_function from rosflight_holodeck_interface import ROSflightHolodeck import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm import time import holodeck from holodeck import agents from holodeck.environments import * from holodeck import sensors from I...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 686, 82, 22560, 62, 3937, 1098, 694, 62, 39994, 1330, 48263, 22560, 28115, 1098, 694, 198, 11748, 299, 32152, 355, 45941, ...
1.930871
2,112
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> from IPython.display import HTML # <markdowncell> # #Graphing Calculator - inspired by AP Calculus # Graphing calculators are permitted for use during "calculator active" problems on AP exams. Here we attempt to provide open access to those functionali...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1279, 46803, 18982, 29, 18, 13, 15, 3556, 46803, 18982, 29, 198, 198, 2, 1279, 8189, 3846, 29, 198, 198, 6738, 6101, 7535, 13, 13812, 1330, 11532, 198, 198, 2, 12...
1.809957
3,736
# The MIT License (MIT) # Copyright (c) 2017 Massachusetts Institute of Technology # # Authors: Cody Rude # This software is part of the NSF DIBBS Project "An Infrastructure for # Computer Aided Discovery in Geoscience" (PI: V. Pankratius) and # NASA AIST Project "Computer-Aided Discovery of Earth Surface # Deformation...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 15069, 357, 66, 8, 2177, 10140, 5136, 286, 8987, 198, 2, 198, 2, 46665, 25, 27035, 371, 2507, 198, 2, 770, 3788, 318, 636, 286, 262, 10896, 37, 360, 9865, 4462, 4935, 366, 2025, 33709, ...
3.806167
454
# -*- coding: utf-8 -*- # # on_rtd is whether we are on readthedocs.org import os import sys sys.path.insert(0, os.path.abspath('.')) sys.path.append(os.path.abspath('extensions')) extensions = [ 'sphinx.ext.graphviz', 'sphinx.ext.todo', 'wikipedia', 'examplecode' ] on_rtd = os.environ.get('READTHEDOC...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 319, 62, 81, 8671, 318, 1771, 356, 389, 319, 1100, 83, 704, 420, 82, 13, 2398, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, ...
2.340376
426
test_input = [4, 8] puzzle_input = [4, 9] #part1() import collections part2()
[ 9288, 62, 15414, 796, 685, 19, 11, 807, 60, 198, 79, 9625, 62, 15414, 796, 685, 19, 11, 860, 60, 198, 198, 2, 3911, 16, 3419, 198, 198, 11748, 17268, 198, 198, 3911, 17, 3419, 220, 220, 220, 220, 628 ]
2.15
40
from typing import Optional import numpy as np import matplotlib.pyplot as plt from matplotlib.axis import Axis from matplotlib.patches import Rectangle from superresolution import SIM_3D_Data # TODO: add support for plotting slices along x and y axes as well. # Will need to use transpose to swap that dimension...
[ 6738, 19720, 1330, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 22704, 1330, 38349, 198, 6738, 2603, 29487, 8019, 13, 8071, 2052, 1330, 4...
3.663366
101
#!/usr/bin/python2 import pyghmi.util.webclient as webclient import json import os import sys missingargs = False if 'XCCUSER' not in os.environ: print('Must set XCCUSER environment variable') missingargs = True if 'XCCPASS' not in os.environ: print('Must set XCCPASS environment variable') missingargs ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 198, 11748, 12972, 456, 11632, 13, 22602, 13, 12384, 16366, 355, 3992, 16366, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 45688, 22046, 796, 10352, 198, 361, 705, 55, 4093...
2.545244
431
from github import Github from my_token import token g = Github(token) repo = g.get_repo("adafruit/Adafruit_CircuitPython_Display_Text") repo_topics = repo.get_topics() print(repo_topics)
[ 6738, 33084, 1330, 38994, 198, 198, 6738, 616, 62, 30001, 1330, 11241, 198, 198, 70, 796, 38994, 7, 30001, 8, 198, 198, 260, 7501, 796, 308, 13, 1136, 62, 260, 7501, 7203, 324, 1878, 4872, 14, 2782, 1878, 4872, 62, 31560, 5013, 3790...
2.608108
74
import hashlib import os import tempfile import numpy as np import fcswrite def test_write_fcs(): """test that fcm can read the data files""" fname = tempfile.mktemp(suffix=".fcs", prefix="write_test") data = 1.0*np.arange(400).reshape((100, 4)) chn_names = ['cha', 'chb', 'ch3', 'ch4'] # monkey-...
[ 11748, 12234, 8019, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 277, 66, 2032, 6525, 628, 198, 4299, 1332, 62, 13564, 62, 69, 6359, 33529, 198, 220, 220, 220, 37227, 9288, 326, ...
2.139037
561
from moviepy.editor import VideoFileClip from datetime import datetime import numpy as np import time import os def manage_time(timestamp): """ Given the string representation of a the time using the "minutes:seconds[:miliseconds]" representation, returns the number of seconds using double precision ...
[ 6738, 3807, 9078, 13, 35352, 1330, 7623, 8979, 2601, 541, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 28686, 628, 198, 4299, 6687, 62, 2435, 7, 16514, 27823, 2599, 198, 220, ...
3.043597
367
#!/usr/bin/env python
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198 ]
2.444444
9
import snap G = snap.GenFull(snap.PNEANet, 100) # get a new random generator, provide the seed value Rnd = snap.TRnd(42) # randomize the generator, every execution will produce a different sequence. # Comment out the line to get the same sequence on every execution. Rnd.Randomize() for i in range(0,10): # provi...
[ 11748, 11495, 198, 198, 38, 796, 11495, 13, 13746, 13295, 7, 45380, 13, 47, 12161, 1565, 316, 11, 1802, 8, 198, 198, 2, 651, 257, 649, 4738, 17301, 11, 2148, 262, 9403, 1988, 198, 49, 358, 796, 11495, 13, 5446, 358, 7, 3682, 8, ...
3.09816
163
print("Thank you Jesus") # Read a value from standard input a value # input("Thank you") # Evaluate expression x = 1 print(x) x += 3 print(x) # loops if x > 1: print("great than 1") else: print("less than 1") n = 3 while n > 1: print(n) n -= 1 # Arithmetic operator print({100 % 3}, {100 / 3}) z =...
[ 4798, 7203, 10449, 345, 5803, 4943, 198, 198, 2, 4149, 257, 1988, 422, 3210, 5128, 257, 1988, 198, 2, 5128, 7203, 10449, 345, 4943, 628, 198, 2, 26439, 4985, 5408, 198, 87, 796, 352, 198, 4798, 7, 87, 8, 198, 87, 15853, 513, 198, ...
2.305128
780
# Standard Library import logging import os import socket import sys from collections import defaultdict # First Party from smdebug.core.config_constants import LOG_DUPLICATION_THRESHOLD _logger_initialized = False def _get_log_level(): default = "info" log_level = os.environ.get("SMDEBUG_LOG_LEVEL", defa...
[ 2, 8997, 10074, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 2, 3274, 3615, 198, 6738, 895, 24442, 13, 7295, 13, 11250, 62, 9979, 1187, 1330, 41605, 62, 35, ...
2.242377
1,279
# -*- coding: utf-8 -*- # Scrapy settings for scrapper project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/lates...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 1446, 2416, 88, 6460, 329, 19320, 2848, 1628, 198, 2, 198, 2, 1114, 21654, 11, 428, 2393, 4909, 691, 6460, 3177, 1593, 393, 198, 2, 8811, 973, 13, 921, 460, ...
2.300889
6,863
# # This file is part of datacube-classification # Copyright (C) 2021 INPE. # # datacube-classification Library is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. # """classification models module""" import pandas as pd def train_sklear...
[ 2, 198, 2, 770, 2393, 318, 636, 286, 4818, 330, 3266, 12, 4871, 2649, 198, 2, 15069, 357, 34, 8, 33448, 3268, 11401, 13, 198, 2, 198, 2, 4818, 330, 3266, 12, 4871, 2649, 10074, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 29...
3.19802
404
#!/usr/bin/env python # -*- coding: utf-8 -*- from redis import StrictRedis from HeartbeatMaker import HeartbeatMaker import arrow maker = HeartbeatMaker('redis://localhost:6379/0', 'test-beat', test) # maker.clean() # maker.beat_it('bac', 6,'bac-par') # maker.beat_it('shawn', 2,'par') # maker.omit_it('jack') make...
[ 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, 2266, 271, 1330, 520, 2012, 7738, 271, 198, 6738, 8894, 12945, 48890, 1330, 8894, 12945, 48890, 198, 11748, ...
2.56338
142
# Copyright 2021 RushanNotOfficial#1146. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 33448, 13063, 272, 3673, 28529, 2, 1157, 3510, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, ...
2.734835
577
"""File containing a class for the main gauge.""" from tkinter import font, Label, Frame from classes.widgets.main_gauge import MainGauge from classes.pub_sub import Subscriber
[ 37811, 8979, 7268, 257, 1398, 329, 262, 1388, 18266, 526, 15931, 198, 6738, 256, 74, 3849, 1330, 10369, 11, 36052, 11, 25184, 198, 6738, 6097, 13, 28029, 11407, 13, 12417, 62, 70, 559, 469, 1330, 8774, 38, 559, 469, 198, 6738, 6097, ...
3.52
50
from .core import ( mean, sum, exp, sin, cos, tan, log, tensor, grad_tensor, zeros, ones, randn, rand, Tensor, argmax, ) from .linear import Linear from .model import Module, Sequential from .sampler import TensorSample
[ 6738, 764, 7295, 1330, 357, 198, 220, 220, 220, 1612, 11, 198, 220, 220, 220, 2160, 11, 198, 220, 220, 220, 1033, 11, 198, 220, 220, 220, 7813, 11, 198, 220, 220, 220, 8615, 11, 198, 220, 220, 220, 25706, 11, 198, 220, 220, 220,...
2.153846
130
from eth_tester.exceptions import TransactionFailed from utils import captureFilteredLogs, AssertLog, nullAddress, TokenDelta, PrintGasUsed from pytest import raises, mark pytestmark = mark.skip(reason="We might not even need governance and currently dont account for transfering ownership")
[ 6738, 4555, 62, 4879, 353, 13, 1069, 11755, 1330, 45389, 37, 6255, 198, 6738, 3384, 4487, 1330, 8006, 11928, 4400, 11187, 82, 11, 2195, 861, 11187, 11, 9242, 20231, 11, 29130, 42430, 11, 12578, 39699, 38052, 198, 6738, 12972, 9288, 1330...
4.069444
72
# terrascript/resource/hashicorp/ad.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:10:57 UTC) import terrascript __all__ = [ "ad_computer", "ad_gplink", "ad_gpo", "ad_gpo_security", "ad_group", "ad_group_membership", "ad_ou", "ad_user", ]
[ 2, 8812, 15961, 14, 31092, 14, 17831, 291, 16300, 14, 324, 13, 9078, 198, 2, 17406, 4142, 7560, 416, 4899, 14, 15883, 8189, 13, 9078, 357, 1731, 12, 19117, 12, 1238, 2481, 1315, 25, 940, 25, 3553, 18119, 8, 198, 11748, 8812, 15961, ...
2.173913
138
import sys from utils import my_train, flickr_train_params, flickr_params, my_test, copy_networks if __name__ == "__main__": do_import = True first_arg = sys.argv[0] if do_import: copy_networks(model_to_import="celeba_cycle", iter="2") flickr_train_params["continue_train"] = True ...
[ 11748, 25064, 198, 6738, 3384, 4487, 1330, 616, 62, 27432, 11, 781, 18994, 62, 27432, 62, 37266, 11, 781, 18994, 62, 37266, 11, 616, 62, 9288, 11, 4866, 62, 3262, 5225, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 12...
2.520362
221
#!/usr/bin/env python import sys import platform from setuptools import setup # from Cython.Build import cythonize # TODO: use environment markres instead of Python code in order to # allow building proper wheels. Markers are not enabled right now because # of setuptools/wheel incompatibilities and the 'pip >= 6.0' ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 11748, 3859, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 2, 422, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 628, 198, 198, 2, 16926, 46, 25, 779, 2858, 1...
2.477087
1,222
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import hashlib import os import os.path as osp import pickle import time import attr import gym import magnum as mn imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287,...
2.238311
1,326
############### ## LIBRARIES ## ############### import click from copy import deepcopy from pprint import pprint from arcgis.gis import GIS from arcgis import features import geopandas as gpd ################## ## FUNCTION(S) ## ################## if __name__ == "__main__": main()
[ 7804, 4242, 21017, 198, 2235, 45651, 49, 1503, 11015, 22492, 198, 7804, 4242, 21017, 198, 11748, 3904, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 6738, 10389, 70, 271, 13, 70, 271, 1330, 402, ...
3.129032
93
# PyOS # Made for Python 2.7 # programs/mv.py # Import Libraries # PyOS Scripts import internal.extra import os from programs.cp import displayCwdFiles, getFileOrigin
[ 2, 9485, 2640, 198, 2, 14446, 329, 11361, 362, 13, 22, 198, 2, 4056, 14, 76, 85, 13, 9078, 198, 198, 2, 17267, 46267, 198, 2, 9485, 2640, 12327, 82, 198, 11748, 5387, 13, 26086, 198, 11748, 28686, 198, 6738, 4056, 13, 13155, 1330,...
3.188679
53
""" 382. Linked List Random Node Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being chosen. Implement the Solution class: Solution(ListNode head) Initializes the object with the integer array nums. int getRandom() Chooses a node ran...
[ 37811, 198, 36243, 13, 7502, 276, 7343, 14534, 19081, 198, 198, 15056, 257, 1702, 306, 6692, 1351, 11, 1441, 257, 4738, 10139, 338, 1988, 422, 262, 6692, 1351, 13, 5501, 10139, 198, 27238, 423, 262, 976, 12867, 286, 852, 7147, 13, 198...
3.289474
380
from datetime import timedelta from uuid import uuid1 from snuba.redis import redis_client from snuba.subscriptions.data import SubscriptionData from snuba.subscriptions.store import RedisSubscriptionDataStore from tests.subscriptions import BaseSubscriptionTest
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 334, 27112, 1330, 334, 27112, 16, 198, 198, 6738, 3013, 22013, 13, 445, 271, 1330, 2266, 271, 62, 16366, 198, 6738, 3013, 22013, 13, 7266, 12048, 507, 13, 7890, 1330, 3834, 33584, 6601, ...
3.732394
71
import pytest from app.broadcast_areas.models import CustomBroadcastAreas from app.models.broadcast_message import BroadcastMessage from tests import broadcast_message_json
[ 11748, 12972, 9288, 198, 198, 6738, 598, 13, 36654, 2701, 62, 533, 292, 13, 27530, 1330, 8562, 30507, 2701, 8491, 292, 198, 6738, 598, 13, 27530, 13, 36654, 2701, 62, 20500, 1330, 44244, 12837, 198, 6738, 5254, 1330, 7025, 62, 20500, ...
3.829787
47
#coding:utf-8 """ """ from torchtext.data.field import RawField, Field, LabelField
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 37811, 198, 198, 37811, 198, 6738, 28034, 5239, 13, 7890, 13, 3245, 1330, 16089, 15878, 11, 7663, 11, 36052, 15878, 628 ]
2.931034
29
from __future__ import print_function, division from warnings import warn from nilmtk.disaggregate import Disaggregator import pandas as pd import numpy as np from collections import OrderedDict import matplotlib.pyplot as plt from sklearn.decomposition import MiniBatchDictionaryLearning, SparseCoder from sklearn.met...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 6738, 14601, 1330, 9828, 198, 6738, 18038, 16762, 74, 13, 6381, 9460, 49373, 1330, 3167, 9460, 2301, 1352, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, ...
3.631579
114
from plugins import PluginUtil from plugins.task_affinity import TaskAffinityPlugin plugin = TaskAffinityPlugin() if __name__ == '__main__': test_regex() test_regex1() test_regex2() test_regex3() test_regex4() test_regex5()
[ 6738, 20652, 1330, 42636, 18274, 346, 198, 6738, 20652, 13, 35943, 62, 2001, 6269, 1330, 15941, 35191, 6269, 37233, 198, 198, 33803, 796, 15941, 35191, 6269, 37233, 3419, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354,...
2.51
100
from __future__ import print_function import pyzbar.pyzbar as pyzbar import numpy as np import cv2 if __name__ == '__main__': train_image = cv2.imread('target.png') query_image = cv2.imread('target.png') cv2.imwrite("train_image.png", train_image) qr = QRdetect(query_image) R, t = qr.process_...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 12972, 89, 5657, 13, 9078, 89, 5657, 355, 12972, 89, 5657, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, ...
2.364198
162
import unittest from app.models import User,Role,Post,Comment
[ 11748, 555, 715, 395, 198, 198, 6738, 598, 13, 27530, 1330, 11787, 11, 47445, 11, 6307, 11, 21357, 198, 220, 220 ]
3.095238
21
import logging import os
[ 11748, 18931, 198, 11748, 28686, 628 ]
4.333333
6
from state import print_solution_path from search import BBS, A_star_search from puzzle import generate from write_to_file import write_to_csv, write_to_txt ''' CS461 - Artificial Intelligence Homework 3 Group members: * Fuad Aghazada * Can zgrel * aatay Sel * Utku Mert Topuolu...
[ 6738, 1181, 1330, 3601, 62, 82, 2122, 62, 6978, 198, 6738, 2989, 1330, 347, 4462, 11, 317, 62, 7364, 62, 12947, 198, 6738, 15027, 1330, 7716, 198, 6738, 3551, 62, 1462, 62, 7753, 1330, 3551, 62, 1462, 62, 40664, 11, 3551, 62, 1462, ...
2.548387
465
import ccxt from datetime import datetime from datetime import timedelta import calendar import time from enum import Enum import ccxtWrapper import math import LineNotify import orderInfo
[ 11748, 36624, 742, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 11748, 11845, 198, 11748, 640, 198, 6738, 33829, 1330, 2039, 388, 198, 11748, 36624, 742, 36918, 2848, 198, 11748, 10688, 198, 117...
3.897959
49
import os from lxml import html import requests for chapter in get_dir_list('./'): md_path = os.path.join(chapter, 'README.md') new_md = [] with open(md_path, "r", encoding="UTF8") as f: for line in f.readlines(): line = line.strip() row = line.split('|') numberS...
[ 11748, 28686, 198, 6738, 300, 19875, 1330, 27711, 198, 11748, 7007, 198, 198, 1640, 6843, 287, 651, 62, 15908, 62, 4868, 7, 4458, 14, 6, 2599, 198, 220, 220, 220, 45243, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7, 43582, 11, 705, ...
1.748936
705
from utilidadesCeV import moeda preco = float(input('Digite o preo: R$')) porcentagem = float(input('Digite a aliquota:')) print(f'A metade de {moeda.moeda(preco)} {moeda.metade(preco, True)}') print(f'O dobro de {moeda.moeda(preco)} {moeda.dobro(preco, True)}') print(f'Aumentando {moeda.moeda(preco)} em {porcentag...
[ 6738, 7736, 312, 2367, 34, 68, 53, 1330, 6941, 18082, 628, 198, 3866, 1073, 796, 12178, 7, 15414, 10786, 19511, 578, 267, 662, 78, 25, 371, 3, 6, 4008, 198, 1819, 1087, 363, 368, 796, 12178, 7, 15414, 10786, 19511, 578, 257, 435, ...
2.287736
212