content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from cmath import sqrt from statistics import mean import numpy as np import math import cmath import scipy from scipy.optimize import minimize from sympy import Nor import time from scipy.optimize import linprog #1. iterativni algoritem, ki vrne vrednost matrične igre in optimalno strategijo # v obliki v...
[ 6738, 269, 11018, 1330, 19862, 17034, 201, 198, 6738, 7869, 1330, 1612, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 10688, 201, 198, 11748, 269, 11018, 201, 198, 11748, 629, 541, 88, 201, 198, 6738, 629, 541, 88, 13, 400...
2.033333
420
import enum
[ 11748, 33829, 628, 220, 220, 220, 220, 220, 220, 220, 220 ]
1.909091
11
################################################################################ # The MIT License # # Copyright (c) 2019-2021, Prominence AI, 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 So...
[ 29113, 29113, 14468, 198, 2, 383, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 12, 1238, 2481, 11, 10335, 18386, 9552, 11, 3457, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048,...
3.2
765
import logging import socket import uuid from zeroconf import ServiceInfo, Zeroconf logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 17802, 198, 11748, 334, 27112, 198, 198, 6738, 1976, 263, 36221, 69, 1330, 4809, 12360, 11, 37028, 36221, 69, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198 ]
3.125
40
## Mostly from Physical Acoustics V.IIIB - W.P. Mason ed. 1965 [534 M412p] Ch. 1-2 ## Also in Journal of Alloys and Compounds 353 (2003) 74–85 ## Data here for Co3O4 # need to determine units for these values mass = 240.79500/7/1000./6.0221415e23 # average atomic mass in ?kg/atom? N = 1. #number of atoms per un...
[ 2235, 33495, 422, 16331, 4013, 23968, 873, 569, 13, 3978, 9865, 532, 370, 13, 47, 13, 14737, 1225, 13, 17672, 685, 20, 2682, 337, 39226, 79, 60, 609, 13, 352, 12, 17, 220, 201, 198, 2235, 4418, 287, 4913, 286, 1439, 19417, 290, 30...
1.786571
2,085
""" Solver of Black-Scholes PDE using BSDE method or L2-projection of X_T to approximate the conditional expecation E(X_T | F_t) """ import torch import torch.nn as nn import numpy as np import argparse import tqdm import os import math import pandas as pd from lib.bsde_risk_neutral_measure import FBSDE_BlackScholes ...
[ 37811, 198, 50, 14375, 286, 2619, 12, 14874, 4316, 350, 7206, 1262, 24218, 7206, 2446, 393, 406, 17, 12, 16302, 295, 286, 1395, 62, 51, 284, 27665, 262, 26340, 409, 431, 30907, 412, 7, 55, 62, 51, 930, 376, 62, 83, 8, 198, 37811, ...
2.167619
1,575
import struct from collections import defaultdict import darm from elftools.elf.elffile import ELFFile classlist_section_name = '__DATA, __objc_classlist, regular, no_dead_strip' if __name__ == '__main__': import sys if len(sys.argv) < 2: sys.stderr.write('usage: decompile.py </path/to/l...
[ 11748, 2878, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 288, 1670, 198, 6738, 1288, 701, 10141, 13, 7046, 13, 417, 487, 576, 1330, 17852, 5777, 576, 628, 198, 4871, 4868, 62, 5458, 62, 3672, 796, 705, 834, 26947, 11, 11593,...
2.49697
165
import os import subprocess import sys from collections import namedtuple import click from cookiecutter.main import cookiecutter Command = namedtuple("Command", ["name", "full_command", "error_message"]) def init_cmd(url: str) -> None: """ Initializes a contributor package by pulling down the Cookiecutter ...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 3904, 198, 6738, 19751, 8968, 353, 13, 12417, 1330, 19751, 8968, 353, 198, 198, 21575, 796, 3706, 83, 29291, 7203, 21575, ...
2.878652
445
#!/usr/bin/env python3 """ data_processing.py - Task 1: Pun Detection using word2vec and RNN with LSTM cells Author: Dung Le (dungle@bennington.edu) Date: 11/7/2017 """ import xml.etree.ElementTree as ET import gensim import tensorflow as tf import numpy as np from retrained_word2vec import sentences # Lo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 220, 220, 220, 1366, 62, 36948, 13, 9078, 532, 15941, 352, 25, 14944, 46254, 1262, 1573, 17, 35138, 290, 371, 6144, 351, 406, 2257, 44, 4778, 198, 220, 220, 220, 6434...
2.598259
804
import os import re import sys from typing import Pattern from .remappings import Remappings NS_PATTERN: Pattern = re.compile(r'^__ns:=(?P<ns>.*)') MASTER_PATTERN: Pattern = re.compile(r'^__master:=(?P<master>.+)') ADDRESS_PATTERN: Pattern = re.compile(r'^__(ip|hostname):=(?P<address>.+)')
[ 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 198, 6738, 19720, 1330, 23939, 198, 198, 6738, 764, 2787, 39242, 1330, 3982, 39242, 628, 198, 8035, 62, 47, 1404, 31800, 25, 23939, 796, 302, 13, 5589, 576, 7, 81, 6, 61, 834, 5...
2.512605
119
import logging import os import tempfile from functools import wraps import typing import torch import torch.nn as nn import onnx from torch.onnx import TrainingMode from daceml.onnx import ONNXModel from daceml.onnx.shape_inference import infer_shapes class DaceModule(nn.Module): """ A wrapper that converts a ...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 19720, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 319, 77, 87, 198, 6738, 28034, 13, 26...
2.275325
1,155
#!/bin/env python # # Copyright (C) 2014 The Android Open Source Project # # 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 require...
[ 2, 48443, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 34, 8, 1946, 383, 5565, 4946, 8090, 4935, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
2.016418
9,989
import tensorflow as tf # Default hyper-parameters: from tensorflow.contrib.seq2seq import BahdanauAttention, LuongAttention from tacotron.attention import AttentionMode, AttentionScore, LocalLuongAttention model_params = tf.contrib.training.HParams( # Number of unique characters in the vocabulary. vocabular...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 2, 15161, 8718, 12, 17143, 7307, 25, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 13, 41068, 17, 41068, 1330, 13081, 25604, 559, 8086, 1463, 11, 6026, 506, 8086, 1463, 198, 198, 6738, 26...
2.356315
1,726
''' /* * Copyright 2019 Amazon.com, Inc. and its affiliates. All Rights Reserved. * * Licensed under the MIT License. See the LICENSE accompanying this file * for the specific language governing permissions and limitations under * the License. */ ''' from AWSIoTPythonSDK.MQTTLib import DROP_OLDEST from AW...
[ 7061, 6, 198, 11900, 198, 220, 1635, 15069, 13130, 6186, 13, 785, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 220, 1635, 198, 220, 1635, 49962, 739, 262, 17168, 13789, 13, 4091, 262, 38559, 24290, 19249, 428, 2393, ...
2.777106
2,481
# encoding: utf-8 # module renderdoc # from P:\1-Scripts\_Python\Py-Autocomplete\renderdoc.pyd # by generator 1.146 # no doc # imports import enum as __enum from .SwigPyObject import SwigPyObject class ColorBlend(SwigPyObject): """ Describes the blend configuration for a given output target. """ def __eq__(...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 8265, 8543, 15390, 198, 2, 422, 350, 7479, 16, 12, 7391, 82, 59, 62, 37906, 59, 20519, 12, 16541, 42829, 6677, 59, 13287, 15390, 13, 79, 5173, 198, 2, 416, 17301, 352, 13, 20964, 198, 2, ...
2.96288
889
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################# # Copyright Kitware Inc. # # 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 th...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 7804, 4242, 2, 198, 2, 220, 15069, 10897, 1574, 3457, 13, 198, 2, 198, 2, 220, 49962, 739, 262, ...
3.77
300
from textwrap import dedent import pytest from pylox.lox import Lox # Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/for/closure_in_body.lox TEST_SRC = dedent( """\ var f1; var f2; var f3; for (var i = 1; i < 4; i = i + 1) { var j = i; fun f() { ...
[ 6738, 2420, 37150, 1330, 4648, 298, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 279, 2645, 1140, 13, 75, 1140, 1330, 406, 1140, 198, 198, 2, 7308, 2663, 422, 3740, 1378, 12567, 13, 785, 14, 6199, 21559, 14, 3323, 278, 3849, 3866, ...
1.919643
336
import logging import os logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)s: %(levelname)s %(message)s') logging.getLogger("pika").setLevel(logging.WARNING) POSTGRES_USER = os.environ.get('POSTGRES_USER', 'postgres') POSTGRES_PASSWORD = os.environ.get('POSTGRES_PASSWORD','yellow') POSTGRES_HOST = o...
[ 11748, 18931, 198, 11748, 28686, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 11, 5794, 11639, 4, 7, 292, 310, 524, 8, 82, 4064, 7, 3672, 8, 82, 25, 4064, 7, 5715, 3672, 8, 82, 4064, 7, 20500, 8, ...
2.38961
231
#!/usr/bin/env python import os import argparse import subprocess import logging import sys from uuid import uuid4 from string import maketrans from collections import namedtuple from collections import defaultdict as dd import pysam import numpy as np from bx.intervals.intersection import Intersecter, Interval FO...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 6738, 4731, 1330, 285, 46...
2.744898
392
from tkinter import * root = Tk() text1 = Text(width=20,height=1) label1 = Label(width=20) but1 = Button(width=20, bg='#ff0000') but2 = Button(width=20, bg='#ff7d00') but3 = Button(width=20, bg='#ffff00') but4 = Button(width=20, bg='#00ff00') but5 = Button(width=20, bg='#007dff') but6 = Button(width=20, bg...
[ 6738, 256, 74, 3849, 1330, 1635, 201, 198, 201, 198, 15763, 796, 309, 74, 3419, 201, 198, 201, 198, 5239, 16, 796, 8255, 7, 10394, 28, 1238, 11, 17015, 28, 16, 8, 201, 198, 18242, 16, 796, 36052, 7, 10394, 28, 1238, 8, 201, 198,...
2.096774
372
import tensorflow as tf t
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 83 ]
2.888889
9
from app.api.services import domain_service from app.api.business.errors import DomainCriteriaInvalidDomainException, DomainCriteriaInvalidRateException
[ 6738, 598, 13, 15042, 13, 30416, 1330, 7386, 62, 15271, 198, 6738, 598, 13, 15042, 13, 22680, 13, 48277, 1330, 20021, 18559, 5142, 44651, 43961, 16922, 11, 20021, 18559, 5142, 44651, 32184, 16922, 628 ]
4.529412
34
from .core import FuzzySet # fuzzc.memberships
[ 6738, 764, 7295, 1330, 376, 4715, 88, 7248, 628, 198, 2, 26080, 66, 13, 30814, 5748, 628 ]
2.941176
17
from unittest import TestCase from helloworld.greeter import say_hello
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 5968, 322, 1764, 13, 16694, 2357, 1330, 910, 62, 31373, 628 ]
3.47619
21
from __future__ import annotations from typing import Any, Union, List import numpy as np from nptyping import NDArray from .core.ElementInGFpn import ElementInGFpn from .core import types, modulus, validator, primitive_roots as pr class GFpn: """Galois Field: GF(p^n). Args: p (int): A prime number...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 4377, 11, 4479, 11, 7343, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 457, 4464, 278, 1330, 25524, 19182, 198, 198, 6738, 764, 7295, 13, 20180, 818, 21713, 21999...
2.150206
972
from setuptools import setup, find_packages from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md')) as f: description = f.read() setup( name='avaland', version='0.1.0-alpha', description='Avaland is a command-line program to download music...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 28686, 1330, 3108, 198, 198, 14421, 62, 15908, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 198, 4480, 1280, 7, 6978, 13,...
2.616993
765
# Copyright (c) Microsoft Corporation # Licensed under the MIT License. import os import copy import io import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torchvision import random from backwardcompatibilityml import loss as bcloss from backwardcomp...
[ 2, 15069, 357, 66, 8, 5413, 10501, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 33245, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, ...
3.607656
209
import sys from fabric.api import task @task def test_fab_file(): """A test task to show correct file has been loaded""" @task def identity(): """Which version of fabfile am I using""" try: import fab_support version = f"fab_support version {fab_support._version.__version__}" except...
[ 11748, 25064, 198, 6738, 9664, 13, 15042, 1330, 4876, 628, 198, 31, 35943, 198, 4299, 1332, 62, 36434, 62, 7753, 33529, 198, 220, 220, 220, 37227, 32, 1332, 4876, 284, 905, 3376, 2393, 468, 587, 9639, 37811, 628, 198, 31, 35943, 198, ...
2.849315
146
# import nltk_parser test_sentence = [['Павел', 'Павлуша'], [','], ['Александр', 'Алекс'], ['и', 'а', 'о'], ['Василий'], ['пошли'], ['гулять'], ['.']] test_tree = MPT_forming(test_sentence) print(test_tree.kids.value, test_tree.kids.kids, test_tree.kids.brother)
[ 2, 1330, 299, 2528, 74, 62, 48610, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 9288, 62, 34086, 594, 796, 16410, 6, 140, 253, 16142, 38857, 16843, 30143, 3256, 705, 140, 253, 16142, 38857, 30143, 35072, 141, 230, 16142, 6, 435...
1.754839
155
# class of learning agent import tensorflow as tf import numpy as np from nn import NeuralNet import random import math class Agent(object): # initialize with data # select an action based on policy # perform action to get next state # compute the reward # REWARD 1: fast skipping # ...
[ 201, 198, 2, 1398, 286, 4673, 5797, 201, 198, 11748, 11192, 273, 11125, 355, 48700, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 299, 77, 1330, 47986, 7934, 201, 198, 11748, 4738, 201, 198, 11748, 10688, 201, 198, 201, 198...
2.766784
283
import pygame as pg import numpy as np from time import time from settings import * # test object
[ 11748, 12972, 6057, 355, 23241, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 640, 1330, 640, 201, 198, 6738, 6460, 1330, 1635, 201, 198, 201, 198, 220, 220, 220, 1303, 1332, 2134, 201, 198, 201, 198, 201, 198, 201, 198, ...
2.659091
44
from .base import ( ASCENDING, DESCENDING, ) from .client import MontyClient from .database import MontyDatabase from .collection import MontyCollection from .cursor import ( MontyCursor, CursorType ) from .configure import MontyConfigure from . import utils from .version import ( version, ver...
[ 6738, 764, 8692, 1330, 357, 198, 220, 220, 220, 25400, 10619, 2751, 11, 198, 220, 220, 220, 22196, 34, 10619, 2751, 11, 198, 8, 198, 6738, 764, 16366, 1330, 5575, 88, 11792, 198, 6738, 764, 48806, 1330, 5575, 88, 38105, 198, 6738, 7...
2.442857
280
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # @author: Manuel Gunther <siebenkopf@googlemail.com> # @date: Mon Oct 16 18:35:14 MDT 2017 """This module provides the Database interface allowing the user to query the JANUS database. """ from .reader import * import bob.db.base class Database(bob.db.base.Da...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 900, 2393, 12685, 7656, 28, 40477, 12, 23, 1058, 198, 2, 2488, 9800, 25, 25995, 6748, 490, 1279, 44524, 11722, 74, 404, 69, 31, 13297, 4529, 13, 785, 29, 198, 2, 2488...
2.634577
3,511
import math import random import time from amifast import bench from amifast import dtypes TOLERANCE = 1e-1
[ 11748, 10688, 198, 11748, 4738, 198, 11748, 640, 198, 198, 6738, 716, 361, 459, 1330, 7624, 198, 6738, 716, 361, 459, 1330, 288, 19199, 628, 198, 51, 3535, 1137, 19240, 796, 352, 68, 12, 16, 628, 628, 628 ]
3.052632
38
import wx from gui import MyWindow_1 from random import choice app = wx.App(0) MyWindow_2(None).Show() app.MainLoop() # app = wx.App(False) # frame = MyWindow_2(None) # frame.Show() # app.MainLoop()
[ 11748, 266, 87, 198, 6738, 11774, 1330, 2011, 27703, 62, 16, 198, 198, 6738, 4738, 1330, 3572, 628, 628, 628, 628, 628, 198, 1324, 796, 266, 87, 13, 4677, 7, 15, 8, 198, 3666, 27703, 62, 17, 7, 14202, 737, 15307, 3419, 198, 1324, ...
2.482759
87
# 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 in writing, software # distributed under t...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.130926
443
#!/usr/bin/env python import os import re import subprocess import sys from argparse import ArgumentParser, ArgumentError from datetime import datetime import yaml from ebi_eva_common_pyutils import command_utils from ebi_eva_common_pyutils.command_utils import run_command_with_output from ebi_eva_common_pyutils.confi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 1822, 29572, 1330, 45751, 46677, 11, 45751, 12331, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, ...
3.048327
269
# Benjamin Chu # Python Script - Test Case #3 # Using the World of Warcraft Item Set Web API, # retrieve data for 'Finkle's Lava Dredger' 10,000+ # times to confirm throttling. import requests import json item_id = 18803 # Finkle's Lava Dredger Item ID # API Urls for individual regions api_us_url = "http://us.battl...
[ 2, 14533, 25459, 198, 2, 11361, 12327, 532, 6208, 8913, 1303, 18, 198, 198, 2, 8554, 262, 2159, 286, 26952, 9097, 5345, 5313, 7824, 11, 198, 2, 19818, 1366, 329, 705, 37, 19894, 338, 406, 4170, 360, 445, 1362, 6, 838, 11, 830, 10,...
2.817133
607
""" # Copyright 2021 Xiang Wang, Inc. 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 Author: Xiang Wang, xiangking1995@163....
[ 37811, 198, 2, 15069, 33448, 45641, 15233, 11, 3457, 13, 1439, 6923, 33876, 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, 11846...
3.350467
214
#!/usr/bin/env python from __future__ import division import rospy import tf import scipy.linalg as la import numpy as np from math import * import mavros_msgs.srv from mavros_msgs.msg import AttitudeTarget from nav_msgs.msg import Odometry from std_msgs.msg import * from geometry_msgs.msg import * from mavros_msgs.msg...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 686, 2777, 88, 198, 11748, 48700, 198, 11748, 629, 541, 88, 13, 75, 1292, 70, 355, 8591, 198, 11748, 299, 32152, 355, 45941, 198, 6738,...
2.086835
1,071
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383, ...
3.813636
440
from . import clustering from . import plotting from . import do_segmentation from . import argparser #from . import identity from . import leaflets from . import settests
[ 6738, 764, 1330, 32966, 1586, 198, 6738, 764, 1330, 29353, 198, 6738, 764, 1330, 466, 62, 325, 5154, 341, 198, 6738, 764, 1330, 1822, 48610, 198, 2, 6738, 764, 1330, 5369, 198, 6738, 764, 1330, 48409, 198, 6738, 764, 1330, 2970, 3558,...
4
43
import csv import os #2
[ 11748, 269, 21370, 198, 11748, 28686, 198, 198, 2, 17, 628, 628 ]
2.333333
12
from typing import Any, List, Optional from ..caches import DEFAULT_CACHE_DIR from ..configs import MethodLayerConfig from ..mappers import ( SingleDomainRankingMethodMapper, MultiDomainRankingMethodMapper, MethodLayerRankingCacheMapper, MethodLayerDataCacheMapper, ) from ..data import DomainPDFList fr...
[ 6738, 19720, 1330, 4377, 11, 7343, 11, 32233, 198, 198, 6738, 11485, 66, 3694, 1330, 5550, 38865, 62, 34, 2246, 13909, 62, 34720, 198, 6738, 11485, 11250, 82, 1330, 11789, 49925, 16934, 198, 6738, 11485, 76, 46629, 1330, 357, 198, 220, ...
3.240437
183
from collections import deque import gym from baselines.common.atari_wrappers import NoopResetEnv, MaxAndSkipEnv, FireResetEnv, EpisodicLifeEnv import numpy as np import cv2 # Below are copied or adapted from OpenAI's baselines.common.atari_wrappers.py
[ 6738, 17268, 1330, 390, 4188, 198, 198, 11748, 11550, 198, 6738, 1615, 20655, 13, 11321, 13, 35554, 62, 29988, 11799, 1330, 1400, 404, 4965, 316, 4834, 85, 11, 5436, 1870, 50232, 4834, 85, 11, 3764, 4965, 316, 4834, 85, 11, 4551, 271,...
3.134146
82
from module import suml, prodl zeroes = [0 for i in range(5)] ones = [1 for i in range(5)] print(suml(zeroes)) print(prodl(ones))
[ 6738, 8265, 1330, 2160, 75, 11, 386, 25404, 198, 198, 9107, 3028, 796, 685, 15, 329, 1312, 287, 2837, 7, 20, 15437, 198, 1952, 796, 685, 16, 329, 1312, 287, 2837, 7, 20, 15437, 198, 4798, 7, 16345, 75, 7, 9107, 3028, 4008, 198, ...
2.54902
51
from .mobilenetv2 import QuantizableMobileNetV2, mobilenet_v2, __all__ as mv2_all from .mobilenetv3 import QuantizableMobileNetV3, mobilenet_v3_large, mobilenet_v3_small, __all__ as mv3_all __all__ = mv2_all + mv3_all
[ 6738, 764, 76, 25898, 268, 316, 85, 17, 1330, 16972, 13821, 17066, 7934, 53, 17, 11, 17754, 268, 316, 62, 85, 17, 11, 11593, 439, 834, 355, 285, 85, 17, 62, 439, 198, 6738, 764, 76, 25898, 268, 316, 85, 18, 1330, 16972, 13821, 1...
2.329787
94
from doit.action import CmdAction from plumbum import local import dodos.noisepage from dodos import VERBOSITY_DEFAULT DEFAULT_DB = "np_pilot" DEFAULT_USER_DAEMON = "np_pilot_daemon" DEFAULT_USER_CLIENT = "np_pilot_client" DEFAULT_PASS_DAEMON = "np_pilot_daemon_pass" DEFAULT_PASS_CLIENT = "np_pilot_client_pass" DB_C...
[ 6738, 466, 270, 13, 2673, 1330, 327, 9132, 12502, 198, 6738, 458, 2178, 388, 1330, 1957, 198, 198, 11748, 20764, 418, 13, 3919, 271, 538, 496, 198, 6738, 20764, 418, 1330, 33310, 33, 2640, 9050, 62, 7206, 38865, 198, 198, 7206, 38865,...
1.939646
1,806
# Copyright (c) 2012 by California Institute of Technology # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this...
[ 2, 15069, 357, 66, 8, 2321, 416, 3442, 5136, 286, 8987, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 17...
1.952676
7,269
# Generated by Django 3.2.7 on 2021-10-25 21:26 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 940, 12, 1495, 2310, 25, 2075, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
2.926829
41
import os import ujson import zlib from base64 import urlsafe_b64encode as b64e, urlsafe_b64decode as b64d if (__name__ == '__main__'): data = get_zone_records("./web-service.org.txt", domain="web-service.org", interested_in=['A'], invert=True) print(ujson.dumps(data, indent=4)) print('-'*30) if (0):...
[ 11748, 28686, 198, 11748, 334, 17752, 198, 198, 11748, 1976, 8019, 198, 6738, 2779, 2414, 1330, 2956, 7278, 8635, 62, 65, 2414, 268, 8189, 355, 275, 2414, 68, 11, 2956, 7278, 8635, 62, 65, 2414, 12501, 1098, 355, 275, 2414, 67, 198, ...
2.285714
406
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import sys import os if __name__=='__main__': main()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 28686, 628, 198, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198...
2.137255
51
from Core import GlobalExceptions
[ 6738, 7231, 1330, 8060, 3109, 11755, 198 ]
4.857143
7
# !/usr/bin/python # coding=utf-8 import sys, getopt, os from dfa import DFA from instruction import read_instrs default_args = {'-c':0, '-s':0, '-r':0, '-l':0, '3addr_code_file_name':'examples/gcd.c.3addr'} if __name__ == '__main__': main()
[ 2, 5145, 14, 14629, 14, 8800, 14, 29412, 201, 198, 2, 19617, 28, 40477, 12, 23, 201, 198, 11748, 25064, 11, 651, 8738, 11, 28686, 201, 198, 6738, 288, 13331, 1330, 360, 7708, 201, 198, 6738, 12064, 1330, 1100, 62, 259, 2536, 82, 2...
2.132231
121
from io import StringIO import subprocess as sp import os list1 = ["867-5309", "751-8745", "546-9874"] list1_converted = ["243-0751", "309-2360", "064-1236"] help_flags = ["-h", "--help"]
[ 6738, 33245, 1330, 10903, 9399, 198, 11748, 850, 14681, 355, 599, 198, 11748, 28686, 198, 198, 4868, 16, 796, 14631, 23, 3134, 12, 20, 26895, 1600, 366, 48365, 12, 5774, 2231, 1600, 366, 49489, 12, 4089, 4524, 8973, 198, 4868, 16, 62,...
2.423077
78
#!/usr/bin/env python import copy import json import tqdm import tarfile from collections import Counter import qcportal as ptl import qcelemental as qcel from qcelemental.models import Molecule dataset_name = "Kinase Inhibitors: WBO Distributions" update = True client = ptl.FractalClient.from_file() print(client) ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 4866, 198, 11748, 33918, 198, 11748, 256, 80, 36020, 198, 11748, 13422, 7753, 198, 6738, 17268, 1330, 15034, 198, 11748, 10662, 66, 634, 282, 355, 279, 28781, 198, 11748, 106...
2.330696
632
from flask import Flask, jsonify, request from flask_cors import CORS import sqlite3 # configuration DEBUG = True # instantiate the app app = Flask(__name__) app.config.from_object(__name__) #instantiate database database = 'stw3.db' GlobalID = [] # enable CORS CORS(app, resources={r'/*': {'origins': '*'}}) Globa...
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 11748, 44161, 578, 18, 628, 198, 2, 8398, 198, 30531, 796, 6407, 198, 198, 2, 9113, 9386, 262, 598, 198, 1324, 796, 46947, 7,...
2.686567
268
from datetime import datetime, timedelta from typing import List from joj.horse.schemas import BaseModel from joj.horse.schemas.user import User
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 2525, 73, 13, 30527, 13, 1416, 4411, 292, 1330, 7308, 17633, 198, 6738, 2525, 73, 13, 30527, 13, 1416, 4411, 292, 13, 7220, 1330, 1178...
3.386364
44
print fib(12) print fib(2) print fib(-2) print fib(4)
[ 198, 4798, 12900, 7, 1065, 8, 198, 4798, 12900, 7, 17, 8, 198, 4798, 12900, 32590, 17, 8, 198, 4798, 12900, 7, 19, 8, 198 ]
2.2
25
if __name__ == "__main__": sort_process = sort_by_step([6, 9, 5, 4, 8, 10]) for i in range(0,21): print(next(sort_process))
[ 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3297, 62, 14681, 796, 3297, 62, 1525, 62, 9662, 26933, 21, 11, 860, 11, 642, 11, 604, 11, 807, 11, 838, 12962, 198, 220, 220, 220, 329, ...
2.086957
69
""" A RouteProvider Service Provider """ import json import re from pydoc import locate from masonite.provider import ServiceProvider from masonite.view import View
[ 37811, 317, 18956, 29495, 4809, 32549, 37227, 198, 198, 11748, 33918, 198, 11748, 302, 198, 6738, 279, 5173, 420, 1330, 17276, 198, 198, 6738, 285, 888, 578, 13, 15234, 1304, 1330, 4809, 29495, 198, 6738, 285, 888, 578, 13, 1177, 1330, ...
3.906977
43
from distutils.core import setup setup( name='kete_hs21', version='1.0', packages=[''], url='', license='Apache 2.0', author='41796', author_email='armon.dressler@gmail.com', description='key technologies school project' )
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 7126, 68, 62, 11994, 2481, 3256, 198, 220, 220, 220, 2196, 11639, 16, 13, 15, 3256, 198, 220, 220, 220, 10392, 41888, 7061, 4357, 198, 220...
2.534653
101
"""Debugging support.""" import logging from vine.utils import wraps from kombu.log import get_logger __all__ = ('setup_logging', 'Logwrapped') def setup_logging(loglevel=logging.DEBUG, loggers=None): """Setup logging to stdout.""" loggers = ['kombu.connection', 'kombu.channel'] if not loggers else logger...
[ 37811, 27509, 2667, 1104, 526, 15931, 198, 198, 11748, 18931, 198, 198, 6738, 17793, 13, 26791, 1330, 27521, 198, 198, 6738, 479, 2381, 84, 13, 6404, 1330, 651, 62, 6404, 1362, 198, 198, 834, 439, 834, 796, 19203, 40406, 62, 6404, 266...
2.695455
220
#!/usr/bin/env python3 from tgnoti import TGNotifier if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 256, 70, 1662, 72, 1330, 44121, 3673, 7483, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.410256
39
# 「プロパティ」エリア → 「マテリアル」タブ import os import re import sys import time import bpy import bmesh import mathutils from . import common from . import compat from . import cm3d2_data # メニュー等に項目追加 (for 2.7x or less) @compat.BlRegister(only_latest=True) @compat.BlRegister() @compat.BlRegister() @compat.BlRegister() ...
[ 2, 40283, 30965, 16253, 32546, 44431, 13700, 23544, 12675, 11839, 15168, 40283, 20115, 24336, 12675, 47794, 13700, 23376, 24001, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 275, 9078, 198, 11748, 275, ...
2.329949
197
#!/usr/bin/env python import numpy as np from connect_board import board
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2018, 62, 3526, 1330, 3096, 198 ]
3.217391
23
from __future__ import annotations from typing import Iterable
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 40806, 540, 628 ]
4.642857
14
""" ============================ Lasso with held-out test set ============================ This example shows how to perform hyperparameter optimization for a Lasso using a held-out validation set. """ # Authors: Quentin Bertrand <quentin.bertrand@inria.fr> # Quentin Klopfenstein <quentin.klopfenstein@u-bou...
[ 37811, 198, 4770, 25609, 198, 43, 28372, 351, 2714, 12, 448, 1332, 900, 198, 4770, 25609, 198, 198, 1212, 1672, 2523, 703, 284, 1620, 8718, 17143, 2357, 23989, 198, 1640, 257, 406, 28372, 1262, 257, 2714, 12, 448, 21201, 900, 13, 198,...
2.651961
1,428
# Дан файл. Определите сколько в нем букв (латинского алфавита), слов, строк. Выведите три найденных числа в формате, # приведенном в примере. Словом считается последовательность больших и маленьких латинских букв (для проверки того, # состоит ли строка только из латинских букв удобно пользоваться методом isalpha()). В...
[ 2, 12466, 242, 16142, 22177, 220, 141, 226, 16142, 140, 117, 30143, 13, 12466, 252, 140, 123, 21169, 16843, 43666, 16843, 30143, 18849, 20375, 16843, 220, 21727, 31583, 25443, 119, 45367, 31583, 15166, 12466, 110, 12466, 121, 16843, 43108, ...
1.439286
560
from board import * from piece import * import copy import math import numpy # Randomly places the given players pieces to start game # Stores all of the movable pieces for the given player # Force-populates myPieces and myMovables # returns all the...
[ 6738, 3096, 1330, 1635, 201, 198, 6738, 3704, 1330, 1635, 201, 198, 11748, 4866, 201, 198, 11748, 10688, 201, 198, 11748, 299, 32152, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 220, 220, 220, 1303, 14534, 306, 4113, ...
1.834224
7,299
#!/usr/bin/env python #-*- coding:utf-8 -*- from logger import logger if __name__ == '__main__': divider = 0 mainFunc(divider) print('I am fine. Thank you , and you?')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 49706, 1330, 49706, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2659, 130...
2.426667
75
#! /usr/env/bin python import numpy as np from pyboas import predictor, models # Build random 3-parameter normal posterior. posterior = np.random.randn(100, 3) def test_basic_shape(): """Test basic shape conditions on output of predictions.""" time = np.random.rand(4, ) pred1 = predictor.GaussPredicto...
[ 2, 0, 1220, 14629, 14, 24330, 14, 8800, 21015, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 12972, 2127, 292, 1330, 41568, 11, 4981, 198, 198, 2, 10934, 4738, 513, 12, 17143, 2357, 3487, 34319, 13, 198, 79, 6197, 1504, 796, 4...
2.736052
466
""" Demonstrates iterating/looping through a list """ temperatures = [34.56, 56.45, 45.98, 47.62, 67.87, 55.12] #A list containing a series of temperatures for t in temperatures : #Prints every value in the temperatures list using a for loop print("Loop 1:", t) print(...
[ 37811, 198, 35477, 2536, 689, 11629, 803, 14, 5439, 15816, 832, 257, 1351, 198, 37811, 198, 198, 11498, 525, 6691, 796, 685, 2682, 13, 3980, 11, 7265, 13, 2231, 11, 4153, 13, 4089, 11, 6298, 13, 5237, 11, 8275, 13, 5774, 11, 5996, ...
2.4677
387
import os import json import math import multiprocessing import tornado.gen import tornado.web from tornado.template import Loader from tornado.concurrent import run_on_executor from concurrent.futures import ThreadPoolExecutor import tornado.escape from logger import Logger from osm_graph import findRoute
[ 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 18540, 305, 919, 278, 198, 11748, 33718, 13, 5235, 198, 11748, 33718, 13, 12384, 198, 6738, 33718, 13, 28243, 1330, 8778, 263, 198, 6738, 33718, 13, 1102, 14421, 1330, ...
3.829268
82
""" The reader is part of the new database concept 2017. The task of the reader is to take a database JSON and an dataset identifier as an input and load all meta data for each observation with corresponding numpy arrays for each time signal (non stacked). An example ID often stands for utterance ID. In case of speak...
[ 37811, 198, 464, 9173, 318, 636, 286, 262, 649, 6831, 3721, 2177, 13, 198, 198, 464, 4876, 286, 262, 9173, 318, 284, 1011, 257, 6831, 19449, 290, 281, 27039, 27421, 355, 198, 272, 5128, 290, 3440, 477, 13634, 1366, 329, 1123, 13432, ...
2.475563
1,821
# -*- coding: utf-8 -*- import hashlib import io import struct # default from KeePass2 source BLOCK_LENGTH = 1024 * 1024 try: file_types = (file, io.IOBase) except NameError: file_types = (io.IOBase,) # HEADER_LENGTH = 4+32+4 class HashedBlockIO(io.BytesIO): """ The data is stored in hashed blocks....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 12234, 8019, 198, 11748, 33245, 198, 11748, 2878, 198, 198, 2, 4277, 422, 19799, 14478, 17, 2723, 198, 9148, 11290, 62, 43, 49494, 796, 28119, 1635, 28119, 198, 1...
2.299545
1,539
from flask import Flask, render_template, request import json from flask_cors import CORS import numpy as np import cv2 # Library for image processing from math import floor app = Flask(__name__) CORS(app) @app.route('/api', methods=['GET','POST'])#Health End Point Defining @app.route('/...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 198, 11748, 33918, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
2.550296
169
import numpy as np import cffi import os from awrams.utils.nodegraph import nodes from awrams.utils import geo, extents from awrams.utils.helpers import as_int from awrams.utils.mapping_types import gen_coordset ffi = cffi.FFI() ffi.cdef("void undo_thing(double *in, double *out, int xn, int yn, int scalefac);...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 269, 487, 72, 201, 198, 11748, 28686, 201, 198, 6738, 3253, 9474, 13, 26791, 13, 17440, 34960, 1330, 13760, 201, 198, 6738, 3253, 9474, 13, 26791, 1330, 40087, 11, 1070, 658, 201, 198, 6...
2.242116
983
#!/usr/bin/python import yaml users = [{'name': 'John Doe', 'occupation': 'gardener'}, {'name': 'Lucy Black', 'occupation': 'teacher'}] with open('users.yaml', 'w') as f: data = yaml.dump(users, f)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 331, 43695, 198, 198, 18417, 796, 685, 90, 6, 3672, 10354, 705, 7554, 31780, 3256, 705, 19596, 341, 10354, 705, 19977, 877, 6, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220,...
2.212121
99
# Exercise 10: Tuning decision tree classifier using grid search in pipeline # continuing from Activity 4: # Specify the hyperparameter space import numpy as np grid = {'criterion': ['gini', 'entropy'], 'min_weight_fraction_leaf': np.linspace(0.0, 0.5, 10), 'min_impurity_decrease': np.linspace(0.0, 1....
[ 2, 32900, 838, 25, 13932, 278, 2551, 5509, 1398, 7483, 1262, 10706, 2989, 287, 11523, 198, 198, 2, 8282, 422, 24641, 604, 25, 198, 198, 2, 18291, 1958, 262, 8718, 17143, 2357, 2272, 198, 11748, 299, 32152, 355, 45941, 198, 25928, 796,...
2.854478
268
import io import numpy as np from PIL import Image
[ 11748, 33245, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 350, 4146, 1330, 7412, 628, 198 ]
3.176471
17
#!/usr/bin/env python # -*- coding: utf-8 -*- spinMultiplicity = 2 opticalIsomers = 1 externalSymmetry = 2 energy = { 'CBS-QB3': GaussianLog('p5.log'), 'CCSD(T)-F12/cc-pVTZ-F12': MolproLog('p5_f12.out'), } frequencies = GaussianLog('p5freq.log') rotors = [HinderedRotor(scanLog=ScanLog('scan_0.lo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 39706, 15205, 24705, 8467, 796, 362, 201, 198, 201, 198, 8738, 605, 3792, 21499, 796, 352, 201, 198, 22615, ...
2.061538
325
__author__ = ["Francisco Clavero"] __email__ = ["fcoclavero32@gmail.com"] __status__ = "Prototype" from ..settings import EN from .common import SpellChecker class EnglishSpellCheckerSingleton(SpellChecker): """ Utility class to manage a single SpellChecker instance for english. """ __instance = No...
[ 834, 9800, 834, 796, 14631, 42885, 4861, 1012, 8770, 78, 8973, 198, 834, 12888, 834, 796, 14631, 16072, 420, 5031, 332, 78, 2624, 31, 14816, 13, 785, 8973, 198, 834, 13376, 834, 796, 366, 19703, 8690, 1, 628, 198, 6738, 11485, 33692, ...
2.681592
402
# Copyright 2017 Google Inc. 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 applicable law or a...
[ 2, 15069, 2177, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.029101
1,134
from os import path from ..dojo_test_case import DojoTestCase from dojo.tools.anchore_enterprise.parser import AnchoreEnterpriseParser from dojo.tools.anchore_enterprise.parser import extract_cve, search_filepath from dojo.models import Test
[ 6738, 28686, 1330, 3108, 198, 6738, 11485, 4598, 7639, 62, 9288, 62, 7442, 1330, 2141, 7639, 14402, 20448, 198, 6738, 466, 7639, 13, 31391, 13, 3702, 382, 62, 9255, 7919, 13, 48610, 1330, 29253, 382, 17469, 7919, 46677, 198, 6738, 466, ...
3.422535
71
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-23 23:40 from __future__ import unicode_literals import api.shows.models from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 22, 319, 2177, 12, 2713, 12, 1954, 2242, 25, 1821, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.8125
64
from typing import Optional, Tuple import numpy as np from mne.preprocessing.bads import _find_outliers from numpy.typing import ArrayLike, NDArray from ._checks import _check_type from ._logs import logger def generate_async_timings( sequence_timings: ArrayLike, zscore: float = 2.0, valid_perc: float =...
[ 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 285, 710, 13, 3866, 36948, 13, 65, 5643, 1330, 4808, 19796, 62, 448, 75, 3183, 198, 6738, 299, 32152, 13, 774, 13886, 1330, 15690, 7594, 11,...
2.630332
1,055
from unittest.mock import MagicMock from azure.storage.blob import BlobClient, BlobServiceClient, ContainerClient from conftest import CosmosClientMock from prefect import flow from prefect_azure.credentials import ( BlobStorageAzureCredentials, CosmosDbAzureCredentials, MlAzureCredentials, )
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 198, 6738, 35560, 495, 13, 35350, 13, 2436, 672, 1330, 1086, 672, 11792, 11, 1086, 672, 16177, 11792, 11, 43101, 11792, 198, 6738, 369, 701, 395, 1330, 39972, 11792, 44, 73...
2.971698
106
from flask import Blueprint, jsonify, request from db.sqlite3 import api_log, api_query import requests from datetime import datetime import json restful_api = Blueprint('restful_api', __name__) @restful_api.errorhandler(404) @restful_api.route('/') @restful_api.route('/weather/current') @restful_api.route('/...
[ 6738, 42903, 1330, 39932, 11, 33918, 1958, 11, 2581, 198, 6738, 20613, 13, 25410, 578, 18, 1330, 40391, 62, 6404, 11, 40391, 62, 22766, 198, 11748, 7007, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 198, 2118, 913, ...
2.920635
126
import struct import zlib import logging import base64 from Crypto.Cipher import AES, DES from core.encryption.EncryptionServiceBase import EncryptionService from core.encryption.Exceptions import CheckSumFailure log = logging.getLogger(__name__) # assumes that key is in string format and data is in bytes ...
[ 11748, 2878, 198, 11748, 1976, 8019, 198, 11748, 18931, 198, 11748, 2779, 2414, 198, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 11, 22196, 198, 198, 6738, 4755, 13, 12685, 13168, 13, 27195, 13168, 16177, 14881, 1330, 14711, 13168, 1617...
3.672
125
# 1423634 # # https://adventofcode.com/2016/day/19 # This solution uses a doubly-linked circular list. # One pointer points to the elf whose turn it is. # Another pointer points to the middle elf. nElves = 5 # test case nElves = 11 # test case nElves = 3017957 root = Elf(1) a = 1 current = root for id in range(2, ...
[ 2, 1478, 24940, 2682, 198, 2, 220, 198, 2, 3740, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 5304, 14, 820, 14, 1129, 198, 198, 2, 770, 4610, 3544, 257, 3385, 306, 12, 25614, 18620, 1351, 13, 198, 2, 1881, 17562, 2173, 284, 262, 2...
2.454315
394
import tom.hello as h h.say_hello()
[ 11748, 16667, 13, 31373, 355, 289, 198, 198, 71, 13, 16706, 62, 31373, 3419, 628 ]
2.533333
15
"""This file contains test cases for the Chinese Language Generator""" from typing import Tuple import pytest from more_itertools import only from adam.axes import ( HorizontalAxisOfObject, FacingAddresseeAxis, AxesInfo, GRAVITATIONAL_AXIS_FUNCTION, ) from adam.ontology.phase2_ontology import gravitat...
[ 37811, 1212, 2393, 4909, 1332, 2663, 329, 262, 3999, 15417, 35986, 37811, 628, 198, 6738, 19720, 1330, 309, 29291, 198, 11748, 12972, 9288, 198, 6738, 517, 62, 270, 861, 10141, 1330, 691, 198, 6738, 23197, 13, 897, 274, 1330, 357, 198, ...
3.05668
3,211
import numpy as np import cv2 import random cap = cv2.VideoCapture(1) ret, frame = cap.read() height, width, channels = frame.shape frame = cv2.resize(frame, (int(width * 1.5),int(height * 1.5)), interpolation = cv2.INTER_AREA) height, width, channels = frame.shape img = np.zeros((height, width, channels)...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 4738, 201, 198, 201, 198, 11128, 796, 269, 85, 17, 13, 10798, 49630, 7, 16, 8, 201, 198, 1186, 11, 5739, 796, 1451, 13, 961, 3419, 201, 198, 17015, 11, ...
1.827957
2,325
import numpy as np import functions from ssp_bayes_opt.agent import SSPAgent # func, bounds, T = functions.factory('branin-hoo') func, bounds, T = functions.factory('himmelblau') a = np.linspace(bounds[0,0], bounds[0,1], 100) b = np.linspace(bounds[1,0], bounds[1,1], 100) X, Y = np.meshgrid(a,b) init_xs = np.vs...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 5499, 628, 198, 6738, 264, 2777, 62, 24406, 274, 62, 8738, 13, 25781, 1330, 311, 4303, 36772, 198, 198, 2, 25439, 11, 22303, 11, 309, 796, 5499, 13, 69, 9548, 10786, 1671, 272, 259, 12, 71,...
2.102975
437
from typing import Optional class DataPipelinesError(Exception): """Base class for all exceptions in data_pipelines_cli module""" message: str """explanation of the error""" submessage: Optional[str] """additional informations for the error""" class DependencyNotInstalledError(DataPipelinesErro...
[ 6738, 19720, 1330, 32233, 628, 198, 4871, 6060, 47, 541, 20655, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 14881, 1398, 329, 477, 13269, 287, 1366, 62, 79, 541, 20655, 62, 44506, 8265, 37811, 628, 220, 220, 220, 3275, 25, 965, ...
3.490196
357
from django.conf import settings from django.contrib.auth.models import AnonymousUser, Permission from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models class AbstractRefreshToken(models.Model): """ Abstract base...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 19200, 12982, 11, 2448, 3411, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 25747, 1330, 42044, 33616, 9218, ...
2.692868
687
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 15 17:00:54 2021 @author: ghiggi """ import numpy as np import matplotlib.pyplot as plt #-----------------------------------------------------------------------------. ###################### ### Miscellaneous #### ###################### def is_sorte...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2365, 1315, 1596, 25, 405, 25, 4051, 33448, 198, 198, 31, 9800, 25, 24997, 6950, 7...
2.407241
6,905
import pathlib from setuptools import find_packages, setup HERE = pathlib.Path(__file__).parent README = (HERE / 'README.md').read_text() requires = (HERE / 'requirements.txt').read_text().split('\n') setup( name="sentivi", version="1.1.0", description="A simple tool for Vietnamese Sentiment Analysis", ...
[ 11748, 3108, 8019, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 39, 9338, 796, 3108, 8019, 13, 15235, 7, 834, 7753, 834, 737, 8000, 198, 15675, 11682, 796, 357, 39, 9338, 1220, 705, 15675, 11682, 13, 9132, ...
2.625
312
"""the first alembic revision Revision ID: e3b50f666fbb Revises: Create Date: 2016-05-30 11:32:22.585690 """ # revision identifiers, used by Alembic. revision = 'e3b50f666fbb' down_revision = None branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa
[ 37811, 1169, 717, 31341, 2022, 291, 18440, 198, 198, 18009, 1166, 4522, 25, 304, 18, 65, 1120, 69, 27310, 69, 11848, 198, 18009, 2696, 25, 220, 198, 16447, 7536, 25, 1584, 12, 2713, 12, 1270, 1367, 25, 2624, 25, 1828, 13, 38905, 358...
2.612613
111