content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from . import generative
[ 6738, 764, 1330, 1152, 876, 198 ]
4.166667
6
from pathlib import Path with (Path(__file__).parent / "input.txt").open() as puzzle_input_file: puzzle_input_raw = puzzle_input_file.read() from collections import defaultdict limit = 1_000_000 houses = defaultdict(int) number = int(puzzle_input_raw) for elf in range(1, number): for house in range(elf, min...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 4480, 357, 15235, 7, 834, 7753, 834, 737, 8000, 1220, 366, 15414, 13, 14116, 11074, 9654, 3419, 355, 15027, 62, 15414, 62, 7753, 25, 198, 220, 220, 220, 15027, 62, 15414, 62, 1831, 796, 15027, ...
2.564972
177
# # @lc app=leetcode id=377 lang=python3 # # [377] Combination Sum IV # from typing import List # @lc code=start # @lc code=end solve = Solution().combinationSum4
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 26514, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 26514, 60, 14336, 1883, 5060, 8363, 198, 2, 198, 6738, 19720, 1330, 7343, 198, 198, 2, 2488, 44601, 2438, 28, 9688, 628, ...
2.65625
64
from django.utils import six from nodeconductor.core.models import User, SshPublicKey from nodeconductor.logging.log import EventLogger, event_logger from nodeconductor.structure import models event_logger.register('customer_role', CustomerRoleEventLogger) event_logger.register('project_role', ProjectRol...
[ 6738, 42625, 14208, 13, 26791, 1330, 2237, 198, 198, 6738, 18666, 721, 40990, 13, 7295, 13, 27530, 1330, 11787, 11, 311, 1477, 15202, 9218, 198, 6738, 18666, 721, 40990, 13, 6404, 2667, 13, 6404, 1330, 8558, 11187, 1362, 11, 1785, 62, ...
3.539286
280
import collections
[ 11748, 17268 ]
9
2
import tensorflow.compat.v1 as tf from tensorflow.compat.v1.keras.layers import ( Activation, Conv2D, Dense, Flatten, add, BatchNormalization, ) from tensorflow.compat.v1.keras.regularizers import l2 def residual_block( inputs, num_filters=16, kernel_size=3, strides=1, acti...
[ 11748, 11192, 273, 11125, 13, 5589, 265, 13, 85, 16, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 5589, 265, 13, 85, 16, 13, 6122, 292, 13, 75, 6962, 1330, 357, 198, 220, 220, 220, 13144, 341, 11, 198, 220, 220, 220, 34872, 17, ...
2.318621
725
# pylint: disable=wildcard-import, unused-wildcard-import from .backbone import * from .deepten import * from .sseg import * __all__ = ['model_list', 'get_model'] models = { # resnet 'resnet50': resnet50, 'resnet101': resnet101, 'resnet152': resnet152, # resnest 'resnest50': resnest50, 'r...
[ 2, 279, 2645, 600, 25, 15560, 28, 21992, 9517, 12, 11748, 11, 21958, 12, 21992, 9517, 12, 11748, 198, 198, 6738, 764, 1891, 15992, 1330, 1635, 198, 6738, 764, 67, 1453, 457, 268, 1330, 1635, 198, 6738, 764, 82, 325, 70, 1330, 1635, ...
2.181118
1,038
import pywhatkit as pwt pwt.sendwhatmsg("+558599011005", "não sei fazer mais nada ;-;", 16,16)
[ 11748, 12972, 10919, 15813, 355, 279, 46569, 198, 79, 46569, 13, 21280, 10919, 19662, 7203, 10, 2816, 5332, 2079, 486, 3064, 20, 1600, 366, 77, 28749, 384, 72, 277, 19178, 285, 15152, 299, 4763, 2162, 12, 26, 1600, 1467, 11, 1433, 8 ]
2.238095
42
# Lint as: python3 # Copyright 2020 The TensorFlow 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 ...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 15069, 12131, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743...
2.334183
7,059
import matplotlib import importlib from hydroDL import kPath, utils from hydroDL.app import waterQuality from hydroDL.master import basins from hydroDL.data import usgs, gageII, gridMET, ntn from hydroDL.master import slurm from hydroDL.post import axplot, figplot import numpy as np import matplotlib.pyplot as plt imp...
[ 198, 11748, 2603, 29487, 8019, 198, 11748, 1330, 8019, 198, 6738, 17173, 19260, 1330, 479, 15235, 11, 3384, 4487, 198, 6738, 17173, 19260, 13, 1324, 1330, 1660, 35013, 198, 6738, 17173, 19260, 13, 9866, 1330, 1615, 1040, 198, 6738, 17173,...
2.030158
2,918
"""________________readme________________""" # source code for Private Function in Python # how to use it is given in the docstring portion of the PrivateFunc class # please report any bug # first release: April 6, 2021 # latest update release: April 8, 2021 # version: 1.2.21 """________________readme________________""...
[ 37811, 4841, 961, 1326, 4841, 37811, 198, 2, 2723, 2438, 329, 15348, 15553, 287, 11361, 198, 2, 703, 284, 779, 340, 318, 1813, 287, 262, 2205, 8841, 6903, 286, 262, 15348, 37, 19524, 1398, 198, 2, 3387, 989, 597, 5434, 198, 2, 717, ...
3.324296
959
import django from django.core.handlers.wsgi import WSGIHandler def get_wsgi_application(): """ The public interface to Django's WSGI support. Return a WSGI callable. Avoids making django.core.handlers.WSGIHandler a public API, in case the internal WSGI implementation changes or moves in the...
[ 11748, 42625, 14208, 201, 198, 6738, 42625, 14208, 13, 7295, 13, 4993, 8116, 13, 18504, 12397, 1330, 25290, 18878, 25060, 201, 198, 201, 198, 201, 198, 4299, 651, 62, 18504, 12397, 62, 31438, 33529, 201, 198, 220, 220, 220, 37227, 201, ...
2.864286
140
''' @Krishna Somandepalli - July 2017 Train a simple deep VGG-style CNN to predict race from face. The race databases were constructed from here: https://docs.google.com/spreadsheets/d/16XkCRkipjKMGVZ1GQXG3ZOgUgtcYewbfIYgezlmM9Gc/edit#gid=0 5 race classes: caucasian, african, eastasian, asianindian, latino (nativeamer...
[ 7061, 6, 198, 31, 42, 37518, 2616, 9995, 392, 538, 36546, 532, 2901, 2177, 198, 198, 44077, 257, 2829, 2769, 569, 11190, 12, 7635, 8100, 284, 4331, 3234, 422, 1986, 13, 198, 464, 3234, 20083, 547, 12006, 422, 994, 25, 3740, 1378, 31...
2.457586
4,574
import abc import functools import logging import re import subprocess try: import magic except ImportError: magic = None import html.parser from bs4 import BeautifulSoup import lxml.etree as etree logger = logging.getLogger(__name__) @functools.total_ordering class PlainText(DocumentParser): """ ...
[ 11748, 450, 66, 198, 11748, 1257, 310, 10141, 198, 11748, 18931, 198, 11748, 302, 198, 11748, 850, 14681, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 5536, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 5536, 796, 6045, 198, 198...
3.130137
146
# Copyright 2010 Google Inc. # # 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, merge, publish, dis- # trib...
[ 2, 15069, 3050, 3012, 3457, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 2, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 198, 2, 366, 25423, 12340, 284, 17...
3.695096
469
import sys, fmdata """ Simple script to extract a 'test' data set from a real '.dat' file. """ f = open(sys.argv[1], "r") d = fmdata.readFromDatFile(f) f.close() linenums = [] for x in xrange(0, d.nx, 2): for y in xrange(0, d.ny, 2): for z in xrange(0, d.nz, 6): linenums.append(x*d.ny*d.nz +...
[ 198, 11748, 25064, 11, 277, 76, 7890, 198, 198, 37811, 198, 26437, 4226, 284, 7925, 257, 705, 9288, 6, 1366, 900, 422, 257, 1103, 45302, 19608, 6, 2393, 13, 198, 37811, 198, 198, 69, 796, 1280, 7, 17597, 13, 853, 85, 58, 16, 4357,...
2.098592
284
from __future__ import unicode_literals import copy from . import models as conference_models class ConferenceTestingMixin(object): """ This is a simple mixin that provides helper methods for initializing fully setup conference objects and related models like SessionKinds. """ _registered_confer...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 4866, 198, 198, 6738, 764, 1330, 4981, 355, 4495, 62, 27530, 628, 198, 4871, 8785, 44154, 35608, 259, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 22...
2.465214
1,193
import configparser def config(section, file='database.ini'): """parses through a file and returns configuration settings for a given section in an INI file Args: section (str) - name of the section in the configuration INI file file (str) - file name of INI file Returns: ...
[ 11748, 4566, 48610, 198, 198, 4299, 4566, 7, 5458, 11, 2393, 11639, 48806, 13, 5362, 6, 2599, 198, 220, 220, 220, 37227, 79, 945, 274, 832, 257, 2393, 290, 5860, 8398, 6460, 329, 257, 1813, 2665, 287, 281, 3268, 40, 2393, 198, 220, ...
2.757895
285
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import logging import os import pytest from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 @pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.wifi def test_examples_protocol_http...
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33160, 20386, 601, 361, 11998, 357, 2484, 272, 20380, 8, 7375, 42513, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 791, 43085, 6375, 12624, 15, 12, 16, 13, 15, 198, 11748, 18931, 198, ...
2.399123
456
from fastapi import APIRouter, Depends, HTTPException, Body from fastapi.security import OAuth2PasswordRequestForm from starlette.status import HTTP_400_BAD_REQUEST # custom defined from app.models.user import UserCreate, User, TokenResponse, UserListResponse, UserCreateRequest, RolePatchRequest, \ RoleCreateModel,...
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 2129, 2412, 11, 14626, 16922, 11, 12290, 198, 6738, 3049, 15042, 13, 12961, 1330, 440, 30515, 17, 35215, 18453, 8479, 198, 6738, 3491, 21348, 13, 13376, 1330, 14626, 62, 7029, 62, 33, 2885...
2.309345
931
""" You should not make an instance of the Client class yourself, rather you should listen for new connections with :meth:`~websocket.server.WebSocketServer.connection` >>> @socket.connection >>> async def on_connection(client: Client): ... # Here you can use the client, register callbacks on it or send it messag...
[ 37811, 198, 1639, 815, 407, 787, 281, 4554, 286, 262, 20985, 1398, 3511, 11, 2138, 345, 815, 6004, 329, 649, 8787, 351, 220, 198, 25, 76, 2788, 25, 63, 93, 732, 1443, 5459, 13, 15388, 13, 13908, 39105, 10697, 13, 38659, 63, 198, 1...
2.694993
1,518
import json import os import re from os.path import relpath from time import sleep from deployment_helpers.aws.iam import create_s3_access_credentials from deployment_helpers.aws.rds import get_full_db_credentials from deployment_helpers.aws.s3 import create_data_bucket from deployment_helpers.constants impor...
[ 11748, 33918, 201, 198, 11748, 28686, 201, 198, 11748, 302, 201, 198, 6738, 28686, 13, 6978, 1330, 823, 6978, 201, 198, 6738, 640, 1330, 3993, 201, 198, 201, 198, 6738, 14833, 62, 16794, 364, 13, 8356, 13, 1789, 1330, 2251, 62, 82, ...
2.895981
1,269
# -*- coding: UTF-8 -*- from __future__ import unicode_literals from lino_book.projects.docs.settings.demo import * SITE = Site(globals())
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 300, 2879, 62, 2070, 13, 42068, 13, 31628, 13, 33692, 13, 9536, 78, 1330, 1635, 198, 198, 50, ...
2.660377
53
import db from flask import session USERNAME_COOKIE = 'username' ACCESS_TOKEN_COOKIE = 'access_token' ACCESS_TOKEN_SECRET_COOKIE = 'token_secret' def is_same(target_user): """Checks that the logged in user is the same user as target_user.""" if not is_logged_in(): return False return target_user...
[ 11748, 20613, 198, 198, 6738, 42903, 1330, 6246, 628, 198, 29904, 20608, 62, 34, 15308, 10008, 796, 705, 29460, 6, 198, 26861, 7597, 62, 10468, 43959, 62, 34, 15308, 10008, 796, 705, 15526, 62, 30001, 6, 198, 26861, 7597, 62, 10468, 4...
2.45614
399
import torch import torch.optim as optim import torch.multiprocessing from torch.cuda.amp import GradScaler from torch.cuda.amp import autocast as autocast # 自动混合精度,提高计算速度,降低显存使用 from torch.utils.data import DataLoader from torchvision import transforms from models.model_with_tcn_big import Model from models.loss_ker...
[ 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 16680, 541, 305, 919, 278, 198, 6738, 28034, 13, 66, 15339, 13, 696, 1330, 17701, 3351, 36213, 198, 6738, 28034, 13, 66, 15339, 13, 696, 1330, 1960, 420, 45...
2.454968
1,077
# Copyright 2017 Lajos Gerecs, Janos Czentye # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 2177, 406, 1228, 418, 402, 567, 6359, 11, 2365, 418, 327, 89, 3787, 68, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, ...
2.575421
3,149
from django.contrib.auth.mixins import LoginRequiredMixin as LoginRequired from django.contrib.auth import logout, authenticate from django.contrib.auth import update_session_auth_hash from django.views.generic import FormView, DeleteView from django.core.urlresolvers import reverse_lazy from django.utils.translation i...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 355, 23093, 37374, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 2604, 448, 11, 8323, 5344, 198, 6738, 42625, 14208, 13, 3642, 822...
3.414747
217
# Copyright (c) 2012, 2013 Ricardo Andrade # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from scipy import stats, special import scipy as sp import gp_transformations from noise_distributions import NoiseDistribution from scipy import stats, integrate from scipy.special import gammaln,...
[ 2, 15069, 357, 66, 8, 2321, 11, 2211, 38847, 843, 27585, 198, 2, 49962, 739, 262, 347, 10305, 513, 12, 565, 682, 5964, 357, 3826, 38559, 24290, 13, 14116, 8, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, ...
2.040763
5,348
# Faça um programa que tenha uma função chamada contador(), que receba três parâmetros: início, fim e passo e realize # a contagem. # Seu programa tem que realizar três contagens através da função criada: # a) De 1 até 10, de 1 em 1 # b) De 10 até 0, de 2 em 2 # c) Uma contagem personalizada. from time import sleep ...
[ 2, 18350, 50041, 23781, 1430, 64, 8358, 3478, 3099, 334, 2611, 1257, 16175, 28749, 442, 321, 4763, 542, 7079, 22784, 8358, 1407, 7012, 491, 25792, 82, 1582, 22940, 4164, 4951, 25, 287, 8836, 66, 952, 11, 277, 320, 304, 1208, 78, 304, ...
2.367647
272
# -*- coding: utf-8 -*- import click @click.group() from .merge import * from .dedup import * from .compile_step_stats import * from .stats_percentage import * from .sum_stats import * from .bt2_log_to_csv import * if __name__ == "__main__": cli()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 3904, 198, 198, 31, 12976, 13, 8094, 3419, 198, 198, 6738, 764, 647, 469, 220, 220, 220, 1330, 1635, 198, 6738, 764, 9395, 929, 1330, 1635, 198, 6738, 764, 5589...
2.539216
102
#!/usr/bin/env python ''' A solution to a ROSALIND bioinformatics problem. Problem Title: Finding a Shared Motif Rosalind ID: LCSM Rosalind #: 014 URL: http://rosalind.info/problems/lcsm/ ''' from scripts import ReadFASTA def LongestSubstring(string_list): '''Extracts all substrings from the first string in a list,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 32, 4610, 284, 257, 48263, 1847, 12115, 13401, 259, 18982, 873, 1917, 13, 198, 198, 40781, 11851, 25, 27063, 257, 39403, 6543, 361, 198, 35740, 282, 521, 4522, 25, 38217,...
2.738866
494
from tools2Dgauss import * from figPlots import * ### PLOTS ARE LISTED FIRST ### COMPUTATIONS ## make 2D chi2 image as a function of X position and counts def gauss2Dastrom(muX, muY, alpha, A, Bkgd, Xpixels, Ypixels): """2D circular gaussian + background""" r = np.sqrt((Xpixels-muX)**2 + (Ypixels-muY)...
[ 6738, 4899, 17, 35, 4908, 1046, 1330, 1635, 198, 6738, 2336, 3646, 1747, 1330, 1635, 628, 198, 21017, 9297, 33472, 15986, 39498, 1961, 31328, 628, 198, 21017, 24301, 3843, 18421, 220, 628, 198, 2235, 787, 362, 35, 33166, 17, 2939, 355, ...
2.312821
390
# pylint: disable=no-member import torch from models import AutoEncoder PATH_TO_EMBEDDER = 'neural/checkpoints/ae-512-224x224-loss-0.024.pth'
[ 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 19522, 198, 198, 11748, 28034, 198, 198, 6738, 4981, 1330, 11160, 27195, 12342, 198, 198, 34219, 62, 10468, 62, 3620, 33, 1961, 14418, 796, 705, 710, 1523, 14, 9122, 13033, 14, 3609, 12, 2...
2.517241
58
import os import wx import time
[ 11748, 28686, 198, 11748, 266, 87, 198, 11748, 640, 628 ]
3.3
10
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 12131, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
2.800615
5,206
import torch, math import torch.nn as nn # B: batch size # T: max sequence length # E: word embedding size # C: conn embeddings size # H: hidden size # Y: output size # N_dir: num directions # N_layer: num layers # L_i: length of sequence i ################ # Model Layers # ################ ################ # I...
[ 11748, 28034, 11, 10688, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 2, 347, 25, 15458, 2546, 198, 2, 309, 25, 3509, 8379, 4129, 198, 2, 412, 25, 1573, 11525, 12083, 2546, 198, 2, 327, 25, 48260, 11525, 67, 654, 2546, 19...
3.311321
106
from os.path import basename import torch from commode_utils.callback import PrintEpochResultCallback, UploadCheckpointCallback from omegaconf import DictConfig from pytorch_lightning import LightningModule, LightningDataModule, Trainer from pytorch_lightning.callbacks import ModelCheckpoint, EarlyStopping, LearningRa...
[ 6738, 28686, 13, 6978, 1330, 1615, 12453, 198, 198, 11748, 28034, 198, 6738, 725, 1098, 62, 26791, 13, 47423, 1330, 12578, 13807, 5374, 23004, 47258, 11, 36803, 9787, 4122, 47258, 198, 6738, 267, 28917, 7807, 69, 1330, 360, 713, 16934, ...
3.927835
97
import torch import numpy as np from scipy import stats import pandas as pd #when not using ranked output i.e. not explaining the outputs (therefore exlaining the z dimension or mu)
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 9756, 198, 11748, 19798, 292, 355, 279, 67, 628, 628, 198, 2, 12518, 407, 1262, 10307, 5072, 1312, 13, 68, 13, 407, 11170, 262, 23862, 357, 8117, 754, ...
3.518519
54
import pandas as pd import os import wget import pathlib from pathlib import Path PROJECT_DIR = Path(__file__).parent.parent DM_USE_CASES = ["Structured_Fodors-Zagats", "Structured_DBLP-GoogleScholar", "Structured_DBLP-ACM", "Structured_Amazon-Google", "Structured_Walmart-Amazon", "Str...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 266, 1136, 198, 11748, 3108, 8019, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 31190, 23680, 62, 34720, 796, 10644, 7, 834, 7753, 834, 737, 8000, 13, 8000, 198, 23127, ...
2.112903
248
''' https://leetcode.com/problems/longest-nice-substring/ A string s is nice if, for every letter of the alphabet that s contains, it appears both in uppercase and lowercase. For example, "abABB" is nice because 'A' and 'a' appear, and 'B' and 'b' appear. However, "abA" is not because 'b' appears, but 'B' does not. G...
[ 7061, 6, 198, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 6511, 395, 12, 44460, 12, 7266, 8841, 14, 198, 198, 32, 4731, 264, 318, 3621, 611, 11, 329, 790, 3850, 286, 262, 24830, 326, 264, 4909, 11, 340, 3568, 1111, ...
3.022333
403
#!python def contains(text, pattern): """Return a boolean indicating whether pattern occurs in text.""" assert isinstance(text, str), 'text is not a string: {}'.format(text) assert isinstance(pattern, str), 'pattern is not a string: {}'.format(text) # TODO: Implement contains here (iteratively and/or ...
[ 2, 0, 29412, 628, 198, 4299, 4909, 7, 5239, 11, 3912, 2599, 198, 220, 220, 220, 37227, 13615, 257, 25131, 12739, 1771, 3912, 8833, 287, 2420, 526, 15931, 198, 220, 220, 220, 6818, 318, 39098, 7, 5239, 11, 965, 828, 705, 5239, 318, ...
2.62
1,250
import StringIO ### def CompileToAST(init_rule, stmt, cmodule): ''' Used by AST node during transformation to create new AST nodes ''' infile = StringIO.StringIO(stmt) import striga.compiler.scanner as scanner tokens = scanner.Scan(infile.readline) import striga.compiler.astbuilder as astbuilde...
[ 11748, 10903, 9399, 201, 198, 201, 198, 21017, 201, 198, 201, 198, 4299, 3082, 576, 2514, 11262, 7, 15003, 62, 25135, 11, 336, 16762, 11, 269, 21412, 2599, 201, 198, 197, 7061, 6, 201, 198, 38052, 416, 29273, 10139, 1141, 13389, 284, ...
2.658683
167
from ..betterbot import Member name = 'avatar'
[ 6738, 11485, 27903, 13645, 1330, 10239, 198, 198, 3672, 796, 705, 615, 9459, 6, 628 ]
3.266667
15
# Author: Barbaros Cetiner import os import cv2 from lib.infer_detector import Infer import torch import time from tqdm import tqdm import argparse import csv import warnings # Ignore warning messages: warnings.filterwarnings("ignore") if __name__ == '__main__': opt = get_args() infer(opt)
[ 2, 6434, 25, 45952, 418, 327, 316, 7274, 198, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 6738, 9195, 13, 259, 2232, 62, 15255, 9250, 1330, 554, 2232, 198, 11748, 28034, 198, 11748, 640, 198, 6738, 256, 80, 36020, 1330, 256, 80...
2.809091
110
# -*- coding: utf-8 -*- ''' Created on Sep 24, 2013 @author: jin ''' from django.db import models import re from django.core import validators from django.contrib.auth.models import User
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 41972, 319, 8621, 1987, 11, 2211, 198, 198, 31, 9800, 25, 474, 259, 198, 7061, 6, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 11748, 302, 198, ...
2.613333
75
from sofi.ui import Small
[ 6738, 523, 12463, 13, 9019, 1330, 10452, 198 ]
3.25
8
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from PyQt5.Qt import * if __name__ == '__main__': app = QApplication([]) mw = MainWindow() mw.show() app.exec()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 541, 21879, 1077, 6, 628, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 1330, 1635, ...
2.134021
97
# # ovirt-engine-setup -- ovirt engine setup # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # import gettext from otopi import util from otopi import plugin from ovirt_engine_setup.dwh import constants as odwhcons from ovirt_engine_setup.engine import constants as oenginecons from ovirt_engin...
[ 2, 198, 2, 19643, 2265, 12, 18392, 12, 40406, 1377, 19643, 2265, 3113, 9058, 198, 2, 198, 2, 15069, 267, 53, 2265, 46665, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 628, 198, 11748,...
3.059603
151
#encoding:utf-8 import importlib import time from datetime import datetime import random import logging from utils import SupplyResult from utils.get_all_admins import get_admins_list from utils.tech import get_dev_channel, get_all_submodules, get_last_members_cnt subreddit = 'all' t_channel = get_dev_channel()
[ 2, 12685, 7656, 25, 40477, 12, 23, 198, 198, 11748, 1330, 8019, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 4738, 198, 11748, 18931, 198, 198, 6738, 3384, 4487, 1330, 22663, 23004, 198, 6738, 3384, 4487, 13, ...
3.117647
102
from contextlib import contextmanager import os import tempfile @contextmanager def safewrite(path, mode='w'): """ Open a temporary file and replace it with `path` upon close. Examples -------- .. Run the code below in a clean temporary directory: >>> getfixture('cleancwd') >>> with ...
[ 6738, 4732, 8019, 1330, 4732, 37153, 198, 11748, 28686, 198, 11748, 20218, 7753, 628, 198, 31, 22866, 37153, 198, 4299, 1932, 413, 6525, 7, 6978, 11, 4235, 11639, 86, 6, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4946, 257, ...
2.211982
651
#!/usr/bin/env python3 import os import sys import argparse import json from random import randint MAXINT = sys.maxsize MININT = -sys.maxsize ROW_SIZE_SAMPLE_POINTS = 1024 if __name__ == "__main__": main() """ wbs_dir=/ufs/bogdan/work/master-project/public_bi_benchmark-master_project/benchmark max_sample_s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 6738, 4738, 1330, 43720, 600, 628, 198, 22921, 12394, 796, 25064, 13, 9806, 7857, 198, 23678, 1...
2.640662
423
version = '1.6.0' git_version = 'b0d483c1266e6822c730d35b39bff3d9b92c6648'
[ 198, 9641, 796, 705, 16, 13, 21, 13, 15, 6, 198, 18300, 62, 9641, 796, 705, 65, 15, 67, 38783, 66, 1065, 2791, 68, 3104, 1828, 66, 43916, 67, 2327, 65, 2670, 65, 487, 18, 67, 24, 65, 5892, 66, 21, 34287, 6, 198 ]
1.727273
44
""" All Measurements are either explicit or implicit """ """ Specific Measurement Enumerations """ ########## GPS ########## ########## Azimuth ########## ########## Elevation ########## ########## Range ########## ########## Linear Relation ########## ########## Velocity ########## ########## Debug GPS of Nei...
[ 198, 37811, 1439, 24291, 902, 389, 2035, 7952, 393, 16992, 37227, 198, 198, 37811, 17377, 24291, 434, 2039, 6975, 602, 37227, 198, 198, 7804, 2235, 15472, 1303, 7804, 2, 198, 198, 7804, 2235, 7578, 320, 1071, 1303, 7804, 2, 198, 198, ...
3.881857
237
import argparse from collections import namedtuple import glob import numpy as np import os import re import struct import json import pandas as pd from collections import OrderedDict from tqdm.auto import tqdm class Tags(object): """ Represents tag name to id mapping from a header file. Preprocessor macr...
[ 11748, 1822, 29572, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 2878, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, ...
2.424528
2,120
# -*- coding: utf-8 -*- # Copyright (c) 2019-2021 Ramon van der Winkel. # All rights reserved. # Licensed under BSD-3-Clause-Clear. See LICENSE file for details. """ Django local settings for the NhbApps project. This file is included from settings.py and contains specific settings that can be changed...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 220, 15069, 357, 66, 8, 13130, 12, 1238, 2481, 7431, 261, 5719, 4587, 7178, 7750, 13, 198, 2, 220, 1439, 2489, 10395, 13, 198, 2, 220, 49962, 739, 347, 10305...
2.633737
1,073
"""Universal configurator. Allows the custom project to have configuration written in TOML or JSON file and easily be converted to the class with same hierarchy of values. """ import json import pytomlpp import libnacl.secret as crypter from pathlib import Path from libnacl.utils import load_key from typing import Un...
[ 37811, 38747, 4566, 333, 1352, 13, 220, 198, 198, 34934, 262, 2183, 1628, 284, 423, 8398, 3194, 287, 41526, 43, 393, 198, 40386, 2393, 290, 3538, 307, 11513, 284, 262, 1398, 351, 976, 18911, 198, 1659, 3815, 13, 198, 37811, 198, 11748...
2.337719
1,824
from typing import List, Tuple if __name__ == "__main__": # print(mas([3, 7, 4, 6, 5, 9])) assert max_array_sum([3, 7, 4, 6, 5]) == 13 assert max_array_sum([2, 1, 5, 8, 4]) == 11
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 3601, 7, 5356, 26933, 18, 11, 767, 11, 604, 11, 718, 11, 642, 11, 860, 60, 4008, 198, 220, ...
2.191011
89
# palindrome index checker a = 'hgygsvlfcwnswtuhmyaljkqlqjjqlqkjlaymhutwsnwcwflvsgygh' c = a[::-1] print c l = len(a) - 1 print l for i in range(0, len(a) / 2): if a == a[::-1]: print -1 elif a[i] != a[l - i]: if (a[i + 1] == a[l - i]) and (a[i + 2] == a[l - i - 1]): ...
[ 2, 6340, 521, 5998, 6376, 2198, 263, 201, 198, 201, 198, 201, 198, 64, 796, 705, 71, 1360, 14542, 85, 1652, 66, 675, 2032, 83, 7456, 1820, 282, 73, 74, 13976, 80, 41098, 13976, 80, 42421, 10724, 76, 71, 315, 86, 16184, 86, 66, 8...
1.635659
387
from random import randint, Random import uuid import re import os from pyArango.connection import Connection from pyArango.theExceptions import CreationError from stix2 import parse from stix2arango.exceptions import MergeFailedException SPECIAL_CHARS = '[()]=<>' STRING_CHARS = '"\'' SEPARATOR_CHARS = ' \t' de...
[ 6738, 4738, 1330, 43720, 600, 11, 14534, 198, 11748, 334, 27112, 198, 11748, 302, 198, 11748, 28686, 198, 198, 6738, 12972, 3163, 14208, 13, 38659, 1330, 26923, 198, 6738, 12972, 3163, 14208, 13, 1169, 3109, 11755, 1330, 21582, 12331, 198...
2.285992
1,028
# # PySNMP MIB module ZYXEL-MLD-SNOOPING-PROXY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZYXEL-MLD-SNOOPING-PROXY-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:44:51 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python vers...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 1168, 56, 55, 3698, 12, 5805, 35, 12, 50, 15285, 3185, 2751, 12, 31190, 34278, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45,...
2.600161
13,698
#!/usr/bin/env python import sys import re import numpy as np start=0 filename ='tempController.log' #print (len(sys.argv)) if(len(sys.argv)==2): filename=sys.argv[1] # filename -s start_line for i in range(1,len(sys.argv)): if(sys.argv[i]=='-s'): start=sys.argv[i+1] #print start if(filename[0] != '/'): f = o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 198, 9688, 28, 15, 198, 198, 34345, 796, 6, 29510, 22130, 13, 6404, 6, 198, 2, 4798, 357, 11925, 7, 17597...
2.096187
1,154
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 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, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
from base64 import b64encode, b64decode from pbincli.utils import PBinCLIError import zlib # try import AES cipher and check if it has GCM mode (prevent usage of pycrypto) try: from Crypto.Cipher import AES if not hasattr(AES, 'MODE_GCM'): try: from Cryptodome.Cipher import AES ...
[ 6738, 2779, 2414, 1330, 275, 2414, 268, 8189, 11, 275, 2414, 12501, 1098, 198, 6738, 279, 8800, 44506, 13, 26791, 1330, 30524, 259, 5097, 40, 12331, 198, 11748, 1976, 8019, 198, 198, 2, 1949, 1330, 34329, 38012, 290, 2198, 611, 340, 4...
2.371608
479
# from torch2trt.torch2trt import * # import torch # # @tensorrt_converter('torch.sub') # # def convert_sub(ctx): # # input_a = ctx.method_args[0] # # input_b = ctx.method_args[1] # # output = ctx.method_return # # input_a_trt, input_b_trt = add_missing_trt_tensors(ctx.network, [input_a, input_b]) # # ...
[ 2, 422, 28034, 17, 2213, 83, 13, 13165, 354, 17, 2213, 83, 1330, 1635, 198, 2, 1330, 28034, 198, 198, 2, 1303, 2488, 83, 22854, 17034, 62, 1102, 332, 353, 10786, 13165, 354, 13, 7266, 11537, 198, 2, 1303, 825, 10385, 62, 7266, 7, ...
2.238148
907
import sys import pkg_resources sys.path.insert(0, 'anaconda_lib') sys.path.insert(1, 'anaconda_server') pkg_resources.declare_namespace(__name__)
[ 11748, 25064, 198, 11748, 279, 10025, 62, 37540, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 272, 330, 13533, 62, 8019, 11537, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 705, 272, 330, 13533, 62, 15388, 11537, 198, 35339, 62, ...
2.625
56
samples = [ { "input": { "array": [ [1, 2, 3, 4], [12, 13, 14, 5], [11, 16, 15, 6], [10, 9, 8, 7], ], }, "output": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], }, { "input": { ...
[ 82, 12629, 796, 685, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 15414, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 18747, 1298, 685, 198, 220, 220, 220, 220, 220, 220, ...
1.378505
428
import sys import os import re import time import json import itertools
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 340, 861, 10141, 628 ]
3.65
20
from adventofcode2021.utils.abstract import FileReaderSolution
[ 6738, 19980, 1659, 8189, 1238, 2481, 13, 26791, 13, 397, 8709, 1330, 9220, 33634, 46344, 628, 628 ]
3.882353
17
MOCK_USERS = [ {"email": 'test@test.com', "password": 'test'} ] MOCK_TABLES = [{"_id": "1", "number": "1", "owner": "test@test.com", "url": "/newrequest"}]
[ 44, 11290, 62, 2937, 4877, 796, 685, 198, 220, 220, 220, 220, 19779, 12888, 1298, 705, 9288, 31, 9288, 13, 785, 3256, 366, 28712, 1298, 705, 9288, 6, 92, 198, 60, 198, 44, 11290, 62, 5603, 9148, 1546, 796, 685, 4895, 62, 312, 1298...
2.022727
88
# noqa from .provider import ( get_cached_combined, get_cached_etherscan_api, get_cached_local_interfaces ) from .storage import ( ABIKey, FuncStorage ) __all__ = [ 'get_cached_combined', 'get_cached_etherscan_api', 'get_cached_local_interfaces', 'ABIKey', 'FuncStorage' ]
[ 2, 645, 20402, 198, 6738, 764, 15234, 1304, 1330, 357, 198, 220, 220, 220, 651, 62, 66, 2317, 62, 24011, 1389, 11, 198, 220, 220, 220, 651, 62, 66, 2317, 62, 6750, 35836, 62, 15042, 11, 198, 220, 220, 220, 651, 62, 66, 2317, 62,...
2.233577
137
''' -------------------------------------------------- File: app.py -------------------------------------------------- Author: Deloitte Australia 2021 Description: Defines the application that will provide the API for the recommendation engines Endpoints: #TODO Run with $ uvicorn src.app:app --reload --host 0.0.0....
[ 7061, 6, 198, 47232, 438, 198, 8979, 25, 598, 13, 9078, 198, 47232, 438, 198, 13838, 25, 4216, 78, 2654, 4505, 33448, 198, 198, 11828, 25, 2896, 1127, 262, 3586, 326, 481, 2148, 262, 7824, 329, 262, 15602, 11874, 198, 198, 12915, 13...
3.160356
449
from flask import request from flask_restful import Resource from flask_jwt_extended import jwt_required, get_jwt_identity from app.api.stammdaten.models import SentosaSetting, SentosaUntersuchung, SentosaSettingSchema, SentosaUntersuchungSchema
[ 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 474, 46569, 62, 35827, 11, 651, 62, 73, 46569, 62, 738, 414, 198, 6738, 598, 13, 15042, 13, 301, 6475, 196...
3.121951
82
import unittest from src.Zad1.Password import *
[ 11748, 555, 715, 395, 198, 6738, 12351, 13, 57, 324, 16, 13, 35215, 1330, 1635, 628 ]
3.0625
16
import boto3, json, os '''def put_to_s3(bucket_name, bucket_file_name, temp_creds): # Push temporary credentials to S3 bucket s3 = boto3.resource('s3') result = s3.Object(bucket_name, bucket_file_name).put(Body=str(temp_creds), ServerSideEncryption='AES256') # s3.Object("st-security-audit", "temp-creds...
[ 11748, 275, 2069, 18, 11, 33918, 11, 28686, 198, 198, 7061, 6, 4299, 1234, 62, 1462, 62, 82, 18, 7, 27041, 316, 62, 3672, 11, 19236, 62, 7753, 62, 3672, 11, 20218, 62, 66, 445, 82, 2599, 198, 220, 220, 220, 1303, 23691, 8584, 18...
2.611765
170
#!/usr/bin/env python3 from googleapiclient import discovery from oauth2client.client import GoogleCredentials import argparse import json parser = argparse.ArgumentParser() parser.add_argument("-p", "--project", required=True, help="Project that flights service is deployed in") args = p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 6738, 23645, 499, 291, 75, 1153, 1330, 9412, 201, 198, 6738, 267, 18439, 17, 16366, 13, 16366, 1330, 3012, 34, 445, 14817, 201, 198, 11748, 1822, 29572, 201, 198, ...
2.208955
536
#!/usr/bin/env python import typer from lib import aoc from typing import List SAMPLE = [ 'abc\n\na\nb\nc\n\nab\nac\n\na\na\na\na\n\nb', "abc\n\na\nb\nc\n\nab\nac\n\na\na\na\na\n\nb", ] if __name__ == '__main__': typer.run(Day06().run) # vim:ts=2:sw=2:expandtab
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1259, 525, 198, 6738, 9195, 1330, 257, 420, 198, 6738, 19720, 1330, 7343, 198, 198, 49302, 16437, 796, 685, 198, 220, 705, 39305, 59, 77, 59, 2616, 59, 46803, 59, 10782, ...
1.902778
144
''' Copyright (c) 2013 by JustAMan at GitHub 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, merge, publish, dist...
[ 7061, 6, 198, 15269, 357, 66, 8, 2211, 416, 2329, 2390, 272, 379, 21722, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 198, 5661, 3788, 290, 3917, 10314, 3696, 357, 1169, 366...
2.860731
876
#!/usr/bin/env python import sys, math from numpy import * """ As datatrans3a.py, but splitting the whole file at once, store the numbers in a one-dimensional NumPy and then reshaping the array appropriately. """ try: infilename = sys.argv[1]; outfilename = sys.argv[2] except: print "Usage:",sys.argv[0], ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 11, 10688, 198, 6738, 299, 32152, 1330, 1635, 198, 37811, 198, 1722, 4818, 265, 26084, 18, 64, 13, 9078, 11, 475, 26021, 262, 2187, 2393, 379, 1752, 11, 198, 8095, 262, ...
2.591696
289
# coding: utf-8 from __future__ import absolute_import from .account_service_api import AccountServiceApi from .application_user_service_api import ApplicationUserServiceApi from .card_processing_service_api import CardProcessingServiceApi from .charge_attempt_service_api import ChargeAttemptServiceApi from .charge_f...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 764, 23317, 62, 15271, 62, 15042, 1330, 10781, 16177, 32, 14415, 198, 6738, 764, 31438, 62, 7220, 62, 15271, 62, 15042, 1330, ...
3.906658
1,457
# These need to be at the top to allow for running on cluster import os import sys cwd = os.getcwd() sys.path.append(cwd) # Other imports import numpy as np import json import math from h_buildModels import build_par_inject_model, build_incv3_feat, build_resnet50_feat, build_brownlee_model, \ build_at...
[ 2, 2312, 761, 284, 307, 379, 262, 1353, 284, 1249, 329, 2491, 319, 13946, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 201, 198, 66, 16993, 796, 28686, 13, 1136, 66, 16993, 3419, 201, 198, 17597, 13, 6978, 13, 33295, 7,...
2.952183
481
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals class OSType(Enum): """ Action descriptor type """ REFERENCE = b'obj ' DESCRIPTOR = b'Objc' LIST = b'VlLs' DOUBLE = b'doub' UNIT_FLOAT = b'UntF' UNIT_FLOATS = b'UnFl' STRING = b'TEXT' ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 628, 628, 628, 628, 628, 628, 198, 4871, 440, 2257, 2981, 7, 4834, 388, 2599, 198, 220...
2.027221
698
# -*- coding: utf-8 -*- """ SolarDB configuration. """ import argparse import datetime import logging import pickle as pk from enum import Enum from io import StringIO from typing import Any, Dict, Union, TextIO, TypeVar, List, Optional from solardb.common.cache import Cache def split_with_keywords(to_split: [str]...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 38825, 11012, 8398, 13, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 2298, 293, 355, 279, 74, 198, 6...
2.370181
5,862
import numpy as np import numpy.random as rnd import matplotlib.pyplot as plt # data length m = 100 # param: [0.5, 1, 2] X = 6 * np.random.rand(m, 1) - 3 noise = np.random.randn(m, 1) # polynomial y = 0.5 * X**2 + X + 2 + noise # true param to be estimated coeff = [0.5, 1, 2] # tmp = X*X # tmp[0] # X...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 299, 32152, 13, 25120, 355, 374, 358, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 201, 198, 2, 1366, 4129, 201, 198, 76, 796, 1802, 201, 198, 2, 5772, ...
2.496201
1,316
# -*- coding: utf-8 -*- array = [1,2,3,4,5,6] # print map(sum_1, array) print reduce(add, array) print filter(big, array)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 18747, 796, 685, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 60, 198, 198, 2, 3601, 3975, 7, 16345, 62, 16, 11, 7177, 8, 628, 198, 4798, 4646, 7, 2860, 11, 717...
2.118644
59
# -*- coding: utf-8 -*- from .....Functions.Plot.plot_A_fft2 import plot_A_fft2 as plot_A_fft2_fct def plot_A_fft2( self, Data_str, is_phase=False, is_deg=True, is_elecorder=False, is_spaceorder=False, freq_max=20000, r_max=100, mag_max=None, is_norm=False, unit="SI", ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11485, 986, 24629, 2733, 13, 43328, 13, 29487, 62, 32, 62, 487, 83, 17, 1330, 7110, 62, 32, 62, 487, 83, 17, 355, 7110, 62, 32, 62, 487, 83, 17, 62, 6...
2.25393
827
""" Define the API functions """ from time import time from fastapi import status, Query from fastapi.responses import JSONResponse from api import m_f from api.lookup import m_entity_search from api_f import app, api_info from api_f.f_models import * @app.get("/", tags=["introduction"]) @app.get( "/entity_in...
[ 37811, 198, 7469, 500, 262, 7824, 5499, 198, 37811, 198, 6738, 640, 1330, 640, 198, 198, 6738, 3049, 15042, 1330, 3722, 11, 43301, 198, 6738, 3049, 15042, 13, 16733, 274, 1330, 19449, 31077, 198, 6738, 40391, 1330, 285, 62, 69, 198, 6...
2.608333
360
import logging from d2ix import RawData logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 288, 17, 844, 1330, 16089, 6601, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
2.962963
27
# everything specific to an environment OLD_TALKS_SERVER = None OLD_TALKS_USER = None OLD_TALKS_PASSWORD = None # default values for HTTP API calls API_OX_PLACES_URL = 'https://api.m.ox.ac.uk/places/' API_OX_DATES_URL = 'https://api.m.ox.ac.uk/dates/' TOPICS_URL = 'https://talks-dev.oucs.ox.ac.uk/topics/'
[ 2, 2279, 2176, 284, 281, 2858, 198, 198, 15173, 62, 51, 1847, 27015, 62, 35009, 5959, 796, 6045, 198, 15173, 62, 51, 1847, 27015, 62, 29904, 796, 6045, 198, 15173, 62, 51, 1847, 27015, 62, 47924, 54, 12532, 796, 6045, 198, 198, 2, ...
2.376923
130
""" db_util 180903_2140 180809_1100 171215_1150 """ import logging import copy from tittles import mod _t = mod.Mod("tittles.tittles") _dbc = mod.Mod("dbcore") # pylint: disable-msg=C0103 if __name__ == "__main__": logging.basicConfig(format="%(levelname)s: %(module)s:%(lineno)d(%(funcName)s)...
[ 37811, 20613, 62, 22602, 1248, 2931, 3070, 62, 17, 15187, 198, 220, 220, 220, 220, 220, 220, 220, 11546, 34583, 62, 42060, 198, 220, 220, 220, 220, 220, 220, 220, 1596, 1065, 1314, 62, 1157, 1120, 198, 37811, 198, 11748, 18931, 198, ...
2.088812
867
# -*- coding:utf-8 -*- from distutils.core import setup setup( name="thenextquant", version="0.0.6", packages=["quant", "quant.utils", "quant.platform", ], description="Quant Trader Framework", url="https://github.com/TheNextQuant/thenextquant", autho...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 1169, 19545, 40972, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 15, 13...
2.105263
247
#!/usr/bin/env python from pwn import * SERVER = "mustard.stt.rnl.tecnico.ulisboa.pt" PORT = 10093 context.arch = "i386" context.os = "linux" e = ELF("bin") SYM = e.symbols["target"] PTR = p32(SYM) PADD = 64 POS = 7 s = remote(SERVER, PORT) s.sendline(PTR + "%{}x".format(PADD) + "%{}$n".format(POS)) print(s.recvun...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 279, 675, 1330, 1635, 198, 198, 35009, 5959, 796, 366, 27238, 446, 13, 301, 83, 13, 81, 21283, 13, 660, 31522, 3713, 13, 377, 271, 48614, 13, 457, 1, 198, 15490, 796, 1802, 6...
2.098765
162
from classes.cell_trace_config import CellTraceConfig, cell_trace_config_filter import logging import numpy as np from scipy.stats import mannwhitneyu
[ 6738, 6097, 13, 3846, 62, 40546, 62, 11250, 1330, 12440, 2898, 558, 16934, 11, 2685, 62, 40546, 62, 11250, 62, 24455, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 582, 77, 1929, 270,...
3.319149
47
from microbit import * wheels=[ { 'forward': [9,14,4,18,10,15,6,-2,16,7,-9,-7,1,-6,11,2,-13,-7,-18,-1,3,-10,-14,-21,-5,-3], 'reverse': [18,9,21,13,7,2,-4,6,14,-9,7,10,-6,-1,-10,-14,-7,-2,1,5,-15,-18,3,-3,-16,-11], 'offset': 0 }, { 'forward': [13,24,7,4,2,12,-4,16,4,15,8,11,-11,1,6,-10,-16,-9,3,-8,-5,-17,-12,-...
[ 6738, 4580, 2545, 1330, 1635, 198, 198, 12491, 1424, 41888, 198, 90, 198, 220, 705, 11813, 10354, 685, 24, 11, 1415, 11, 19, 11, 1507, 11, 940, 11, 1314, 11, 21, 12095, 17, 11, 1433, 11, 22, 12095, 24, 12095, 22, 11, 16, 12095, ...
1.673759
846
# Copyright 2020, Battelle Energy Alliance, LLC # ALL RIGHTS RESERVED import sys from CashFlows import CashFlowGroup import _utils as hutils raven_path = hutils.get_raven_loc() sys.path.append(raven_path) class CashFlowUser: """ Base class for objects that want to access the functionality of the CashFlow object...
[ 198, 2, 15069, 12131, 11, 12350, 13485, 6682, 10302, 11, 11419, 198, 2, 11096, 371, 34874, 15731, 1137, 53, 1961, 198, 11748, 25064, 198, 6738, 16210, 7414, 1666, 1330, 16210, 37535, 13247, 198, 11748, 4808, 26791, 355, 289, 26791, 198, ...
2.998899
908
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from .chart import Chart
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, 67, 1330, 12176, 274, 18, 35, 198, 6738, 2603, 29487, 8019, 1330, 12067, 198, 6...
2.958333
48
#!/usr/bin/env python3 """ gps_manage.py Script to control donkey car with GPS navigation. Waypoints are set with GPS coordinates in degrees. Call: gps_manage.py -drive """ # import GPS Planner and other DK parts import donkeycar as dk from gps_parts.gps import GPS from gps_parts.planner import Planner from donkeyca...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 70, 862, 62, 805, 496, 13, 9078, 198, 198, 7391, 284, 1630, 50085, 1097, 351, 15472, 16408, 13, 6378, 13033, 389, 900, 351, 15472, 22715, 287, 7370, 13, 198, 198, 141...
2.406481
1,080
#!/usr/bin/env python # -*- coding: utf-8 -*- """ RLBook.Utils - NeuralNetwork Base Class definition """ import logging from abc import abstractclassmethod, ABCMeta from keras import backend as K from keras.losses import mean_squared_error from keras.models import model_from_json class NeuralNet: """ This clas...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 45715, 10482, 13, 18274, 4487, 198, 198, 12, 47986, 26245, 7308, 5016, 6770, 198, 198, 37811, 198, 11748, 18931, ...
2.461994
1,013
#!/usr/bin/env python3 # Provide `os.walk(1)`. import os # Provide `sys.exit(1)`. import sys STATUS_SUCCESS = 0 SOURCES_BASE = '../../src/' # TODO Stop relying on this. if __name__ == '__main__': run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 220, 220, 44290, 4600, 418, 13, 11152, 7, 16, 8, 44646, 198, 11748, 28686, 198, 198, 2, 220, 220, 44290, 4600, 17597, 13, 37023, 7, 16, 8, 44646, 198, 11748, 25064, 628...
2.23
100
BOT_NAME = "dragon_talon" SPIDER_MODULES = ["dragon_talon.spiders"] NEWSPIDER_MODULE = "dragon_talon.spiders" LOG_LEVEL = "INFO" TWISTED_REACTOR = "twisted.internet.asyncioreactor.AsyncioSelectorReactor" # Crawl responsibly by identifying yourself (and your website) on the user-agent # USER_AGENT = 'tutorial (+http:...
[ 33, 2394, 62, 20608, 796, 366, 14844, 62, 39240, 261, 1, 198, 198, 4303, 41237, 62, 33365, 6239, 1546, 796, 14631, 14844, 62, 39240, 261, 13, 2777, 4157, 8973, 198, 13965, 4303, 41237, 62, 33365, 24212, 796, 366, 14844, 62, 39240, 261...
2.811483
1,045
"""Holds string literals for commands """ START_COMMAND = "start" CLEAR_CHAT_COMMAND = "clearchatwithbot" SHOW_KARMA_COMMAND = 'showkarma' USER_INFO_COMMAND = 'userinfo' CHAT_INFO_COMMAND = 'chatinfo' HISTORY_GRAPH_COMMAND = 'historygraph' SHOW_KARMA_KEYBOARD_COMMAND = 'checkchatkarmas'
[ 37811, 39, 10119, 4731, 4187, 874, 329, 9729, 198, 37811, 198, 2257, 7227, 62, 9858, 44, 6981, 796, 366, 9688, 1, 198, 29931, 1503, 62, 31542, 62, 9858, 44, 6981, 796, 366, 2375, 998, 265, 4480, 13645, 1, 198, 9693, 3913, 62, 42, ...
2.391667
120