content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import datetime import typing from networkmonitor import OldConfig from networkmonitor.src.configuration import IConfig, ContextConfig from networkmonitor.src.protocols import IProtocols, ContextProtocols from networkmonitor.src import Configuration from networkmonitor.src import Nodes from networkmonitor.src import I...
[ 198, 11748, 4818, 8079, 198, 11748, 19720, 198, 6738, 3127, 41143, 1330, 5706, 16934, 198, 6738, 3127, 41143, 13, 10677, 13, 11250, 3924, 1330, 314, 16934, 11, 30532, 16934, 198, 6738, 3127, 41143, 13, 10677, 13, 11235, 4668, 82, 1330, ...
4.188525
122
from django.contrib import admin from welltory import models admin.site.register(models.Sleep, SleepAdmin) admin.site.register(models.Steps, StepsAdmin) admin.site.register(models.Geo, GeoAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 880, 83, 652, 1330, 4981, 628, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 40555, 11, 17376, 46787, 8, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 8600, 82...
3.174603
63
from Pyro5 import api from ...core._signals import _CMMCoreSignaler
[ 6738, 44954, 20, 1330, 40391, 198, 198, 6738, 2644, 7295, 13557, 12683, 874, 1330, 4808, 24187, 9655, 382, 11712, 36213, 628 ]
3.333333
21
from django.contrib import admin from .models import Tag,Ingredient admin.site.register(Tag) admin.site.register(Ingredient)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 17467, 11, 27682, 445, 1153, 198, 198, 28482, 13, 15654, 13, 30238, 7, 24835, 8, 198, 28482, 13, 15654, 13, 30238, 7, 27682, 445, 1153, 8 ]
3.205128
39
""" PROIECT Colorarea imaginilor folosind autoencoder si invatarea automata Badea Adrian Catalin, grupa 334, anul III, FMI """ import pdb from DataSet import * from AeModel import * data_set: DataSet = DataSet() data_set.scene_name = 'forest' ae_model: AeModel = AeModel(data_set)...
[ 37811, 201, 198, 220, 220, 220, 21965, 40, 9782, 201, 198, 220, 220, 220, 220, 201, 198, 220, 220, 220, 5315, 20337, 25007, 346, 273, 5955, 418, 521, 1960, 6571, 66, 12342, 33721, 800, 265, 20337, 3557, 1045, 201, 198, 220, 220, 220...
2.321799
289
from nodes.core import * from nodes.connect import * from nodes.util import * import numpy as np import math
[ 6738, 13760, 13, 7295, 1330, 1635, 198, 6738, 13760, 13, 8443, 1330, 1635, 198, 6738, 13760, 13, 22602, 1330, 1635, 628, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688 ]
3.666667
30
import sys sys.path.append("..") from common.util import preprocess, create_co_matrix, cos_similarity text = "You say goobye and I say hello." corpus, word_to_id, id_to_word = preprocess(text) vocab_size = len(word_to_id) C = create_co_matrix(corpus, vocab_size) c0 = C[word_to_id["you"]] c1 = C[word_to_id...
[ 11748, 25064, 201, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 201, 198, 6738, 2219, 13, 22602, 1330, 662, 14681, 11, 2251, 62, 1073, 62, 6759, 8609, 11, 8615, 62, 38610, 414, 201, 198, 201, 198, 201, 198, 5239, 796, 366, 1639...
2.229814
161
import math import json import random import uuid import SocketServer import threading import time import key_derivation from .bucketset import BucketSet from .hashing import hash_function, random_id from .peer import Peer from .shortlist import Shortlist k = 20 alpha = 3 id_bits = 128 iteration_sleep = 1 keysize = 2...
[ 11748, 10688, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 334, 27112, 198, 11748, 47068, 10697, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 1994, 62, 1082, 26939, 198, 198, 6738, 764, 27041, 1039, 316, 1330, 48353, 7248, 198,...
3.254386
114
""" Exercise 2 Using the same CelestialBody class, write a static method closer_to_sun that compares two CelectialBody objects and returns the name of the object that is closes to the sun. Expected Output If the objects mercury and venus are compared, then the method would return Mercury. """ class CelestialBody: ...
[ 37811, 198, 3109, 23697, 362, 198, 12814, 262, 976, 37231, 25842, 1398, 11, 3551, 257, 9037, 2446, 5699, 62, 1462, 62, 19155, 326, 23008, 198, 11545, 327, 9509, 498, 25842, 5563, 290, 5860, 262, 1438, 286, 262, 2134, 326, 318, 20612, ...
2.781132
265
import numpy as np import os from azureml.core.run import Run from scipy.stats import entropy from ..utils.tfrecords import resize, parse_tfrecord from .kmeans import * from ..models import * run = Run.get_context() class ClusterFeatureMap(tf.keras.Model): """" This is a clustering class with methods to all...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 6738, 35560, 495, 4029, 13, 7295, 13, 5143, 1330, 5660, 198, 6738, 629, 541, 88, 13, 34242, 1330, 40709, 198, 198, 6738, 11485, 26791, 13, 27110, 8344, 3669, 1330, 47558, 11, ...
2.195313
1,536
# pylint: disable=missing-docstring,invalid-name,line-too-long from django.test import TestCase import markdown class TestDetails(TestCase): """ Test details extension. """
[ 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 11, 259, 12102, 12, 3672, 11, 1370, 12, 18820, 12, 6511, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 11748, 1317, 2902, 198, 198, 4871, 6208, 24259, 7, 14...
3.196429
56
"""Module containing the attributes for gtunrealdevice.""" import yaml from os import path from textwrap import dedent from gtunrealdevice.utils import File __version__ = '0.2.8' version = __version__ __edition__ = 'Community' edition = __edition__ __all__ = [ 'Data', 'version', 'edition' ]
[ 37811, 26796, 7268, 262, 12608, 329, 308, 28286, 260, 1940, 1990, 501, 526, 15931, 198, 198, 11748, 331, 43695, 198, 198, 6738, 28686, 1330, 3108, 198, 6738, 2420, 37150, 1330, 4648, 298, 198, 198, 6738, 308, 28286, 260, 1940, 1990, 501...
2.844037
109
import numpy as np a = np.array([ (1, 3, 5, 7), (3, 5, 7, 1), (5, 7, 1, 3), (7, 1, 1, 5) ], dtype=np.float64) b = np.array([12, 0, 4, 16], dtype=np.float64) MAX_STEPS = 100 print("Gauss (with selection of main element):", solve_gauss_m(a, b)) print("numpy.linalg.solve:", np.linalg.solve(a, b)) ...
[ 11748, 299, 32152, 355, 45941, 628, 198, 64, 796, 45941, 13, 18747, 26933, 198, 220, 220, 220, 357, 16, 11, 513, 11, 642, 11, 767, 828, 198, 220, 220, 220, 357, 18, 11, 642, 11, 767, 11, 352, 828, 198, 220, 220, 220, 357, 20, ...
1.898305
295
from haystack.modeling.training.base import Trainer
[ 6738, 27678, 25558, 13, 4666, 10809, 13, 34409, 13, 8692, 1330, 31924 ]
4.25
12
""" """ import os from sacred.observers import FileStorageObserver from sacred import Experiment from ctseg.ctutil.utils import read_json def initialize_experiment(): """Initialize the Sacred Experiment This method reads a JSON config from mcdn-3d-seg/sacred_config.json with the following entries: ...
[ 37811, 198, 198, 37811, 198, 11748, 28686, 198, 198, 6738, 13626, 13, 672, 2655, 690, 1330, 9220, 31425, 31310, 18497, 198, 6738, 13626, 1330, 29544, 198, 198, 6738, 269, 83, 325, 70, 13, 310, 22602, 13, 26791, 1330, 1100, 62, 17752, ...
2.318647
3,518
# -*- coding: utf-8 -*- r""" Check for pdf2svg """ # **************************************************************************** # Copyright (C) 2021 Sebastien Labbe <slabqc@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 81, 37811, 198, 9787, 329, 37124, 17, 21370, 70, 198, 37811, 198, 2, 41906, 17174, 46068, 198, 2, 220, 220, 220, 220, 220, 220, 15069, 357, 34, 8, 33448, 22787, 2013, ...
2.452471
526
import os import cv2 import numpy as np import pandas as pd import tensorflow as tf def read_image(path, size): """ Load image from local storage :param path: image path :param size: image size :return: loaded image """ image = cv2.imread(path, cv2.IMREAD_COLOR) image = cv2.resize(ima...
[ 11748, 28686, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4299, 1100, 62, 9060, 7, 6978, 11, 2546, 2599, 198, 220, 220, ...
2.40634
694
from coldtype import * @animation((1080, 1080), timeline=Timeline(3500, 24))
[ 6738, 4692, 4906, 1330, 1635, 198, 198, 31, 11227, 341, 19510, 24045, 11, 17729, 828, 15264, 28, 14967, 4470, 7, 2327, 405, 11, 1987, 4008, 198 ]
3
26
#!/usr/bin/env python3 import rospy rospy.logerr("###\n###\n###\n###\n###\nYou didn't specifiy which robot you want to start!\nPlease add minibot:=true or wolfgang:=true or davros:=true behind you roslaunch.\n###\n###\n###\n###\n###")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 686, 2777, 88, 198, 198, 305, 2777, 88, 13, 6404, 8056, 7203, 21017, 59, 77, 21017, 59, 77, 21017, 59, 77, 21017, 59, 77, 21017, 59, 77, 1639, 1422, 470, 1020, 361, 7745...
2.43299
97
from django.contrib import admin from cms_redirects.models import CMSRedirect admin.site.register(CMSRedirect, CMSRedirectAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 269, 907, 62, 445, 1060, 82, 13, 27530, 1330, 40773, 7738, 1060, 198, 198, 28482, 13, 15654, 13, 30238, 7, 34, 5653, 7738, 1060, 11, 40773, 7738, 1060, 46787, 8, 198 ]
3.170732
41
import plotly.graph_objects as go @register
[ 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 628, 198, 31, 30238, 628 ]
3.357143
14
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from cybox.objects.win_network_route_entry_object import WinNetworkRouteEntry from cybox.test import EntityTestCase, round_trip from cybox.test.objects import ObjectTestCase if __name__ == "__mai...
[ 2, 15069, 357, 66, 8, 1946, 11, 383, 17168, 2200, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 4091, 38559, 24290, 13, 14116, 329, 1844, 2846, 13, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 3075, 3524, 13, 48205, 13, 5404, 62, 2...
3.295238
105
#!/usr/bin/env python # Copyright (C) 2008-2011 by # George Asimenos, Robert C. Edgar, Serafim Batzoglou and Arend Sidow. # # 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 restrictio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 34, 8, 3648, 12, 9804, 416, 198, 2, 4502, 1081, 19027, 418, 11, 5199, 327, 13, 29166, 11, 2930, 1878, 320, 6577, 89, 28678, 280, 290, 4231, 358, 15686, 322, 13, 198,...
2.555074
1,153
## Copyright 2020 Alexander Liniger ## 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 ...
[ 2235, 15069, 12131, 10009, 5164, 8254, 198, 198, 2235, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2235, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2235, 92...
4.564972
177
from os import link from googleapiclient.discovery import build import json from csv import reader from google.oauth2 import service_account import pandas as pd from os.path import exists import numpy as np from functools import reduce import time SERVICE_ACCOUNT_FILE = None SCOPES = ['https://www.googleapis.com/auth/...
[ 6738, 28686, 1330, 2792, 198, 6738, 23645, 499, 291, 75, 1153, 13, 67, 40821, 1330, 1382, 198, 11748, 33918, 198, 6738, 269, 21370, 1330, 9173, 198, 6738, 23645, 13, 12162, 1071, 17, 1330, 2139, 62, 23317, 198, 11748, 19798, 292, 355, ...
2.900175
571
# This code is part of Qiskit. # # (C) Copyright IBM 2022. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 33160, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330, 257, 486...
2.696403
695
#!/usr/bin/env python # coding: utf-8 # ## Compressive sampling Overview # our previous discussion, we saw that imposing bandlimited-ness on our class of signals permits point-wise sampling of our signal and then later perfect reconstruction. It turns out that by imposing *sparsity* we can also obtain perfect recons...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 22492, 3082, 3314, 19232, 28578, 198, 198, 2, 220, 674, 2180, 5114, 11, 356, 2497, 326, 20814, 4097, 10698, 12, 1108, 319, 674, 1398, 2...
2.698952
8,012
# ============================================================================= # # Explicit Finite Difference Method Code to Solve the 1D Linear Transport Equation # Adapted by: Cameron Armstrong (2019) # Source: Lorena Barba, 12 Steps to NS in Python # Institution: Virginia Commonwealth University # # ======...
[ 2, 38093, 25609, 201, 198, 2, 220, 201, 198, 2, 11884, 4463, 578, 43795, 11789, 6127, 284, 4294, 303, 262, 352, 35, 44800, 19940, 7889, 341, 201, 198, 2, 30019, 276, 416, 25, 10821, 21166, 357, 23344, 8, 201, 198, 2, 8090, 25, 156...
1.913545
1,388
import re from functools import partial from typing import Callable, Container, Iterable, List, Union from bs4 import BeautifulSoup from bs4.element import NavigableString, PageElement, SoupStrainer, Tag from monty.log import get_logger from . import MAX_SIGNATURE_AMOUNT log = get_logger(__name__) _UNWANTED_SIGNA...
[ 11748, 302, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 4889, 540, 11, 43101, 11, 40806, 540, 11, 7343, 11, 4479, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 275, 82, 19, 13, 30854, 1330, 13...
2.771205
1,792
""" This module describes procedures to sample preferences for different probability distributions. """ import numpy as np def generateICStrictProfile(nbVoters, alternatives): """ Generates a profile following the impartial culture. :param nbVoters: Number of orders to sample. :type nbVoters: int :param alter...
[ 37811, 770, 8265, 8477, 9021, 284, 6291, 15387, 329, 1180, 12867, 24570, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 7716, 2149, 1273, 2012, 37046, 7, 46803, 53, 26008, 11, 14693, 2599, 198, 197, 37811, 2980...
3.027177
1,987
import sqlite3 import pandas as pd !wget https://raw.githubusercontent.com/jonathanmendoza-tx/DS-Unit-3-Sprint-2-SQL-and-Databases/master/module1-introduction-to-sql/buddymove_holidayiq.csv conn = sqlite3.connect('buddymove_holidayiq.sqlite3') cur = conn.cursor() df = pd.read_csv('/content/buddymove_holidayiq.csv', ...
[ 11748, 44161, 578, 18, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 0, 86, 1136, 3740, 1378, 1831, 13, 12567, 43667, 13, 785, 14, 46286, 6696, 76, 31110, 4496, 12, 17602, 14, 5258, 12, 26453, 12, 18, 12, 50, 4798, 12, 17, 12, ...
2.716049
405
"""quart_redoc version file.""" __version__ = "0.5.1"
[ 37811, 36008, 62, 445, 420, 2196, 2393, 526, 15931, 198, 834, 9641, 834, 796, 366, 15, 13, 20, 13, 16, 1, 198 ]
2.454545
22
#!/usr/local/CyberCP/bin/python import os,sys sys.path.append('/usr/local/CyberCP') import django os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings") django.setup() from inspect import stack from cli.cliLogger import cliLogger as logger import json from plogical.virtualHostUtilities import virtualHostUt...
[ 2, 48443, 14629, 14, 12001, 14, 20418, 527, 8697, 14, 8800, 14, 29412, 198, 11748, 28686, 11, 17597, 198, 17597, 13, 6978, 13, 33295, 10786, 14, 14629, 14, 12001, 14, 20418, 527, 8697, 11537, 198, 11748, 42625, 14208, 198, 418, 13, 26...
3.420779
385
from collections import deque class FixedArray(object): """ Object acts a queue of fixed length """
[ 6738, 17268, 1330, 390, 4188, 198, 198, 4871, 10832, 19182, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9515, 6529, 257, 16834, 286, 5969, 4129, 198, 220, 220, 220, 37227, 628, 198 ]
3.194444
36
# Copyright (c) 2019, Xilinx # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and th...
[ 2, 220, 15069, 357, 66, 8, 13130, 11, 1395, 346, 28413, 198, 2, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 220, 17613, 11, 389, 10431, 281...
2.53868
1,409
"""Unit tests for Faucet State Collector""" import unittest from unit_base import FaucetStateCollectorTestBase from forch.proto.faucet_event_pb2 import StackTopoChange from forch.utils import dict_proto class DataplaneStateTestCase(FaucetStateCollectorTestBase): """Test cases for dataplane state""" def tes...
[ 37811, 26453, 5254, 329, 376, 14272, 316, 1812, 17573, 37811, 198, 198, 11748, 555, 715, 395, 198, 6738, 4326, 62, 8692, 1330, 376, 14272, 316, 9012, 31337, 273, 14402, 14881, 198, 198, 6738, 329, 354, 13, 1676, 1462, 13, 69, 14272, 3...
2.414141
594
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette.by import By from gaiatest.apps.base import Base
[ 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, 4904, 43, 373, 407, 9387, 351, 428, 198, 2, 2393, 11, 921, 460, 7330, 530, 379, ...
3.243902
82
import time import click import requests from elasticsearch.connection import Connection from elasticsearch.connection_pool import DummyConnectionPool from elasticsearch.transport import Transport from elasticsearch.exceptions import ( ConnectionError, ConnectionTimeout, SSLError ) from elasticsearch.compa...
[ 11748, 640, 198, 198, 11748, 3904, 198, 11748, 7007, 198, 6738, 27468, 12947, 13, 38659, 1330, 26923, 198, 6738, 27468, 12947, 13, 38659, 62, 7742, 1330, 360, 13513, 32048, 27201, 198, 6738, 27468, 12947, 13, 7645, 634, 1330, 19940, 198, ...
3.346821
173
from pystache import TemplateSpec
[ 198, 6738, 12972, 301, 4891, 1330, 37350, 22882, 628 ]
4
9
import random # imports the random module, which contains a variety of things to do with random number generation. number = random.randint(1,10) #If we wanted a random integer, we can use the randint function Randint accepts two parameters: a lowest and a highest number. for i in range(0,3): user = int(...
[ 11748, 4738, 220, 220, 220, 220, 220, 220, 220, 1303, 17944, 262, 4738, 8265, 11, 543, 4909, 257, 4996, 286, 1243, 284, 466, 351, 4738, 1271, 5270, 13, 198, 17618, 796, 4738, 13, 25192, 600, 7, 16, 11, 940, 8, 220, 220, 220, 220, ...
2.952632
190
from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from djangosaml2.conf import get_config from djangosaml2.utils import available_idps from saml2.attribute_converter import ac_factory from saml2.mdstore import InMemoryMetaData, MetaDataFile from saml2.mdstore import name as get_idp_...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 648, 418, 43695, 17, 13, 10414, 1330, 651, 62, 11250, 198, 6738, 42625, 648, 418, 43695...
3.289256
121
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # 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 applica...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 15069, 2813, 33687, 5303, 509, 2662, 40, 44947, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, ...
2.924765
638
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.75
8
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # 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 us...
[ 2, 15069, 357, 34, 8, 12131, 13, 43208, 21852, 1766, 1539, 12052, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 391...
2.80599
768
""" Static threshold based anomaly detection """ from typing import List, Tuple import logging import numpy as np import pandas as pd from nbdb.anomaly.anomaly_interface import AnomalyInterface from nbdb.readapi.graphite_response import Anomaly from nbdb.readapi.time_series_response import TimeRange logger = logging...
[ 37811, 198, 45442, 11387, 1912, 32172, 13326, 198, 37811, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 299, 65, 9945, 13,...
2.252189
1,142
#!/usr/bin/env python3 import unittest from R_ev3dev.interpreter import Interpreter, Command from R_ev3dev.help import Help, Version class TestCommand01(Command): """ this is the test command 01 usage: c01 """ class TestCommand02(Command): """ this is the test command 02 """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 555, 715, 395, 198, 6738, 371, 62, 1990, 18, 7959, 13, 3849, 3866, 353, 1330, 4225, 3866, 353, 11, 9455, 198, 6738, 371, 62, 1990, 18, 7959, 13, 16794, 1330, 10478, 11, ...
2.709402
117
from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns from news import views app_name = "news" urlpatterns = [ path("news/", views.NewsList.as_view()), path("news/<int:pk>/", views.NewsDetail.as_view()), path("category/", views.CategoryList.as_view()), path("categor...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 1334, 62, 30604, 13, 6371, 33279, 82, 1330, 5794, 62, 37333, 844, 62, 33279, 82, 198, 6738, 1705, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 366, 10827, 1, 198, 6371, 33279, 8...
2.658228
158
import torch from torch import nn from .retrieve import SEG_MODELS_REGISTRY @SEG_MODELS_REGISTRY.register()
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 198, 6738, 764, 1186, 30227, 1330, 311, 7156, 62, 33365, 37142, 62, 31553, 1797, 40405, 628, 628, 198, 198, 31, 5188, 38, 62, 33365, 37142, 62, 31553, 1797, 40405, 13, 30238, 3419, 1...
2.714286
42
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from sipHeader import SIPHeader from sipStartLineFactory import SIPStartLineFactory
[ 28311, 25, 198, 220, 220, 220, 422, 269, 10100, 9399, 1330, 10903, 9399, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 10903, 9399, 1330, 10903, 9399, 198, 6738, 31145, 39681, 1330, 311, 4061, 39681, 198, 6738, 31145, 10434, 13...
3.6
50
# # @lc app=leetcode.cn id=1635 lang=python3 # # [1635] number-of-good-pairs # None # @lc code=end
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 13, 31522, 4686, 28, 1433, 2327, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 1433, 2327, 60, 1271, 12, 1659, 12, 11274, 12, 79, 3468, 198, 2, 198, 14202, 198, 2, 2488, 44601, 2438,...
2.085106
47
# Exercise 12: Prompting People # Variables age = raw_input("How old are you? ") height = raw_input("How tall are you? ") weight = raw_input("How much do you weigh? ") # Print print "So, you're %r old, %r tall and %r heavy." % (age, height, weight) # Study Drills # 1. In Terminal where you normally run python to ru...
[ 2, 32900, 1105, 25, 45965, 278, 4380, 198, 198, 2, 15965, 2977, 198, 496, 796, 8246, 62, 15414, 7203, 2437, 1468, 389, 345, 30, 366, 8, 198, 17015, 796, 8246, 62, 15414, 7203, 2437, 7331, 389, 345, 30, 366, 8, 198, 6551, 796, 8246...
3.024523
367
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.446809
47
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Checker...
[ 2, 16529, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 16529, 35937, 198, 3...
2.415137
5,285
"""Endpoints of the Konfuzio Host.""" import logging from konfuzio_sdk import KONFUZIO_HOST, KONFUZIO_PROJECT_ID logger = logging.getLogger(__name__) def get_auth_token_url() -> str: """ Generate URL that creates an authentication token for the user. :return: URL to generate the token. """ ret...
[ 37811, 12915, 13033, 286, 262, 17431, 69, 10277, 952, 14504, 526, 15931, 198, 198, 11748, 18931, 198, 198, 6738, 479, 261, 69, 10277, 952, 62, 21282, 74, 1330, 509, 1340, 38989, 57, 9399, 62, 39, 10892, 11, 509, 1340, 38989, 57, 9399,...
2.701894
1,637
from django.db import models from django.contrib.auth.models import AbstractUser from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.base_user import BaseUserManager # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 42625...
3.461538
65
# Copyright 2020 The HuggingFace Team. 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 applicabl...
[ 2, 15069, 12131, 383, 12905, 2667, 32388, 4816, 13, 1439, 2489, 10395, 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,...
2.735068
1,691
# -*- coding: utf-8 -*- # # ramstk.logger.py is part of The RAMSTK Project # # All rights reserved. # Copyright 2019 Doyle Rowland doyle.rowland <AT> reliaqual <DOT> com """RAMSTK Logger Module.""" # Standard Library Imports import logging import sys from typing import Dict # Third Party Imports from pubsub imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 15770, 301, 74, 13, 6404, 1362, 13, 9078, 318, 636, 286, 383, 13931, 2257, 42, 4935, 198, 2, 198, 2, 1439, 2489, 10395, 13...
2.397535
3,489
import numpy from chaco.api import Plot, ArrayPlotData from chaco.layers.api import ErrorLayer, WarningLayer, StatusLayer from enable.component_editor import ComponentEditor from traits.api import HasTraits, Instance, Button from traitsui.api import UItem, View, HGroup class MyPlot(HasTraits): """ Displays a plo...
[ 198, 11748, 299, 32152, 198, 198, 6738, 442, 10602, 13, 15042, 1330, 28114, 11, 15690, 43328, 6601, 198, 6738, 442, 10602, 13, 75, 6962, 13, 15042, 1330, 13047, 49925, 11, 15932, 49925, 11, 12678, 49925, 198, 6738, 7139, 13, 42895, 62, ...
2.222346
895
from concurrent.futures import ThreadPoolExecutor import time if __name__ == '__main__': main()
[ 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 11748, 640, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
3.125
32
from pygame import * from enemies import * import random init() fontGeneral = font.Font('resources/fonts/Calibri.ttf', 30) fontHealth = font.Font('resources/fonts/Calibri Bold.ttf', 15) #draws itself and its health
[ 6738, 12972, 6057, 1330, 1635, 201, 198, 6738, 5775, 1330, 1635, 201, 198, 11748, 4738, 201, 198, 15003, 3419, 201, 198, 201, 198, 10331, 12218, 796, 10369, 13, 23252, 10786, 37540, 14, 10331, 82, 14, 9771, 571, 380, 13, 926, 69, 3256...
1.890244
164
# Copyright 2019 Nathan Jay and Noga Rotman # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ 2, 15069, 13130, 18106, 9180, 290, 399, 10949, 18481, 805, 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.039666
479
""" Django settings for cheddar_oauth_example project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BAS...
[ 37811, 198, 35, 73, 14208, 6460, 329, 269, 44937, 62, 12162, 1071, 62, 20688, 1628, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, 5450, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14, 16, 13, 22, ...
2.382753
1,322
from django.urls import path from django102.views import index as index_view, UsersListView, GamesListView, something, methods_demo, \ raises_exception, create_game urlpatterns = [ path('', index_view, name='index'), path('2/', UsersListView.as_view()), path('games/', GamesListView.as_view()),...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 201, 198, 201, 198, 6738, 42625, 14208, 15377, 13, 33571, 1330, 6376, 355, 6376, 62, 1177, 11, 18987, 8053, 7680, 11, 5776, 8053, 7680, 11, 1223, 11, 5050, 62, 9536, 78, 11, 3467, 201, 1...
2.596685
181
from google.colab import drive drive.mount('/content/drive') import librosa import os import pandas as pd from numpy import mean import warnings; warnings.filterwarnings('ignore'); folders_5s = { 'pop_5s':'/content/drive/My Drive/ML_Project/New_Data/pop_test_5s', 'rnb_5s':'/content/drive/...
[ 198, 6738, 23645, 13, 4033, 397, 1330, 3708, 198, 19472, 13, 14948, 10786, 14, 11299, 14, 19472, 11537, 198, 198, 11748, 9195, 4951, 64, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 299, 32152, 1330, 1612, 198, ...
2.069838
2,649
import os import argparse import random if __name__ == '__main__': parser = argparse.ArgumentParser(description='Split the data') parser.add_argument('--meta-all', type=str, help='The meta file generated by preprocess.py', required=True) parser.add_argument('--ratio-test', default=0.1, type=float, help='...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 4738, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 41205, 262, 1366, 11537, ...
3.028777
139
""" Frequent item discovery by PCY algorithm""" import operator import json import sys from pyspark import SparkContext, SparkConf import pyspark_cassandra from cassandra.cluster import Cluster cluster = None session = None class PCYFrequentItems: """ Find Frequent item list using PCY algorithm """ ...
[ 37811, 22192, 298, 2378, 9412, 416, 4217, 56, 11862, 37811, 198, 198, 11748, 10088, 198, 11748, 33918, 198, 11748, 25064, 198, 6738, 279, 893, 20928, 1330, 17732, 21947, 11, 17732, 18546, 198, 11748, 279, 893, 20928, 62, 66, 562, 15918, ...
1.911996
5,602
""" A wrapper around my pnc.py module """ import os.path import wx import wx.lib.filebrowsebutton as filebrowse import pnc class MyFrame(wx.Frame): """ This is MyFrame. It just shows a few controls on a wxPanel, and has a simple menu. Use this file inFileBtn Write this root name TextEntry ...
[ 37811, 198, 32, 29908, 1088, 616, 279, 10782, 13, 9078, 8265, 198, 37811, 198, 198, 11748, 28686, 13, 6978, 198, 198, 11748, 266, 87, 198, 11748, 266, 87, 13, 8019, 13, 7753, 25367, 325, 16539, 355, 2393, 25367, 325, 198, 198, 11748, ...
2.190367
872
import sys from src.Exchange import Exchange if __name__ == "__main__": exchange = None if len(sys.argv) == 2: if sys.argv[1] == "debug": # Exchange outputs using debug mode. exchange = Exchange(debug="dump") elif sys.argv[1] == "none": # Exchange won't outp...
[ 11748, 25064, 198, 198, 6738, 12351, 13, 3109, 3803, 1330, 12516, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 5163, 796, 6045, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 6624...
2.505703
263
from .signal import ExtrinsicRewardSignal
[ 6738, 764, 12683, 282, 1330, 5683, 81, 1040, 291, 48123, 11712, 282, 198 ]
3.230769
13
import server if __name__ == "__main__": server.app.run(host='0.0.0.0',port=5000,debug=False)
[ 11748, 4382, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 4382, 13, 1324, 13, 5143, 7, 4774, 11639, 15, 13, 15, 13, 15, 13, 15, 3256, 634, 28, 27641, 11, 24442, 28, 25101, 8, 198 ]
2.302326
43
import tempfile from logging import getLogger import mailparser from django.conf import settings from django.core.exceptions import ImproperlyConfigured from datahub.documents import utils as documents from datahub.interaction.email_processors.processors import CalendarInteractionEmailProcessor logger = getLogger(__...
[ 11748, 20218, 7753, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 11748, 6920, 48610, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 198, ...
2.421606
1,046
import random as r offBoundsMsgs = ["Der er ikkje noko i den retninga.", "Du møtte ein vegg.", "Du kjem deg ikkje vidare i den retninga."] roomSizeX, roomSizeY = 2, 1 # Dette er baseklassa til allle romma
[ 11748, 4738, 355, 374, 628, 198, 2364, 33, 3733, 10128, 14542, 796, 14631, 28532, 1931, 220, 36073, 18015, 299, 16044, 1312, 2853, 1005, 768, 64, 33283, 366, 35660, 285, 24172, 83, 660, 304, 259, 1569, 1130, 33283, 366, 35660, 479, 73, ...
2.420455
88
#!/usr/bin/env python # _*_ coding: utf-8 _*_ import os import argparse from pymatflow.vasp.dfpt import dfpt_run """ usage: """ params = {} if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-d", "--directory", type=str, default="tmp-vasp-static", ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 201, 198, 201, 198, 11748, 28686, 201, 198, 11748, 1822, 29572, 201, 198, 201, 198, 201, 198, 201, 198, 6738, 279, ...
2.461252
1,613
from python5_unixSocket import interComs myInterComs = interComs() myInterComs.run() import sys from time import sleep while True: print("MESSAGES FROM PYTHON 5") sys.stdout.flush() myInterComs.send( {"wordDawg": "from python5"} ) sleep(0.500)
[ 6738, 21015, 20, 62, 403, 844, 39105, 1330, 987, 34, 3150, 198, 1820, 9492, 34, 3150, 796, 987, 34, 3150, 3419, 198, 1820, 9492, 34, 3150, 13, 5143, 3419, 198, 11748, 25064, 198, 6738, 640, 1330, 3993, 198, 198, 4514, 6407, 25, 198,...
2.524272
103
# -*- coding: utf-8 -*- """ Define extensions to be used with this Revit model. Defined extensions can be installed by using the "Install Extensions" button. """ import revitron import System.Windows from pyrevit import script from rpw.ui.forms import FlexForm, TextBox, Button, Label if not revitron.Document().isFami...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 7469, 500, 18366, 284, 307, 973, 351, 428, 5416, 270, 2746, 13, 2896, 1389, 18366, 460, 307, 6589, 416, 1262, 262, 366, 15798, 49751, 1, 4936, 13, 220, 198...
2.808411
642
#!/usr/bin/env python import logging import numpy as np import librosa import scipy from random import randint from src.utils.math_utils import nextpow2 logger = logging.getLogger(__name__)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 9195, 4951, 64, 198, 11748, 629, 541, 88, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 12351, 13, 26791, 13, 11018, 62, 2...
3.063492
63
import numpy as np import pickle @np.vectorize
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 628, 198, 31, 37659, 13, 31364, 1096, 628 ]
2.941176
17
# Generated by Django 2.1.2 on 2018-10-25 09:36 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone import uuid
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 17, 319, 2864, 12, 940, 12, 1495, 7769, 25, 2623, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12102, 2024, ...
3
68
import pandas as pd # Crear diccionario donde key sera columna a crear # y su valuela informacion de cada columna data = {'paises': ['Mexico', 'España', 'Estados Unidos'], 'Ciudades': ['Monterrey,' 'Madrid', 'Nueva York'], 'Casos': [4291, 3829, 10283]} # Crear un DataFrame pasando el diccioario y # señalizar ...
[ 11748, 19798, 292, 355, 279, 67, 220, 198, 198, 2, 5844, 283, 288, 44240, 295, 4982, 288, 14378, 1994, 1055, 64, 951, 388, 2616, 257, 1126, 283, 220, 198, 2, 331, 424, 1188, 2731, 64, 4175, 49443, 390, 269, 4763, 951, 388, 2616, 2...
2.375
208
#!/pxrpythonsubst # # Copyright 2017 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
[ 2, 48443, 8416, 81, 79, 5272, 684, 549, 301, 198, 2, 198, 2, 15069, 2177, 46706, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 25189, 4891, 13789, 4943, 198, 2, 351, 262, 1708, 17613, 26, ...
3.560907
353
#!/usr/bin/env python3 # This script fixes some problems the RTTM file # including invalid time boundaries and others import os import sys import numpy as np import argparse if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 770, 4226, 13040, 617, 2761, 262, 11923, 15972, 2393, 198, 2, 1390, 12515, 640, 13215, 290, 1854, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, ...
3.34375
64
import math r = Rect(2, 5) c = Circle(3) shapes: list[Shape] = [ r, c, ] [print_area(s) for s in shapes] print(isinstance(r, Rect)) print(isinstance(r, Circle)) print(isinstance(r, Shape)) # print_area(2) print(Rect.mro()) Person().say_hello()
[ 11748, 10688, 628, 628, 628, 198, 81, 796, 48599, 7, 17, 11, 642, 8, 198, 66, 796, 16291, 7, 18, 8, 198, 1477, 7916, 25, 1351, 58, 33383, 60, 796, 685, 198, 220, 220, 220, 374, 11, 198, 220, 220, 220, 269, 11, 198, 60, 198, ...
2.267241
116