content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# Copyright (c) 2018 Serguei Kalentchouk et al. All rights reserved. # Use of this source code is governed by an MIT license that can be found in the LICENSE file. from node_test_case import NodeTestCase, cmds
[ 2, 15069, 357, 66, 8, 2864, 2930, 18701, 72, 12612, 298, 354, 38960, 2123, 435, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 281, 17168, 5964, 326, 460, 307, 1043, 287, 262, 38559, 24290, 2393, 13,...
3.637931
58
import pytest from models import TodoItem pytestmark = [ pytest.mark.usefixtures("use_db"), ] def test_format_without_strike(items, chat): lines = chat.get_formatted_items().split("\n") assert len(lines) == 2 assert "1. Hello" == lines[0] assert "2. Nice!" == lines[1] def test_format_with_s...
[ 11748, 12972, 9288, 198, 198, 6738, 4981, 1330, 309, 24313, 7449, 198, 198, 9078, 9288, 4102, 796, 685, 198, 220, 220, 220, 12972, 9288, 13, 4102, 13, 1904, 69, 25506, 7203, 1904, 62, 9945, 12340, 198, 60, 628, 628, 198, 4299, 1332, ...
2.487465
359
import copy import json from django.contrib import admin from django.db import models from web.multilingual.data_structures import MultiLingualTextStructure from web.multilingual.form import MultiLingualFormField, MultiLingualRichTextFormField, \ MultiLingualRichTextUploadingFormField from web.multilingual.widget...
[ 11748, 4866, 198, 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 3992, 13, 16680, 34900, 13, 7890, 62, 7249, 942, 1330, 15237, 43, 278, 723, 8206, ...
3.457627
118
from django.test import TestCase from shop.models import Product from django.contrib.auth.models import User from coupons.forms import CouponForm
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 201, 198, 6738, 6128, 13, 27530, 1330, 8721, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 201, 198, 6738, 45972, 13, 23914, 1330, 43156, 261, 8479, 201,...
2.8
60
from __future__ import annotations import asyncio from typing import Any import asynctest.mock # type: ignore import pytest # type: ignore import pytest_mock._util # type: ignore pytest_mock._util._mock_module = asynctest.mock
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 355, 2047, 310, 395, 13, 76, 735, 220, 1303, 2099, 25, 8856, 198, 11748, 12972, 9288, 220, 1303, 2099, 25, 8856, 198, 11...
3.012658
79
#=============================================================================# # # # MODIFIED: 15-Jan-2019 by C. Purcell # # # ...
[ 2, 23926, 25609, 46249, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.088983
236
# -*- coding: utf-8 -*- """ Physical or mathematical constants. Since every code has its own conversion units, this module defines what QE understands as for an eV or other quantities. Whenever possible, we try to use the constants defined in :py:mod:aiida.common.constants:, but if some constants are slightly differen...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31611, 393, 18069, 38491, 13, 220, 198, 6385, 790, 2438, 468, 663, 898, 11315, 4991, 11, 428, 8265, 15738, 644, 198, 48, 36, 14759, 355, 329, 281, 304, 53,...
2.4625
400
# This file is MACHINE GENERATED! Do not edit. # Generated by: tensorflow/python/tools/api/generator/create_python_api.py script. """Public API for tf.keras.applications namespace. """ from __future__ import print_function as _print_function import sys as _sys from keras.api._v2.keras.applications import densenet fr...
[ 2, 770, 2393, 318, 337, 16219, 8881, 24700, 1137, 11617, 0, 2141, 407, 4370, 13, 198, 2, 2980, 515, 416, 25, 11192, 273, 11125, 14, 29412, 14, 31391, 14, 15042, 14, 8612, 1352, 14, 17953, 62, 29412, 62, 15042, 13, 9078, 4226, 13, ...
2.951902
894
from flash.vision.embedding.image_embedder_model import ImageEmbedder, ImageEmbedderDataPipeline
[ 6738, 7644, 13, 10178, 13, 20521, 12083, 13, 9060, 62, 20521, 1082, 62, 19849, 1330, 7412, 31567, 276, 1082, 11, 7412, 31567, 276, 1082, 6601, 47, 541, 4470, 198 ]
3.344828
29
import os import sys import logging from configparser import ConfigParser from .open_struct import OpenStruct from .section_struct import SectionStruct # TODO: use file lock when read/write def choose_theirs(section, option, mine, theirs): '''Always prefer values for keys from file.''' return theirs def c...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 6738, 764, 9654, 62, 7249, 1330, 4946, 44909, 198, 6738, 764, 5458, 62, 7249, 1330, 7275, 44909, 198, 198, 2, 16926, 46, 25, 779, ...
3.227273
176
import origen # pylint: disable=import-error import pytest, pathlib, os, stat, abc from os import access, W_OK, X_OK, R_OK from tests.shared import clean_falcon, clean_compiler, tmp_dir def user_compiler(): ''' End users should access the compiler via ``origen.app.compiler``. ''' return origen.app.co...
[ 11748, 1796, 268, 220, 1303, 279, 2645, 600, 25, 15560, 28, 11748, 12, 18224, 201, 198, 11748, 12972, 9288, 11, 3108, 8019, 11, 28686, 11, 1185, 11, 450, 66, 201, 198, 6738, 28686, 1330, 1895, 11, 370, 62, 11380, 11, 1395, 62, 11380...
2.12099
1,091
from flask import Flask, jsonify, request import predict import socket app = Flask(__name__) #to spedicy route after url if __name__ == '__main__': #for remote host ip = socket.gethostbyname(socket.gethostname()) app.run(port=5000,host=ip) #for local host #app.run(debug=True, port=5000)
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 198, 11748, 4331, 198, 11748, 17802, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 2, 1462, 40424, 4611, 6339, 706, 19016, 628, 198, 198, 361, 11593, 3672, 834, 6624, ...
2.721739
115
# (c) 2016, Hao Feng <whisperaven@gmail.com> __version__ = '0.1.0'
[ 2, 357, 66, 8, 1584, 11, 367, 5488, 18164, 1279, 1929, 271, 525, 4005, 31, 14816, 13, 785, 29, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 198 ]
2.060606
33
from Dimension_Reduction import Viewer import pandas as pd view_tool = Viewer() reduc = 'pca' suffix = '5' data_plot = pd.read_csv(f"{reduc}_dim2_{suffix}.csv", delimiter=",") models = ['km', 'fuzz', 'gmm', 'dbsc', 'hier', 'spec' ] for model in models: print(model) labels = pd.read_csv(f"labels_{mo...
[ 6738, 34024, 62, 7738, 8110, 1330, 3582, 263, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 201, 198, 1177, 62, 25981, 796, 3582, 263, 3419, 201, 198, 445, 1229, 796, 705, 79, 6888, 6, 201, 198, 37333, 844, 796, 705, 20, 6,...
2.335196
179
from collections import UserList from dataclasses import dataclass, field from datetime import datetime from typing import List, Dict, Any, Optional, Type DATE_FORMAT = '%Y-%m-%d %H:%M:%S %Z' _link_classes = {'navigation': NavigationLink, 'action': ActionLink} # a type -...
[ 6738, 17268, 1330, 11787, 8053, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 4377, 11, 32233, 11, 5994, 198, 198, 35, 6158, 62,...
2.618834
223
from jobs_scraper import JobsScraper # Let's create a new JobsScraper object and perform the scraping for a given query. position_var = "Python" scraper = JobsScraper(country="ca", position=position_var, location="Toronto", pages=3) df = scraper.scrape() df.to_csv(rf'{position_var} jobs.csv', index = False)
[ 6738, 3946, 62, 1416, 38545, 1330, 19161, 3351, 38545, 198, 198, 2, 3914, 338, 2251, 257, 649, 19161, 3351, 38545, 2134, 290, 1620, 262, 46743, 329, 257, 1813, 12405, 13, 198, 9150, 62, 7785, 796, 366, 37906, 1, 198, 198, 1416, 38545,...
3.206186
97
import tarfile, sys,os from PyQt4.QtCore import * from PyQt4.QtGui import * app = QApplication(sys.argv) try: zfile = tarfile.open(sys.argv[1], "r:gz" ) zfile.extractall(sys.argv[2]) zfile.close() mb = QMessageBox('Red-R Updated', "Red-R has been updated'", QMessageBox.Informa...
[ 11748, 13422, 7753, 11, 25064, 11, 418, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 14055, 1330, 1635, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 8205, 72, 1330, 1635, 198, 1324, 796, 1195, 23416, 7, 17597, 13, 853, 85, 8, 198, 198, ...
2.114883
383
from ctypes import * #from multiprocessing import Process, Queue import queue import time from threading import Lock,Thread from fastapi import FastAPI from fastapi import Request from fastapi import WebSocket, WebSocketDisconnect import uvicorn #from yolo_service import * import socket import random from typing import...
[ 6738, 269, 19199, 1330, 1635, 198, 2, 6738, 18540, 305, 919, 278, 1330, 10854, 11, 4670, 518, 198, 11748, 16834, 198, 11748, 640, 198, 6738, 4704, 278, 1330, 13656, 11, 16818, 198, 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 3049,...
2.92437
357
import numpy as np from pyqmc.slater import sherman_morrison_row from pyqmc.slater import sherman_morrison_ms if __name__ == "__main__": r_err, inv_err = list(zip(*[run_sherman_morrison() for i in range(2000)])) print(np.amax(r_err)) print(np.amax(inv_err)) counts, bins = np.histogram(np.log10(in...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 80, 23209, 13, 6649, 729, 1330, 15059, 805, 62, 4491, 7426, 62, 808, 198, 6738, 12972, 80, 23209, 13, 6649, 729, 1330, 15059, 805, 62, 4491, 7426, 62, 907, 628, 628, 628, 198, 361, 11...
2.333333
168
#!/usr/bin/env python3 import sys import socket import time import numpy as np import matplotlib.pyplot as plt HOST = '10.49.234.234' PORT = 2055 if __name__ == '__main__': # Select TR command_select='SELECT 0' rsp=repr(command_to_licel(command_select)) print('Received',rsp) # Clear memory ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 198, 11748, 17802, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 39, 10892, 796, 705, 9...
2.128521
568
# Copyright 2012 Nebula, 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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
[ 2, 15069, 2321, 46915, 11, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
2.407115
1,518
## Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. ## Note: ## The solution set must not contain duplicate triplets. ## Example: ## Given array nums = [-1, 0, 1, 2, -1, -4], ## A solution set is: ## [ ## ...
[ 2235, 11259, 281, 7177, 997, 82, 286, 299, 37014, 11, 389, 612, 4847, 257, 11, 275, 11, 269, 287, 997, 82, 884, 326, 257, 1343, 275, 1343, 269, 796, 657, 30, 9938, 477, 3748, 15055, 912, 287, 262, 7177, 543, 3607, 262, 2160, 286, ...
2.477419
155
from django.db import models from user.models import UserModel
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 2836, 13, 27530, 1330, 11787, 17633, 628 ]
4
16
import os import click from developers_chamber.git_utils import get_current_branch_name from developers_chamber.gitlab_utils import \ create_merge_request as create_merge_request_func from developers_chamber.scripts import cli DEFAULT_API_URL = os.environ.get('GITLAB_API_URL', 'https://gitlab.com/api/v4') DEFAUL...
[ 11748, 28686, 198, 198, 11748, 3904, 198, 198, 6738, 6505, 62, 354, 7789, 13, 18300, 62, 26791, 1330, 651, 62, 14421, 62, 1671, 3702, 62, 3672, 198, 6738, 6505, 62, 354, 7789, 13, 18300, 23912, 62, 26791, 1330, 3467, 198, 220, 220, ...
2.664835
182
# Copyright 2021 IBM Corp. # # 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, sof...
[ 2, 15069, 33448, 19764, 11421, 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, 13, 198, 2, 921, 743...
2.514033
4,418
import unittest from os import getcwd from click.testing import CliRunner from openvariant.commands.openvar import cat
[ 11748, 555, 715, 395, 198, 6738, 28686, 1330, 651, 66, 16993, 198, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 198, 6738, 1280, 25641, 415, 13, 9503, 1746, 13, 9654, 7785, 1330, 3797, 628 ]
3.388889
36
import torch import torch.nn as nn
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 628 ]
3.166667
12
from camera import Camera if __name__ == '__main__': main()
[ 198, 6738, 4676, 1330, 20432, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.72
25
from calendarApp import shell, models import os if __name__ == "__main__": main()
[ 6738, 11845, 4677, 1330, 7582, 11, 4981, 198, 11748, 28686, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.966667
30
import time import numpy as np import scipy.sparse as sps from gensim.models import Word2Vec from tqdm import tqdm from recommenders.recommender import Recommender from utils.datareader import Datareader from utils.evaluator import Evaluator from utils.post_processing import eurm_to_recommendation_list from recommender...
[ 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 82, 198, 6738, 308, 641, 320, 13, 27530, 1330, 9678, 17, 53, 721, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 4313, ...
2.547684
367
from ._version import __version__ # noqa from .pyesasky import ESASkyWidget # noqa from .catalogue import Catalogue # noqa from .catalogueDescriptor import CatalogueDescriptor # noqa from .cooFrame import CooFrame # noqa from .footprintSet import FootprintSet # noqa from .footprintSetDescriptor import FootprintSetDesc...
[ 6738, 47540, 9641, 1330, 220, 11593, 9641, 834, 1303, 645, 20402, 198, 6738, 764, 79, 8505, 2093, 88, 1330, 13380, 1921, 2584, 38300, 1303, 645, 20402, 198, 6738, 764, 9246, 30326, 1330, 16758, 5119, 1303, 645, 20402, 198, 6738, 764, 92...
3.130612
245
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: Jared """ import numpy as np import pandas as pd import myConfig import matplotlib.pyplot as plt from ast import literal_eval from plotter import getTrendPlot1 from matplotlib.pyplot import figure df = pd.read_csv(myConfig.extOutput) dffExt = pd.read_csv(my...
[ 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, 31, 9800, 25, 19116, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, ...
1.857958
1,577
name = input("Enter your name? ") if name == "guna": print("1234567890") elif name == "david": print("0987654321") elif name == "rakulan": print("12345") elif name == "raj": print("1234455667") else: print("No contacts found")
[ 3672, 796, 5128, 7203, 17469, 534, 1438, 30, 366, 8, 628, 198, 361, 1438, 6624, 366, 7145, 64, 1298, 198, 197, 4798, 7203, 10163, 2231, 30924, 3829, 4943, 198, 198, 417, 361, 1438, 6624, 366, 67, 8490, 1298, 198, 197, 4798, 7203, 29...
2.443299
97
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time import emoji import string import csv import os browser = webdriver.Chrome() user = input('Masukkan username akun anda: ') passwo = input('Masukkan password akun anda: ') url = 'https://www.instagr...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 201, 198, 11748, 640, 201, 198, 11748, 44805, 201, 198, 11748, 4731, 201, 198, 11748, 269, 21370, 201, 198...
2.670886
158
import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import plotly.graph_objects as go import plotly.express as px import plotly.figure_factory as ff from sklearn.metrics import roc_curve import pandas as p...
[ 11748, 14470, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 6738, 14470, 13, 45841, 3976, ...
2.535817
2,094
from katana.sdk.service import get_component from katana.sdk.service import Service
[ 6738, 479, 43777, 13, 21282, 74, 13, 15271, 1330, 651, 62, 42895, 198, 6738, 479, 43777, 13, 21282, 74, 13, 15271, 1330, 4809, 628 ]
3.541667
24
from .base_controller import BaseController from ..helper.utils import render_template from ..helper.constants import STATUS_OK
[ 6738, 764, 8692, 62, 36500, 1330, 7308, 22130, 198, 6738, 11485, 2978, 525, 13, 26791, 1330, 8543, 62, 28243, 198, 6738, 11485, 2978, 525, 13, 9979, 1187, 1330, 15486, 2937, 62, 11380, 628 ]
3.909091
33
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2177, 402, 3528, 8987, 23973, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 7...
3.622776
281
from django.conf import settings from selenium import webdriver from selenium.webdriver.chrome.options import Options import pytest import os
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 18634, 198, 11748, 12972, 9288, 198, 11748, 28686, 628, 628, 628 ]
3.769231
39
# Generated by Django 3.0.3 on 2020-02-05 08:50 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 18, 319, 12131, 12, 2999, 12, 2713, 8487, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os, sys import json if __name__ == '__main__': c = Convert() c.apply() # c.mips_gcc_c() # c.mips_objcopy() # c.mips_bin2mem() # config = Config()
[ 11748, 28686, 11, 25064, 198, 11748, 33918, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 269, 796, 38240, 3419, 198, 220, 220, 220, 269, 13, 39014, 3419, 198, 220, 220, 220, 1303, 269, ...
2.056818
88
#!/bin/python3 # Copyright (C) 2021, Michigan State University. # # 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,...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 2, 15069, 357, 34, 8, 33448, 11, 7055, 1812, 2059, 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...
3.415825
594
import torch from torch import nn import torch.nn.functional as F import torch.optim as optim from preprocess import * from torch.utils.data import Dataset, DataLoader from blazeface import BlazeFace import os import cv2 import numpy as np from matplotlib import pyplot as plt import random import pickle ...
[ 11748, 28034, 201, 198, 6738, 28034, 1330, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 28034, 13, 40085, 355, 6436, 201, 198, 6738, 662, 14681, 1330, 1635, 201, 198, 6738, 28034, 13, 26791, 13, 78...
2.350093
537
# Copyright 2020 Makani Technologies LLC # # 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, 12131, 15841, 3216, 21852, 11419, 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, 13, 198, 2, ...
3.225888
394
#!/usr/bin/env python ########################################################################### # This software is graciously provided by HumaRobotics # under the Simplified BSD License on # github: git@www.humarobotics.com:baxter_tasker # HumaRobotics is a trademark of Generation Robots. # www.humarobotics.com #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 29113, 29113, 7804, 21017, 220, 198, 2, 770, 3788, 318, 1036, 45289, 2810, 416, 49387, 14350, 23891, 220, 198, 2, 739, 262, 45157, 1431, 347, 10305, 13789, 319, 198, 2, 33084, 25, 1760...
2.964418
1,349
from siptrackdlib import errors from siptrackdlib import log object_registry = ObjectRegistry()
[ 6738, 264, 10257, 39638, 67, 8019, 1330, 8563, 198, 6738, 264, 10257, 39638, 67, 8019, 1330, 2604, 198, 198, 15252, 62, 2301, 4592, 796, 9515, 8081, 4592, 3419, 198 ]
3.344828
29
from GenericAdventuringRequest import GenericAdventuringRequest
[ 6738, 42044, 2782, 1151, 870, 18453, 1330, 42044, 2782, 1151, 870, 18453, 198 ]
4.923077
13
''' myclient1.py - imports mymod.py and check its operation. ''' from mymod import test, countChars, countChars1, countLines, countLines1 text = 'test.txt' file = open(text) print(test(text), test(file)) print(countChars(text), countChars1(file)) print(countLines(text), countLines1(file)) print('\nedited again versio...
[ 7061, 6, 198, 1820, 16366, 16, 13, 9078, 532, 17944, 616, 4666, 13, 9078, 290, 2198, 663, 4905, 13, 198, 7061, 6, 198, 6738, 616, 4666, 1330, 1332, 11, 954, 1925, 945, 11, 954, 1925, 945, 16, 11, 954, 43, 1127, 11, 954, 43, 1127...
2.801724
116
from .date import Date from ..response import handleResponse from datetime import datetime
[ 6738, 764, 4475, 1330, 7536, 198, 6738, 11485, 26209, 1330, 5412, 31077, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628 ]
4.6
20
#!/usr/bin/python import sys from pyspark import SparkContext from shutil import rmtree import os.path as path if len(sys.argv) > 1: if path.exists("output"): rmtree("output") sc = SparkContext() localidad = sys.argv[1] localidadRDD = sc.textFile("Gasolineras.csv") localidadRDD = localida...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 6738, 279, 893, 20928, 1330, 17732, 21947, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 11748, 28686, 13, 6978, 355, 3108, 198, 198, 361, 18896, 7, 17597, 13, 853...
2.170591
2,591
from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse, reverse_lazy from django.http import HttpResponseRedirect from django.shortcuts import render,HttpResponse from django.views.generic.edit import CreateView, Updat...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, ...
3.526405
587
#!/usr/bin/env python3 import logging import os import pickle import time from os.path import join as pjoin import matplotlib.pyplot as plt import numpy as np import scipy from matplotlib import rc from scipy.optimize import least_squares import asymptotic_formulae from asymptotic_formulae import GaussZ0 from asympto...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 640, 198, 6738, 28686, 13, 6978, 1330, 4654, 355, 279, 22179, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487,...
2.528384
1,374
import pytest from pxtrade.assets import reset, Stock, Portfolio from pxtrade.compliance import ( Compliance, UnitLimit, WeightLimit, )
[ 11748, 12972, 9288, 198, 6738, 279, 742, 27585, 13, 19668, 1330, 13259, 11, 10500, 11, 4347, 13652, 198, 6738, 279, 742, 27585, 13, 47587, 1330, 357, 198, 220, 220, 220, 40536, 11, 198, 220, 220, 220, 11801, 39184, 11, 198, 220, 220, ...
3.040816
49
from article.serializers.serializers import ( ArticleListSerializer, ArticleDetailSerializer )
[ 6738, 2708, 13, 46911, 11341, 13, 46911, 11341, 1330, 357, 198, 220, 220, 220, 10172, 8053, 32634, 7509, 11, 198, 220, 220, 220, 10172, 11242, 603, 32634, 7509, 198, 8, 198 ]
3.322581
31
# set up the environment by reading in libraries: # os... graphics... data manipulation... time... math... statistics... import sys import os from urllib.request import urlretrieve import matplotlib as mpl import matplotlib.pyplot as plt import PIL as pil from IPython.display import Image import pandas as pd from p...
[ 2, 900, 510, 262, 2858, 416, 3555, 287, 12782, 25, 220, 198, 2, 28686, 986, 9382, 986, 1366, 17512, 986, 640, 986, 10688, 986, 7869, 986, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, ...
2.750951
526
# # Bentobox # SDK - Graph # Graph Value # from typing import Any from bento.value import wrap from bento.protos.graph_pb2 import Node def wrap_const(val: Any): """Wrap the given native value as a Constant graph node. If val is a Constant node, returns value as is. Args: val: Native value to wrap...
[ 2, 198, 2, 20421, 672, 1140, 198, 2, 26144, 532, 29681, 198, 2, 29681, 11052, 198, 2, 198, 198, 6738, 19720, 1330, 4377, 198, 6738, 17157, 78, 13, 8367, 1330, 14441, 198, 6738, 17157, 78, 13, 11235, 418, 13, 34960, 62, 40842, 17, ...
2.788991
218
from marshmallow import Schema, fields from marshmallow.validate import Length, Range
[ 6738, 22397, 42725, 1330, 10011, 2611, 11, 7032, 198, 6738, 22397, 42725, 13, 12102, 378, 1330, 22313, 11, 13667 ]
4.473684
19
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os import sys import numpy as np from joblib import Parallel, delayed import joblib import argparse import importlib from itertools import product import collections from copy import deepcopy from mcpy.utils import fi...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1693, 8019, 1330, 42945, 11, 11038, 198...
3.39777
538
#------------------------------------------------------------------------------------------------------ # File Name: MusicGame.py # Author: Kyle Parrish # Date: 7/4/2014 # Description: This is a simple program that I wrote for the raspberry pi so that my daughter can # play with. It is a simple pro...
[ 2, 10097, 3880, 23031, 198, 2, 9220, 6530, 25, 220, 220, 220, 7849, 8777, 13, 9078, 198, 2, 6434, 25, 220, 220, 220, 220, 220, 220, 14316, 2547, 37518, 198, 2, 7536, 25, 220, 220, 220, 220, 220, 220, 220, 220, 767, 14, 19, 14, ...
2.659776
1,161
from __future__ import print_function from robin.utils import img_processing_utils import numpy as np
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 3857, 259, 13, 26791, 1330, 33705, 62, 36948, 62, 26791, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.714286
28
#4) ##########KEYWORD############### ################################ # . # .. # (Feed Forward NN) . # . # () . # Layer . # . # . # 2 400% 10% . # . # 0 9 10 3 . # 3 . . #25 P35 # #Layer ...
[ 2, 19, 8, 220, 220, 198, 198, 7804, 2235, 20373, 54, 12532, 7804, 4242, 21017, 628, 628, 198, 198, 29113, 628, 198, 2, 220, 220, 220, 220, 220, 764, 220, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 220, 220, 220, 11485,...
1.370629
1,573
import os import pandas as pd dictt = {} i = 0 for label in ['down', 'up', 'left', 'right']: img_lst = os.listdir("./data/img_data/" + label + "/") temp_label = [0] * 4 temp_label[i] = 1 for img in img_lst: print(label + " " + img) dictt[img] = temp_label i += 1 label_df = pd.Dat...
[ 11748, 28686, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11600, 83, 796, 23884, 198, 72, 796, 657, 198, 198, 1640, 6167, 287, 37250, 2902, 3256, 705, 929, 3256, 705, 9464, 3256, 705, 3506, 6, 5974, 198, 220, 220, 220, 3370...
2.187793
213
''' Created on Jun 27, 2017 @author: lawrencezeng ''' import unittest from rubiks_race import solver if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.test_solve'] unittest.main()
[ 7061, 6, 198, 41972, 319, 7653, 2681, 11, 2177, 198, 198, 31, 9800, 25, 1099, 6784, 89, 1516, 198, 7061, 6, 198, 11748, 555, 715, 395, 198, 6738, 6437, 72, 591, 62, 16740, 1330, 1540, 332, 198, 220, 220, 220, 220, 220, 220, 220, ...
2.265957
94
# -*- coding: utf-8 -*- from __future__ import unicode_literals from modeltranslation import settings as mt_settings from modeltranslation.utils import build_localized_fieldname, get_translation_fields from django.db import migrations, models
[ 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, 953, 2120, 26084, 7592, 1330, 6460, 355, 45079, 62, 33692, 198, 6738, 953, 2120, 26084, 7592, ...
3.416667
72
#!/usr/bin/env python # Copyright 2016-2021 Biomedical Imaging Group Rotterdam, Departments of # Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 1584, 12, 1238, 2481, 8436, 35914, 48656, 4912, 18481, 353, 11043, 11, 2129, 32514, 286, 198, 2, 8366, 554, 18982, 873, 290, 5325, 12371, 11, 5256, 8597, 385, 13122, 11,...
3.488127
379
import argparse import json import re if __name__ == "__main__": parser = argparse.ArgumentParser(description = 'JSON tweet converter', epilog = 'lol tw33tz', add_help = 'How to use', prog = 'python json_to_txt.py <options>') # Required arguments. parser.add_argument("-i", "--input", requi...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 302, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 796, 705, 40386, 6126, 38394, 3256...
2.29
700
# Generated by Django 2.2.5 on 2019-10-26 20:20 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 20, 319, 13130, 12, 940, 12, 2075, 1160, 25, 1238, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: utf-8 -*- # # Copyright (c) 2020 CPV.BY # # For suggestions and questions: # <7664330@gmail.com> # # LICENSE: Commercial import webbrowser from kivymd.theming import ThemableBehavior from kivymd.uix.screen import MDScreen
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 16932, 53, 13, 17513, 198, 2, 198, 2, 1114, 11776, 290, 2683, 25, 198, 2, 1279, 4304, 2414, 26073, 31, 14816, 13, 785, 29, 198...
2.704545
88
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from gym import Env from scipy.spatial import distance from typing import Optional, Tuple, Any from causal_rl.environments import CausalEnv
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 11550, 1330, 2039, 85, 198, 6738, 629, 541, 88, 13, 2777, 34961, 1330, 5253, 19...
3.283582
67
from flask import Flask app = Flask(__name__) if __name__ == "__main__": app.run(port=5000)
[ 6738, 42903, 1330, 46947, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 598, 13, 5143, 7, 634, 28, 27641, 8, 198 ]
2.552632
38
#!/usr/bin/env python3 import pandas as pd import sys import json from Bio import SeqIO sample_name=sys.argv[1] pango=pd.read_csv('pango.csv') nextclade=pd.read_csv('nextclade.tsv', sep='\t') aln2type=pd.read_csv('aln2type.csv') pango['sampleName']=sample_name nextclade['sampleName']=sample_name aln2type['sampleName...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 11748, 33918, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 198, 39873, 62, 3672, 28, 17597, 13, 853, 85, 58, 16, 60, 198,...
2.49354
1,161
from alerta.models.alert import Alert from alerta.webhooks import WebhookBase from alerta.exceptions import RejectException import os import hashlib
[ 6738, 7995, 64, 13, 27530, 13, 44598, 1330, 23276, 198, 6738, 7995, 64, 13, 12384, 25480, 82, 1330, 5313, 25480, 14881, 198, 6738, 7995, 64, 13, 1069, 11755, 1330, 797, 752, 16922, 198, 11748, 28686, 198, 11748, 12234, 8019, 198 ]
3.725
40
# 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 the...
[ 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, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.292225
373
################################################## # # ################################################## # []"", # ignore_user = ["Nightbot","Streamelements","Moobot"] # # URL del_word = ["88+","+"] # # https://cloud.google.com/translate/docs/languages ignore_lang = ["",""] # home_lang = "ja" # home_lang ...
[ 29113, 14468, 2235, 198, 2, 220, 198, 2, 220, 198, 29113, 14468, 2235, 198, 2, 17635, 1, 1600, 198, 198, 2, 220, 198, 46430, 62, 7220, 796, 14631, 24732, 13645, 2430, 30611, 480, 3639, 2430, 16632, 672, 313, 8973, 198, 198, 2, 220, ...
2.859091
220
import logging from sqlalchemy.exc import OperationalError from wxcloudrun import db from wxcloudrun.model import Counters # logger = logging.getLogger('log') logger.info("aaaaaaa") def query_counterbyid(id): """ IDCounter :param id: CounterID :return: Counter """ logger.info("bbbbbbbbb") ...
[ 11748, 18931, 198, 198, 6738, 44161, 282, 26599, 13, 41194, 1330, 6564, 864, 12331, 198, 198, 6738, 266, 87, 17721, 5143, 1330, 20613, 198, 6738, 266, 87, 17721, 5143, 13, 19849, 1330, 3545, 1010, 198, 198, 2, 220, 198, 6404, 1362, 79...
2.388158
608
# -*- encoding: utf-8 -*- import os import sys import uuid import pytest from django.apps import apps from django.contrib.auth.models import Group from django.core.files.base import ContentFile try: from django.core.urlresolvers import reverse except ImportError: from django.urls import reverse from django.db...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 334, 27112, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, 36...
3.109215
293
from typing import List from typing import Tuple from bot.utilities.api.constants import SCORE_TEMPLATE
[ 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 10214, 13, 315, 2410, 13, 15042, 13, 9979, 1187, 1330, 6374, 6965, 62, 51, 3620, 6489, 6158, 628 ]
3.419355
31
# -*- coding: utf-8 -*- # @Time : 2021/4/6 9:21 # @Author : # @File : carousel_serializers.py # @Software: Pycharm from rest_framework import serializers from Emall.exceptions import DataFormatError from shop_app.models.commodity_models import Carousel
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 1058, 33448, 14, 19, 14, 21, 860, 25, 2481, 198, 2, 2488, 13838, 1058, 220, 198, 2, 2488, 8979, 1058, 1097, 48355, 62, 46911, 11341, 13, 9078, 19...
2.826087
92
from itertools import chain from typing import List, Tuple from .br.br_nud import *
[ 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 198, 6738, 764, 1671, 13, 1671, 62, 77, 463, 1330, 1635, 628, 628, 628, 628 ]
3.066667
30
import argparse import gc import pathlib import sys import typing import uvicorn # type: ignore from attack_surface_pypy import __service_name__, __version__, asgi from attack_surface_pypy import logging as app_logging from attack_surface_pypy import settings # logger = structlog.get_logger() gc.disable() parser =...
[ 11748, 1822, 29572, 198, 11748, 308, 66, 198, 11748, 3108, 8019, 198, 11748, 25064, 198, 11748, 19720, 198, 198, 11748, 334, 25531, 1211, 220, 1303, 2099, 25, 8856, 198, 198, 6738, 1368, 62, 42029, 62, 79, 4464, 88, 1330, 11593, 15271, ...
2.568521
737
# Generated by Django 2.2.5 on 2020-06-30 11:57 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 20, 319, 12131, 12, 3312, 12, 1270, 1367, 25, 3553, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 2 16:54:10 2021 @author: sdn1 """ import numpy as np import os i=0 while(i<1): 1/0 print(bcolors.OKGREEN + chr(np.random.randint(250,400)) + bcolors.ENDC, end='') os.system('python $(pwd)/main.py') i=i+1 print(i)
[ 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, 3300, 7653, 220, 362, 1467, 25, 4051, 25, 940, 33448, 198, 198, 31, 9800, 25, 264, 32656,...
1.98125
160
import datetime from pathlib import Path from typing import Optional, Tuple from .common import _IMAGE_SUFFIXES, _PERMITTED_EXTENSIONS, PathDetails, rebuild_event_store if __name__ == "__main__": import argparse from dateutil.tz import tzoffset parser = argparse.ArgumentParser() parser.add_argume...
[ 11748, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 198, 6738, 764, 11321, 1330, 4808, 3955, 11879, 62, 12564, 5777, 10426, 1546, 11, 4808, 18973, 44, 22470, 1961, 62, 13918, 16938, ...
2.492857
280
# ESnet Network Operating System (ENOS) Copyright (c) 2015, The Regents # of the University of California, through Lawrence Berkeley National # Laboratory (subject to receipt of any required approvals from the # U.S. Dept. of Energy). All rights reserved. # # If you have questions about your rights to use or distribut...
[ 2, 13380, 3262, 7311, 24850, 4482, 357, 1677, 2640, 8, 15069, 357, 66, 8, 1853, 11, 383, 3310, 658, 198, 2, 286, 262, 2059, 286, 3442, 11, 832, 13914, 14727, 2351, 198, 2, 18643, 357, 32796, 284, 14507, 286, 597, 2672, 45818, 422, ...
2.60061
656
import math
[ 11748, 10688 ]
5.5
2
from __future__ import division import inspect import types from functools import wraps function_type = type(lambda x: x) # using this instead of callable() because classes are callable, for instance no_default = NoDefault() def inject_method(self, method_function, method_name=None): """ method_functio...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 10104, 198, 11748, 3858, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 8818, 62, 4906, 796, 2099, 7, 50033, 2124, 25, 2124, 8, 220, 1303, 1262, 428, 2427, 286, 869, 540, 3419...
2.323738
2,814
#!/usr/bin/env python from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Test version numbering before running setup test_version() setup( name='MIPPY', version=get_version(), description='Modular Image Processing in Python', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 40481, 82, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, ...
2.734694
245
"""Run a sample problem to test full system.""" # pylint: disable=invalid-name,missing-docstring import unittest from collections import namedtuple import math import os from physprog import classfunctions from physprog import optimize THIS_DIR = os.path.dirname(__file__) SAMPLE_INPUT = os.path.join(THIS_DIR, 'sam...
[ 37811, 10987, 257, 6291, 1917, 284, 1332, 1336, 1080, 526, 15931, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 259, 12102, 12, 3672, 11, 45688, 12, 15390, 8841, 198, 11748, 555, 715, 395, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, ...
2.834356
163
import os import sys from collections import defaultdict import tensorflow as tf import tensorflow.keras.backend as K import numpy as np import scipy.stats as ss import matplotlib.pyplot as plt from sklearn.metrics import roc_curve from sklearn.linear_model import LogisticRegression from utils import process_texts, ...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 6122, 292, 13, 1891, 437, 355, 509, 198, 11748, 299, 32152, 355, 45941, 198, 11748, ...
2.244751
3,620
from django.test import TestCase from django.urls import reverse from django.contrib.auth import get_user_model from rest_framework.test import APIClient from rest_framework import status from core.models import Tag from recipe.serializers import TagSerializer TAGS_URL = reverse("recipe:tag-list")
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 34...
3.465909
88
import numpy as np # import open3d as o3d from . import BaseAnnotationDefinition # from scipy.spatial.transform import Rotation as R import logging logger = logging.getLogger(name=__name__)
[ 11748, 299, 32152, 355, 45941, 198, 2, 1330, 1280, 18, 67, 355, 267, 18, 67, 198, 6738, 764, 1330, 7308, 2025, 38983, 36621, 198, 2, 422, 629, 541, 88, 13, 2777, 34961, 13, 35636, 1330, 371, 14221, 355, 371, 198, 11748, 18931, 198, ...
3.2
60
#!/usr/bin/env python # coding: utf-8 from my_module.exceptions import InvalidArgumentsError if __name__ == "__main__": my_adder = SimpleCalculator(operator="add") print('Case01:', my_adder.execute(4, 2)) print('Case02:', my_adder.execute(5, "a")) my_subtractor = SimpleCalculator(operator="sub") ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 616, 62, 21412, 13, 1069, 11755, 1330, 17665, 28100, 2886, 12331, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 6...
2.533101
287
import keras from keras.layers import Conv2D, Conv3D, Flatten, Dense, Reshape, BatchNormalization from keras.layers import Dropout, Input from keras.models import Model from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint from keras.utils import np_utils from sklearn.decomposition impo...
[ 11748, 41927, 292, 201, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 34872, 17, 35, 11, 34872, 18, 35, 11, 1610, 41769, 11, 360, 1072, 11, 1874, 71, 1758, 11, 347, 963, 26447, 1634, 201, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 14...
2.059667
3,905
#!/usr/bin/env python3 from setuptools import setup, find_packages requirements = ["pyp2rpm~=3.3.1"] setup( name="utest", version="0.1.0", description="Micro test module", license="GPLv2+", author="pyp2rpm Developers", author_email='bkabrda@redhat.com, rkuska@redhat.com, mcyprian@redhat.com, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 8897, 18883, 796, 14631, 79, 4464, 17, 48235, 93, 28, 18, 13, 18, 13, 16, 8973, 198, 198, 40406, 7, 198...
2.480263
304
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33160, 383, 3012, 4992, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
2.334525
1,399
from math import log from PIL import Image, ImageDraw from collections import Counter import numpy as np from pandas import DataFrame # my_data = [['slashdot', 'USA', 'yes', 18, 213.2, 'None'], # ['google', 'France', 'yes', 23, 121.2, 'Premium'], # ['digg', 'USA', 'yes', 24, 21.32, 'Basic'], # ...
[ 6738, 10688, 1330, 2604, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 198, 6738, 17268, 1330, 15034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 198, 2, 616, 62, 7890, 796, 16410, 6, 6649, ...
1.792975
1,338
from datetime import datetime
[ 6738, 4818, 8079, 1330, 4818, 8079, 628, 198 ]
4
8
#!/usr/bin/env python3 from __future__ import print_function import sys sys.path.append('./method') import os import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import model as m """ Run fit. """ predict_list = ['sinewave', 'staircase', 'activation', 'ap'] try: which_pred...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 4458, 14, 24396, 11537, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, ...
2.203523
2,044
''' python3 classifier_service.py data.csv This service runs a scikit-learn classifier on data provided by the csv file data.csv. The idea of this is a simple spam detector. In the file, you will see a number, 1 or -1, followed by a pipe, followed by a piece of text. The text is designed to be a subject email, and...
[ 7061, 6, 198, 29412, 18, 1398, 7483, 62, 15271, 13, 9078, 1366, 13, 40664, 198, 198, 1212, 2139, 4539, 257, 629, 1134, 270, 12, 35720, 1398, 7483, 319, 1366, 2810, 416, 262, 269, 21370, 2393, 1366, 13, 40664, 13, 198, 198, 464, 2126...
3.089672
1,617
# SPDX-License-Identifier: MIT import os import idaapi import idautils from PyQt5 import QtWidgets from uefi_analyser import dep_browser, dep_graph, prot_explorer, ui AUTHOR = "yeggor" VERSION = "1.2.0" NAME = "UEFI_RETool" WANTED_HOTKEY = "Ctrl+Alt+U" HELP = "This plugin performs automatic analysis of the input UE...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 28686, 198, 198, 11748, 220, 3755, 15042, 198, 11748, 4686, 2306, 4487, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 198, 198, 6738, 334, 891, 72, 62...
2.430556
216