content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import re,sys, json knownRetTypes = { "V" : "Void" , "Z" : "boolean", "B" : "byte", "S" : "short", "C" : "char", "I" : "int", "J" : "long", "F" :"float", "D" : "double" } if __name__== "__main__": if len(sys.argv) > 1: print("parsing descriptors of file " + sys.argv[1] ) parseDescriptorsFile(sy...
[ 198, 11748, 302, 11, 17597, 11, 33918, 198, 198, 4002, 9781, 31431, 220, 796, 1391, 198, 197, 1, 53, 1, 1058, 366, 53, 1868, 1, 837, 198, 197, 1, 57, 1, 197, 25, 366, 2127, 21052, 1600, 198, 197, 1, 33, 1, 197, 25, 366, 26327,...
1.973958
192
import pytest from render2.src.shared.shared_logging import get_logger, truncate, prep_for_logging, TRUNCATE_TEXT, TRUNCATE_LENGTH LONG_STRING = "zxcvbnmasdfghjklqwertyuiop1234567890zxcvbnmasdfghjklqwertyu" \ "iop1234567890zxcvbnmasdzxcvkjapeorijfaldkcfjadfjapsoeifjadf" TRUNCATED_STRING = f"{LONG_STRING...
[ 11748, 12972, 9288, 198, 198, 6738, 8543, 17, 13, 10677, 13, 28710, 13, 28710, 62, 6404, 2667, 1330, 651, 62, 6404, 1362, 11, 40122, 378, 11, 3143, 62, 1640, 62, 6404, 2667, 11, 7579, 4944, 34, 6158, 62, 32541, 11, 7579, 4944, 34, ...
2.578457
1,504
from rest_framework import serializers from .models import StaffLog, CompanyLog from accounts.serializers import UserSerializer from company.serializers import CompanySerializer
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 764, 27530, 1330, 9983, 11187, 11, 5834, 11187, 198, 6738, 5504, 13, 46911, 11341, 1330, 11787, 32634, 7509, 198, 6738, 1664, 13, 46911, 11341, 1330, 5834, 32634, 7509, 628, 198 ]
4.525
40
from dg_calibration import reflectance def toa_reflectance(radata, mtdFile, band_ids): """Estimate toa reflectance from radiometric data ignoring atmospheric, topographic and BRDF effects Parameters ---------- radata : ndarray shape (nbands, ny, nx) radiance data mtdFile : str ...
[ 6738, 288, 70, 62, 9948, 571, 1358, 1330, 4079, 590, 628, 198, 4299, 284, 64, 62, 35051, 590, 7, 6335, 1045, 11, 285, 8671, 8979, 11, 4097, 62, 2340, 2599, 198, 220, 220, 220, 37227, 22362, 1920, 284, 64, 4079, 590, 422, 19772, 16...
2.575472
212
############### # Repository: https://github.com/lgervasoni/urbansprawl # MIT License ############### from shapely.geometry import GeometryCollection import geopandas as gpd import pandas as pd import os import numpy as np import osmnx as ox from osmnx import log from .utils import get_population_extract_filename D...
[ 7804, 4242, 21017, 198, 2, 1432, 13264, 25, 3740, 1378, 12567, 13, 785, 14, 75, 70, 712, 888, 72, 14, 5945, 504, 79, 13132, 198, 2, 17168, 13789, 198, 7804, 4242, 21017, 198, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 2269, 15748, ...
2.526564
2,334
# -------------------------------------------------------- # Tensorflow Phrase Detection # Licensed under The MIT License [see LICENSE for details] # Written by Bryan Plummer based on code from Ross Girshick # -------------------------------------------------------- from __future__ import absolute_import from __future_...
[ 2, 20368, 22369, 198, 2, 309, 22854, 11125, 1380, 22789, 46254, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 22503, 416, 17857, 1345, 31647, 1912, 319, 2438, 422, 9847, 23837, 1477, 624, 198, ...
3.927374
179
from __future__ import division import glob, os import numpy as np import cv2 import torch.utils.data as torch_data import yaml import utils.radiate_utils as radiate_utils from utils.calibration import Calibration
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 15095, 11, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 28034, 62, 7890, 198, 11748, 331, 43695, 198, 11748, 3384, 4487...
3.34375
64
# -*- coding: utf-8 -*- from flask import Blueprint from flask_journey import route from .services import get_pilots, get_pilot from .schemas import pilot, pilots, query bp = Blueprint('pilots', __name__) @route(bp, '/<pilot_id>', methods=['GET'], marshal_with=pilot) @route(bp, '/', methods=['GET'], _query=quer...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42903, 1330, 39932, 198, 6738, 42903, 62, 73, 5604, 1330, 6339, 198, 198, 6738, 764, 30416, 1330, 651, 62, 79, 346, 1747, 11, 651, 62, 79, 23439, 198, 6738,...
2.734848
132
# -*- coding: utf-8 -*- from setuptools import find_packages, setup setup( name="redisfe", version="0.0.1", packages=find_packages(), entry_points={"console_scripts": ("redisfe=redisfe.main:main",)}, )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 445, 4468, 68, 1600, 198, 220, 220, 220, 2196, 2625,...
2.391304
92
# ---------------------------------------------------------------------------- # Title: Scientific Visualisation - Python & Matplotlib # Author: Nicolas P. Rougier # License: BSD # ---------------------------------------------------------------------------- import numpy as np import matplotlib.pyplot as plt fig =...
[ 2, 16529, 10541, 198, 2, 11851, 25, 220, 220, 22060, 15612, 5612, 532, 11361, 1222, 6550, 29487, 8019, 198, 2, 6434, 25, 220, 29737, 350, 13, 13876, 70, 959, 198, 2, 13789, 25, 347, 10305, 198, 2, 16529, 10541, 198, 11748, 299, 3215...
2.281971
954
import tensorly as tl import numpy as np from src._als import als,nn_als from src._herals import her_Als,nn_her_Als from src._cprand import CPRAND, nn_CPRAND from src._hercprand import her_CPRAND,nn_her_CPRAND from src._base import init_factors,random_init_fac import copy import matplotlib.pyplot as plt def speedup(li...
[ 11748, 11192, 273, 306, 355, 256, 75, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12351, 13557, 874, 1330, 435, 82, 11, 20471, 62, 874, 198, 6738, 12351, 13557, 372, 874, 1330, 607, 62, 2348, 82, 11, 20471, 62, 372, 62, 2348, 82,...
1.954379
2,455
from datetime import date from flask import abort, Flask, Response import json from pyliturgical import calendar app = Flask(__name__) @app.route('/reformed/<date_str>') if __name__ == '__main__': app.run(host='127.0.0.1', port=8080, debug=True)
[ 6738, 4818, 8079, 1330, 3128, 198, 6738, 42903, 1330, 15614, 11, 46947, 11, 18261, 198, 11748, 33918, 198, 6738, 279, 2645, 270, 31839, 1330, 11845, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 31, 1324, 13, 38629, 1078...
2.771739
92
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import ipdb import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import * from classLSTMCore import LSTMCore
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 20966, 9945, 198, 11748, 299, 32152, 355, 45941, 198, 11748,...
3.506173
81
import unittest from io import StringIO from spacegraphcats.catlas.graph_io import read_from_gxt, write_to_gxt from spacegraphcats.catlas.graph import Graph if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 6738, 2272, 34960, 24619, 13, 9246, 21921, 13, 34960, 62, 952, 1330, 1100, 62, 6738, 62, 70, 742, 11, 3551, 62, 1462, 62, 70, 742, 198, 6738, 2272, 34960, 24619, 1...
2.849315
73
from models.base_model import BaseModel import tensorflow as tf import numpy as np from label_storage import LabelStorage from tqdm import tqdm import time from copy import deepcopy # Three heads acting on the rnn output of size batchxlengthxoutput_size # They predict IoU, whether the Gt exists, and the shift to GT b...
[ 6738, 4981, 13, 8692, 62, 19849, 1330, 7308, 17633, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6167, 62, 35350, 1330, 36052, 31425, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 117...
3.730435
115
from django.urls import include, path from .me import views as me_views from .auth import views as auth_views from .services import urls as services_urls app_name = 'multauth' urlpatterns = [ path('me/', me_views.MeView.as_view(), name='me'), path('me/password/', me_views.MePasswordView.as_view(), name='me-...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 11, 3108, 198, 198, 6738, 764, 1326, 1330, 5009, 355, 502, 62, 33571, 198, 6738, 764, 18439, 1330, 5009, 355, 6284, 62, 33571, 198, 6738, 764, 30416, 1330, 2956, 7278, 355, 2594, 62, 6371,...
2.759843
254
import pytest import packerlicious.post_processor as post_processor
[ 11748, 12972, 9288, 198, 198, 11748, 2353, 263, 677, 699, 13, 7353, 62, 41341, 355, 1281, 62, 41341, 628, 628, 198 ]
3.47619
21
# 2015 lab 1 print('Hello World')
[ 2, 1853, 2248, 352, 198, 198, 4798, 10786, 15496, 2159, 11537, 198 ]
2.916667
12
from odoo import models, fields, api, _ from odoo.exceptions import ValidationError, Warning
[ 6738, 16298, 2238, 1330, 4981, 11, 7032, 11, 40391, 11, 4808, 198, 6738, 16298, 2238, 13, 1069, 11755, 1330, 3254, 24765, 12331, 11, 15932, 628 ]
3.76
25
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from typing import List, Dict import math import random import aiohttp import asyncio import discord from discord.ext import commands, tasks from contents.character.Investigator import Investigator
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 201, 198, 11748, 10688, 201, 198, 11748, 4738, 201, 198, 11748, ...
3.022989
87
# Copyright Aaron Stanek 2021 # See LICENSE for more details import sys if sys.version_info[0] != 3 or sys.version_info[1] < 6: raise Exception("Python Password Utility requires Python 3.6 or later. Compatibility with any major versions after Python 3 is not guaranteed.") import hashlib import secrets ...
[ 2, 15069, 12139, 7299, 988, 33448, 201, 198, 2, 4091, 38559, 24290, 329, 517, 3307, 201, 198, 201, 198, 11748, 25064, 201, 198, 201, 198, 361, 25064, 13, 9641, 62, 10951, 58, 15, 60, 14512, 513, 393, 25064, 13, 9641, 62, 10951, 58, ...
2.894737
266
# =========================================================================== # tfrecords_utils.py------------------------------------------------------- # =========================================================================== """ The following functions can be used to convert a value to a type compatible with ...
[ 2, 38093, 2559, 855, 198, 2, 220, 220, 48700, 8344, 3669, 62, 26791, 13, 9078, 3880, 19351, 6329, 198, 2, 38093, 2559, 855, 198, 198, 37811, 383, 1708, 5499, 460, 307, 973, 284, 10385, 257, 1988, 284, 257, 2099, 11670, 351, 48700, 1...
3.333749
3,209
# -*- coding: utf-8 -*- """ oreos.core ~~~~~~~~~~ The creamy white center. """ from .monkeys import SimpleCookie def dict_from_string(s): '''''' cookies = dict() c = SimpleCookie() c.load(s) for k,v in c.items(): cookies.update({k: v.value}) return cookies
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 382, 418, 13, 7295, 198, 15116, 4907, 198, 198, 464, 27892, 2330, 3641, 13, 198, 37811, 198, 198, 6738, 764, 2144, 13083, 1330, 17427, 34, 18055, 628, ...
2.346457
127
# -*- coding: utf-8 -*- from bravado_core.spec import Spec
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 49025, 4533, 62, 7295, 13, 16684, 1330, 18291, 628, 628, 628 ]
2.461538
26
import sys import string import numpy from numpy import * import os.path import pickle import re from types import FloatType import getopt, sys import copy import gzip from btk.common import * from btk.stream import * from btk.feature import * from btk.matrix import * from btk.utils import * #from pygsl import * from...
[ 11748, 25064, 198, 11748, 4731, 198, 11748, 299, 32152, 198, 6738, 299, 32152, 1330, 1635, 198, 11748, 28686, 13, 6978, 198, 11748, 2298, 293, 198, 11748, 302, 198, 6738, 3858, 1330, 48436, 6030, 198, 11748, 651, 8738, 11, 25064, 198, 1...
3.053782
595
# -*- coding: utf-8 -*- from django import forms
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 1330, 5107, 628 ]
2.5
20
import os target_names = ['-to-process.txt.subbed', '_to_process.txt.subbed', '_to-process.txt.subbed', '-to_process.txt.subbed', '-tp.txt.subbed', '_tp.txt.subbed'] target = "-Processing" for dirname, dirs, files in os.walk('.'): if target in dirname and 'tagged' not in dirname: for filename in f...
[ 11748, 28686, 201, 198, 201, 198, 16793, 62, 14933, 796, 685, 29001, 1462, 12, 14681, 13, 14116, 13, 7266, 3077, 3256, 705, 62, 1462, 62, 14681, 13, 14116, 13, 7266, 3077, 3256, 705, 62, 1462, 12, 14681, 13, 14116, 13, 7266, 3077, 3...
2.035511
704
#!/usr/bin/env python3 ### # YoSon # @treqtl/xinput.py # produce xtreqtl input files by matching rs numbers from trait and iv summary statistics ### import pandas as pd import numpy as np import os, sys from sys import argv from os import walk from treqtl_input import read_dir if __name__ == '__main__': # i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 21017, 198, 2, 25455, 31056, 198, 2, 2488, 33945, 80, 28781, 14, 87, 15414, 13, 9078, 198, 2, 4439, 220, 742, 42180, 28781, 5128, 3696, 416, 12336, 44608, 3146, 422, 16708, ...
2.561111
180
from aioli import Package from .controller import HttpController from .service import OpenApiService from .config import ConfigSchema export = Package( controllers=[HttpController], services=[OpenApiService], config=ConfigSchema, auto_meta=True )
[ 6738, 257, 1669, 72, 1330, 15717, 198, 198, 6738, 764, 36500, 1330, 367, 29281, 22130, 198, 6738, 764, 15271, 1330, 4946, 32, 14415, 16177, 198, 6738, 764, 11250, 1330, 17056, 27054, 2611, 198, 198, 39344, 796, 15717, 7, 198, 220, 220, ...
3.3125
80
import matplotlib.pyplot as plt from sklearn.metrics import roc_auc_score from sklearn.metrics import roc_curve, auc import itertools import numpy as np import tensorflow as tf from tensorflow.keras.preprocessing import sequence from tensorflow.keras.models import Model from tensorflow.keras.layers import Input from te...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 686, 66, 62, 14272, 62, 26675, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 686, 66, 62, 22019, 303, 11, 257, 1229, 198, 11748, ...
2.137119
2,166
"""Special options for messages from bot.""" from pydantic import BaseModel from botx.models.messages.sending.options import NotificationOptions class ResultOptions(BaseModel): """Configuration for command result or notification that is send to BotX API.""" #: send message only when stealth mode is enabled....
[ 37811, 13409, 3689, 329, 6218, 422, 10214, 526, 15931, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 198, 6738, 10214, 87, 13, 27530, 13, 37348, 1095, 13, 82, 1571, 13, 25811, 1330, 42808, 29046, 628, 198, 4871, 25414, 29046, 7, ...
3.760563
142
# Import sqlite3 para tratar os erros import _sqlite3 # Importado para formatar a data from datetime import date, datetime # Importa a função de relatório de pedidos from source.db.tblOrder import selectAllOrderInformation, selectAllOrderBetweenDate # Exibe todos os pedidos # Exibe todos os pedidos de acordo com o ...
[ 2, 17267, 44161, 578, 18, 31215, 491, 9459, 28686, 1931, 4951, 198, 11748, 4808, 25410, 578, 18, 198, 198, 2, 17267, 4533, 31215, 5794, 283, 257, 1366, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 198, 198, 2, 17267, 64, 257, ...
3.209524
105
from tinydb import Query, where from pa import get_db from pa.config import Config
[ 6738, 7009, 9945, 1330, 43301, 11, 810, 198, 6738, 14187, 1330, 651, 62, 9945, 198, 6738, 14187, 13, 11250, 1330, 17056, 628 ]
3.818182
22
#!python3 # coding: utf-8 # Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: # # 22=4, 23=8, 24=16, 25=32 # 32=9, 33=27, 34=81, 35=243 # 42=16, 43=64, 44=256, 45=1024 # 52=25, 53=125, 54=625, 55=3125 # If they are then placed in numerical order, with any repeats removed, we get the following sequen...
[ 2, 0, 29412, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 12642, 477, 18253, 17790, 286, 450, 329, 362, 41305, 257, 41305, 642, 290, 362, 41305, 275, 41305, 642, 25, 198, 2, 220, 198, 2, 2534, 28, 19, 11, 2242, 28, 23, 11,...
2.481481
459
import gspread import time from oauth2client.service_account import ServiceAccountCredentials
[ 11748, 308, 43639, 198, 11748, 640, 198, 6738, 267, 18439, 17, 16366, 13, 15271, 62, 23317, 1330, 220, 4809, 30116, 34, 445, 14817 ]
4.086957
23
import markdown with open("index.md", 'r') as md: output = markdown.markdown(md.read()) with open("public/index.html", 'w') as out: out.write(output)
[ 11748, 1317, 2902, 198, 198, 4480, 1280, 7203, 9630, 13, 9132, 1600, 705, 81, 11537, 355, 45243, 25, 198, 220, 220, 220, 5072, 796, 1317, 2902, 13, 4102, 2902, 7, 9132, 13, 961, 28955, 198, 220, 220, 220, 351, 1280, 7203, 11377, 14,...
2.455882
68
from numpy.linalg import inv import numpy as np import pykov import matplotlib.pyplot as plt import matplotlib.cbook as cbook from itertools import cycle import matplotlib from matplotlib.pyplot import * import brewer2mpl import seaborn as sns from scipy.stats import ks_2samp from scipy.stats import mode import pandas ...
[ 6738, 299, 32152, 13, 75, 1292, 70, 1330, 800, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 21862, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 66, 2070, 355, 269, 2070, 19...
1.36962
7,551
#!/usr/bin/env python3 import argparse import cv2 import depthai as dai import socket from pipelines import goal_edge_depth_detection import logging from common import target_finder from common.mjpeg_stream import MjpegStream from networktables.util import NetworkTables from common.utils import FPSHandler parser = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 269, 85, 17, 198, 11748, 6795, 1872, 355, 288, 1872, 198, 11748, 17802, 198, 198, 6738, 31108, 1330, 3061, 62, 14907, 62, 18053, 62, 15255, 321...
3.004484
223
from Crypto.Cipher import AES import base64, hashlib, json from app.services import payment from app.models import Vault from app.utils import further_processing, standardize_response
[ 6738, 36579, 13, 34, 10803, 1330, 34329, 198, 11748, 2779, 2414, 11, 12234, 8019, 11, 33918, 198, 6738, 598, 13, 30416, 1330, 6074, 198, 6738, 598, 13, 27530, 1330, 23450, 198, 6738, 598, 13, 26791, 1330, 2252, 62, 36948, 11, 3210, 10...
4.088889
45
""" This module contains unit tests, for the most important functions of ruspy.estimation.estimation_cost_parameters. The values to compare the results with are saved in resources/estimation_test. The setting of the test is documented in the inputs section in test module. """ import numpy as np import pytest from numpy...
[ 37811, 198, 1212, 8265, 4909, 4326, 5254, 11, 329, 262, 749, 1593, 5499, 286, 198, 14932, 9078, 13, 395, 18991, 13, 395, 18991, 62, 15805, 62, 17143, 7307, 13, 383, 3815, 284, 8996, 262, 2482, 351, 198, 533, 7448, 287, 4133, 14, 395...
3.25
248
from itertools import product import numpy as np from typing import Tuple from IMLearn.learners.classifiers import DecisionStump from IMLearn.metalearners import AdaBoost from utils import * import plotly.graph_objects as go from plotly.subplots import make_subplots pio.renderers.default = "browser" def generate_da...
[ 6738, 340, 861, 10141, 1330, 1720, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 314, 5805, 451, 77, 13, 35720, 364, 13, 4871, 13350, 1330, 26423, 1273, 931, 198, 6738, 314, 5805, 451, 77, 13,...
2.275041
1,218
import torch import torch.nn.functional as F import torch.optim as optim from model import Model from video_dataset import Dataset from tensorboard_logger import log_value import utils import numpy as np from torch.autograd import Variable from classificationMAP import getClassificationMAP as cmAP from detect...
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 28034, 13, 40085, 355, 6436, 201, 198, 6738, 2746, 1330, 9104, 201, 198, 6738, 2008, 62, 19608, 292, 316, 1330, 16092, 292, 316, 201, 198, 6738, 11...
3.195652
138
''' BSD 3-Clause License Copyright (c) 2019, Donald N. Bockoven III All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this l...
[ 7061, 6, 201, 198, 21800, 513, 12, 2601, 682, 13789, 201, 198, 15269, 357, 66, 8, 13130, 11, 3759, 399, 13, 347, 735, 16206, 6711, 201, 198, 3237, 2489, 10395, 13, 201, 198, 7738, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, ...
3.439306
519
#----------------------------------------------------------------------------- # This file is part of 'SLAC Firmware Standard Library'. # It is subject to the license terms in the LICENSE.txt file found in the # top-level directory of this distribution and at: # https://confluence.slac.stanford.edu/display/ppareg/LI...
[ 2, 10097, 32501, 198, 2, 770, 2393, 318, 636, 286, 705, 8634, 2246, 31623, 1574, 8997, 10074, 4458, 198, 2, 632, 318, 2426, 284, 262, 5964, 2846, 287, 262, 38559, 24290, 13, 14116, 2393, 1043, 287, 262, 198, 2, 1353, 12, 5715, 8619,...
4.3625
160
# def hypotenuse(x, y): # return 0.0 # # print(hypotenuse(3, 4)) # # def hypotenuse(x, y): # square_x = x**2 # square_y = y**2 # print('square_x is', square_x) # print('square_y is', square_y) # return 0.0 # # print(hypotenuse(3, 4)) # # def hypotenuse(x, y): # from math import sqrt # sq...
[ 2, 825, 8813, 268, 1904, 7, 87, 11, 331, 2599, 198, 2, 220, 220, 220, 220, 1441, 657, 13, 15, 198, 2, 198, 2, 3601, 7, 36362, 313, 268, 1904, 7, 18, 11, 604, 4008, 198, 2, 198, 2, 825, 8813, 268, 1904, 7, 87, 11, 331, 2599...
2
271
#!/usr/bin/env python # Plots stargazers of repositories. import pandas as pd import matplotlib.pyplot as plt import numpy as np from sklearn.neighbors import KernelDensity # Based on: https://jakevdp.github.io/blog/2013/12/01/kernel-density-estimation/ def kde_sklearn(x, x_grid, bandwidth=0.2, **kwargs): """Kerne...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1345, 1747, 336, 853, 1031, 364, 286, 38072, 13, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 321...
2.515222
427
# # Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. # from analytic_client import AnalyticApiClient import time, socket, os from topology_uve import LinkUve import gevent from gevent.lock import Semaphore from opserver.consistent_schdlr import ConsistentScheduler from topology_config_handler import Topol...
[ 2, 198, 2, 15069, 357, 66, 8, 1853, 7653, 9346, 27862, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 6738, 49166, 62, 16366, 1330, 16213, 13370, 32, 14415, 11792, 198, 11748, 640, 11, 17802, 11, 28686, 198, 6738, 1353, 1435, 62,...
3.452381
168
# conda install scikit-learn # conda install -c conda-forge scikit-optimize # conda install -c conda-forge rdkit import pandas as pd # from Tools.Clustering.butina import cluster_molecules from molml.Datastructures.molecule import Dataset from molml.Data import read_csv from molml.Representations.descriptors import ec...
[ 2, 1779, 64, 2721, 629, 1134, 270, 12, 35720, 198, 2, 1779, 64, 2721, 532, 66, 1779, 64, 12, 30293, 629, 1134, 270, 12, 40085, 1096, 198, 2, 1779, 64, 2721, 532, 66, 1779, 64, 12, 30293, 374, 67, 15813, 198, 11748, 19798, 292, 3...
2.307884
1,205
alphabet = "0123456789." code = input() grid = [] variables = [] loops = 10 for i in range(100): grid.append(00) while code[0] != "3" or code[1] != "." or code[-1] != "4": code = input("Code invalid. ") code += "000000" i = 2 while i < len(code) - 6: variables = [] variables.append(int(code[i+1] + ...
[ 17307, 8380, 796, 366, 486, 1954, 2231, 3134, 4531, 526, 198, 8189, 796, 5128, 3419, 198, 25928, 796, 17635, 198, 25641, 2977, 796, 17635, 198, 5439, 2840, 796, 838, 198, 198, 1640, 1312, 287, 2837, 7, 3064, 2599, 198, 220, 220, 220, ...
1.740188
1,274
# coding: utf-8 """ Paasta API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 11243, 40197, 7824, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 4946, 15042, 35986, 3740, 1378, 12567, 13, 785, 14, 9654, 499, 270, 10141, 14, 9654, 150...
2.46485
3,229
#!/usr/bin/env python import numpy as np from pymvg.test.utils import _build_points_3d, make_M import os from pymvg.util import normalize from pymvg.camera_model import CameraModel DRAW=int(os.environ.get('DRAW','0')) if DRAW: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 279, 4948, 45119, 13, 9288, 13, 26791, 1330, 4808, 11249, 62, 13033, 62, 18, 67, 11, 787, 62, 44, 198, 11748, 28686, 198, 198, 6738, 27...
2.502924
171
name = "colored_graph"
[ 3672, 796, 366, 25717, 62, 34960, 1, 198 ]
2.875
8
import random import math from common import ( ROW_COUNT, COLUMN_COUNT, MINIMAX, MONTE_CARLO, RANDOM, RANDOM_IMPR, Observer, ) YELLOW_PLAYER = 1 RED_PLAYER = -1 PLAYERS = {1: "Yellow", -1: "Red"} class Bot(Observer): """ This class handles the different bots that were used. I...
[ 11748, 4738, 198, 11748, 10688, 198, 6738, 2219, 1330, 357, 198, 220, 220, 220, 371, 3913, 62, 34, 28270, 11, 198, 220, 220, 220, 20444, 5883, 45, 62, 34, 28270, 11, 198, 220, 220, 220, 20625, 3955, 25922, 11, 198, 220, 220, 220, ...
2.143263
3,169
from revoscalepy import rx_lin_mod, rx_serialize_model, rx_summary import pandas as pd import pyodbc import os conn_str = 'Driver=SQL Server;Server=<Server Name>;Database=MLDB;Uid=<User Name>;Pwd=<Password>;' cnxn = pyodbc.connect(conn_str) cnxn.setencoding("utf-8") inputsql = 'select "RentalCount", "Year", "Month", "...
[ 6738, 2710, 418, 9948, 538, 88, 1330, 374, 87, 62, 2815, 62, 4666, 11, 374, 87, 62, 46911, 1096, 62, 19849, 11, 374, 87, 62, 49736, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 375, 15630, 198, 11748, 28686, 198, 198, ...
2.764273
543
import numpy as np def uniform_grid(n_centers, low, high): """ This function is used to create the parameters of uniformly spaced radial basis functions with 25% of overlap. It creates a uniformly spaced grid of ``n_centers[i]`` points in each ``ranges[i]``. Also returns a vector containing the ap...
[ 11748, 299, 32152, 355, 45941, 628, 198, 4299, 8187, 62, 25928, 7, 77, 62, 1087, 364, 11, 1877, 11, 1029, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 2163, 318, 973, 284, 2251, 262, 10007, 286, 42096, 38980, 44503, 198...
2.086008
779
from PyQt5.QtChart import * import PyQt5.QtCore as QtCore import PyQt5.QtGui as QtGui import PyQt5.QtWidgets as QtWidgets import config import nav import yfinance as yf
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 45488, 1330, 1635, 198, 11748, 9485, 48, 83, 20, 13, 48, 83, 14055, 355, 33734, 14055, 198, 11748, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 355, 33734, 8205, 72, 198, 11748, 9485, 48, 83, 20, ...
2.329114
79
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Maximum flow by Dinic # jill-jênn vie et christoph dürr - 2015-2018 from collections import deque from sys import setrecursionlimit from tryalgo.graph import add_reverse_arcs setrecursionlimit(5010) # necessary for big graphs # snip{ def dinic(graph, capacity, sou...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 22246, 5202, 416, 23448, 291, 198, 2, 474, 359, 12, 73, 25792, 20471, 410, 494, 2123, 33826, 2522, 288, 9116, ...
2.195025
1,005
#!/usr/bin/env python # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 290, 383, 12905, 2667, 32388, 3457, 13, 1074, 13, 198, 2, 15069, 357, 66, 8, 2864, 11, 15127, ...
2.698029
2,232
from swsscommon import swsscommon import time import re import json
[ 6738, 1509, 824, 11321, 1330, 1509, 824, 11321, 198, 11748, 640, 198, 11748, 302, 198, 11748, 33918, 198 ]
3.777778
18
# ***************************************************************** # Copyright 2015 MIT Lincoln Laboratory # Project: SPAR # Authors: JCH # Description: Various classes to inform user of progress # # Modifications: # Date Name Modification # ---- ---- ...
[ 2, 41906, 17174, 9, 198, 2, 220, 15069, 1853, 17168, 12406, 18643, 220, 220, 198, 2, 220, 4935, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6226, 1503, 198, 2, 220, 46665, 25, 220, 220, 220, 220, 220, 220, 220, 22...
2.834437
302
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33160, 383, 3012, 4992, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
2.590361
2,988
import abc # Good old composite pattern # This is used when we want to create a hierachy of instances that contain other instances, # but we want to operate on all instances somewhat equally # Here the composite instances can contain other composites or leafs # All implement the operation method, where the composite w...
[ 11748, 450, 66, 198, 2, 4599, 1468, 24185, 3912, 198, 2, 770, 318, 973, 618, 356, 765, 284, 2251, 257, 13550, 35586, 286, 10245, 326, 3994, 584, 10245, 11, 198, 2, 475, 356, 765, 284, 8076, 319, 477, 10245, 6454, 8603, 198, 198, 2...
3.685567
194
from unittest import TestCase from itertools import product from genki.http.url.parse import parse_url, url_parse_result from genki.http.request import RequestBuilder from genki.http.constants import Scheme from genki.http.url.exceptions import InvalidURL
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 198, 6738, 2429, 4106, 13, 4023, 13, 6371, 13, 29572, 1330, 21136, 62, 6371, 11, 19016, 62, 29572, 62, 20274, 198, 6738, 2429, 4106, 13, 4023, 13, ...
3.547945
73
from textwrap import dedent from typing import List import pytest import gen from gen.tests.utils import make_arguments, true_false_msg, validate_error class TestAdminRouterTLSConfig: """ Tests for the Admin Router TLS Config creation. """ def test_default(self): """ By default, the...
[ 6738, 2420, 37150, 1330, 4648, 298, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 2429, 198, 6738, 2429, 13, 41989, 13, 26791, 1330, 787, 62, 853, 2886, 11, 2081, 62, 9562, 62, 19662, 11, 26571, 62, 1822...
2.314995
1,854
#!/usr/bin/env python engine = 'innodb' host = 'localhost' db_name = '' user = '' passwd = '' skip_tables = () import MySQLdb db = MySQLdb.connect(user=user, passwd=passwd, db=db_name, host=host) c = db.cursor() c.execute("show tables") row = c.fetchone() while row: table = row[0] print 'Converting Table: %...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 18392, 796, 705, 3732, 375, 65, 6, 198, 4774, 796, 705, 36750, 6, 198, 9945, 62, 3672, 796, 10148, 198, 7220, 796, 10148, 198, 6603, 16993, 796, 10148, 198, 48267, 62, 83, 2977, 796,...
2.333333
315
from .bsdict import bsdict, memoizer
[ 6738, 764, 1443, 11600, 1330, 275, 82, 11600, 11, 16155, 7509, 198 ]
3.083333
12
t = int(input()) while(t>0): a=list(map(int,input().split(' '))) D=a[0] d=a[1] p=a[2] q=a[3] remainder=D%d n=D//d value=(n*p*d) + (d*q*(n*(n-1)//2))+(p*remainder+(remainder*q*n)) print(value,"\n") t=t-1
[ 83, 796, 493, 7, 15414, 28955, 198, 4514, 7, 83, 29, 15, 2599, 198, 220, 220, 220, 257, 28, 4868, 7, 8899, 7, 600, 11, 15414, 22446, 35312, 10786, 705, 22305, 198, 220, 220, 220, 360, 28, 64, 58, 15, 60, 198, 220, 220, 220, 28...
1.563291
158
from django.db import models from cajas.users.models.user import User from cajas.office.models.officeCountry import OfficeCountry class BoxDailySquare(models.Model): """Modelo para la caja de un cuadre diario """ user = models.ForeignKey( User, verbose_name='Usuario', on_delete=m...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 269, 1228, 292, 13, 18417, 13, 27530, 13, 7220, 1330, 11787, 198, 6738, 269, 1228, 292, 13, 31810, 13, 27530, 13, 31810, 33921, 1330, 4452, 33921, 628, 198, 4871, 8315, 28545, ...
2.215247
446
from monster import Monster
[ 6738, 9234, 1330, 12635, 628 ]
5.8
5
import dump_instance
[ 198, 198, 11748, 10285, 62, 39098, 628 ]
3.428571
7
"""twoject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
[ 37811, 11545, 752, 10289, 28373, 198, 198, 464, 4600, 6371, 33279, 82, 63, 1351, 11926, 32336, 284, 5009, 13, 1114, 517, 1321, 3387, 766, 25, 198, 220, 220, 220, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14...
2.952941
510
''' Date: 2022-01-11 16:05:39 LastEditors: Waterking LastEditTime: 2022-01-12 18:21:49 FilePath: /stocknet-code/src/stat_logger.py ''' #!/usr/local/bin/python import metrics as metrics from ConfigLoader import logger
[ 7061, 6, 198, 10430, 25, 33160, 12, 486, 12, 1157, 1467, 25, 2713, 25, 2670, 198, 5956, 18378, 669, 25, 5638, 3364, 198, 5956, 18378, 7575, 25, 33160, 12, 486, 12, 1065, 1248, 25, 2481, 25, 2920, 198, 8979, 15235, 25, 1220, 13578, ...
2.716049
81
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
[ 2, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 13789, 355, 3199, 416, 198, 2, 262, 3232, 10442, 5693, 26, 2035, 2196, 362, 286, 262, 13...
2.398414
1,639
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader import json def create_pretrain_mask(tokens, mask_cnt, vocab_list): """ masking subwords(15% of entire subwords) - mask_cnt: len(subwords) * 0.15 - [MASK]: 80% of maski...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 6060, 17401, 198, 11748, ...
1.926819
4,646
from matscholar import Rester import bson import tqdm import os import pymongo client = pymongo.MongoClient('mongodb+srv://%s:%s@matstract-kve41.mongodb.net/test:27017' % (os.getenv('ATLAS_USER_RW'), os.getenv('ATLAS_USER_PASSWORD_RW')), authSource='admin') db = client['matstract_db'] c = ...
[ 6738, 46054, 354, 6192, 1330, 1874, 353, 198, 11748, 275, 1559, 198, 11748, 256, 80, 36020, 198, 11748, 28686, 198, 11748, 279, 4948, 25162, 198, 198, 16366, 796, 279, 4948, 25162, 13, 44, 25162, 11792, 10786, 31059, 375, 65, 10, 27891,...
2.220544
331
#!/usr/local/bin/python # -*-: coding utf-8 -*- """ Snips core and nlu server. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from rasa_core.agent import Agent import os import os.path import re from rasa_core.do...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 25, 19617, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 5489, 2419, 4755, 290, 299, 2290, 4382, 13, 37227, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198,...
3.177515
338
from getratings.models.ratings import Ratings
[ 6738, 651, 10366, 654, 13, 27530, 13, 10366, 654, 1330, 36826, 201, 198, 201, 198 ]
3.266667
15
# https://machinelearningmastery.com/predict-sentiment-movie-reviews-using-deep-learning/ import os import numpy as np from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.utils import to_categorical from keras.callbacks import EarlyStopping, TensorBoard, Mo...
[ 198, 2, 3740, 1378, 30243, 40684, 9866, 88, 13, 785, 14, 79, 17407, 12, 34086, 3681, 12, 41364, 12, 19023, 82, 12, 3500, 12, 22089, 12, 40684, 14, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 41927, 292, 13...
2.893426
1,445
import mbuild as mb class NH(mb.Compound): """A nitrogen with a hydrogen and two open ports. """ if __name__ == '__main__': nh = NH()
[ 11748, 285, 11249, 355, 285, 65, 628, 198, 4871, 24451, 7, 2022, 13, 7293, 633, 2599, 198, 220, 220, 220, 37227, 32, 23417, 351, 257, 17669, 290, 734, 1280, 14090, 13, 37227, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 8...
2.685185
54
from Jumpscale import j import os __version__ = "0.0.1"
[ 6738, 449, 8142, 38765, 1330, 474, 198, 11748, 28686, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 15, 13, 16, 1, 628 ]
2.521739
23
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from instrosetta.interfaces.optomechanics import filter_wheel_pb2 as instrosetta_dot_interfaces_dot_optomechanics_dot_filter__wheel__pb2
[ 2, 2980, 515, 416, 262, 308, 49, 5662, 11361, 8435, 17050, 13877, 13, 8410, 5626, 48483, 0, 198, 11748, 1036, 14751, 198, 198, 6738, 916, 305, 2617, 8326, 13, 3849, 32186, 13, 8738, 462, 3147, 873, 1330, 8106, 62, 22001, 62, 40842, ...
3.140845
71
print('hello') """ Compare the number of operations and the time needed to compute Fibonacci numbers recursively versus that needed to compute them iteratively """ # recursive work # Python program to display the Fibonacci sequence import time recursive_data = Data_tracker() number_of_terms = 40 recursive_data.s...
[ 4798, 10786, 31373, 11537, 198, 198, 37811, 198, 41488, 262, 1271, 286, 4560, 290, 262, 640, 2622, 198, 1462, 24061, 41566, 261, 44456, 3146, 664, 1834, 2280, 9051, 326, 198, 27938, 284, 24061, 606, 11629, 9404, 198, 37811, 628, 198, 2,...
2.742991
642
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2011 Openstack, LLC. # 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...
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 2813, 4946, 25558, 11, 11419, 13, 198, 2, 220, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 22...
2.353698
4,894
file = open('./input') w = 25 h = 6 ppl = 25 * 6 line = file.readline() layers = [] for start in range(0, len(line), ppl): layer = line[start:start+ppl] layers.append([int(pixel) for pixel in layer]) img = [] for i in range(ppl): for layer in layers: if layer[i] != 2: img.append(lay...
[ 7753, 796, 1280, 7, 4458, 14, 15414, 11537, 198, 198, 86, 796, 1679, 198, 71, 796, 718, 198, 381, 75, 796, 1679, 1635, 718, 198, 198, 1370, 796, 2393, 13, 961, 1370, 3419, 198, 198, 75, 6962, 796, 17635, 198, 198, 1640, 923, 287, ...
2.154255
188
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
3.637168
113
# Time: O(b^(d/2)), b is the branch factor of bfs, d is the result depth # Space: O(w * l), w is the number of words, l is the max length of words from collections import defaultdict from string import ascii_lowercase # Time: O(b^d), b is the branch factor of bfs, d is the result depth # Space: O(w * l), w is the...
[ 2, 3862, 25, 220, 440, 7, 65, 61, 7, 67, 14, 17, 36911, 275, 318, 262, 8478, 5766, 286, 275, 9501, 11, 288, 318, 262, 1255, 6795, 198, 2, 4687, 25, 440, 7, 86, 1635, 300, 828, 266, 318, 262, 1271, 286, 2456, 11, 300, 318, 26...
3.058333
120
from abc import ABCMeta class Writer(metaclass=ABCMeta): """ 動画書き込みの、抽象基底クラス """ def open(self, **kwargs): """ 書き込み機能を開く """ pass def write(self, **kwargs): """ 出力する """ pass def close(self, **kwargs): """ 処理を終了す...
[ 6738, 450, 66, 1330, 9738, 48526, 628, 198, 4871, 26606, 7, 4164, 330, 31172, 28, 24694, 48526, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 10263, 233, 243, 18796, 119, 162, 249, 116, 33778, 164, 122, 120, 2515, 123, 5641, ...
1.427984
243
from contextlib import contextmanager, ExitStack from pathlib import Path from typing import Iterator from npipes.utils.typeshed import pathlike @contextmanager def autoDeleteFile(path:pathlike) -> Iterator[pathlike]: """Context manager that deletes a single file when the context ends """ try: yie...
[ 6738, 4732, 8019, 1330, 4732, 37153, 11, 29739, 25896, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 40806, 1352, 198, 198, 6738, 45941, 18636, 13, 26791, 13, 19199, 704, 1330, 3108, 2339, 198, 198, 31, 22866, 37153, 198, ...
2.707379
393
from bottle import run,post,request,response,route import os import urllib @post('/test') @route('/path',method="post") if __name__ == '__main__': port_config = int(os.getenv('PORT', 5000)) run(host='0.0.0.0', port=port_config)
[ 6738, 9294, 1330, 1057, 11, 7353, 11, 25927, 11, 26209, 11, 38629, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 198, 198, 31, 7353, 10786, 14, 9288, 11537, 198, 198, 31, 38629, 10786, 14, 6978, 3256, 24396, 2625, 7353, 4943, 628, 19...
2.553191
94
import time as time_lib import numpy as np import sounddevice as sd duration = 50 # in seconds warmup_time = 2 # in seconds max_pop_time = 3 # in seconds time pop_threshold = 15 # in volume units min_pop_time = 512 # in milliseconds pop_times = [] if __name__ == '__main__': main()
[ 11748, 640, 355, 640, 62, 8019, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2128, 25202, 355, 45647, 198, 198, 32257, 796, 2026, 220, 1303, 287, 4201, 198, 31975, 929, 62, 2435, 796, 362, 220, 1303, 287, 4201, 198, 9806, 62, ...
2.893204
103
# Functions specific to restricted boltzmann machines # Adapted from MFP/Functions.py import numpy as np # BASIS FUNCTIONS: Regression # Diagonalize first dimension of an n-dimensional array tau = 1 # Sigmoid threshold unit basis_logistic = Function('basis', 'logistic', # Commonly known as 'Sigmoid' ...
[ 2, 40480, 2176, 284, 10770, 18100, 89, 9038, 8217, 198, 2, 30019, 276, 422, 337, 5837, 14, 24629, 2733, 13, 9078, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 2, 29809, 1797, 29397, 4177, 11053, 25, 3310, 2234, 198, 2, 60...
1.984615
780
# encoding: utf-8 from manet.utils import read_image import os
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 582, 316, 13, 26791, 1330, 1100, 62, 9060, 198, 11748, 28686, 628, 198 ]
2.954545
22
from .models import Menu
[ 6738, 764, 27530, 1330, 21860, 628 ]
4.333333
6
from .dialogs import OpenView from src.utils import EmbedFactory from disnake.ext import commands class Ide(commands.Cog): """Ide cog""" @commands.command() @commands.max_concurrency(1, commands.BucketType.channel) def setup(bot: commands.Bot) -> None: """Setup Ide cog""" bot.add_cog(Ide(bot))...
[ 6738, 764, 38969, 18463, 1330, 4946, 7680, 198, 6738, 12351, 13, 26791, 1330, 13302, 276, 22810, 198, 6738, 595, 77, 539, 13, 2302, 1330, 9729, 628, 198, 4871, 16714, 7, 9503, 1746, 13, 34, 519, 2599, 198, 220, 220, 220, 37227, 41452,...
2.767241
116
# Creates C data structures for binary lookup table of entities, # using python's html5 entity data. # Usage: python3 tools/make_entities_inc.py > src/entities.inc import html entities5 = html.entities.html5 # remove keys without semicolons. For some reason the list # has duplicates of a few things, like auml, one ...
[ 2, 7921, 274, 327, 1366, 8573, 329, 13934, 35847, 3084, 286, 12066, 11, 198, 2, 1262, 21015, 338, 27711, 20, 9312, 1366, 13, 198, 2, 29566, 25, 21015, 18, 4899, 14, 15883, 62, 298, 871, 62, 1939, 13, 9078, 1875, 12351, 14, 298, 87...
2.781977
344
print "You enter a dark room with two doors. Do you go thorugh door #1 or door # 2" door = raw_input(">" ) if door == "1": print "Theres a giant bear here earting a cheescake. What do you do?" print "Option '1'. Take the cake" print "Option '2'. Scream at the bear." bear = raw_input("> ") if bea...
[ 4798, 366, 1639, 3802, 257, 3223, 2119, 351, 734, 8215, 13, 2141, 345, 467, 41899, 6724, 3420, 1303, 16, 393, 3420, 1303, 362, 1, 198, 198, 9424, 796, 8246, 62, 15414, 7, 5320, 1, 1267, 198, 198, 361, 3420, 6624, 366, 16, 1298, 19...
2.827068
399
line0.timing_system.channels.hsc.delay = 4.97e-06 line0.Phase [s] = 5.4527e-06 line0.ChopX = 36.78 line0.ChopY = 30.11 line0.description = 'S-1t' line0.updated = '2019-05-30 14:18:48' line1.timing_system.channels.hsc.delay = 0.0 line1.ChopX = 36.78 line1.ChopY = 31.136 line1.description = 'S-1' line1.updated = '2019-05...
[ 1370, 15, 13, 16514, 278, 62, 10057, 13, 354, 8961, 13, 71, 1416, 13, 40850, 796, 604, 13, 5607, 68, 12, 3312, 198, 1370, 15, 13, 35645, 685, 82, 60, 796, 642, 13, 2231, 1983, 68, 12, 3312, 198, 1370, 15, 13, 1925, 404, 55, 79...
2.134074
1,350
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ Using Classifier and String Features ======================================== This is a famous `shogun` classifier example that predicts family name of Shogun from his first name. """ ...
[ 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, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 1...
2.90631
523
from PIL import Image import matplotlib.pyplot as plt import numpy as np from PIL import ImageOps '''def turnWhite(imageName, newName): img = Image.open(imageName+'.png') img = img.convert("RGBA") datas = img.getdata() newData = [] for item in datas: if item[3]!=0: newData.appe...
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 41472, 198, 198, 7061, 6, 4299, 1210, 12256, 7, 9060, 5376, 11, 649, 5376...
2.09407
489
import os import requests from base64 import b64encode from flask import render_template BASE_URL = os.getenv("NSO_URL", "http://localhost:8080") API_ROOT = BASE_URL + '/api/running' NSO_USERNAME = os.getenv("NSO_USERNAME", "admin") NSO_PASSWORD = os.getenv("NSO_PASSWORD", "admin") HEADERS = { 'Content-Type': "a...
[ 11748, 28686, 198, 11748, 7007, 198, 6738, 2779, 2414, 1330, 275, 2414, 268, 8189, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 198, 33, 11159, 62, 21886, 796, 28686, 13, 1136, 24330, 7203, 8035, 46, 62, 21886, 1600, 366, 4023, 1378, ...
1.916031
524