content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import unittest from partname_resolver.components.inductor import Inductor from partname_resolver.units.temperature import TemperatureRange
[ 11748, 555, 715, 395, 198, 6738, 636, 3672, 62, 411, 14375, 13, 5589, 3906, 13, 10259, 2715, 1330, 1423, 33029, 198, 6738, 636, 3672, 62, 411, 14375, 13, 41667, 13, 11498, 21069, 1330, 34467, 17257, 628 ]
3.916667
36
# -*- coding: utf-8 -*- # # Copyright (C) 2021 CESNET. # # CESNET-OpenID-Remote is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """CESNET OIDC Auth backend for OARepo""" import os from setuptools import find_packages, setup readme...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 33448, 42700, 12884, 13, 198, 2, 198, 2, 42700, 12884, 12, 11505, 2389, 12, 36510, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290...
2.322733
1,478
high_resource_language_list = [ 'bg', 'cs', 'da', 'de', 'en', 'es', 'eu', 'fa', 'fi', 'fr', 'he', 'hi', 'hr', 'id', 'it', 'nl', 'no', 'pl', 'pt', 'sl', 'sv' ] low_resource_language_list = [ 'el', 'et', 'ga', 'hu', 'ro', 'ta' ] extra_language_list_ud12 = [ 'ar', 'cu', 'fi_ftb', 'got', 'grc', 'grc_proie...
[ 8929, 62, 31092, 62, 16129, 62, 4868, 796, 685, 198, 220, 220, 220, 705, 35904, 3256, 705, 6359, 3256, 705, 6814, 3256, 705, 2934, 3256, 705, 268, 3256, 705, 274, 3256, 705, 12496, 3256, 705, 13331, 3256, 705, 12463, 3256, 705, 8310, ...
1.991632
239
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 2864, 383, 21239, 80, 34152, 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,...
2.665567
909
#coding=utf-8 # Copyright (C) 2020 ATHENA AUTHORS; LanYu; # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 2, 15069, 357, 34, 8, 12131, 317, 4221, 45510, 37195, 20673, 26, 14730, 40728, 26, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1...
2.422181
3,264
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-31 16:05 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 319, 1853, 12, 1065, 12, 3132, 1467, 25, 2713, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, ...
2.776119
67
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-09 19:24 from __future__ import unicode_literals import datetime import django.db.models.deletion from django.conf import settings 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, 17, 319, 1584, 12, 940, 12, 2931, 678, 25, 1731, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 19...
2.914634
82
""" This component provides support for Home Automation Manager (HAM). For more details about this component, please refer to the documentation at https://home-assistant.io/components/edgeos/ """ import asyncio import json import logging import re from typing import Optional from urllib.parse import urlparse import ai...
[ 37811, 198, 1212, 7515, 3769, 1104, 329, 5995, 17406, 341, 9142, 357, 33363, 737, 198, 1890, 517, 3307, 546, 428, 7515, 11, 3387, 3522, 284, 262, 10314, 379, 198, 5450, 1378, 11195, 12, 562, 10167, 13, 952, 14, 5589, 3906, 14, 14907, ...
3.592105
152
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator 2.3.3...
[ 2, 19617, 28, 40477, 12, 23, 201, 198, 2, 16529, 35937, 201, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 201, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 201...
3.060665
511
#!/usr/bin/env python # graph.py # Created by Vivek Gopalakrishnan on 2018-11-13. # Email: vgopala4@jhu.edu # Copyright (c) 2018. All rights reserved. import timeit from src.features.summary import Stats from src.random.bernoulli import RandomGraph def measure_runtime(n, p, number=5): """ Calculates the ru...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 4823, 13, 9078, 198, 2, 15622, 416, 29237, 74, 402, 33067, 461, 37518, 12647, 319, 2864, 12, 1157, 12, 1485, 13, 198, 2, 9570, 25, 410, 70, 404, 6081, 19, 31, 73, 13415, ...
2.735795
352
import os import numpy as np learning_rate = [0.01, 0.001] prune_ratio = 30 ADMM_times = [2,3,4,5,6,7] Total_epochs = [10,30,40,50,60] target_accuracy = 0.76 count = 0 highest_acc = 0 for i in range(len(learning_rate)): for j in range(len(ADMM_times)): for k in range(len(Total_epochs)): lr = le...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 40684, 62, 4873, 796, 685, 15, 13, 486, 11, 657, 13, 8298, 60, 198, 1050, 1726, 62, 10366, 952, 796, 1542, 198, 2885, 12038, 62, 22355, 796, 685, 17, 11, 18, 11, 19, 11, 20, ...
1.759379
773
from django.contrib import admin from tower import ugettext_lazy as _ from users.models import Profile, Link username = lambda u: u.user.username username.short_description = _('Username') admin.site.register(Profile, ProfileAdmin) admin.site.register(Link, LinkAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 10580, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 2985, 13, 27530, 1330, 13118, 11, 7502, 628, 198, 29460, 796, 37456, 334, 25, 334, 13, 7220, 13, ...
3.365854
82
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # we need to use composite data pipeline with multiblock datasets alg = vtk.vtkAlgorithm() pip = vtk.vtkCompositeDataPipeline() alg.SetDefaultExecutivePrototype(pip) #del pi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 11748, 410, 30488, 201, 198, 6738, 410, 30488, 13, 9288, 1330, 23983, 201, 198, 6738, 410, 30488, 13, 22602, 13, 44374, 1330, 410, 30488, 3855, 6601, 30016, 201, 198, 36392, 42, 6...
2.349255
1,947
from __future__ import absolute_import from pdbuddy.formatters.base import BaseFormatter
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 279, 9945, 21584, 13, 18982, 1010, 13, 8692, 1330, 7308, 8479, 1436, 628 ]
3.791667
24
import vsearch as vsearch from flask import Flask, render_template, request, redirect app= Flask(__name__) # # @app.route('/') # def hello() -> str: # return redirect('/entry') @app.route('/search4', methods=['POST']) @app.route('/') @app.route('/entry') if __name__ == '__main__0': app.run(debug=True)
[ 11748, 410, 12947, 355, 410, 12947, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 198, 198, 1324, 28, 46947, 7, 834, 3672, 834, 8, 198, 198, 2, 198, 2, 2488, 1324, 13, 38629, 10786, 14, 11537, 198, 2, 82...
2.614754
122
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
[ 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 2, 1398, 12200, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2124, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2100, 796, 2124, 1...
2.175676
74
import numpy as np import pandas as pd def calculate_dG(data_dict: dict, gas_constant: float, temperature: float, rxn_order: list = None) -> tuple: """ Given a dictionary representing a GRASP input file, calculates the minimum and maximum reaction dGs based on the standard dGs in thermoRxns and metabolit...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 198, 4299, 15284, 62, 67, 38, 7, 7890, 62, 11600, 25, 8633, 11, 3623, 62, 9979, 415, 25, 12178, 11, 5951, 25, 12178, 11, 374, 87, 77, 62, 2875, 25, 1...
2.034507
2,840
import clustering import numpy as np from sklearn import datasets import matplotlib.pyplot as plt import dionysus as dion import random if __name__ == '__main__': seed = 0 dataset = gen_data2(seed, noise=0.1, n_samples=100) diagrams = compute_diagrams(dataset) diagrams_cluster = clusterin...
[ 198, 11748, 32966, 1586, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 1330, 40522, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 288, 295, 893, 385, 355, 288, 295, 198, 11748, 4738, 628, 628, ...
2.483333
300
"""pathfinder.py - specifies paths and common filenames""" __author__ = 'Chris R. Coughlin' from models import config import os.path import sys def normalized(path_fn): """Decorator to normalize (os.path.normcase) paths""" return normalize @normalized def app_path(): """Returns the base application pat...
[ 37811, 6978, 22805, 13, 9078, 532, 26052, 13532, 290, 2219, 1226, 268, 1047, 37811, 198, 834, 9800, 834, 796, 705, 15645, 371, 13, 327, 619, 2815, 6, 198, 198, 6738, 4981, 1330, 4566, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 19...
2.809274
1,337
TRANSACTION_STATUS_PENDING = 'pending' TRANSACTION_STATUS_COMPLETE = 'complete' TRANSACTION_STATUS_REFUNDED = 'refunded' TRANSACTION_STATUSES = ( (TRANSACTION_STATUS_PENDING, TRANSACTION_STATUS_PENDING), (TRANSACTION_STATUS_COMPLETE, TRANSACTION_STATUS_COMPLETE), (TRANSACTION_STATUS_REFUNDED, TRANSACTION_ST...
[ 5446, 15037, 44710, 62, 35744, 2937, 62, 47, 10619, 2751, 796, 705, 79, 1571, 6, 198, 5446, 15037, 44710, 62, 35744, 2937, 62, 41335, 9328, 796, 705, 20751, 6, 198, 5446, 15037, 44710, 62, 35744, 2937, 62, 31688, 4944, 35, 1961, 796, ...
2.449275
138
import numpy as np import sys import yaml import pytest import test_tools import hsbalance as hs '''This module is for testing Min_Max model solver''' # Reading the test cases from config.yaml file, to add more tests follow the rules on the file tests, tests_id, timeout = test_tools.get_tests_from_yaml('Min_max') @p...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 11748, 12972, 9288, 198, 11748, 1332, 62, 31391, 198, 11748, 289, 82, 20427, 355, 289, 82, 198, 198, 7061, 6, 1212, 8265, 318, 329, 4856, 1855, 62, 11518, ...
2.246696
908
from pymatex.listener import MatexASTVisitor from pymatex.node import *
[ 6738, 279, 4948, 378, 87, 13, 4868, 877, 1330, 24787, 87, 1921, 6849, 271, 2072, 198, 6738, 279, 4948, 378, 87, 13, 17440, 1330, 1635, 628 ]
2.807692
26
from datetime import datetime, timedelta import time from db_apis import trim_tables, create_summaries
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 640, 198, 6738, 20613, 62, 499, 271, 1330, 15797, 62, 83, 2977, 11, 2251, 62, 82, 13929, 3166, 628 ]
3.466667
30
##################### QuickSort ################### from typing import List def quick_sort(nums: List[int]) -> List[int]: """ Does recursive sorting using quick sort """ if len(nums) < 2: return nums mid: int = (len(nums) - 1)//2 smaller_values: List[int] = [num for i, num in enumerate(nums) ...
[ 14468, 4242, 2, 12029, 42758, 1303, 14468, 2235, 198, 6738, 19720, 1330, 7343, 628, 198, 4299, 2068, 62, 30619, 7, 77, 5700, 25, 7343, 58, 600, 12962, 4613, 7343, 58, 600, 5974, 198, 220, 220, 220, 37227, 8314, 45115, 29407, 1262, 206...
2.180812
271
import numpy as np
[ 11748, 299, 32152, 355, 45941 ]
3.6
5
import pytest from models.test import StructA from models.simple import MILSTD_1553_Message from models.chapter10 import MILSTD_1553_Data_Packet_Format_1 @pytest.mark.parametrize( "struct", [StructA, MILSTD_1553_Message, MILSTD_1553_Data_Packet_Format_1] )
[ 11748, 12972, 9288, 198, 198, 6738, 4981, 13, 9288, 1330, 32112, 32, 198, 6738, 4981, 13, 36439, 1330, 31515, 32147, 62, 1314, 4310, 62, 12837, 198, 6738, 4981, 13, 43582, 940, 1330, 31515, 32147, 62, 1314, 4310, 62, 6601, 62, 47, 831...
2.75
96
from lib.base import PowerDNSClientAction class ServerListAction(PowerDNSClientAction): """ List available PowerDNS servers. """
[ 6738, 9195, 13, 8692, 1330, 4333, 35, 8035, 11792, 12502, 628, 198, 4871, 9652, 8053, 12502, 7, 13434, 35, 8035, 11792, 12502, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7343, 1695, 4333, 35, 8035, 9597, 13, 198, 220, 220, ...
3.177778
45
from unittest import mock from rattr.analyser.context import Call, Func, Import, Name from rattr.analyser.context.symbol import Class from rattr.analyser.results import generate_results_from_ir
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 27263, 81, 13, 272, 26266, 263, 13, 22866, 1330, 4889, 11, 11138, 66, 11, 17267, 11, 6530, 198, 6738, 27263, 81, 13, 272, 26266, 263, 13, 22866, 13, 1837, 23650, 1330, 5016, 198, 673...
3.266667
60
# Work with Python 3.6 import discord import numpy as np import pandas as pd import random import subprocess import weather as wt from nlu_yahoo import nluservice from MorseCode import morse # from wc import noname_wc #import softalk as sf from calender import getCalender, getCalLink, getCommandList from news import ge...
[ 2, 5521, 351, 11361, 513, 13, 21, 198, 11748, 36446, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4738, 198, 11748, 850, 14681, 198, 11748, 6193, 355, 266, 83, 198, 6738, 299, 2290, 62, 40774, ...
3.358491
212
# Copyright 2020, The TensorFlow Federated 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 applicable law o...
[ 2, 15069, 12131, 11, 383, 309, 22854, 37535, 35089, 515, 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, 11846, 351, ...
2.818785
1,959
from phi.fluidformat import * # for scene in scenes("~/data/control/squares"): # scene.remove() scenecount = 1000 for scene_index in range(scenecount): scene = new_scene("~/data/control/squares") start_x, start_y, end_x, end_y = np.random.randint(10, 110, 4) print(scene) scenelength = 32 vx =...
[ 6738, 872, 72, 13, 35522, 312, 18982, 1330, 1635, 198, 198, 2, 329, 3715, 287, 8188, 7203, 93, 14, 7890, 14, 13716, 14, 16485, 3565, 1, 2599, 198, 2, 220, 220, 220, 220, 3715, 13, 28956, 3419, 198, 198, 1416, 268, 721, 608, 796, ...
2.153664
423
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
[ 2, 1303, 2343, 248, 254, 15932, 198, 2, 198, 2, 3336, 47466, 3180, 36592, 2389, 1961, 366, 1921, 3180, 1600, 42881, 34764, 56, 3963, 15529, 509, 12115, 11, 7788, 32761, 6375, 8959, 49094, 11, 47783, 2751, 21728, 5626, 198, 2, 40880, 5...
3.080292
411
# -*- coding: utf-8 -*- # ToMaTo (Topology management software) # Copyright (C) 2010 Dennis Schwerdel, University of Kaiserslautern # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either vers...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1675, 21467, 2514, 357, 9126, 1435, 4542, 3788, 8, 220, 198, 2, 15069, 357, 34, 8, 3050, 16902, 3059, 15448, 12381, 11, 2059, 286, 11611, 21572, 75, 2306, 1142, 198...
3.635294
255
# Generated by Django 2.1.9 on 2019-07-03 04:53 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 24, 319, 13130, 12, 2998, 12, 3070, 8702, 25, 4310, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Массовая загрузка набора данных Open Images Dataset V6 python oidv6/samples/run.py <command> --classes названия_классов_или_текстовый_файл [--dataset Dataset --type_data train --limit 0 --multi_classes --yes --no_labels --hide_metadata --no_clear_shell] """ # ##...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 140, 250, 16142, 21727, 21727, 25443, 110, 16142, 40623, 12466, 115, 16142, 140, 111, 21169, 35072, 140,...
1.880487
3,782
import pytest from requests import Response from py42._internal.auth_handling import AuthHandler from py42._internal.auth_handling import HeaderModifier from py42._internal.auth_handling import TokenProvider ORIGINAL_VALUE = "test-original-value" UPDATED_VALUE = "test-updated-value" CUSTOM_NAME = "Custom-Name" DEFAUL...
[ 11748, 12972, 9288, 198, 6738, 7007, 1330, 18261, 198, 198, 6738, 12972, 3682, 13557, 32538, 13, 18439, 62, 4993, 1359, 1330, 26828, 25060, 198, 6738, 12972, 3682, 13557, 32538, 13, 18439, 62, 4993, 1359, 1330, 48900, 5841, 7483, 198, 673...
3
142
# There is probably a more efficient way to do this # Now I need to do the actual backwards function
[ 198, 220, 220, 220, 1303, 1318, 318, 2192, 257, 517, 6942, 835, 284, 466, 428, 628, 220, 220, 220, 1303, 2735, 314, 761, 284, 466, 262, 4036, 16196, 2163 ]
3.793103
29
#!/usr/bin/env python2.7 # TODO: Actual values devid = { 'p24fj256gb106': 0xFFFF , 'p18f2550': 0x1234 } targetmem = { 'int_flash': 0 , 'int_eeprom': 1 # , 'ext_flash': 2 # , 'ext_eeprom': 3 } # TODO: Actual values maxmem = { 'p24fj256gb106': {'int_flash':255*1024, 'int_eeprom':2048} , 'p18f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 198, 2, 16926, 46, 25, 33520, 3815, 198, 7959, 312, 220, 220, 220, 220, 796, 1391, 705, 79, 1731, 69, 73, 11645, 22296, 15801, 10354, 657, 87, 29312, 198, 197, 197, 197...
2.460976
1,230
import time import copy import os import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib import gridspec from matplotlib.animation import FuncAnimation import matplotlib.animation as animation import flowrect from flowrect.simulations.util import calculate_age, calculate_mt, eta_SRM fro...
[ 11748, 640, 198, 11748, 4866, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 50000, 43106, 198, ...
2.108543
995
import tkinter as tk from tkinter import ttk import tkinter.scrolledtext as st from tkinter import filedialog from functools import partial """ Вкладка "перекодировать текст" """ def init_frame(self, frame: tk.Frame): """ Инициализация вкладки "Перекодировать текст" :param tk_recoder.gui.Gui self: Осно...
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 11748, 256, 74, 3849, 13, 1416, 8375, 5239, 355, 336, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 198, 6738, 1257, 310, 10141, 1330, 13027, 198...
2.029175
994
# Bigram formation # using list comprehension + enumerate() + split() # initializing list test_list = ['በሙቀት ጀምሮ በቅዝቃዜ መጨረስ የዚህ ዓለም መገለጫ ሆኗል እልልታ በኡኡታ፣ ሠርግ በግልግል፣ ማሬ የሚለው ቃል እሬቴ በሚልይለወጣል', 'ጨርሰው የማይሰሩ አሳሳቢ አይደሉም፣ አይሠሩምና። ብልሽት ያለባቸው ማሞቂያዎች ግን ሰውዬው ሲሞክራቸው ይሠራሉ '] # printing the original list print ("The original list ...
[ 198, 2, 4403, 859, 9978, 198, 2, 1262, 1351, 35915, 1343, 27056, 378, 3419, 1343, 6626, 3419, 198, 198, 2, 4238, 2890, 1351, 198, 9288, 62, 4868, 796, 37250, 157, 231, 254, 157, 230, 247, 157, 231, 222, 157, 231, 113, 28053, 234, ...
1.162109
512
from blspy import G1Element from chia.types.blockchain_format.coin import Coin from chia.types.blockchain_format.sized_bytes import bytes32 from chia.util.ints import uint32, uint64 from chia.wallet.puzzles.p2_delegated_puzzle_or_hidden_puzzle import puzzle_for_pk
[ 6738, 698, 2777, 88, 1330, 402, 16, 20180, 198, 198, 6738, 442, 544, 13, 19199, 13, 9967, 7983, 62, 18982, 13, 3630, 1330, 16312, 198, 6738, 442, 544, 13, 19199, 13, 9967, 7983, 62, 18982, 13, 13982, 62, 33661, 1330, 9881, 2624, 198...
2.904255
94
# # from os import stat import pymongo from apps.wxs.model.m_mongodb import MMongoDb
[ 2, 201, 198, 2, 220, 201, 198, 6738, 28686, 1330, 1185, 201, 198, 11748, 279, 4948, 25162, 201, 198, 6738, 6725, 13, 86, 34223, 13, 19849, 13, 76, 62, 31059, 375, 65, 1330, 20806, 25162, 43832, 201 ]
2.432432
37
""" Workflow definition to book data """ from __future__ import division, absolute_import, print_function from datetime import datetime, timedelta from airflow import DAG from airflow.operators import ( BookData ) dag_id = "book_data" schedule_interval = None default_args = { 'owner': 'europython', 'de...
[ 37811, 198, 12468, 11125, 6770, 284, 1492, 1366, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 4112, 62, 11748, 11, 3601, 62, 8818, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 45771, ...
2.562016
258
from unittest import TestCase from alex.components.tts.voicerss import VoiceRssTTS import alex.utils.audio as audio import wave from alex.utils.config import as_project_path __author__ = 'm2rtin'
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 257, 2588, 13, 5589, 3906, 13, 83, 912, 13, 13038, 291, 364, 82, 1330, 15282, 49, 824, 51, 4694, 198, 11748, 257, 2588, 13, 26791, 13, 24051, 355, 6597, 198, 11748, 6769, 198, ...
2.869565
69
""" TXA - Transfer Register X to Accumulator. A = X Copies the current contents of the X register into the accumulator and sets the zero and negative flags as appropriate. Processor Status after use: +------+-------------------+--------------------------+ | Flag | Description | State | +===...
[ 37811, 198, 29551, 32, 532, 20558, 17296, 1395, 284, 6366, 388, 8927, 13, 198, 198, 32, 796, 1395, 198, 198, 13379, 444, 262, 1459, 10154, 286, 262, 1395, 7881, 656, 262, 10507, 8927, 290, 5621, 198, 1169, 6632, 290, 4633, 9701, 355, ...
2.543689
824
import pwn HOST, PORT = "crypto.hsctf.com", 6001 rem = pwn.remote(HOST, PORT) rem.recvline() data = rem.recvline() initial = data.decode().strip().split(':')[-1] print(initial) initial = int(initial) for i in range(10): rem.sendline(str(nextval(initial)).encode()) print(rem.recvline().decode()) initial ...
[ 11748, 279, 675, 198, 198, 39, 10892, 11, 350, 9863, 796, 366, 29609, 78, 13, 11994, 310, 69, 13, 785, 1600, 718, 8298, 198, 2787, 796, 279, 675, 13, 47960, 7, 39, 10892, 11, 350, 9863, 8, 198, 198, 2787, 13, 8344, 85, 1370, 341...
2.421429
140
#!/usr/bin/env python3 # Author:: Justin Flannery (mailto:juftin@juftin.com) """ YAML Utilities for Camply """ from datetime import datetime import logging import os from pathlib import Path from re import compile from typing import Dict, Tuple from yaml import load, SafeLoader from camply.config import Search...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 6434, 3712, 220, 220, 220, 10799, 39016, 35865, 220, 357, 4529, 1462, 25, 14396, 701, 259, 31, 14396, 701, 259, 13, 785, 8, 198, 198, 37811, 198, 56, 2390, 43, 41086, 3...
2.409198
1,696
''' Created on May 23, 2016 @author: Lucas Lehnert (lucas.lehnert@mail.mcgill.ca) Script to generate all plots from the NIPS 2016 paper. ''' import matplotlib matplotlib.use( 'agg' ) matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = [r'\usepackage{amsmath}'] import matplotlib.p...
[ 7061, 6, 198, 41972, 319, 1737, 2242, 11, 1584, 198, 198, 31, 9800, 25, 15257, 1004, 21116, 861, 357, 75, 1229, 292, 13, 293, 21116, 861, 31, 4529, 13, 23209, 70, 359, 13, 6888, 8, 198, 198, 7391, 284, 7716, 477, 21528, 422, 262, ...
2.586364
220
from Support.Code.actions.Support.utils.functions_dict import get_name from django.utils.text import slugify
[ 6738, 7929, 13, 10669, 13, 4658, 13, 15514, 13, 26791, 13, 12543, 2733, 62, 11600, 1330, 651, 62, 3672, 198, 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 31065, 1958, 198 ]
3.516129
31
# Standard Library Imports from datetime import datetime from typing import List # Protean from protean.core.aggregate import BaseAggregate from protean.core.entity import BaseEntity from protean.core.field.association import HasMany, HasOne, Reference from protean.core.field.basic import Auto, DateTime, Integer, Stri...
[ 2, 8997, 10074, 1846, 3742, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 7343, 198, 198, 2, 1041, 660, 272, 198, 6738, 5915, 272, 13, 7295, 13, 9460, 49373, 1330, 7308, 46384, 49373, 198, 6738, 5915, 272, 13, 7295,...
3.5
216
#!/usr/bin/env python # coding: utf-8 # In[ ]: #%load_ext autoreload #%autoreload 2 # In[ ]: import sys import torch import numpy as np import time import hashlib from os import listdir from os.path import isfile, join import pickle import argparse import json from tqdm import tqdm from copy import deepcopy impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 2361, 25, 628, 198, 2, 4, 2220, 62, 2302, 1960, 382, 2220, 198, 2, 4, 2306, 382, 2220, 362, 628, 198, 2, 554, 58, 2361, ...
2.479851
1,613
import RPi.GPIO as GPIO import time dis=0 while True: # Setup triggers and Echos of all sensors GPIO.setmode(GPIO.BOARD) TRIG=11 ECHO=13 GPIO.setup(TRIG,GPIO.OUT) GPIO.setup(3,GPIO.OUT) GPIO.setup(ECHO,GPIO.IN) GPIO.setup(5,GPIO.IN) GPIO.setup(35,GPIO.OUT) GPIO.setup(31,GPIO.OU...
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 640, 198, 198, 6381, 28, 15, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1303, 31122, 20022, 290, 412, 354, 418, 286, 477, 15736, 198, 220, 220, 220, 50143, 13, 2617, 1417...
2.02069
435
""" Copyright C.C.: Emiliano Hernandez Laos https://github.com/emhlaos/ 28/02/2018 """ from urllib.request import urlopen import os from io import BytesIO from zipfile import ZipFile #LOAD FUNCTION: currentdirectory = os.getcwd() xbrldirectory = currentdirectory+"/xbrl" if not os.path.exist...
[ 37811, 201, 198, 15269, 327, 13, 34, 11207, 201, 198, 220, 220, 220, 44272, 10115, 24687, 45919, 201, 198, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 368, 71, 5031, 418, 14, 201, 198, 220, 220, 220, 2579, 14, 2999, 14, 7908, 2...
1.821636
1,553
import six from oslo_log import log as logging from hpedockerplugin.cmd import cmd from hpedockerplugin import exception LOG = logging.getLogger(__name__)
[ 11748, 2237, 198, 198, 6738, 28686, 5439, 62, 6404, 1330, 2604, 355, 18931, 198, 198, 6738, 289, 9124, 12721, 33803, 13, 28758, 1330, 23991, 198, 6738, 289, 9124, 12721, 33803, 1330, 6631, 198, 198, 25294, 796, 18931, 13, 1136, 11187, 1...
3.382979
47
input = """ 1 2 3 2 3 4 5 1 3 3 2 2 4 5 1 4 3 2 2 3 5 1 5 0 0 5 6 4 3 0 2 3 4 2 2 2 1 1 1 1 6 0 4 c 3 b 2 a 0 B+ 0 B- 1 0 1 """ output = """ INCOHERENT """
[ 15414, 796, 37227, 198, 16, 362, 513, 362, 513, 604, 642, 198, 16, 513, 513, 362, 362, 604, 642, 198, 16, 604, 513, 362, 362, 513, 642, 198, 16, 642, 657, 657, 198, 20, 718, 604, 513, 657, 362, 513, 604, 362, 362, 362, 198, 16...
1.714286
91
import os import shutil import pickle as pkl import numpy as np import SimpleITK as sitk from data_registration import RegHearts LOAD_DIR = '/pylon5/ac5616p/Data/HeartSegmentationProject/CAP_challenge/CAP_challenge_training_set/test2/brain/total/' ''' Generator function to get one pair of fixed and moving image at a ...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 2298, 293, 355, 279, 41582, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 17427, 2043, 42, 355, 1650, 74, 198, 6738, 1366, 62, 2301, 33397, 1330, 3310, 1544, 5889, 198, 198, 35613, 62, ...
2.913793
174
# coding=utf-8 """ LCD1602 Plugin for Octoprint """ from __future__ import absolute_import from octoprint.printer.estimation import PrintTimeEstimator import octoprint.plugin import octoprint.events from RPLCD.i2c import CharLCD import time import datetime import os import sys from fake_rpi import printf import fak...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 198, 220, 23598, 1433, 2999, 42636, 329, 2556, 404, 22272, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 19318, 404, 22272, 13, 1050, 3849, 13, 395, 1899...
3.008065
124
from bangtal import * import random import copy import time setGameOption(GameOption.INVENTORY_BUTTON, False) setGameOption(GameOption.MESSAGE_BOX_BUTTON, False) main_scene = Scene("퍼즐게임", "images/backgroud.PNG") scene1 = Scene("Loopy 퍼즐", "images/backgroud.PNG") scene2 ...
[ 6738, 20188, 39240, 1330, 1635, 201, 198, 201, 198, 11748, 4738, 201, 198, 201, 198, 11748, 4866, 201, 198, 201, 198, 11748, 640, 201, 198, 201, 198, 220, 201, 198, 201, 198, 220, 201, 198, 201, 198, 2617, 8777, 19722, 7, 8777, 1972...
1.790476
735
import sys if sys.version_info < (3, 10): from importlib_metadata import entry_points else: from importlib.metadata import entry_points from . import ( cpu, devices, gpu, memory, ) __all__ = ( "cpu", "devices", "gpu", "installed_plugins", "memory", ) installed_plugins = ...
[ 11748, 25064, 198, 198, 361, 25064, 13, 9641, 62, 10951, 1279, 357, 18, 11, 838, 2599, 198, 220, 220, 220, 422, 1330, 8019, 62, 38993, 1330, 5726, 62, 13033, 198, 17772, 25, 198, 220, 220, 220, 422, 1330, 8019, 13, 38993, 1330, 5726...
2.475177
141
from __future__ import annotations import typing import torch from torch.utils.data import DataLoader import pytorch_lightning as pl from pltools.config import Config transform_type = typing.Iterable[typing.Callable]
[ 6738, 11593, 37443, 834, 1330, 37647, 628, 198, 11748, 19720, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 198, 6738, 458, 31391, 13, 11250, 13...
3.655738
61
# coding: utf-8 from datetime import timedelta from helpers import make_record def day_fill(data, fill_value=None): """Given a data set with missing day values sorted by day, adds records with value of `fill_value` """ return generic_day_fill(1, data, fill_value) def week_fill(data, fill_value=None...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 49385, 1330, 787, 62, 22105, 628, 198, 4299, 1110, 62, 20797, 7, 7890, 11, 6070, 62, 8367, 28, 14202, 2599, 198, 220, 220, 220, 37227, 15056,...
2.981366
161
from Foundation import NSObject from objc import * from AppKit import NSBezierPath from fieldMath import * #____________________________________________________________
[ 6738, 5693, 1330, 10896, 10267, 198, 6738, 26181, 66, 1330, 1635, 198, 6738, 2034, 20827, 1330, 10896, 3856, 89, 959, 15235, 198, 198, 6738, 2214, 37372, 1330, 1635, 198, 198, 2, 10221, 32941, 1427, 628 ]
4.914286
35
from __future__ import division as division import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import field import traceray import surface import cal_tools # test ray.py and traceray.py # define rays l1 = np.linspace(-5,5,10) Pos1 = [] for i in l1: for j in l1: if i**2+j**...
[ 6738, 11593, 37443, 834, 1330, 7297, 355, 7297, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, 67, 1330, 12176, 274, 18, ...
2.163408
716
# -*- coding: utf-8 -*- from unittest import TestCase, main from recc.mime.mime_codec_register import get_global_mime_register if __name__ == "__main__": main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 11, 1388, 198, 6738, 302, 535, 13, 76, 524, 13, 76, 524, 62, 19815, 721, 62, 30238, 1330, 651, 62, 20541, 62, 76, 524, ...
2.5
68
#!/usr/bin/env python3.7 import sys import json import signal import urllib.request as urllib import threading import pyperclip import time if __name__ == '__main__': exitflag = False try: signal.signal(signal.SIGINT, quit) signal.signal(signal.SIGTERM, quit) thread1 = Cli...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 22, 198, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 6737, 198, 11748, 2956, 297, 571, 13, 25927, 355, 2956, 297, 571, 198, 11748, 4704, 278, 198, 11748, 12972, 525, 15036, 19...
2.060071
283
# -*- coding: utf-8 -*- #Search Wikipedia for Heart Attack import wikipedia, codecs, itertools, os, time from pprint import pprint relevant_categories = {'medical','emergencies','disease'} conditions = ["heart attack","palpitations"] #Search all related pages? make_filename = lambda aStr: aStr.replace(' ','_'...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 18243, 15312, 329, 8894, 8307, 198, 11748, 47145, 11151, 11, 40481, 82, 11, 340, 861, 10141, 11, 28686, 11, 640, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 49...
3.060403
149
from django.shortcuts import render from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.http import HttpResponseRedirect from django.urls import reverse from django.contrib.auth.decorators import login_required from datetime import datetime, timedelta from...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 17594, 11, 2604, 448, 198, 6738, 42625...
3.714932
221
import random, math N = 16 eta = 0.26 sigma = math.sqrt(eta / N / math.pi) n_runs = 100 print 'Note that this program might take a while!' for run in range(n_runs): iterations, config = direct_disks(N, sigma) print 'run',run print iterations - 1, 'tabula rasa wipe-outs before producing the following confi...
[ 11748, 4738, 11, 10688, 198, 198, 45, 796, 1467, 198, 17167, 796, 657, 13, 2075, 198, 82, 13495, 796, 10688, 13, 31166, 17034, 7, 17167, 1220, 399, 1220, 10688, 13, 14415, 8, 198, 77, 62, 48381, 796, 1802, 198, 4798, 705, 6425, 326,...
2.910569
123
import re template = r"[a-zA-Z]" username = input() match = re.match(template, username) if match: print("Thank you!") else: print("Oops! The username has to start with a letter.")
[ 11748, 302, 198, 198, 28243, 796, 374, 17912, 64, 12, 89, 32, 12, 57, 30866, 198, 29460, 796, 5128, 3419, 198, 15699, 796, 302, 13, 15699, 7, 28243, 11, 20579, 8, 198, 361, 2872, 25, 198, 220, 220, 220, 3601, 7203, 10449, 345, 247...
2.835821
67
import argparse import numpy as np if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.655172
29
# -*- coding: utf-8 -*- import os import sys import signal import inspect from qtpy.QtCore import QObject, Slot
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 6737, 198, 11748, 10104, 198, 198, 6738, 10662, 83, 9078, 13, 48, 83, 14055, 1330, 1195, 10267, 11, 32026, 628 ]
2.780488
41
""" Author: David Walshe Date: 08 April 2021 """ import logging from tabulate import tabulate from sla_cli.src.db.accessors.base import Accessor logger = logging.getLogger(__name__)
[ 37811, 198, 13838, 25, 220, 220, 220, 220, 3271, 370, 874, 258, 198, 10430, 25, 220, 220, 220, 220, 220, 220, 8487, 3035, 33448, 198, 37811, 198, 198, 11748, 18931, 198, 198, 6738, 7400, 5039, 1330, 7400, 5039, 198, 198, 6738, 1017, ...
2.69863
73
from collections import OrderedDict import pandas as pd import numpy as np from tia.util.decorator import lazy_property from tia.analysis.model.interface import TxnPlColumns as TPL from tia.analysis.perf import drawdown_info, drawdowns, guess_freq, downside_deviation, periodicity from tia.analysis.plots import plot_r...
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 256, 544, 13, 22602, 13, 12501, 273, 1352, 1330, 16931, 62, 26745, 198, 6738, 256, 544, 13, 20930,...
2.834711
363
# noinspection PyUnusedLocal # friend_name = unicode string #print(hello("Mike"))
[ 201, 198, 201, 198, 2, 645, 1040, 14978, 9485, 3118, 1484, 14565, 201, 198, 2, 1545, 62, 3672, 796, 28000, 1098, 4731, 201, 198, 201, 198, 2, 4798, 7, 31373, 7203, 16073, 48774, 201, 198 ]
2.6
35
import numpy # Remark: # Real FFT with even n is faster than real FFT with odd n. # I do not know why. def realfft_col(a_mat): ''' Real Fast Fourier Transform (FFT) Independently Applied to Each Column of A Input a_mat: n-by-d dense NumPy matrix. Output c_mat: n-by-d matr...
[ 11748, 299, 32152, 198, 198, 2, 3982, 668, 25, 198, 2, 220, 220, 6416, 376, 9792, 351, 772, 299, 318, 5443, 621, 1103, 376, 9792, 351, 5629, 299, 13, 198, 2, 220, 220, 314, 466, 407, 760, 1521, 13, 198, 198, 4299, 1103, 487, 83,...
1.959534
1,804
from urldl import download from pycallisto import fitsfile callisto_archives = 'http://soleil80.cs.technik.fhnw.ch/' \ 'solarradio/data/2002-20yy_Callisto/' filelist = [ "BLEN7M_20110216_133009_24.fit.gz", "BLEN7M_20110216_134510_24.fit.gz", "BLEN7M_20110216_140011_24.fit.gz", "BLEN7M_2011...
[ 6738, 2956, 335, 75, 1330, 4321, 198, 6738, 12972, 13345, 396, 78, 1330, 11414, 7753, 628, 198, 13345, 396, 78, 62, 48814, 796, 705, 4023, 1378, 6753, 346, 1795, 13, 6359, 13, 23873, 1134, 13, 69, 21116, 86, 13, 354, 14, 6, 3467, ...
1.807154
643
import logging import yaml from detectime.detectime import detectron from definitions import ROOT_DIR from detectime.utils import convert_dict_to_tuple log = logging.getLogger(__name__) CONFIG_PATH = 'config.yml' if __name__ == '__main__': main()
[ 11748, 18931, 198, 11748, 331, 43695, 198, 6738, 4886, 524, 13, 15255, 478, 524, 1330, 4886, 1313, 198, 6738, 17336, 1330, 15107, 2394, 62, 34720, 198, 6738, 4886, 524, 13, 26791, 1330, 10385, 62, 11600, 62, 1462, 62, 83, 29291, 198, ...
2.942529
87
#!/usr/bin/env python """Clone wars simulator. Simulates the growth of clones in a 2D space. Mutations are induced by button presses. Currently untested. """ import splash splash.splashScreen("CloneWars!",rotation=270) import signal import sys import RPi.GPIO as GPIO try: import numpy as np ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 2601, 505, 9976, 35375, 13, 198, 198, 8890, 15968, 262, 3349, 286, 32498, 287, 257, 362, 35, 2272, 13, 198, 44, 32855, 389, 18268, 416, 4936, 31048, 13, 198, 198, 21327, 1418, ...
2.364341
774
# Generated by Django 4.0.2 on 2022-02-06 09:41 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 17, 319, 33160, 12, 2999, 12, 3312, 7769, 25, 3901, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
import numpy as np
[ 11748, 299, 32152, 355, 45941 ]
3.6
5
from EMAlgorithm import EmAlgorithm import numpy as np def create_data(mu0, sigma0, mu1, sigma1, alpha0, alpha1): ''' 初始化数据集 这里通过服从高斯分布的随机函数来伪造数据集 :param mu0: 高斯0的均值 :param sigma0: 高斯0的方差 :param mu1: 高斯1的均值 :param sigma1: 高斯1的方差 :param alpha0: 高斯0的系数 :param alpha1: 高斯1的系数 :retu...
[ 6738, 17228, 2348, 42289, 1330, 2295, 2348, 42289, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 2251, 62, 7890, 7, 30300, 15, 11, 264, 13495, 15, 11, 38779, 16, 11, 264, 13495, 16, 11, 17130, 15, 11, 17130, 16, 2599, 198, 220...
1.227462
721
import os xmldir = '/media/e813/E/dataset/eccv/eccv/VisDrone2018-VID-val/xmlannotations' # datasetdir = '/media/e813/E/dataset/eccv/eccv/VisDrone2018-VID-train' # file = os.path.join(datasetdir,'index.txt') # f = open(file,'w') count=0 for seq in os.listdir(xmldir): seqpath = os.path.join(xmldir,seq) for n,xml_...
[ 11748, 28686, 198, 87, 76, 335, 343, 796, 31051, 11431, 14, 68, 23, 1485, 14, 36, 14, 19608, 292, 316, 14, 68, 535, 85, 14, 68, 535, 85, 14, 15854, 6187, 505, 7908, 12, 11008, 12, 2100, 14, 19875, 34574, 602, 6, 198, 2, 27039, ...
1.976119
335
import textwrap from asyncio import Future from prompt_toolkit.layout.containers import HSplit from prompt_toolkit.layout.dimension import D from prompt_toolkit.widgets import Button, Label from prompt_toolkit.widgets.dialogs import Dialog from pepys_admin.maintenance.utils import get_system_name_mappings from pepys_...
[ 11748, 2420, 37150, 198, 6738, 30351, 952, 1330, 10898, 198, 198, 6738, 6152, 62, 25981, 15813, 13, 39786, 13, 3642, 50221, 1330, 18070, 489, 270, 198, 6738, 6152, 62, 25981, 15813, 13, 39786, 13, 46156, 1330, 360, 198, 6738, 6152, 62, ...
3.495495
111
# @param {integer[]} nums1 # @param {integer} m # @param {integer[]} nums2 # @param {integer} n # @return {void} Do not return anything, modify nums1 in-place instead.
[ 220, 220, 220, 1303, 2488, 17143, 1391, 41433, 21737, 92, 997, 82, 16, 198, 220, 220, 220, 1303, 2488, 17143, 1391, 41433, 92, 285, 198, 220, 220, 220, 1303, 2488, 17143, 1391, 41433, 21737, 92, 997, 82, 17, 198, 220, 220, 220, 1303...
2.561644
73
from ansible.parsing.dataloader import DataLoader from ansible.template import Templar import json import pytest import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') @pytest.fixture() def get_...
[ 198, 6738, 9093, 856, 13, 79, 945, 278, 13, 67, 10254, 1170, 263, 1330, 6060, 17401, 198, 6738, 9093, 856, 13, 28243, 1330, 41741, 198, 198, 11748, 33918, 198, 11748, 12972, 9288, 198, 11748, 28686, 198, 198, 11748, 1332, 10745, 430, ...
2.372752
1,835
import sys if (sys.version_info >= (2,7)): import unittest else: import unittest2 as unittest import pydevtest_sessions as s from pydevtest_common import assertiCmd, assertiCmdFail, interruptiCmd from resource_suite import ResourceBase import commands import os, stat import datetime import time import shutil im...
[ 11748, 25064, 198, 361, 357, 17597, 13, 9641, 62, 10951, 18189, 357, 17, 11, 22, 8, 2599, 198, 220, 220, 220, 1330, 555, 715, 395, 198, 17772, 25, 198, 220, 220, 220, 1330, 555, 715, 395, 17, 355, 555, 715, 395, 198, 11748, 279, ...
1.394783
575
from sqlalchemy import Column, ForeignKey, Integer, String, Enum, Float, DateTime, func from sqlalchemy.orm import relationship import enum from app.database import Base
[ 6738, 44161, 282, 26599, 1330, 29201, 11, 8708, 9218, 11, 34142, 11, 10903, 11, 2039, 388, 11, 48436, 11, 7536, 7575, 11, 25439, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 11748, 33829, 198, 6738, 598, 13, 48806, 1330, 73...
3.826087
46
# Embedded file name: c:\Jenkins\live\output\win_32_static\Release\midi-remote-scripts\Push\MelodicComponent.py from __future__ import with_statement from _Framework.Util import forward_property, find_if from _Framework.SubjectSlot import subject_slot from _Framework.ModesComponent import ModesComponent, LayerMode from...
[ 2, 13302, 47238, 2393, 1438, 25, 269, 7479, 44875, 5331, 59, 12583, 59, 22915, 59, 5404, 62, 2624, 62, 12708, 59, 26362, 59, 13602, 72, 12, 47960, 12, 46521, 59, 49222, 59, 21102, 29512, 21950, 13, 9078, 198, 6738, 11593, 37443, 834, ...
3.968254
189
# MIT License # Copyright (c) 2021 xadrianzetx # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
[ 2, 17168, 13789, 198, 198, 2, 15069, 357, 66, 8, 33448, 2124, 324, 4484, 89, 316, 87, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, ...
3.823729
295
import os import prody as pr # Manipulate rcsb file def organize_rcsb_file(workdir = "/mnt/e/DesignData/ligands/NI_rcsb/"): ''' The .csv files downloaded from rcsb database will be combined first, then generate tab deliminated txt file. ''' all_lines = [] for file in os.listdir(workdir): ...
[ 11748, 28686, 198, 11748, 386, 9892, 355, 778, 628, 198, 2, 35045, 5039, 374, 6359, 65, 2393, 198, 198, 4299, 16481, 62, 6015, 36299, 62, 7753, 7, 1818, 15908, 796, 12813, 76, 429, 14, 68, 14, 23067, 6601, 14, 4604, 1746, 14, 22125,...
2.159639
332
import os import json import boto3 REGION = 'us-east-2' session = boto3.session.Session(profile_name='sandbox') #iam = boto3.resource('iam', region_name=REGION) policy = { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ec2:DeleteVolume", "...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 275, 2069, 18, 198, 198, 31553, 2849, 796, 705, 385, 12, 23316, 12, 17, 6, 198, 198, 29891, 796, 275, 2069, 18, 13, 29891, 13, 36044, 7, 13317, 62, 3672, 11639, 38142, 3524, 11537, 198, 1...
1.945603
1,103
""" Dauphin is wrapper module around graphene meant to provide a couple additional features. Most importantly is a type registry. Instead of referring to the class that corresponds to the GraphQL type everywhere, you are instead allows to use the GraphQL string. This solves an immediate short term problem in that it is...
[ 37811, 198, 35, 559, 746, 259, 318, 29908, 8265, 1088, 42463, 4001, 284, 2148, 257, 3155, 3224, 198, 40890, 13, 4042, 11003, 318, 257, 2099, 20478, 13, 5455, 286, 9759, 284, 198, 1169, 1398, 326, 24866, 284, 262, 29681, 9711, 2099, 83...
3.516423
548
#!python3.6 print("int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}".format(42)) print("int: {0:d}; hex: {0:#x}; oct: {0:#o}; bin: {0:#b}".format(42))
[ 2, 0, 29412, 18, 13, 21, 198, 4798, 7203, 600, 25, 1391, 15, 25, 67, 19629, 220, 17910, 25, 1391, 15, 25, 87, 19629, 220, 19318, 25, 1391, 15, 25, 78, 19629, 220, 9874, 25, 1391, 15, 25, 65, 92, 1911, 18982, 7, 3682, 4008, 198...
1.823529
85
from flask import Flask, request from waitress import serve from src.config.appConfig import loadAppConfig from src.logs.loggerFactory import getFileLogger from src.services.smsSender import SmsApi # get application config appConf = loadAppConfig() # setup logging based on application config backUpCount = appConf["b...
[ 6738, 42903, 1330, 46947, 11, 2581, 198, 6738, 44511, 1330, 4691, 198, 198, 6738, 12351, 13, 11250, 13, 1324, 16934, 1330, 3440, 4677, 16934, 198, 6738, 12351, 13, 6404, 82, 13, 6404, 1362, 22810, 1330, 651, 8979, 11187, 1362, 198, 6738...
2.729358
436
import torch from torchvision import transforms, datasets from torch.utils.data import DataLoader device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') training_data = datasets.CIFAR10(root="data", train=True, download=True, transform=transforms.Compose([ ...
[ 11748, 28034, 201, 198, 6738, 28034, 10178, 1330, 31408, 11, 40522, 201, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 201, 198, 25202, 796, 28034, 13, 25202, 10786, 66, 15339, 6, 611, 28034, 13, 66, 15339, 13, 271, 62, 15...
1.9408
625
# Copyright 2019 Intel Corporation # # 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 wri...
[ 2, 15069, 13130, 8180, 10501, 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, 733...
2.37895
4,304
import pymc as pm import pymc.gp as gp from pymc.gp.cov_funs import matern import numpy as np import matplotlib.pyplot as pl from numpy.random import normal x = np.arange(-1.,1.,.1) # Prior parameters of C diff_degree = pm.Uniform('diff_degree', .1, 3) amp = pm.Lognormal('amp', mu=.4, tau=1.) scale = pm.Lognormal(...
[ 11748, 279, 4948, 66, 355, 9114, 198, 11748, 279, 4948, 66, 13, 31197, 355, 27809, 198, 6738, 279, 4948, 66, 13, 31197, 13, 66, 709, 62, 12543, 82, 1330, 285, 9205, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, ...
2.332623
469
import maxflow # Create a graph with integer capacities. g = maxflow.Graph[int](2, 2) # Add two (non-terminal) nodes. Get the index to the first one. nodes = g.add_nodes(2) # Create two edges (forwards and backwards) with the given capacities. # The indices of the nodes are always consecutive. g.add_edge(nodes[0], nod...
[ 11748, 3509, 11125, 198, 198, 2, 13610, 257, 4823, 351, 18253, 32484, 13, 198, 70, 796, 3509, 11125, 13, 37065, 58, 600, 16151, 17, 11, 362, 8, 198, 2, 3060, 734, 357, 13159, 12, 23705, 282, 8, 13760, 13, 3497, 262, 6376, 284, 262...
2.823077
260
#!/usr/bin/env python """ Analyze FRC data. Hazen 01/18 """ import glob import storm_analysis.frc.frc_calc2d as frcCalc2d dirs = sorted(glob.glob("test*")) total_time = 0.0 for a_dir in dirs: print() print("Analyzing:", a_dir) print() hdf5 = a_dir + "/test.hdf5" frc_text = a_dir + "/frc.txt"...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 37702, 2736, 376, 7397, 1366, 13, 198, 198, 39, 1031, 268, 5534, 14, 1507, 198, 37811, 198, 11748, 15095, 198, 198, 11748, 6388, 62, 20930, 13, 69, 6015, 13, 69, 6015, 62...
1.994949
198