content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" Binary Tree and basic properties 1. In-Order Traversal 2. Pre-Order Traversal 3. Post-Order Traversal 4. Level-Order Traversal """ from collections import deque def main(): """ Tree Structure: 1 / \ 2 3 / \ 4 5 """ tree = BinaryTree(1) tre...
[ 37811, 198, 33, 3219, 12200, 290, 4096, 6608, 198, 16, 13, 554, 12, 18743, 4759, 690, 282, 198, 17, 13, 3771, 12, 18743, 4759, 690, 282, 198, 18, 13, 2947, 12, 18743, 4759, 690, 282, 198, 19, 13, 5684, 12, 18743, 4759, 690, 282, ...
2.197674
344
import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PATH, CONF_USERNAME DOMAIN = "vaddio_conferenceshot" DATA_SCHEMA = vol.Schema( { vol.Required(CONF_HOST): cv.string, vol.Required(CONF_USERNAME): cv.string,...
[ 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 11748, 1363, 562, 10167, 13, 16794, 364, 13, 11250, 62, 12102, 341, 355, 269, 85, 198, 6738, 1363, 562, 10167, 13, 9979, 1330, 7102, 37, 62, 39, 10892, 11, 7102, 37, 62, 47924, 54, 1253...
2.270408
196
# Copyright (c) 2020 LightOn, All Rights Reserved. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. """ This module contains the OPU class """ import time from math import sqrt import pkg_resources from lightonml.encoding.base import NoEnco...
[ 2, 15069, 357, 66, 8, 12131, 4401, 2202, 11, 1439, 6923, 33876, 13, 198, 2, 770, 2393, 318, 2426, 284, 262, 2846, 290, 3403, 5447, 287, 198, 2, 2393, 705, 43, 2149, 24290, 13, 14116, 3256, 543, 318, 636, 286, 428, 2723, 2438, 5301...
2.99239
657
from shovel import task
[ 6738, 33677, 1330, 4876 ]
5.75
4
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Implementation of the configuration object. """ from __future__ import absolute_import from __future__ import print_funct...
[ 2, 770, 2393, 318, 636, 286, 1446, 12826, 198, 2, 4091, 2638, 1378, 2503, 13, 2363, 7959, 13, 2398, 14, 42068, 14, 1416, 12826, 329, 517, 1321, 198, 2, 15069, 357, 34, 8, 39393, 347, 295, 10989, 1279, 28864, 31, 2363, 7959, 13, 23...
2.465504
2,522
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import tempfile import pytest import time from treq.testing import StubTreq from rasa_nlu.config import RasaNLUConfig import json import io fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593,...
3.338462
130
import os import platform import socket import sysconfig from typing import List, Any, Tuple, Union import warnings from bugsnag.sessiontracker import SessionMiddleware from bugsnag.middleware import DefaultMiddleware, MiddlewareStack from bugsnag.utils import (fully_qualified_class_name, validate_str_setter, ...
[ 11748, 28686, 198, 11748, 3859, 198, 11748, 17802, 198, 11748, 25064, 11250, 198, 6738, 19720, 1330, 7343, 11, 4377, 11, 309, 29291, 11, 4479, 198, 11748, 14601, 198, 198, 6738, 11316, 77, 363, 13, 29891, 2213, 10735, 1330, 23575, 34621, ...
2.502874
696
import kopf from .functions import global_logger, reconcile_secret
[ 11748, 479, 404, 69, 198, 198, 6738, 764, 12543, 2733, 1330, 3298, 62, 6404, 1362, 11, 33570, 62, 21078, 628 ]
3.45
20
import datetime import os import ee import math import sys import json from ee.ee_exception import EEException from gee.inputs import getLandsat, getS1 ########## Helper functions ########## ########## Helper routes ########## ########## ee.Image ########## ########## ee.ImageCollecti...
[ 11748, 4818, 8079, 201, 198, 11748, 28686, 201, 198, 11748, 304, 68, 201, 198, 11748, 10688, 201, 198, 11748, 25064, 201, 198, 11748, 33918, 201, 198, 6738, 304, 68, 13, 1453, 62, 1069, 4516, 1330, 27254, 16922, 201, 198, 6738, 308, 1...
2.662791
258
from django.contrib import admin from django.urls import path,include from django.views.generic import TemplateView from .views import Index,SignUp,UserDashboard,AdminDashboard,logout,showAdminData,deleteuser,activeUser,deactiveUser,UserDetailEdit,uploadImage # from .views import Index,UserDashboard,SignUp,AdminDashboa...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 17256, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 6738, 764, 33571, 1330, 12901, 11, 11712, 4933, 11, 129...
2.979899
398
# -*- coding: UTF-8 -*- """ RIFF parser, able to parse: * AVI video container * WAV audio container * CDA file Documents: - libavformat source code from ffmpeg library http://ffmpeg.mplayerhq.hu/ - Video for Windows Programmer's Guide http://www.opennet.ru/docs/formats/avi.txt - What is an animated curso...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 49, 29267, 30751, 11, 1498, 284, 21136, 25, 198, 220, 220, 1635, 317, 12861, 2008, 9290, 198, 220, 220, 1635, 370, 10116, 6597, 9290, 198, 220, 220, 1635, ...
2.651835
899
import os import re def get_subfolder_paths(folder_relative_path: str) -> list: """ Gets all subfolders of a given path :param folder_relative_path: Relative path of folder to find subfolders of :return: list of relative paths to any subfolders """ return [f.path for f in os.scandir(folder_rel...
[ 11748, 28686, 198, 11748, 302, 628, 198, 4299, 651, 62, 7266, 43551, 62, 6978, 82, 7, 43551, 62, 43762, 62, 6978, 25, 965, 8, 4613, 1351, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 29620, 477, 850, 11379, 364, 286, 257, 18...
2.860656
122
from datetime import datetime with open('/home/neo4j/neo4j-community-3.5.1/logs/debug.log', 'r') as log: begin = [] end = [] for line in log: if 'Index population started' in line: begin.append(line[:23]) elif 'Index creation finished' in line: end.append(line[:23]) if len(begin) == 0 or le...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 4480, 1280, 10786, 14, 11195, 14, 710, 78, 19, 73, 14, 710, 78, 19, 73, 12, 28158, 12, 18, 13, 20, 13, 16, 14, 6404, 82, 14, 24442, 13, 6404, 3256, 705, 81, 11537, 355, 2604, 25, 1...
2.279202
351
# -*- coding: utf-8 -*- ''' :file: setup.py :author: -Farmer :url: https://blog.farmer233.top :date: 2021/09/20 11:11:54 ''' from os import path from setuptools import setup, find_packages basedir = path.abspath(path.dirname(__file__)) with open(path.join(basedir, "README.md"), encoding='utf-8') as f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 220, 1058, 7753, 25, 9058, 13, 9078, 198, 220, 220, 220, 1058, 9800, 25, 532, 21428, 647, 198, 220, 220, 220, 1058, 6371, 25, 3740, 1378, 140...
2.397746
621
# Square => sq => RGB(Blue) # Plum => pl => RGB(Green) # Spade => sp => RGB(Black) # Heart => he => RGB(Red) init_poker = { 'local': { 'head': [-1, -1, -1], 'mid': [-1, -1, -1, -1, -1], 'tail': [-1, -1, -1, -1, -1], 'drop': [-1, -1, -1, -1], ...
[ 2, 9276, 220, 220, 220, 220, 220, 5218, 220, 19862, 220, 5218, 220, 25228, 7, 14573, 8, 198, 2, 43178, 220, 220, 220, 220, 220, 220, 220, 5218, 220, 458, 220, 5218, 220, 25228, 7, 13719, 8, 198, 2, 1338, 671, 220, 220, 220, 220,...
1.497687
1,081
name = "David Asiru Adetomiwa" print(name)
[ 3672, 796, 366, 11006, 1081, 35406, 1215, 316, 12753, 10247, 1, 198, 4798, 7, 3672, 8 ]
2.625
16
"""TcEx Framework API Service module.""" # standard library import json import sys import threading import traceback from io import BytesIO from typing import Any from .common_service import CommonService
[ 37811, 51, 66, 3109, 25161, 7824, 4809, 8265, 526, 15931, 198, 2, 3210, 5888, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 11748, 12854, 1891, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 19720, 1330, 4377, ...
4.058824
51
from mmcv.runner import build_optimizer def build_optimizers(model, cfgs): """Build multiple optimizers from configs. If `cfgs` contains several dicts for optimizers, then a dict for each constructed optimizers will be returned. If `cfgs` only contains one optimizer config, the constructed optimizer ...
[ 6738, 8085, 33967, 13, 16737, 1330, 1382, 62, 40085, 7509, 628, 198, 4299, 1382, 62, 40085, 11341, 7, 19849, 11, 30218, 14542, 2599, 198, 220, 220, 220, 37227, 15580, 3294, 6436, 11341, 422, 4566, 82, 13, 628, 220, 220, 220, 1002, 460...
2.467949
624
import datetime from django.contrib.auth import logout from django.shortcuts import render, redirect from .forms import RegisterForm from django.http import HttpResponse from django.contrib.auth.forms import AuthenticationForm from django.conf import settings from django.contrib.auth import authenticate, login from dj...
[ 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 2604, 448, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 764, 23914, 1330, 17296, 8479, 198, 6738, 42625, 14208, 13, 4023, 1...
3.836364
110
# Generated by Django 3.1.7 on 2021-03-26 01:27 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 2075, 5534, 25, 1983, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a new model on one or across multiple GPUs. """ import collections import logging import math import os im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 532, 84, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 242...
2.506352
1,102
""" This is the doc for the Grid Diagnostics module. These functions are based on the grid diagnostics from the GEneral Meteorological PAcKage (GEMPAK). Note that the names are case sensitive and some are named slightly different from GEMPAK functions to avoid conflicts with Jython built-ins (e.g. st...
[ 37811, 220, 198, 220, 220, 770, 318, 262, 2205, 329, 262, 24846, 31549, 34558, 8265, 13, 220, 2312, 5499, 198, 220, 220, 389, 1912, 319, 262, 10706, 6689, 34558, 422, 262, 22319, 1008, 282, 25582, 2770, 220, 198, 220, 220, 8147, 66, ...
2.194787
8,594
from selenium import webdriver #to get the browser from selenium.webdriver.common.keys import Keys #to send key to browser import getpass #to get password safely import time #to pause the program #a calss to store all twetter related objects and functions if __name__ == '__main__': username = input('Em...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 1303, 1462, 651, 262, 6444, 220, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 1303, 1462, 3758, 1994, 284, 6444, 201, 198, 11748, 651, 6603, 1303, 1462...
2.923077
182
import torch import torch.nn as nn from torch.nn import functional as F from PIL import Image import cv2 as cv from matplotlib import cm import numpy as np
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 201, 198, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 11748, 269, 85, 17, 355, 269, 85, 201, 198, 6738, 260...
2.3625
80
''' 2D version of 1st-level algorithm is a combination of frame_blobs, intra_blob, and comp_P: optional raster-to-vector conversion. intra_blob recursively evaluates each blob for two forks of extended internal cross-comparison and sub-clustering: der+: incremental derivation cross-comp in high-variati...
[ 7061, 6, 198, 220, 220, 220, 362, 35, 2196, 286, 352, 301, 12, 5715, 11862, 318, 257, 6087, 286, 5739, 62, 2436, 8158, 11, 23422, 62, 2436, 672, 11, 290, 552, 62, 47, 25, 11902, 374, 1603, 12, 1462, 12, 31364, 11315, 13, 198, 22...
2.444648
2,728
"""Generates a random terrain at Minitaur gym environment reset.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path...
[ 37811, 8645, 689, 257, 4738, 15510, 379, 1855, 270, 2899, 11550, 2858, 13259, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, ...
2.683673
294
from functools import partial from polecat.db.query import query as query_module from psycopg2.sql import SQL, Placeholder from .expression import Expression
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 16825, 9246, 13, 9945, 13, 22766, 1330, 12405, 355, 12405, 62, 21412, 198, 6738, 17331, 22163, 70, 17, 13, 25410, 1330, 16363, 11, 8474, 13829, 198, 198, 6738, 764, 38011, 1330, 41986...
3.833333
42
# 2019 advent day 3 MOVES = { 'R': (lambda x: (x[0], x[1] + 1)), 'L': (lambda x: (x[0], x[1] - 1)), 'U': (lambda x: (x[0] + 1, x[1])), 'D': (lambda x: (x[0] - 1, x[1])), } #R1 = 'R75,D30,R83,U83,L12,D49,R71,U7,L72' #R2 = 'U62,R66,U55,R34,D71,R55,D58,R83' #R1 = 'R98,U47,R26,D63,R33,U87,L62,D20,R33,...
[ 2, 13130, 19980, 1110, 513, 198, 198, 44, 8874, 1546, 796, 1391, 198, 220, 220, 220, 705, 49, 10354, 357, 50033, 2124, 25, 357, 87, 58, 15, 4357, 2124, 58, 16, 60, 1343, 352, 36911, 198, 220, 220, 220, 705, 43, 10354, 357, 50033, ...
1.542751
269
import asyncio
[ 11748, 30351, 952, 198 ]
3.75
4
# -*- coding: utf-8 -*- """IdentityServicesEngineAPI security_groups_acls API fixtures and tests. Copyright (c) 2021 Cisco and/or its affiliates. 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 the Software w...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 7390, 26858, 31007, 13798, 17614, 2324, 62, 24432, 62, 330, 7278, 7824, 34609, 290, 5254, 13, 198, 198, 15269, 357, 66, 8, 33448, 28289, 290, 14, 273, 663, 29116,...
3.606897
435
"""Riemannian and pseudo-Riemannian metrics.""" import math import warnings import autograd import geomstats.backend as gs from geomstats.geometry.connection import Connection EPSILON = 1e-4 N_CENTERS = 10 TOLERANCE = 1e-5 N_REPETITIONS = 20 N_MAX_ITERATIONS = 50000 N_STEPS = 10 def loss(y_pred, y_true, metric):...
[ 37811, 49, 26597, 1236, 666, 290, 24543, 12, 49, 26597, 1236, 666, 20731, 526, 15931, 198, 198, 11748, 10688, 198, 11748, 14601, 198, 198, 11748, 1960, 519, 6335, 198, 198, 11748, 4903, 296, 34242, 13, 1891, 437, 355, 308, 82, 198, 67...
2.474501
451
import pandas as pd from bokeh.models import HoverTool from bokeh.models.formatters import DatetimeTickFormatter from bokeh.palettes import Plasma256 from bokeh.plotting import figure, ColumnDataSource from app import db from app.decorators import data_quality # creates your plot date_formatter = DatetimeTickFormatt...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1489, 365, 71, 13, 27530, 1330, 38452, 25391, 198, 6738, 1489, 365, 71, 13, 27530, 13, 18982, 1010, 1330, 16092, 8079, 51, 624, 8479, 1436, 198, 6738, 1489, 365, 71, 13, 18596, 23014, ...
1.59745
549
#Yannick p6e8 Escribe un programa que te pida primero un nmero y luego te pida nmeros hasta que la suma de los nmeros introducidos coincida con el nmero inicial. El programa termina escribiendo la lista de nmeros. limite = int(input("Escribe limite:")) valores = int(input("Escribe un valor:")) listavalores = [...
[ 2, 56, 1236, 624, 279, 21, 68, 23, 412, 12522, 555, 1430, 64, 8358, 573, 279, 3755, 2684, 3529, 555, 299, 647, 78, 331, 300, 518, 2188, 573, 279, 3755, 299, 647, 418, 19338, 64, 8358, 8591, 2160, 64, 390, 22346, 299, 647, 418, 3...
2.508961
279
from typing import Optional from typing import Tuple from clikit.console_application import ConsoleApplication from .commands import BaseCommand from .commands.completions_command import CompletionsCommand from .config import ApplicationConfig
[ 6738, 19720, 1330, 32233, 201, 198, 6738, 19720, 1330, 309, 29291, 201, 198, 201, 198, 6738, 537, 1134, 270, 13, 41947, 62, 31438, 1330, 24371, 23416, 201, 198, 201, 198, 6738, 764, 9503, 1746, 1330, 7308, 21575, 201, 198, 6738, 764, ...
3.878788
66
#from django.dispatch import dispatcher #def UserProfilePostInsert(sender, instance, signal, *args, **kwargs): #""" #Inserts a blank imap server entry (if necessary) and associates it with the user #""" #user = instance #i = user.get_profile().imap_servers.create() #user.get_profile().about = '...
[ 2, 6738, 42625, 14208, 13, 6381, 17147, 1330, 49952, 198, 198, 2, 4299, 11787, 37046, 6307, 44402, 7, 82, 2194, 11, 4554, 11, 6737, 11, 1635, 22046, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 1303, 37811, 198, 220, 220, 220, ...
2.918129
171
from utils.drawer import Drawer import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("name", help="the name of the datafile") parser.add_argument("--size", help="width,height") args = parser.parse_args() if args.size is None: width, height = 128...
[ 6738, 3384, 4487, 13, 19334, 263, 1330, 15315, 263, 198, 198, 11748, 1822, 29572, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 220, ...
2.690667
375
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
[ 2, 15069, 2177, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 921, 198, 2, 743, 407, 779, 428, 2393, ...
2.303873
1,007
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np path_results = '../results/images/' # this function receives a dataset with binary target and it will graph a hist of values # plot histograms of train and test to understand the differences between them
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6978, 62, 43420, 796, 705, 40720, 43420, 14, 17566...
3.75
80
from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.translation import ugettext_lazy as _
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 261, 7249, 1330, 37431, 7249, 856, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 125...
3.622222
45
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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 the Software without restriction, including without limitation the rights to use, copy, modify, merg...
[ 37811, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 1853, 12, 25579, 36962, 22877, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 30073, 286, 428, 3788, 290, ...
2.445922
4,586
import _winreg import os def get_shared_cache_folder(): """ Look in the registry for the configured cache folder. If there is no entry, then we create one. :return: """ _winreg.aReg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER) try: key = _winreg.OpenKey(_winreg.aReg, ...
[ 11748, 4808, 5404, 2301, 198, 11748, 28686, 628, 198, 4299, 651, 62, 28710, 62, 23870, 62, 43551, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6803, 287, 262, 20478, 329, 262, 17839, 12940, 9483, 13, 198, 220, 220, 220, 1002,...
2.35533
197
# -*- coding: utf-8 -*- info = { "name": "ebu", "date_order": "DMY", "january": [ "mweri wa mbere", "mbe" ], "february": [ "mweri wa kari", "kai" ], "march": [ "mweri wa kathat", "kat" ], "april": [ "mweri wa kana", "kan...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 10951, 796, 1391, 198, 220, 220, 220, 366, 3672, 1298, 366, 1765, 84, 1600, 198, 220, 220, 220, 366, 4475, 62, 2875, 1298, 366, 23127, 56, 1600, 198, 220, 220, 220, ...
1.487024
1,811
"""Preprocessing DeepA2 datasets for LM training""" # flake8: noqa from deepa2.preptrain.t2tpreprocessor import T2TPreprocessor
[ 37811, 6719, 36948, 10766, 32, 17, 40522, 329, 37125, 3047, 37811, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 198, 6738, 2769, 64, 17, 13, 3866, 457, 3201, 13, 83, 17, 83, 3866, 41341, 1330, 309, 17, 51, 6719, 41341, 198 ]
3.071429
42
#!/usr/bin/env python3 from setuptools import setup, find_packages setup(name='awspk', version='0.1', description='A aws cli pen knife with loads of interested stuff', author='Martin Farrow', author_email='awspk@dibley.net', py_modules=['awspk'], license='LICENSE', )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 3672, 11639, 707, 2777, 74, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, ...
2.384615
130
# Xlib.display -- high level display object # # Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the ...
[ 2, 1395, 8019, 13, 13812, 1377, 1029, 1241, 3359, 2134, 198, 2, 198, 2, 220, 220, 220, 15069, 357, 34, 8, 4751, 5613, 16342, 73, 23140, 1279, 6449, 4528, 31, 44755, 12, 66, 13, 4528, 84, 13, 325, 29, 198, 2, 198, 2, 770, 5888, ...
2.98871
620
# -*- coding: utf-8 -*- if __name__ == "__main__": main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
1.969697
33
__author__ = 'dimd' from zope.interface import Interface, Attribute
[ 834, 9800, 834, 796, 705, 27740, 67, 6, 198, 198, 6738, 1976, 3008, 13, 39994, 1330, 26491, 11, 3460, 4163, 628, 198 ]
3.227273
22
import numpy as np import pandas as pd from scipy.stats import f_oneway from typing import Dict, Tuple, Set def extract_significant_p(df: pd.DataFrame, p_value_limit: float): """Return a df, which replaces values that are above p_value_limit with `None`""" return ( df.loc(axis=1)[f"p-value"] ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 629, 541, 88, 13, 34242, 1330, 277, 62, 261, 16172, 198, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 11, 5345, 628, 198, 4299, 7925, 62, 36591, 62...
2.208817
1,724
import os import platform import time import csv import serial import cv2 import tkinter as tk from tkinter.filedialog import askdirectory from serial.tools import list_ports # From https://raspberrypi.stackexchange.com/a/118473 def list_ports(): """ Test the ports and returns a tuple with the available ports...
[ 11748, 28686, 198, 11748, 3859, 198, 11748, 640, 198, 11748, 269, 21370, 198, 11748, 11389, 198, 11748, 269, 85, 17, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 13, 69, 3902, 498, 519, 1330, 1265, 34945, 198, ...
2.324771
545
from hpbandster.core.worker import Worker from a2e.model import AbstractModel from a2e.optimizer import EvaluationResultAggregator from a2e.utility import inf_nan_to_float_max
[ 6738, 27673, 3903, 1706, 13, 7295, 13, 28816, 1330, 35412, 198, 6738, 257, 17, 68, 13, 19849, 1330, 27741, 17633, 198, 6738, 257, 17, 68, 13, 40085, 7509, 1330, 34959, 23004, 46384, 2301, 1352, 198, 6738, 257, 17, 68, 13, 315, 879, ...
3.339623
53
from xagents import a2c, acer, ddpg, dqn, ppo, td3, trpo from xagents.a2c.agent import A2C from xagents.acer.agent import ACER from xagents.base import OffPolicy from xagents.ddpg.agent import DDPG from xagents.dqn.agent import DQN from xagents.ppo.agent import PPO from xagents.td3.agent import TD3 from xagents.trpo.ag...
[ 6738, 2124, 49638, 1330, 257, 17, 66, 11, 936, 263, 11, 49427, 6024, 11, 288, 80, 77, 11, 279, 7501, 11, 41560, 18, 11, 491, 7501, 198, 6738, 2124, 49638, 13, 64, 17, 66, 13, 25781, 1330, 317, 17, 34, 198, 6738, 2124, 49638, 13,...
2.422179
514
from .IsraeliQueue import IsraeliQueue, Item, IsraeliQueueByType
[ 6738, 764, 29818, 34991, 1330, 6085, 34991, 11, 9097, 11, 6085, 34991, 3886, 6030, 198 ]
4.333333
15
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os from mmpt.utils import recursive_config
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
3.915254
59
import os.path from tron import g, hub from tron.Hub.Command.Encoders.ASCIICmdEncoder import ASCIICmdEncoder from tron.Hub.Nub.TCCShellNub import TCCShellNub from tron.Hub.Reply.Decoders.ASCIIReplyDecoder import ASCIIReplyDecoder name = 'tcc'
[ 11748, 28686, 13, 6978, 198, 198, 6738, 491, 261, 1330, 308, 11, 12575, 198, 6738, 491, 261, 13, 16066, 13, 21575, 13, 4834, 19815, 364, 13, 1921, 25690, 2149, 9132, 27195, 12342, 1330, 25400, 40, 2149, 9132, 27195, 12342, 198, 6738, ...
2.666667
93
#!/usr/bin/env python # -*- coding=utf-8 -*- ''' Created on 2013-3-31 @author: Joseph ''' import PtDb if __name__ == '__main__': PtDb.config = { 'sqlite':{ 'type':'sqlite', 'dbname':"data1.db" }, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 28, 40477, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 41972, 319, 2211, 12, 18, 12, 3132, 198, 31, 9800, 25, 7212, 198, 7061, 6, 198, 11748, 34352, 43832, 198, ...
1.504988
802
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. import filecmp import json import pytest import oci import services.object_storage.src.oci_cli_object_storage as oci_cli_object_storage import os import random import shutil import six import string from tests import util fr...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 13130, 11, 18650, 290, 14, 273, 663, 29116, 13, 1439, 2489, 10395, 13, 198, 198, 11748, 2393, 48991, 198, 11748, 33918, 198, 11748, 12972, 9288, 198, 11748, 267, ...
3.032009
906
#!/usr/bin/python3 import random import string import time import subprocess import os import redis import threading def generate_string(string_size, size, dict): ''' https://stackoverflow.com/questions/16308989/fastest-method-to-generate-big-random-string-with-lower-latin-letters ''' for i in ran...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 640, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 2266, 271, 198, 11748, 4704, 278, 628, 198, 198, 4299, 7716, 62, 8841, 7, 8841,...
2.211132
1,042
""" https://www.codeeval.com/browse/30/ Set Intersection Challenge Description: You are given two sorted list of numbers (ascending order). The lists themselves are comma delimited and the two lists are semicolon delimited. Print out the intersection of these two sets. Input Sample: File containin...
[ 37811, 198, 5450, 1378, 2503, 13, 8189, 18206, 13, 785, 14, 25367, 325, 14, 1270, 14, 198, 198, 7248, 4225, 5458, 198, 198, 41812, 3540, 12489, 25, 628, 220, 220, 220, 921, 389, 1813, 734, 23243, 1351, 286, 3146, 357, 3372, 1571, 15...
2.67602
392
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 198, 2, 220, 15069, 13130, 383, 376, 6158, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, ...
3.631579
228
""" VAE on the swirl task. Basically, VAEs don't work. It's probably because the prior isn't very good and/or because the learning signal is pretty weak when both the encoder and decoder change quickly. However, I tried also alternating between the two, and that didn't seem to help. """ from torch.distributions import...
[ 37811, 198, 11731, 36, 319, 262, 42835, 4876, 13, 198, 198, 31524, 11, 13753, 23041, 836, 470, 670, 13, 632, 338, 2192, 780, 262, 3161, 2125, 470, 845, 922, 198, 392, 14, 273, 780, 262, 4673, 6737, 318, 2495, 4939, 618, 1111, 262, ...
2.051333
1,013
# # This file is part of LiteX. # # Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr> # SPDX-License-Identifier: BSD-2-Clause from litex.build.tools import write_to_file from litex.build.generic_programmer import GenericProgrammer # openFPGAloader --------------------------------------------------------...
[ 2, 198, 2, 770, 2393, 318, 636, 286, 27395, 55, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 23347, 429, 17337, 3876, 8344, 1279, 2704, 382, 429, 31, 268, 2633, 12, 34725, 13, 8310, 29, 198, 2, 30628, 55, 12, 34156, 12, 33234, ...
3.659794
97
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2020-2021 FreeHackQuest Team <freehackquest@gmail.com> """This file was automatically generated by fhq-server Version: v0.2.47 Date: 2022-01-01 07:15:35 """ from freehackquest_libclient_py.freehackquest_client import FreeHackQuestClient
[ 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, 15069, 357, 66, 8, 12131, 12, 1238, 2481, 3232, 32833, 12166, 4816, 1279, 5787, 31153, 6138, 31, 14816, 13, 78...
2.857143
105
from exchange_sockets.exchange_websocket import ExchangeWebSocket from singletones.custom_logger import MyLogger import websocket import threading from time import sleep from time import time import json import ssl logger = MyLogger()
[ 6738, 5163, 62, 82, 11603, 13, 1069, 3803, 62, 732, 1443, 5459, 1330, 12516, 13908, 39105, 198, 6738, 2060, 36257, 13, 23144, 62, 6404, 1362, 1330, 2011, 11187, 1362, 198, 11748, 2639, 5459, 198, 11748, 4704, 278, 198, 6738, 640, 1330, ...
3.703125
64
import numpy as np import random import torch from torch.utils.data import DataLoader from torch.utils.data.sampler import Sampler import torchvision.transforms as transforms from dataset import Omniglot, MNIST ''' Helpers for loading class-balanced few-shot tasks from datasets '''
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 37687, 20053, 1330, 3409, 20053, 198, 11748, 28034, 10178, 13, ...
3.666667
78
#!/usr/bin/python import sys import os sys.path.append(os.getcwd()) from Director import Director from OrthologsBuilder import * from SpeciesDB import * if __name__ == "__main__": inputDict = {} for inarg in sys.argv[1:]: try: splitArg = inarg.strip("-").split("=") if splitArg[...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 1136, 66, 16993, 28955, 198, 6738, 5890, 1330, 5890, 198, 6738, 47664, 928, 82, 32875, 1330, 1635, 198, 6738...
2.398684
760
# See also: https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite good_table_names = [ 'foo', '123abc', '123abc.txt', '123abc-ABC.txt', 'foo""bar', '', '_sqlite', ] # See also: https://stackoverflow.com/questions/3694276/what-are-valid-table-names-in-sqlite bad_ta...
[ 2, 4091, 635, 25, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 2623, 5824, 27988, 14, 10919, 12, 533, 12, 12102, 12, 11487, 12, 14933, 12, 259, 12, 25410, 578, 198, 11274, 62, 11487, 62, 14933, 796, 685, 198, 220, 2...
2.129032
186
# -*- coding: utf-8 -*- """ Base settings for twlight project. This is not intended to be used as the live settings file for a project and will not work as one. You should instead use production.py, local.py, heroku.py, or another file that you write. These files should live in the settings directory; start with 'from...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 14881, 6460, 329, 665, 2971, 1628, 13, 198, 198, 1212, 318, 407, 5292, 284, 307, 973, 355, 262, 2107, 6460, 2393, 329, 257, 1628, 290, 481, 198, 1662, 670,...
2.778473
5,435
"""Table of operators.""" # Copyright 2020 by California Institute of Technology # Copyright (c) 2008-2013 INRIA and Microsoft Corporation # All rights reserved. Licensed under 3-clause BSD. # # This module is based on the file: # # <https://github.com/tlaplus/tlapm/blob/main/src/optable.ml> # import pprint from .ast...
[ 37811, 10962, 286, 12879, 526, 15931, 198, 2, 15069, 12131, 416, 3442, 5136, 286, 8987, 198, 2, 15069, 357, 66, 8, 3648, 12, 6390, 220, 3268, 49, 3539, 290, 5413, 10501, 198, 2, 1439, 2489, 10395, 13, 49962, 739, 513, 12, 565, 682, ...
1.756091
6,978
import networkx as nx from awesome.context import ignored import sark import idaapi import idautils import idc from idaapi import PluginForm from sark.qt import QtGui, QtCore, QtWidgets, form_to_widget, use_qt5 if use_qt5: _QSortFilterProxyModel = QtCore.QSortFilterProxyModel _MatchRecursive = QtC...
[ 11748, 3127, 87, 355, 299, 87, 201, 198, 201, 198, 6738, 7427, 13, 22866, 1330, 9514, 201, 198, 11748, 264, 668, 201, 198, 11748, 220, 3755, 15042, 201, 198, 11748, 4686, 2306, 4487, 201, 198, 11748, 4686, 66, 201, 198, 6738, 220, 3...
2.714286
392
from peerbot.PeerBotStateMachine import PeerBotStateMachine from utils.Logger import Logger import discord
[ 6738, 12720, 13645, 13, 6435, 263, 20630, 9012, 37573, 1330, 41139, 20630, 9012, 37573, 198, 6738, 3384, 4487, 13, 11187, 1362, 1330, 5972, 1362, 198, 198, 11748, 36446 ]
3.821429
28
from datetime import datetime from airflow import DAG from airflow.operators.python import PythonOperator # v0.0.1 from oss_know.libs.base_dict.variable_key import NEED_INIT_GITHUB_ISSUES_TIMELINE_REPOS, GITHUB_TOKENS, \ OPENSEARCH_CONN_DATA, PROXY_CONFS from oss_know.libs.util.proxy import KuaiProxyService, Prox...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 45771, 1330, 360, 4760, 198, 6738, 45771, 13, 3575, 2024, 13, 29412, 1330, 11361, 18843, 1352, 198, 198, 2, 410, 15, 13, 15, 13, 16, 198, 6738, 267, 824, 62, 16275, 13, 8019, 82, ...
2.246575
730
import sys from conans.client.command import main if __name__ == '__main__': run()
[ 11748, 25064, 198, 198, 6738, 369, 504, 13, 16366, 13, 21812, 1330, 1388, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1057, 3419, 198 ]
2.757576
33
# -*- coding: utf-8 -*- """ Unit tests for the Person plugin and its model """ from django import forms from django.conf import settings from django.test import TestCase from cms.api import add_plugin, create_page from cmsplugin_plain_text.cms_plugins import PlaintextPlugin from djangocms_picture.cms_plugins import Pi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 26453, 5254, 329, 262, 7755, 13877, 290, 663, 2746, 198, 37811, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738,...
3.431694
183
# cython: language_level=3 # -*- coding: utf-8 -*- from mathics.core.expression import Expression from mathics.core.symbols import Atom, Symbol from mathics.core.atoms import Integer from mathics.builtin.base import MessageException """ This module provides some infrastructure to deal with SubExpressions. """ def...
[ 2, 3075, 400, 261, 25, 3303, 62, 5715, 28, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 10688, 873, 13, 7295, 13, 38011, 1330, 41986, 198, 6738, 10688, 873, 13, 7295, 13, 1837, 2022, 10220, ...
2.175824
2,639
from pyopenproject.api_connection.exceptions.request_exception import RequestError from pyopenproject.api_connection.requests.get_request import GetRequest from pyopenproject.business.exception.business_error import BusinessError from pyopenproject.business.services.command.configuration.configuration_command import Co...
[ 6738, 12972, 9654, 16302, 13, 15042, 62, 38659, 13, 1069, 11755, 13, 25927, 62, 1069, 4516, 1330, 19390, 12331, 198, 6738, 12972, 9654, 16302, 13, 15042, 62, 38659, 13, 8897, 3558, 13, 1136, 62, 25927, 1330, 3497, 18453, 198, 6738, 1297...
4.444444
90
"""Cell API tests. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import mock from treadmill import admin from treadmill.api import cell if __name__ == '__main__': unittest.main()
[ 37811, 28780, 7824, 5254, 13, 198, 37811, 198, 198, 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, 6738, 11593, 37443, 834, 1330, 28000, ...
3.43956
91
# ------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in project root for information. # ------------------------------------------------------------- """Python Package Template""" from __future__...
[ 2, 220, 220, 20368, 1783, 32501, 198, 2, 220, 220, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 220, 220, 49962, 739, 262, 17168, 13789, 13, 4091, 38559, 24290, 287, 1628, 6808, 329, 1321, 13, 198, 2, 220, 22...
4.905405
74
"""Integration test: Test partition of piChain nodes. Note: run tests with default setting values in config.py. """ import time from tests.util import MultiNodeTest
[ 37811, 34500, 1358, 1332, 25, 6208, 18398, 286, 31028, 35491, 13760, 13, 198, 198, 6425, 25, 1057, 5254, 351, 4277, 4634, 3815, 287, 4566, 13, 9078, 13, 198, 37811, 198, 11748, 640, 198, 198, 6738, 5254, 13, 22602, 1330, 15237, 19667, ...
3.906977
43
import zipfile import random RAND_INT_RANGE = (1,100) fnames = [] for i in range(10): fname = 'file' + str(i) + '.txt' wrf(fname) fnames.append(fname) dirpaths = set() with zipfile.ZipFile('myzip.zip', 'w', compression=zipfile.ZIP_DEFLATED) as zf: for fname in fnames: dirpath = '/dirpath'+st...
[ 11748, 19974, 7753, 198, 11748, 4738, 198, 198, 49, 6981, 62, 12394, 62, 49, 27746, 796, 357, 16, 11, 3064, 8, 198, 198, 69, 14933, 796, 17635, 198, 1640, 1312, 287, 2837, 7, 940, 2599, 198, 220, 220, 220, 277, 3672, 796, 705, 775...
2.180272
294
import unittest from django.test import Client from wagtail.core.models import Page from wagtail_managed404.models import PageNotFoundEntry
[ 11748, 555, 715, 395, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 20985, 198, 198, 6738, 266, 363, 13199, 13, 7295, 13, 27530, 1330, 7873, 198, 6738, 266, 363, 13199, 62, 39935, 26429, 13, 27530, 1330, 7873, 3673, 21077, 30150, 628 ]
3.487805
41
__version__ = (1, 8, 5)
[ 834, 9641, 834, 796, 357, 16, 11, 807, 11, 642, 8, 198 ]
2
12
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def bomsoi(path): """Southern Oscillation Index Data The Southern Osci...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 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, 269, 21370, ...
2.922105
950
import pyblish.api import openpype.api
[ 11748, 12972, 65, 1836, 13, 15042, 198, 11748, 1280, 79, 2981, 13, 15042, 628 ]
2.857143
14
import os import cv2 as cv import matplotlib.pyplot as plt import numpy as np #srcPaths = ('dataset/Screenshot1','dataset/Screenshot2','dataset/Screenshot3', 'dataset/Screenshot4') #srcPaths = ('all_dataset/s1', # 'all_dataset/s10', # 'all_dataset/s11', # 'all_dataset/s12', ...
[ 11748, 28686, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 10677, 15235, 82, 796, 19203, 19608, 292, 316, 14, 34204, 16, 41707, ...
1.671656
2,138
""" Kronos: A simple scheduler for graduate training programme Entities: User, Schedule, Rotation """ from operator import itemgetter from datetime import datetime, timedelta def getRotationCapacity(rotationId, startDate, endDate, assignments): """ Calculate number of users assigned to a particular rotation dur...
[ 37811, 198, 42, 1313, 418, 25, 317, 2829, 6038, 18173, 329, 10428, 3047, 11383, 198, 198, 14539, 871, 25, 11787, 11, 19281, 11, 371, 14221, 198, 37811, 198, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 6738, 4818, 8079, 1330, 4818, 8...
2.383231
2,445
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING import contextlib import sys from pylint.utils import utils def preprocess_options(args, search_for): """look for some options (keys of <search_for>) wh...
[ 2, 49962, 739, 262, 38644, 25, 3740, 1378, 2503, 13, 41791, 13, 2398, 14, 677, 4541, 14, 727, 12, 677, 4541, 14, 70, 489, 12, 17, 13, 15, 13, 6494, 201, 198, 2, 1114, 3307, 25, 3740, 1378, 12567, 13, 785, 14, 20519, 34, 48, 32...
1.885267
767
# coding=utf-8 # Copyright 2021 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, 33448, 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, ...
3.221505
465
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- from django.test.utils import override_settings from django.urls import reverse from myuw.test.api import MyuwApiTest
[ 2, 15069, 33448, 33436, 12, 2043, 11, 2059, 286, 2669, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 92...
2.961538
78
# cli_solver.py import argparse import os from boggled import BoggleBoard, BoggleSolver, BoggleWords if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("letters", type=str, help="Board letters") parser.add_argument("dictionary", type=str, ...
[ 2, 537, 72, 62, 82, 14375, 13, 9078, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 6738, 275, 10332, 992, 1330, 347, 20258, 29828, 11, 347, 20258, 50, 14375, 11, 347, 20258, 37117, 628, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.247878
589
from copy import copy, deepcopy import sqlite3 from hashlib import md5 import time import os import os.path as osp from base64 import b64encode, b64decode from zlib import compress, decompress import itertools as it import logging # instead of pickle we use dill, so we can save dynamically defined # classes import dil...
[ 6738, 4866, 1330, 4866, 11, 2769, 30073, 198, 11748, 44161, 578, 18, 198, 6738, 12234, 8019, 1330, 45243, 20, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 6738, 2779, 2414, 1330, 275, 2414, 268, ...
2.280133
14,768
""" Created on Thu Oct 26 14:19:44 2017 @author: Utku Ozbulak - github.com/utkuozbulak """ import os import numpy as np import torch from torch.optim import SGD from torchvision import models from misc_functions import preprocess_image, recreate_image, save_image if __name__ == '__main__': target_class = 130 ...
[ 37811, 198, 41972, 319, 26223, 2556, 2608, 1478, 25, 1129, 25, 2598, 2177, 198, 198, 31, 9800, 25, 7273, 23063, 440, 14969, 377, 461, 532, 33084, 13, 785, 14, 315, 23063, 8590, 15065, 461, 198, 37811, 198, 11748, 28686, 198, 11748, 29...
2.93865
163
#!/usr/bin/env python """ @file visum_mapDistricts.py @author Daniel Krajzewicz @author Michael Behrisch @date 2007-10-25 @version $Id$ This script reads a network and a dump file and draws the network, coloring it by the values found within the dump-file. SUMO, Simulation of Urban MObility; see http://sum...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 31, 7753, 220, 220, 220, 1490, 388, 62, 8899, 44857, 82, 13, 9078, 198, 31, 9800, 220, 7806, 21553, 73, 89, 413, 28051, 198, 31, 9800, 220, 3899, 10407, 2442, 354, 198, ...
1.908364
7,879
#!/usr/bin/env python3 ###### # General Detector # 06.12.2018 / Last Update: 20.05.2021 # LRB ###### import numpy as np import os import sys import tensorflow as tf import hashlib import cv2 import magic import PySimpleGUI as sg import csv import imagehash import face_recognition import subprocess from itertools impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 4242, 2235, 198, 2, 3611, 4614, 9250, 198, 2, 9130, 13, 1065, 13, 7908, 1220, 4586, 10133, 25, 1160, 13, 2713, 13, 1238, 2481, 198, 2, 406, 27912, 198, 4242, 2235, 198, 19...
2.558749
5,532
import time import retro import FrameSkip import TimeLimit import Brute
[ 11748, 640, 198, 11748, 12175, 198, 198, 11748, 25184, 50232, 198, 11748, 3862, 39184, 198, 11748, 1709, 1133, 198 ]
3.842105
19
import io import numpy as np import torch.utils.model_zoo as model_zoo import torch.onnx import torch.nn as nn import torch.nn.init as init # ================================================================ # # Building the Model # # ====================================...
[ 11748, 33245, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 13, 26791, 13, 19849, 62, 89, 2238, 355, 2746, 62, 89, 2238, 198, 11748, 28034, 13, 261, 77, 87, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, ...
2.47585
1,677
# encoding: utf-8 """ Step implementations for section-related features """ from __future__ import absolute_import, print_function, unicode_literals from behave import given, then, when from docx import Document from docx.enum.section import WD_ORIENT, WD_SECTION from docx.section import Section from docx.shared im...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 8600, 25504, 329, 2665, 12, 5363, 3033, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738,...
4.25
136
""" Laplacian of a compressed-sparse graph """ # Authors: Aric Hagberg <hagberg@lanl.gov> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Jake Vanderplas <vanderplas@astro.washington.edu> # License: BSD import numpy as np from scipy.sparse import isspmatrix, coo_matrix #########################...
[ 37811, 198, 14772, 489, 330, 666, 286, 257, 25388, 12, 82, 29572, 4823, 198, 37811, 198, 198, 2, 46665, 25, 943, 291, 21375, 3900, 1279, 71, 363, 3900, 31, 9620, 75, 13, 9567, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.240442
1,177
import os import logging from collections import namedtuple from Crypto.PublicKey import RSA from tornado import gen from tornado import concurrent from cosmos.rbac.object import * from cosmos.service import OBSERVER_PROCESSOR DEBUG = True DB_HOST = "127.0.0.1" DB_NAME = "cosmos" DB_PORT = 27017 DB_USER_NAME = None ...
[ 11748, 28686, 198, 11748, 18931, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 36579, 13, 15202, 9218, 1330, 42319, 198, 6738, 33718, 1330, 2429, 198, 6738, 33718, 1330, 24580, 198, 6738, 39385, 13, 26145, 330, 13, 15252, 1330,...
1.896853
3,209
from .utils.migrations import (migrate_database_from, migrate_machine_from, zilean_rollback_database_backup, zilean_rollback_machine_backup)
[ 6738, 764, 26791, 13, 76, 3692, 602, 1330, 357, 76, 42175, 62, 48806, 62, 6738, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.671429
140
# coding=utf-8 # Copyright 2021 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, 33448, 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.684972
2,695