content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
#!/usr/bin/env python import os import sys import yaml from optparse import OptionParser if __name__ == "__main__": parser = OptionParser() parser.add_option("-l", "--lane", dest="lane", default=0) parser.add_option("-o", "--out_file", dest="out_file", default=None) parser.add_option("-g", "-...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 198, 361, 11593, 3672, 834, ...
2.185185
702
from django import forms #from app.models import Image # class ImageForm(forms.ModelForm): # class Meta: # model = Image # name = ['name'] # location = ['location']
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 2, 6738, 598, 13, 27530, 1330, 7412, 628, 198, 2, 1398, 7412, 8479, 7, 23914, 13, 17633, 8479, 2599, 198, 2, 220, 220, 220, 220, 1398, 30277, 25, 198, 2, 220, 220, 220, 220, 220, 220, 220,...
2.481013
79
#!/usr/bin/python3 """ create_account_with_captcha.py MediaWiki Action API Code Samples Demo of `createaccount` module: Create an account on a wiki with a special authentication extension installed. This example considers a case of a wiki where captcha is enabled through extensions like ConfirmEdi...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 37811, 198, 220, 220, 220, 2251, 62, 23317, 62, 4480, 62, 27144, 11693, 13, 9078, 628, 220, 220, 220, 6343, 32603, 7561, 7824, 6127, 3409, 2374, 198, 220, 220, 220, 34588, 286, 460...
2.651685
1,068
import sys,os import argparse from util.MongoUtil import MongoUtil from util.Generator import Generator #Custom help messages if __name__ == '__main__': #Argument requirments parser = argparse.ArgumentParser(description='Creates new passwords and adds them to mondodb.', usage=help_msg()) parser.add_argume...
[ 11748, 25064, 11, 418, 198, 11748, 1822, 29572, 198, 6738, 7736, 13, 44, 25162, 18274, 346, 1330, 42591, 18274, 346, 198, 6738, 7736, 13, 8645, 1352, 1330, 35986, 198, 198, 2, 15022, 1037, 6218, 198, 198, 361, 11593, 3672, 834, 6624, ...
2.353135
909
from basicnetworkswitch import * from cisconetworkswitch import *
[ 6738, 4096, 3262, 5225, 42248, 1330, 1635, 198, 6738, 33325, 1102, 316, 5225, 42248, 1330, 1635, 198 ]
3.882353
17
from django.conf.urls import url from referralnote import views app_name = 'referral_note' #view_obj = views.ReferralNotes() urlpatterns = [ url(r'^(?P<p_id>[0-9]+)/delete_referralnote/(?P<notenum>[0-9]+)$', views.delete_refnote, name='delete_referralnote'), url(r'^(?P<p_id>[0-9]+)/edit_referralnote...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 31413, 11295, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 260, 2232, 1373, 62, 11295, 6, 198, 198, 2, 1177, 62, 26801, 796, 5009, 13, 46238, 1373, 16130, ...
2.184211
228
# thanks to max9111, https://stackoverflow.com/questions/41651998/python-read-and-convert-raw-3d-image-file import numpy as np from functools import lru_cache
[ 2, 5176, 284, 3509, 24, 16243, 11, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 19, 20986, 21113, 14, 29412, 12, 961, 12, 392, 12, 1102, 1851, 12, 1831, 12, 18, 67, 12, 9060, 12, 7753, 198, 11748, 299, 32152, 355, ...
2.872727
55
import random from brain_games.constants import MINIMAL_RANDOM, MAXIMAL_RANDOM
[ 11748, 4738, 198, 6738, 3632, 62, 19966, 13, 9979, 1187, 1330, 20625, 3955, 1847, 62, 49, 6981, 2662, 11, 25882, 3955, 1847, 62, 49, 6981, 2662, 628, 628 ]
2.928571
28
import os from ase.visualize import view from mpl_toolkits.mplot3d import Axes3D # noqa from scipy.optimize import curve_fit from tqdm import tqdm import matplotlib.pyplot as plt import numpy as np import seaborn as sns sns.set( style="ticks", rc={ "font.family": "Arial", "font.size": 40, ...
[ 11748, 28686, 198, 6738, 257, 325, 13, 41464, 1096, 1330, 1570, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, 67, 1330, 12176, 274, 18, 35, 220, 1303, 645, 20402, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, ...
1.936955
4,584
from django.conf import settings from django import http from django.template import RequestContext, loader def server_error(request, template_name='500.html'): """ 500 error handler. Templates: `500.html` Context: MEDIA_URL Path of static media (e.g. "media.example.org") """ ...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 1330, 2638, 198, 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 11, 40213, 198, 198, 4299, 4382, 62, 18224, 7, 25927, 11, 11055, 62, 3672, 11639, 4059, 13, 6494, 6,...
2.65
180
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-13 13:48 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 22, 319, 2177, 12, 1065, 12, 1485, 1511, 25, 2780, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.690909
55
import torch from ..attack.base_attack import BaseAttacker
[ 11748, 28034, 198, 198, 6738, 11485, 20358, 13, 8692, 62, 20358, 1330, 7308, 8086, 10735, 628 ]
3.8125
16
""" Basic service for testing the service_utils run_main """ connection_models = { 'out': { 'out_connection_1': { 'connection_type': 'requester', 'required_arguments': { 'this_is_a_test_arg': str, }, 'required_return_arguments': { ...
[ 37811, 14392, 2139, 329, 4856, 262, 2139, 62, 26791, 1057, 62, 12417, 37227, 628, 198, 38659, 62, 27530, 796, 1391, 198, 220, 220, 220, 705, 448, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 448, 62, 38659, 62, 16, 1035...
1.878641
206
from time import sleep from random import randint itens = ('Pedra', 'Papel', 'Tesoura') print('Suas opes: ') print("""[ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA""") computador = randint(0,2) jogador = int(input('Qual a sua jogada? ')) print('JO') sleep(1) print('KEN') sleep(1) print('PO!!!') print('-=' * 11) print('Computa...
[ 6738, 640, 1330, 3993, 198, 6738, 4738, 1330, 43720, 600, 198, 270, 641, 796, 19203, 43468, 430, 3256, 705, 47, 499, 417, 3256, 705, 36504, 280, 430, 11537, 198, 4798, 10786, 5606, 292, 1034, 274, 25, 705, 8, 198, 4798, 7203, 15931, ...
2.572368
304
import wtdb import unittest if __name__ == '__main__': import doctest doctest.testmod(wtdb) unittest.main()
[ 11748, 266, 8671, 65, 198, 11748, 555, 715, 395, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 10412, 395, 198, 220, 220, 220, 10412, 395, 13, 9288, 4666, 7, 86, 8671, 65, 8, 19...
2.296296
54
# ENVISIoN # # Copyright (c) 2019 Jesper Ericsson # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list o...
[ 2, 220, 12964, 29817, 40, 78, 45, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 13130, 4804, 525, 7651, 16528, 198, 2, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, ...
3.512987
462
#! /usr/bin/env python # coding:utf-8 from __future__ import division, print_function import math # sqlalchemy import sqlalchemy from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine from sqlalchemy import Column, TEXT, REAL, INTEGER from sqlalchemy.orm import sessionmaker from s...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 40477, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 198, 11748, 10688, 198, 2, 44161, 282, 26599, 198, 11748, 44161, 282, 26599, 198, 67...
1.89375
4,320
#!/usr/bin/env python3 # Copyright 2018 Lael D. Barlow # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 2864, 406, 3010, 360, 13, 2409, 9319, 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,...
2.158572
3,109
import os import os.path as osp import logging import argparse import math import yaml from tabulate import tabulate from torch.utils.data import Dataset from tqdm import tqdm from typing import Tuple, List import torch import torch.nn as nn import torch.nn.functional as functional import torch.distributed as dist f...
[ 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 10688, 198, 198, 11748, 331, 43695, 198, 6738, 7400, 5039, 1330, 7400, 5039, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, ...
2.328125
1,536
from django.conf.urls import url from . import views app_name = 'talent' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^musicians/$', views.MusicianIndex.as_view(), name='musicians'), url(r'^musicians/(?P<pk>[0-9]+)/$', views.MusicianDetail.as_view(), name='musician-detail'), ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 39240, 298, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 5009, ...
2.454308
383
import discord from discord.ext.modules import ModularCommandClient if __name__ == "__main__": client = ModularCommandClient(intents=discord.Intents.none()) client.load_extension("commands.hello_module") client.load_extension("commands.advanced_module") client.run("your_bot_token")
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 13, 18170, 1330, 3401, 934, 21575, 11792, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 5456, 796, 3401, 934, 21575, 11792, 7, 600, 658, 28, 15410, 585...
3.02
100
# Copyright 2019 Benjamin Santos # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
[ 2, 220, 220, 15069, 13130, 14533, 28458, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 1...
2.281879
894
from typing import Any, Dict, List, Type, TypeVar, Union import attr from ..models.secret import Secret from ..types import UNSET, Unset T = TypeVar("T", bound="CryptFsConfig")
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 5994, 11, 5994, 19852, 11, 4479, 198, 198, 11748, 708, 81, 198, 198, 6738, 11485, 27530, 13, 21078, 1330, 3943, 198, 6738, 11485, 19199, 1330, 4725, 28480, 11, 791, 2617, 198, 198, ...
3.232143
56
# -*- coding: utf-8 -*- from django.shortcuts import render, HttpResponse,redirect from django.http import JsonResponse from .forms import RestaurantesForm from .models import restaurants, addr#, image from django.contrib.auth.decorators import login_required import logging log = logging.getLogger(__name__) # Create...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 367, 29281, 31077, 11, 445, 1060, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 764, 23914, ...
2.723077
390
import cb, time, struct, sys, random, string try: import console console.set_color(0.0,0.2,1) print """ _____ _ _____ _ | |___ _| |___| __ | |_ _ ___ | --| . | . | -_| __ -| | | | -_| |_____|___|___|___|_____|_|___|___| _____ _ __/ ___/ ...
[ 11748, 269, 65, 11, 640, 11, 2878, 11, 25064, 11, 4738, 11, 4731, 198, 198, 28311, 25, 198, 197, 11748, 8624, 198, 197, 41947, 13, 2617, 62, 8043, 7, 15, 13, 15, 11, 15, 13, 17, 11, 16, 8, 198, 197, 4798, 37227, 198, 220, 220,...
1.838063
599
from django.urls import path from .views import * app_name = 'products' urlpatterns = [ path('create', CreateProduct.as_view(), name='create'), path('view/<int:pk>', ProductDetail.as_view(), name='detail'), path('list', ProductList.as_view(), name='list'), path('<int:pk>/update', ProductUpdate.as_view...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 1330, 1635, 198, 198, 1324, 62, 3672, 796, 705, 29498, 6, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 17953, 3256, 13610, 15667, 13, 292, ...
2.758065
124
import functools import os import signal import sys from abc import ABC from enum import Enum from pathlib import Path from typing import Callable, ClassVar, List, Optional from jsonschema.exceptions import ValidationError as JsonSchemaValidationError from requests.exceptions import RequestException from yaml.error im...
[ 11748, 1257, 310, 10141, 198, 11748, 28686, 198, 11748, 6737, 198, 11748, 25064, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4889, 540, 11, 5016, 19852, ...
3.216216
222
""" Builds and runs application """ from app import app, user_datastore, db from api_module.api_routes import api from auth_module.auth_routes import auth app.register_blueprint(api) app.register_blueprint(auth) if __name__ == "__main__": # database = create_db(connection_str) # attach_db(g, database) app...
[ 37811, 10934, 82, 290, 4539, 3586, 37227, 198, 6738, 598, 1330, 598, 11, 2836, 62, 19608, 459, 382, 11, 20613, 198, 6738, 40391, 62, 21412, 13, 15042, 62, 81, 448, 274, 1330, 40391, 198, 6738, 6284, 62, 21412, 13, 18439, 62, 81, 448...
2.8
120
''' flask_miracle ------------- This module provides a fabric layer between the Flask framework and the Miracle ACL library. :copyright: (c) 2017 by Timo Puschkasch. :license: BSD, see LICENSE for more details. ''' from .base import Acl from .functions import check_all, check_any, set_current_...
[ 7061, 6, 198, 220, 220, 220, 42903, 62, 10793, 6008, 198, 220, 220, 220, 220, 32501, 198, 220, 220, 220, 770, 8265, 3769, 257, 9664, 7679, 1022, 262, 46947, 9355, 290, 262, 198, 220, 220, 220, 33292, 17382, 5888, 13, 628, 220, 220, ...
2.930769
130
from flask import Blueprint bp = Blueprint('tags', __name__)
[ 6738, 42903, 1330, 39932, 198, 198, 46583, 796, 39932, 10786, 31499, 3256, 11593, 3672, 834, 8, 628 ]
3.705882
17
# -*- coding: utf-8 -*- """{{ cookiecutter.project_slug }} rest-api handlers.""" from .security import security_router __all__ = ("security_router",)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 27007, 19751, 8968, 353, 13, 16302, 62, 6649, 1018, 34949, 1334, 12, 15042, 32847, 526, 15931, 198, 198, 6738, 764, 12961, 1330, 2324, 62, 472, 353, 198, 198, 834...
2.763636
55
from datetime import datetime from .mixins import ArtistMixin, ExternalIDMixin, ExternalURLMixin, ImageMixin, TrackMixin from .object import SpotifyObject from .track import SimpleTrack
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 764, 19816, 1040, 1330, 18902, 35608, 259, 11, 34579, 2389, 35608, 259, 11, 34579, 21886, 35608, 259, 11, 7412, 35608, 259, 11, 17762, 35608, 259, 198, 6738, 764, 15252, 1330, 26778, 1...
3.8
50
__version__ = "5.1.3" LOGGER_NAME = "connector.virustotal_intelligence"
[ 834, 9641, 834, 796, 366, 20, 13, 16, 13, 18, 1, 198, 198, 25294, 30373, 62, 20608, 796, 366, 8443, 273, 13, 37040, 436, 4997, 62, 32683, 1, 198 ]
2.517241
29
from training.config_interface.BaseTrainingProcess import BaseTrainingProcess from training.config_interface.BaseTrainingEpoch import BaseTrainingEpoch
[ 6738, 3047, 13, 11250, 62, 39994, 13, 14881, 44357, 18709, 1330, 7308, 44357, 18709, 198, 6738, 3047, 13, 11250, 62, 39994, 13, 14881, 44357, 13807, 5374, 1330, 7308, 44357, 13807, 5374, 198 ]
4.75
32
# -*- coding: utf-8 -*- # Copyright (c) 2017, masonarmani38@gmail.com and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2177, 11, 285, 888, 283, 805, 72, 2548, 31, 14816, 13, 785, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 6...
3.305556
72
import time
[ 11748, 640, 198 ]
4
3
import struct import os import sys import subprocess if len(sys.argv) != 2: print('Usage: python %s filename \n output is *.spv *.yariv and *.hex file \n' % sys.argv[0]) quit() inputfilepath = sys.argv[1] outputname = os.path.basename(inputfilepath) outdir = os.path.dirname(inputfilepath) ginfile = os.path.basen...
[ 11748, 2878, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 850, 14681, 628, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 3601, 10786, 28350, 25, 21015, 4064, 82, 29472, 3467, 77, 5072, 318, 46866, 2777, 85,...
2.370763
472
#!/usr/bin/env python3 import sys import logging import argparse import tqdm import dataset.budgetary from model import * from test import MockWorker from dataset import load_raw_csv from gui.estimation import Options as EstimationOpts from dataset.experimental_data import ExperimentalData logging.basicConfig(level...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 256, 80, 36020, 198, 198, 11748, 27039, 13, 37315, 560, 198, 198, 6738, 2746, 1330, 1635, 198, 6738, 1332, ...
2.662768
513
# file KML.py # "Produces a kml file from the track as defined in ModuleConstructor.Track." # Strategy here is to produce two .kml files, one that references # google.com and one that references acserver.raf.ucar.edu, the latter # for use on the aircraft to avoid remote connections to google.com # in flight. The latter...
[ 2, 2393, 509, 5805, 13, 9078, 198, 2, 198, 1, 11547, 728, 257, 479, 4029, 2393, 422, 262, 2610, 355, 5447, 287, 19937, 42316, 273, 13, 24802, 526, 198, 2, 20561, 994, 318, 284, 4439, 734, 764, 74, 4029, 3696, 11, 530, 326, 10288, ...
2.060339
5,900
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Functions to make API calls. @author: amagrabi """ import requests def login(client_id, client_secret, project_key, scope, host = 'EU'): '''Authentification Args: client_id: client_id. client_secret: client_secret. project_key...
[ 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, 198, 24629, 2733, 284, 787, 7824, 3848, 13, 198, 198, 31, 9800, 25, 716, 363, 81, 17914, 198, 198, ...
2.275618
849
import sys, re, string, numpy p_strongs = numpy.arange(0.1, 0.9, 0.1) costs = range(3, 10, 1) for p_s in p_strongs: p_meds = numpy.arange(0.1, 1-p_s, 0.1) for p_m in p_meds: p_w = 1 - p_s - p_m for cost in costs: filename = str(p_s) + "_" + str(p_m) + "_" + str(p_w) + "_" + str(cos...
[ 11748, 25064, 11, 302, 11, 4731, 11, 299, 32152, 198, 198, 79, 62, 11576, 82, 796, 299, 32152, 13, 283, 858, 7, 15, 13, 16, 11, 657, 13, 24, 11, 657, 13, 16, 8, 198, 15805, 82, 796, 2837, 7, 18, 11, 838, 11, 352, 8, 198, 1...
1.731982
444
import boto3 as aws import botocore from shuttl import app ## Class for AWS S3 storage
[ 11748, 275, 2069, 18, 355, 3253, 82, 198, 11748, 10214, 420, 382, 198, 198, 6738, 4423, 28781, 1330, 598, 198, 198, 2235, 5016, 329, 30865, 311, 18, 6143, 198 ]
3.068966
29
#!/usr/bin/python # # This script is used to analyze, tabulate, and graph data generated by # the JAM weaver and by JAMScript performance instrumentation. It was # used to produce figures presented in the experimental results section # of ``Efficient Runtime Enforcement Techniques for Policy Weaving,'' # published at F...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 770, 4226, 318, 973, 284, 16602, 11, 7400, 5039, 11, 290, 4823, 1366, 7560, 416, 198, 2, 262, 449, 2390, 356, 8770, 290, 416, 449, 2390, 7391, 2854, 8875, 341, 13, 632, 373, ...
3.333333
360
# Copyright (c) 2011-2013 Peng Sun. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the COPYRIGHT file. # hone_control.py # a placeholder file for any control jobs HONE runtime generates
[ 2, 15069, 357, 66, 8, 2813, 12, 6390, 42341, 3825, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 27975, 38162, 9947, 2393, 1...
3.712121
66
import sys print(sys.version_info[:2])
[ 11748, 25064, 198, 4798, 7, 17597, 13, 9641, 62, 10951, 58, 25, 17, 12962, 198 ]
2.6
15
"""This module is designed to build timestrings from file metadata. Everything is done in seconds since the unix epoch or UTC. Author: Brian Lindsay Author Email: tekemperor@gmail.com """ import sys import os import datetime def filetime(file_path): """Returns formatted time string from file metadata. Uses mo...
[ 37811, 1212, 8265, 318, 3562, 284, 1382, 4628, 395, 33173, 422, 2393, 20150, 13, 198, 198, 19693, 318, 1760, 287, 4201, 1201, 262, 555, 844, 36835, 393, 18119, 13, 198, 13838, 25, 8403, 33127, 198, 13838, 9570, 25, 573, 365, 76, 8723,...
2.334395
942
from __future__ import print_function from tqdm import * import sys import argparse import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from torch.utils.data import DataLoader from torch.optim import lr_scheduler import torch.utils.data.distributed import torchvision.tran...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 256, 80, 36020, 1330, 1635, 198, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 643...
2.489148
3,087
import argparse import json import os from datetime import datetime from settings import annotation_predictor_metadata_dir def concat_detection_record(record1: str, record2: str): """ Concatenates two detection records and saves them in a new file. Args: record1: Path to first record, saved in a ...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 6460, 1330, 23025, 62, 79, 17407, 273, 62, 38993, 62, 15908, 198, 198, 4299, 1673, 265, 62, 15255, 3213, 62, 22105, 7, ...
2.423971
559
""" Generic Device class for manipulators. To make a new device, one must implement at least: * position * absolute_move """ from numpy import array import time __all__ = ['Device']
[ 37811, 198, 46189, 16232, 1398, 329, 7704, 24325, 13, 198, 198, 2514, 787, 257, 649, 3335, 11, 530, 1276, 3494, 379, 1551, 25, 198, 9, 2292, 198, 9, 4112, 62, 21084, 198, 37811, 198, 6738, 299, 32152, 1330, 7177, 198, 11748, 640, 19...
3.588235
51
# PHOTOMETRY CODE (TEST) FOR PYTHON 3.X # 2019.03.09 # GREGORY S.H. PAEK #============================================================ import os, glob import numpy as np import matplotlib.pyplot as plt from astropy.io import ascii from astropy.io import fits #from imsng import zpcal #===================================...
[ 2, 197, 11909, 2394, 2662, 2767, 18276, 42714, 357, 51, 6465, 8, 7473, 350, 56, 4221, 1340, 513, 13, 55, 198, 2, 197, 23344, 13, 3070, 13, 2931, 198, 2, 197, 28934, 38, 15513, 311, 13, 39, 13, 8147, 36, 42, 198, 2, 10052, 4770, ...
2.063845
4,276
from django.db import transaction from django.shortcuts import render, redirect from django.urls import reverse_lazy, reverse from django.views.generic import CreateView, ListView, DeleteView, UpdateView, DetailView from django.contrib.auth.mixins import LoginRequiredMixin from LetsCook.common.forms import CommentForm...
[ 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 11, 9575, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330,...
3.603659
164
from . models import Profile, Business,Myhood, PolicePosts, HealthFacilities, UserPost from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django.forms import widgets
[ 198, 6738, 764, 4981, 1330, 13118, 11, 7320, 11, 3666, 2894, 11, 4287, 21496, 11, 3893, 47522, 2410, 11, 11787, 6307, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443,...
3.223529
85
""" Author: Alexandra Lee Date Created: 11 March 2020 Scripts related to training the VAE including 1. Normalizing gene expression data 2. Wrapper function to input training parameters and run vae training in `vae.tybalt_2layer_model` """ from ponyo import vae, utils import os import pickle import pandas as pd from s...
[ 37811, 198, 13838, 25, 44075, 5741, 198, 10430, 15622, 25, 1367, 2805, 12131, 198, 198, 7391, 82, 3519, 284, 3047, 262, 13753, 36, 1390, 198, 16, 13, 14435, 2890, 9779, 5408, 1366, 198, 17, 13, 27323, 2848, 2163, 284, 5128, 3047, 1000...
2.670789
1,698
"""Provides other helper functions for factors""" from typing import Any, Iterable import numpy from pandas import Categorical, DataFrame from pipda import register_verb from pipda.utils import CallingEnvs from ..core.types import ForcatsRegType, ForcatsType, is_null, is_scalar from ..core.utils import Array from ..co...
[ 37811, 15946, 1460, 584, 31904, 5499, 329, 5087, 37811, 198, 6738, 19720, 1330, 4377, 11, 40806, 540, 198, 11748, 299, 32152, 198, 6738, 19798, 292, 1330, 327, 2397, 12409, 11, 6060, 19778, 198, 6738, 7347, 6814, 1330, 7881, 62, 19011, ...
3.059406
202
from . import utils from . import models __all__ = ['utils', 'models']
[ 6738, 764, 1330, 3384, 4487, 198, 6738, 764, 1330, 4981, 198, 834, 439, 834, 796, 37250, 26791, 3256, 705, 27530, 20520, 198 ]
3.227273
22
# Copyright 2018 PIQuIL - All Rights Reserved # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Licens...
[ 2, 15069, 2864, 30434, 4507, 4146, 532, 1439, 6923, 33876, 198, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, ...
2.140767
3,076
cond = True while cond: x = int(input("Input X Value :")) y = 10 if (x > 10) else 5 if (x < 5) else x print("{} is the Y value".format(y)) cond = True if input("continue? y/n :") == "y" else False
[ 17561, 796, 6407, 198, 4514, 1779, 25, 198, 220, 220, 220, 2124, 796, 493, 7, 15414, 7203, 20560, 1395, 11052, 1058, 48774, 198, 220, 220, 220, 331, 796, 838, 611, 357, 87, 1875, 838, 8, 2073, 642, 611, 357, 87, 1279, 642, 8, 2073...
2.488372
86
import copy # assert next10(5) == [0,1,2,4,5,1,5,8,9,1] # assert next10(9) == [5,1,5,8,9,1,6,7,7,9] # assert next10(18) == [9,2,5,1,0,7,1,0,8,5] # assert next10(2018) == [5,9,4,1,4,2,9,8,8,2] # print(next10(760221)) assert next10([0,1,2,4,5]) == 5 assert next10([5,1,5,8,9]) == 9 assert next10([9,2,5,1,0]) == 18 asser...
[ 11748, 4866, 198, 198, 2, 6818, 1306, 940, 7, 20, 8, 6624, 685, 15, 11, 16, 11, 17, 11, 19, 11, 20, 11, 16, 11, 20, 11, 23, 11, 24, 11, 16, 60, 198, 2, 6818, 1306, 940, 7, 24, 8, 6624, 685, 20, 11, 16, 11, 20, 11, 23, ...
1.707207
222
import xmlrpclib from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler import numpy as np from io import StringIO from numpy.linalg import inv from scipy.linalg import * # Restrict to a particular path. # Create server server = SimpleXMLRPCServer(("loca...
[ 11748, 35555, 81, 79, 565, 571, 201, 198, 6738, 17427, 55, 5805, 49, 5662, 10697, 1330, 17427, 55, 5805, 49, 5662, 10697, 201, 198, 6738, 17427, 55, 5805, 49, 5662, 10697, 1330, 17427, 55, 5805, 49, 5662, 18453, 25060, 201, 198, 11748...
2.739726
219
# put your python code here print(10)
[ 2, 1234, 534, 21015, 2438, 994, 198, 4798, 7, 940, 8, 198 ]
3.166667
12
#!/usr/bin/env python # coding=utf-8 from smtplib import SMTPException from django.conf import settings from django.core.management import BaseCommand from django.core.mail import send_mail
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 6738, 895, 83, 489, 571, 1330, 9447, 7250, 16922, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, ...
3.310345
58
"""Manages the lifecycle of a docker container. Use via the with statement: with Container(some_image) as c: for line in c.run("some_command"): print line """ import docker import click, os # sets the docker host from your environment variables client = docker.Client( **docker.utils.kwargs_from_env(a...
[ 37811, 5124, 1095, 262, 3868, 47510, 286, 257, 36253, 9290, 13, 198, 198, 11041, 2884, 262, 351, 2643, 25, 198, 198, 4480, 43101, 7, 11246, 62, 9060, 8, 355, 269, 25, 198, 220, 220, 220, 329, 1627, 287, 269, 13, 5143, 7203, 11246, ...
3.136364
110
import networkx as nx import numpy as np from sklearn import covariance import torch def convertToTorch(data, req_grad=False, use_cuda=False): """Convert data from numpy to torch variable, if the req_grad flag is on then the gradient calculation is turned on. """ if not torch.is_tensor(data): d...
[ 11748, 3127, 87, 355, 299, 87, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 1330, 44829, 590, 198, 11748, 28034, 198, 198, 4299, 10385, 2514, 15884, 354, 7, 7890, 11, 43089, 62, 9744, 28, 25101, 11, 779, 62, 66, 15339, ...
2.338203
1,848
def multiplica_matrizes(m1, m2): '''Minha soluo para multiplicao de matrizes''' matriz = [] cont = 0 b1 = 0 for t in range(len(m1)): # nmeros de linhas mat1 linhanova = [] for t1 in range(len(m2[0])): #nmeros de colunas mat2 while cont < len(m2): #a1 = m1[...
[ 4299, 15082, 3970, 62, 6759, 380, 12271, 7, 76, 16, 11, 285, 17, 2599, 198, 220, 220, 220, 705, 7061, 9452, 3099, 1540, 20895, 31215, 15082, 3970, 78, 390, 2603, 380, 12271, 7061, 6, 198, 220, 220, 220, 2603, 47847, 796, 17635, 198,...
1.692308
611
# Generated by Django 2.2.2 on 2019-06-10 03:37 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 13130, 12, 3312, 12, 940, 7643, 25, 2718, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
""" Tests of the view factors module """ import pytest import numpy as np from bifacialvf.vf import getSkyConfigurationFactors from bifacialvf.tests import ( SKY_BETA160_C05_D1, SKY_BETA20_C05_D1, SKY_BETA20_C0_D1, SKY_BETA160_C0_D1, SKY_BETA160_C1_D1, SKY_BETA20_C1_D1, SKY_BETA20_C1_D0, SKY_BETA160_C1_D0, ...
[ 37811, 198, 51, 3558, 286, 262, 1570, 5087, 8265, 198, 37811, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 275, 361, 18150, 85, 69, 13, 85, 69, 1330, 651, 22308, 38149, 29054, 669, 198, 6738, 275, 361, 18150...
1.884817
191
# Databricks notebook source import horovod.tensorflow.keras as hvd # COMMAND ---------- from sparkdl import HorovodRunner hr = HorovodRunner(np=-spark.sparkContext.defaultParallelism, driver_log_verbosity="all") hr.run(run_training_horovod) # COMMAND ---------- from sparkdl import HorovodRunner hr = HorovodRunne...
[ 2, 16092, 397, 23706, 20922, 2723, 198, 11748, 3076, 709, 375, 13, 83, 22854, 11125, 13, 6122, 292, 355, 289, 20306, 198, 198, 2, 22240, 6981, 24200, 438, 198, 198, 6738, 9009, 25404, 1330, 6075, 709, 375, 49493, 198, 198, 11840, 796,...
2.969512
164
#!/usr/bin/env python3 import boto3 import os import base64 """ Uploads pre-generated certificates to SSM for the ci to consume example WORKSPACE=dev-next ENVIRONMENT=sandbox aws-vault exec sandbox-shared -- make upload-certificates """ if __name__ == "__main__": uploader = UploadCertificates() uploader.r...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 275, 2069, 18, 198, 11748, 28686, 198, 11748, 2779, 2414, 198, 198, 37811, 198, 41592, 82, 662, 12, 27568, 20835, 284, 6723, 44, 329, 262, 269, 72, 284, 15000, 198, 1...
2.876106
113
import multiprocessing from multiprocessing import Queue from OpenPersonDetector import OpenPersonDetector from newgen.GenerativeDetector import AbstractDetectorGenerator
[ 11748, 18540, 305, 919, 278, 198, 198, 6738, 18540, 305, 919, 278, 1330, 4670, 518, 198, 198, 6738, 4946, 15439, 11242, 9250, 1330, 4946, 15439, 11242, 9250, 198, 6738, 649, 5235, 13, 8645, 876, 11242, 9250, 1330, 27741, 11242, 9250, 86...
4
44
# -*- coding: utf-8 -*- """ Created on Thu Mar 12 10:11:09 2020 @author: NAT """ import torch from torch.utils.data import Dataset import json import os from PIL import Image from utils import transform
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 26223, 1526, 1105, 838, 25, 1157, 25, 2931, 12131, 201, 198, 201, 198, 31, 9800, 25, 10149, 201, 198, 37811, 201, 198, 11748, 28034, ...
2.214286
112
#!/usr/bin/python DOCUMENTATION = ''' --- module: to_toml, from_toml version_added: "2.8" short_description: Converts Python data to TOML and TOML to Python data. author: - "Samy Coenen (contact@samycoenen.be)" ''' import datetime import sys from collections import OrderedDict #pip3 install python-toml def to_to...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 38715, 5883, 3525, 6234, 796, 705, 7061, 198, 6329, 198, 21412, 25, 284, 62, 39532, 75, 11, 422, 62, 39532, 75, 198, 9641, 62, 29373, 25, 366, 17, 13, 23, 1, 198, 19509, 62, 11213, ...
2.361345
357
n = int(input()) divisors = divisor(2*n) answer = 0 for integer in divisors: pair = 2*n // integer a2 = pair + 1 - integer if a2 % 2 == 0: answer += 1 print(answer)
[ 198, 198, 77, 796, 493, 7, 15414, 28955, 198, 7146, 271, 669, 796, 2659, 271, 273, 7, 17, 9, 77, 8, 198, 41484, 796, 657, 198, 1640, 18253, 287, 2659, 271, 669, 25, 198, 220, 220, 220, 5166, 796, 362, 9, 77, 3373, 18253, 198, ...
2.214286
84
from mongoengine import Document, IntField, StringField, FloatField, connect from pymongo import UpdateOne
[ 6738, 285, 25162, 18392, 1330, 16854, 11, 2558, 15878, 11, 10903, 15878, 11, 48436, 15878, 11, 2018, 198, 6738, 279, 4948, 25162, 1330, 10133, 3198, 198 ]
4.115385
26
import json import os from contextlib import AbstractContextManager from tools import settings # I'm not sure if the below can be accomplished with pytest, so using unittest with pytest-subtests. At first glance, # we would need to auto-generate parametrized `test_` functions, with the module as a bound variable....
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 4732, 8019, 1330, 27741, 21947, 13511, 198, 198, 6738, 4899, 1330, 6460, 628, 628, 198, 198, 2, 314, 1101, 407, 1654, 611, 262, 2174, 460, 307, 13013, 351, 12972, 9288, 11, 523, 1262, 555, 7...
3.857143
84
#!/usr/bin/env python from setuptools import setup setup( # The package name along with all the other metadata is specified in setup.cfg # However, GitHub's dependency graph can't see the package unless we put this here. name="sgkit", use_scm_version=True, )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1303, 383, 5301, 1438, 1863, 351, 477, 262, 584, 20150, 318, 7368, 287, 9058, 13, 37581, 198, 220, 220, 2...
3.209302
86
# Mod Divmod "https://www.hackerrank.com/challenges/python-mod-divmod/problem" # Enter your code here. Read input from STDIN. Print output to STDOUT a, b = (int(input()) for _ in range(2)) print(a // b) print(a % b) print(divmod(a, b))
[ 2, 3401, 4777, 4666, 366, 5450, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 29412, 12, 4666, 12, 7146, 4666, 14, 45573, 1, 198, 198, 2, 6062, 534, 2438, 994, 13, 4149, 5128, 422, 48571, 1268, 13, 12578, 5072, ...
2.674157
89
import subprocess import docx.table import pandas as pd from docx import Document from docx.enum.text import WD_PARAGRAPH_ALIGNMENT from docx.oxml import OxmlElement from docx.oxml import ns from docx.oxml.ns import qn from docx.shared import Inches, Pt from docx.table import _Cell from docx2pdf import convert
[ 11748, 850, 14681, 198, 198, 11748, 2205, 87, 13, 11487, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2205, 87, 1330, 16854, 198, 6738, 2205, 87, 13, 44709, 13, 5239, 1330, 48963, 62, 27082, 4760, 49, 31300, 62, 1847, 16284, 10979...
3.048544
103
# -*- coding: utf-8 -*- """Test the import statement.""" import pytest def test_relative_missing_import(): """Test that a relative missing import doesn't crash. Some modules use this to check if a package is installed. Relative import in the site-packages folder""" with pytest.raises(ImportError): ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 14402, 262, 1330, 2643, 526, 15931, 198, 198, 11748, 12972, 9288, 628, 198, 4299, 1332, 62, 43762, 62, 45688, 62, 11748, 33529, 198, 220, 220, 220, 37227, 14...
3.1875
112
""" y_truey_pred_proba """ import sklearn.metrics as skm import numpy as np def auc(y_true, y_pred_proba): """AUC Args: y_true(1-D array-like shape of [n_samples, ]): 2(01) y_pred_proba(1-D array-like shape of [n_samples, ]): (1) Returns: float: (ROC)AUC """ return skm...
[ 37811, 198, 198, 88, 62, 7942, 88, 62, 28764, 62, 1676, 7012, 198, 198, 37811, 198, 11748, 1341, 35720, 13, 4164, 10466, 355, 1341, 76, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 257, 1229, 7, 88, 62, 7942, 11, 331, 62, 2...
2.05821
1,151
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v2/proto/services/campaign_criterion_service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.pr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 23645, 14, 5643, 14, 13297, 5643, 62, 85, 17, 14, 1676, 1462, 14, 30416,...
2.575134
7,673
from network import WLAN import urequests as requests # from ubidots tutorial https://help.ubidots.com/en/articles/961994-connect-any-pycom-board-to-ubidots-using-wi-fi-over-http from machine import I2C import adafruit_sgp30 # from https://github.com/alexmrqt/micropython-sgp30 from machine import Pin from dht import DH...
[ 6738, 3127, 1330, 370, 25697, 198, 11748, 334, 8897, 3558, 355, 7007, 1303, 422, 334, 14065, 1747, 11808, 3740, 1378, 16794, 13, 549, 312, 1747, 13, 785, 14, 268, 14, 26845, 14, 4846, 22666, 12, 8443, 12, 1092, 12, 9078, 785, 12, 35...
2.427904
1,498
# coding:UTF-8 import queue import serial import time import threading ACCData = [0.0] * 8 GYROData = [0.0] * 8 AngleData = [0.0] * 8 FrameState = 0 # 0x Bytenum = 0 # CheckSum = 0 # a = [0.0] * 3 w = [0.0] * 3 Angle = [0.0] * 3 count=0 start_time = time.time() interval=0.01 if __name__ == '__main__': ...
[ 2, 19617, 25, 48504, 12, 23, 198, 11748, 16834, 198, 11748, 11389, 198, 11748, 640, 198, 11748, 4704, 278, 628, 198, 26861, 6601, 796, 685, 15, 13, 15, 60, 1635, 807, 198, 31212, 49, 3727, 1045, 796, 685, 15, 13, 15, 60, 1635, 807...
2.086275
255
import os import unittest from torchtext.data import Field, Iterator from project.utils.utils_metrics import AverageMeter from project.utils.utils_logging import Logger from project.utils.datasets import Seq2SeqDataset data_dir = os.path.join(".", "test", "test_data")
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 28034, 5239, 13, 7890, 1330, 7663, 11, 40806, 1352, 198, 198, 6738, 1628, 13, 26791, 13, 26791, 62, 4164, 10466, 1330, 13475, 44, 2357, 198, 6738, 1628, 13, 26791, 13, 26791, 62...
3.151163
86
# Load in test framework from sublime_plugin_tests import framework
[ 2, 8778, 287, 1332, 9355, 198, 6738, 41674, 62, 33803, 62, 41989, 1330, 9355, 628 ]
4.6
15
import torch import torch.nn as nn import numpy as np
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 628, 198 ]
3.111111
18
# __init__.py # Version of the cab-dynamic-pricing package __version__ = "1.0.0"
[ 2, 11593, 15003, 834, 13, 9078, 198, 198, 2, 10628, 286, 262, 16212, 12, 67, 28995, 12, 1050, 6345, 5301, 198, 834, 9641, 834, 796, 366, 16, 13, 15, 13, 15, 1, 198 ]
2.484848
33
# -*- coding: utf-8 -*- """ 654. Maximum Binary Tree Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: The root is the maximum number in the array. The left subtree is the maximum tree constructed from left part subarray divided by the maximum number. The right sub...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 39111, 13, 22246, 45755, 12200, 198, 198, 15056, 281, 18253, 7177, 351, 645, 14184, 16856, 13, 317, 5415, 5509, 2615, 319, 428, 7177, 318, 5447, 355, 1061, 2...
4.20155
129
import asyncio import traceback from configuration_manager import ConfigurationManager from data_parser import * parse_map = { 0: ProtocolRequest, 1: ProtocolResponse, 2: ServerDisconnect, 3: ConnectSuccess, 4: ConnectFailure, 5: HandshakeChallenge, 6: ChatReceived, 7: None, 8: Non...
[ 11748, 30351, 952, 198, 11748, 12854, 1891, 198, 198, 6738, 8398, 62, 37153, 1330, 28373, 13511, 198, 6738, 1366, 62, 48610, 1330, 1635, 198, 198, 29572, 62, 8899, 796, 1391, 198, 220, 220, 220, 657, 25, 20497, 18453, 11, 198, 220, 22...
2.207362
815
# Import Selenium Module from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC # Import Path from pathlib import Path # Import Base Module for Code import os import datetime #...
[ 2, 17267, 15300, 47477, 19937, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 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, 531...
2.825418
1,495
import sys import os import mxnet as mx import argparse sys.path.append(os.path.join(os.getcwd(), "../src/common")) sys.path.append(os.path.join(os.getcwd(), "../src/eval")) import verification # class faceMode: # def __init__(self, args): # self.arts = args # modelid = args.model.split(',') # ...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 11748, 1822, 29572, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 1136, 66, 16993, 22784, 366, 40720, 10677, 14, 11321, 48774, ...
2.259631
597
# -*- coding: utf-8 -*- # # Copyright (C) 2021 Chris Caron <lead2gold@gmail.com> # All rights reserved. # # This code is licensed under the MIT License. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files(the "Software"), to deal # in th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 33448, 5180, 1879, 261, 1279, 28230, 17, 24267, 31, 14816, 13, 785, 29, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2438, 318...
2.622586
1,709
#! /usr/bin/env python3 import argparse import textwrap import math from PIL import Image parser = argparse.ArgumentParser( prog='img_striper.py', formatter_class=argparse.RawDescriptionHelpFormatter, description=textwrap.dedent('''\ Image striper This is a simple program to make stripes ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 2420, 37150, 198, 11748, 10688, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 220, 220...
2.204327
1,248
import datetime from aiohttp import web from aiohttp_jinja2 import template import sqlalchemy as sa from sqlalchemy.dialects import postgresql as pg import psycopg2 from ds import db from . import forms def _cast_str_to_inet_arr(ip_list_str): return sa.cast(map(str, forms.str_to_ip_list(ip_list_str)), pg.ARRA...
[ 11748, 4818, 8079, 198, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 6738, 257, 952, 4023, 62, 18594, 6592, 17, 1330, 11055, 198, 11748, 44161, 282, 26599, 355, 473, 198, 6738, 44161, 282, 26599, 13, 38969, 478, 82, 1330, 1281, 34239, ...
2.677165
127
# Generated by Django 3.2.9 on 2021-11-19 15:57 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1157, 12, 1129, 1315, 25, 3553, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: tb_paddle/proto/api.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 256, 65, 62, 79, 37382, 14, 1676, 1462, 14, 15042, 13, 1676, 1462, 198, ...
2.325616
20,257
import six import json import logging import requests from requests_oauthlib import OAuth1 if six.PY3: from urllib.parse import parse_qs from urllib.parse import urlencode else: from urlparse import parse_qs from urllib import urlencode log = logging.getLogger(__name__)
[ 11748, 2237, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 7007, 198, 6738, 7007, 62, 12162, 1071, 8019, 1330, 440, 30515, 16, 198, 198, 361, 2237, 13, 47, 56, 18, 25, 198, 220, 220, 220, 422, 2956, 297, 571, 13, 29572, 1330, 21...
2.89
100
import datetime import os import re import sys import urllib from SatTrack.superclasses import FileDirectory ############################################################################### # CONSTANTS TLE_URL = f"https://celestrak.com/NORAD/elements/supplemental" ######################################################...
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 2956, 297, 571, 198, 198, 6738, 7031, 24802, 13, 16668, 37724, 1330, 9220, 43055, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 7102, 2257, 1565, ...
4.675676
74
import os import h5py import torch import torch.nn as nn from torch.utils.data import Dataset, IterableDataset, DataLoader import Levenshtein as levenshtein from tqdm import tqdm from yaml import YAMLObject from transformers import AutoTokenizer, AutoModel from allennlp.modules.elmo import batch_to_ids from utils im...
[ 11748, 28686, 198, 11748, 289, 20, 9078, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 40806, 540, 27354, 292, 316, 11, 6060, 17401, 198, 11748, 1...
2.930876
217
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # justice-basic-service (1.36.3) # pylint: disable=d...
[ 2, 15069, 357, 66, 8, 33448, 4013, 5276, 40778, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 770, 318, 11971, 3788, 422, 4013, 5276, 40778, 3457, 11, 329, 11247, 198, 2, 290, 8733, 2800, 534, 1664, 2775, 4706, 13, 198, 2, 220, 198, 2,...
3.032895
304
""" Copyright 2019 Samsung SDS 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 ...
[ 37811, 198, 220, 220, 220, 15069, 13130, 10397, 311, 5258, 198, 220, 220, 220, 220, 198, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 220, 345, 743, 407, 779, 428...
3.198142
323