content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# # Copyright (c) 2020, Andrey "Limych" Khrolenok <andrey@khrolenok.ru> # Creative Commons BY-NC-SA 4.0 International Public License # (see LICENSE.md or https://creativecommons.org/licenses/by-nc-sa/4.0/) # """ The Snowtire binary sensor. For more details about this platform, please refer to the documentation at h...
[ 2, 198, 2, 220, 15069, 357, 66, 8, 12131, 11, 843, 4364, 366, 19352, 88, 354, 1, 5311, 3225, 268, 482, 1279, 392, 4364, 31, 14636, 3225, 268, 482, 13, 622, 29, 198, 2, 220, 17404, 13815, 11050, 12, 7792, 12, 4090, 604, 13, 15, ...
2.828125
128
from __future__ import (division) from pomegranate import * from pomegranate.io import DataGenerator from pomegranate.io import DataFrameGenerator from nose.tools import with_setup from nose.tools import assert_almost_equal from nose.tools import assert_equal from nose.tools import assert_not_equal from nose.tools im...
[ 6738, 11593, 37443, 834, 1330, 357, 21426, 8, 198, 198, 6738, 279, 462, 46324, 378, 1330, 1635, 198, 6738, 279, 462, 46324, 378, 13, 952, 1330, 6060, 8645, 1352, 198, 6738, 279, 462, 46324, 378, 13, 952, 1330, 6060, 19778, 8645, 1352,...
2.562865
684
#! /usr/bin/python from .solution import Solution try: import gurobipy except ImportError: print("Gurobi not found: error ignored to allow tests") def callback_factory(scoring: AbstactVariableScoring): if isinstance(scoring, VariableRanking): output = __build_callback__(scoring) else: ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 764, 82, 2122, 1330, 28186, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 915, 22609, 541, 88, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 3601, 7203, 38, 1434, 8482, ...
2.881944
144
import sys from fetchcode.vcs.pip._internal.cli.main import main from fetchcode.vcs.pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Optional, List def _wrapper(args=None): # type: (Optional[List[str]]) -> int """Central wrapper for all old entrypoints. ...
[ 11748, 25064, 198, 198, 6738, 21207, 8189, 13, 85, 6359, 13, 79, 541, 13557, 32538, 13, 44506, 13, 12417, 1330, 1388, 198, 6738, 21207, 8189, 13, 85, 6359, 13, 79, 541, 13557, 32538, 13, 26791, 13, 774, 13886, 1330, 17615, 47, 56, 6...
3.010204
392
''' Support for generating documentation readmes for the extensions. Extracts from decorated lua block comments and xml comments. ''' from pathlib import Path from lxml import etree import sys from itertools import chain project_dir = Path(__file__).resolve().parents[1] # Set up an import from the customizer for som...
[ 7061, 6, 198, 15514, 329, 15453, 10314, 1100, 6880, 329, 262, 18366, 13, 198, 11627, 974, 82, 422, 24789, 300, 6413, 2512, 3651, 290, 35555, 3651, 13, 198, 7061, 6, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 300, 19875, 1330,...
2.310561
3,030
#Addition of two numbers a = 30 b = 17 print("Sum of a and b is",a + b)
[ 2, 4550, 653, 286, 734, 3146, 198, 64, 796, 1542, 198, 65, 796, 1596, 198, 4798, 7203, 13065, 286, 257, 290, 275, 318, 1600, 64, 1343, 275, 8 ]
2.535714
28
import sys from PyQt5.QtWidgets import (QApplication, QMainWindow, QPushButton, QToolTip, QLabel, QLineEdit) from PyQt5 import QtGui if __name__ == '__main__': app = QA...
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 357, 48, 23416, 11, 198, 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, ...
1.622568
257
import base64 import os import sys import PyPDF2 svg = '''<svg id="write-document" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <rect id="write-doc-background" width="100%" height="100%" fill="#808080"/> <defs id="write-defs"> <script type="text/writeconfig"> <int name="docFormatVer...
[ 11748, 2779, 2414, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 9485, 20456, 17, 198, 198, 21370, 70, 796, 705, 7061, 27, 21370, 70, 4686, 2625, 13564, 12, 22897, 1, 35555, 5907, 2625, 4023, 1378, 2503, 13, 86, 18, 13, 2398, 14, ...
2.390671
1,029
from typing import Dict, List, cast from py_headless_daw.project.parameter import Parameter, ParameterValueType, ParameterRangeType
[ 6738, 19720, 1330, 360, 713, 11, 7343, 11, 3350, 198, 198, 6738, 12972, 62, 2256, 1203, 62, 67, 707, 13, 16302, 13, 17143, 2357, 1330, 25139, 2357, 11, 25139, 2357, 11395, 6030, 11, 25139, 2357, 17257, 6030, 628 ]
3.526316
38
## # This class encapsulates a Region Of Interest, which may be either horizontal # (pixels) or vertical (rows/lines).
[ 2235, 198, 2, 770, 1398, 32652, 15968, 257, 17718, 3226, 12033, 11, 543, 743, 307, 2035, 16021, 220, 198, 2, 357, 79, 14810, 8, 393, 11723, 357, 8516, 14, 6615, 737, 198 ]
3.75
32
#!/usr/bin/python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 limi...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 6434, 25, 16899, 440, 1156, 1279, 89, 382, 429, 31, 873, 13, 785, 29, 198, 2, 15069, 357, 66, 8, 1853, 8180, 10501, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, ...
1.565265
5,470
from .bernsen import bernsen_thresholding_method from .bradley_roth import bradley_thresholding_method from .contrast import contrast_thresholding_method from .feng import feng_thresholding_method from .gaussian import threshold_value_gaussian from .johannsen import johannsen_thresholding_method from .kapur import kapu...
[ 6738, 764, 527, 5907, 268, 1330, 275, 1142, 6248, 62, 400, 10126, 278, 62, 24396, 198, 6738, 764, 1671, 324, 1636, 62, 33640, 1330, 865, 324, 1636, 62, 400, 10126, 278, 62, 24396, 198, 6738, 764, 3642, 5685, 1330, 6273, 62, 400, 101...
3.218638
279
import os from kombu import Queue, Exchange ## Broker settings. BROKER_URL = os.getenv('BROKER_URL', 'amqp://guest:guest@localhost:5672') #BROKER_URL = "amqp://guest:guest@localhost:5672/" #BROKER_URL = os.getenv('BROKER_URL', 'redis://guest@localhost:6379') #BROKER_HOST = "localhost" #BROKER_PORT = 27017 #BROKER_TRA...
[ 11748, 28686, 198, 6738, 479, 2381, 84, 1330, 4670, 518, 11, 12516, 198, 198, 2235, 2806, 6122, 6460, 13, 198, 11473, 11380, 1137, 62, 21886, 796, 28686, 13, 1136, 24330, 10786, 11473, 11380, 1137, 62, 21886, 3256, 705, 321, 80, 79, 1...
2.334043
470
# -*- coding: utf-8 -*- # # from __future__ import print_function import csv import os import re import sys import arrow from gsheets import Sheets CURRENT_PATH = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) DEBUG = os.environ.get('DEBUG', "0") == "1" AS_CSV = os.environ.get('CSV', "0") == "1" COL...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 198, 11748, 15452...
2.284746
295
import numpy as np import pickle import treys import constants FULL_DECK = np.array(treys.Deck.GetFullDeck())
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 2054, 893, 198, 198, 11748, 38491, 198, 198, 37, 9994, 62, 35, 25171, 796, 45941, 13, 18747, 7, 33945, 893, 13, 5005, 694, 13, 3855, 13295, 5005, 694, 28955, 628 ]
2.756098
41
# -*- coding: utf-8 -*- from cms.models import Page, Title, CMSPlugin, Placeholder from cms.utils import get_language_from_request from django.http import Http404 from django.shortcuts import get_object_or_404
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 269, 907, 13, 27530, 1330, 7873, 11, 11851, 11, 40773, 37233, 11, 8474, 13829, 198, 6738, 269, 907, 13, 26791, 1330, 651, 62, 16129, 62, 6738, 62, 25927, 198, 67...
3.043478
69
import os from PIL import Image, ImageFilter import matplotlib.pyplot as plt import matplotlib.image as mpimg # import seaborn as sns import pandas as pd import numpy as np import random train_path = './AgriculturalDisease_trainingset/' valid_path = './AgriculturalDisease_validationset/' if __name__ == '__main__': ...
[ 11748, 28686, 220, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 22417, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 9060, 355, 29034, 9600, 198, 2, 1330, 384, 397, 1211, 355, 3013, 82...
2.804348
138
# - - - - - - - - - - - # @author like # @since 2021-02-23 11:08 # @email 980650920@qq.com # from matplotlib import pyplot as plt from matplotlib import rc from matplotlib import font_manager import random x = range(0, 120) y = [random.randint(20, 35) for i in range(120)] plt.figure(figsize=(20, 8), dpi=80) plt....
[ 2, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 220, 198, 2, 2488, 9800, 588, 198, 2, 2488, 20777, 33448, 12, 2999, 12, 1954, 1367, 25, 2919, 198, 2, 2488, 12888, 32614, 17544, 37128, 31, 38227, 13, 785, 198, 2, 220, 1...
2.395833
336
import os, sys, cdms2, vcs, vcs.testing.regression as regression dataset = cdms2.open(os.path.join(vcs.sample_data,"clt.nc")) data = dataset("clt") canvas = regression.init() isoline = canvas.createisoline() isoline.label="y" texts=[] colors = [] for i in range(10): text = canvas.createtext() text.color = 50 +...
[ 11748, 28686, 11, 25064, 11, 22927, 907, 17, 11, 410, 6359, 11, 410, 6359, 13, 33407, 13, 2301, 2234, 355, 20683, 198, 198, 19608, 292, 316, 796, 22927, 907, 17, 13, 9654, 7, 418, 13, 6978, 13, 22179, 7, 85, 6359, 13, 39873, 62, ...
2.49262
542
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Mar 5 05:47:03 2018 @author: zg """ import numpy as np #from scipy import io import scipy.io #import pickle from sklearn.model_selection import StratifiedKFold #import sklearn from scipy.sparse import spdiags from scipy.spatial import distance #impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 1526, 220, 642, 8870, 25, 2857, 25, 3070, 2864, 198, 198, 31, 9800, 25, 1976, 70, ...
1.928396
17,122
#!/usr/bin/env python3 """ Imports 7-series routing fabric to the rr graph. For ROI configurations, this also connects the synthetic IO tiles to the routing node specified. Rough structure: Add rr_nodes for CHANX and CHANY from the database. IPIN and OPIN rr_nodes should already be present from the input rr_graph. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 1846, 3742, 767, 12, 25076, 28166, 9664, 284, 262, 374, 81, 4823, 13, 198, 198, 1890, 15107, 40, 25412, 11, 428, 635, 20417, 262, 18512, 24418, 19867, 284, 262, 28166, 198, ...
2.055455
7,177
######################### ######################### # Need to account for limit in input period ######################### ######################### # Baseline M67 long script -- NO crowding # New script copied from quest - want to take p and ecc from each population (all, obs, rec) and put them into separate file # Do...
[ 14468, 7804, 2, 198, 14468, 7804, 2, 198, 2, 10664, 284, 1848, 329, 4179, 287, 5128, 2278, 198, 14468, 7804, 2, 198, 14468, 7804, 2, 198, 198, 2, 6455, 4470, 337, 3134, 890, 4226, 1377, 8005, 4315, 278, 198, 2, 968, 4226, 18984, 4...
2.109198
7,143
import FWCore.ParameterSet.Config as cms import os process = cms.Process("summary") process.MessageLogger = cms.Service( "MessageLogger", debugModules = cms.untracked.vstring( "*" ), cout = cms.untracked.PSet( threshold = cms.untracked.string( ...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 11748, 28686, 198, 198, 14681, 796, 269, 907, 13, 18709, 7203, 49736, 4943, 198, 198, 14681, 13, 12837, 11187, 1362, 796, 269, 907, 13, 16177, 7, 366, 12837, 11187, ...
2.178117
786
from django.urls import path from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView ) urlpatterns = [ path('obtain/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 1334, 62, 30604, 62, 36439, 73, 46569, 13, 33571, 1330, 357, 198, 220, 220, 220, 29130, 5944, 3153, 47, 958, 7680, 11, 198, 220, 220, 220, 29130, 8134, 3447, 7680, 11, 198, 22...
2.664336
143
from ftplib import FTP,error_perm, all_errors import posixpath from io import BytesIO,SEEK_SET from .source import DataSource import sys import re reftp = re.compile('(ssh|ftp)\:\/\/(([^@:]+)?:?([^@]+)?@)?([^:]+)(:[0-9]+)?\/(.*)')
[ 198, 6738, 10117, 489, 571, 1330, 45854, 11, 18224, 62, 16321, 11, 477, 62, 48277, 198, 11748, 1426, 844, 6978, 198, 6738, 33245, 1330, 2750, 4879, 9399, 11, 36078, 42, 62, 28480, 198, 198, 6738, 764, 10459, 1330, 6060, 7416, 198, 117...
2.363636
99
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the knowledge base.""" import unittest from plaso.containers import artifacts from plaso.engine import knowledge_base from tests import test_lib as shared_test_lib if __name__ == '__main__': unittest.main()
[ 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, 51, 3558, 329, 262, 3725, 2779, 526, 15931, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 458, 292, 78, ...
2.835052
97
# https://leetcode.com/problems/word-break-ii/ from typing import List s = Solution() print(s.wordBreak_dfs('catsanddog', ["cat", "cats", "and", "sand", "dog"])) print(s.wordBreak_dfs('pineapplepenapple', [ "apple", "pen", "applepen", "pine", "pineapple"])) # text = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 4775, 12, 9032, 12, 4178, 14, 198, 198, 6738, 19720, 1330, 7343, 628, 198, 198, 82, 796, 28186, 3419, 198, 198, 4798, 7, 82, 13, 4775, 31737, 62, 7568, 82, 10786, 24619,...
2.675799
219
# Copyright 2012 New Dream Network, LLC (DreamHost) # 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 # # ...
[ 2, 15069, 2321, 968, 7610, 7311, 11, 11419, 357, 30571, 17932, 8, 198, 2, 1439, 6923, 33876, 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,...
3.51436
383
from decimal import Decimal from .abc import WithdrawalStrategy # Bengen's Floor-to-Ceiling, as described in McClung's Living Off Your Money
[ 6738, 32465, 1330, 4280, 4402, 198, 6738, 764, 39305, 1330, 2080, 19334, 282, 13290, 4338, 198, 198, 2, 14964, 268, 338, 22343, 12, 1462, 12, 34, 68, 4386, 11, 355, 3417, 287, 23780, 2150, 338, 13728, 3242, 3406, 12911, 198 ]
3.55
40
""" MicroPython driver for Bosh BME280 temperature, pressure and humidity I2C sensor: https://www.bosch-sensortec.com/bst/products/all_products/bme280 Authors: Nelio Goncalves Godoi, Roberto Colistete Jr Version: 3.1.2 @ 2018/04 License: MIT License (https://opensource.org/licenses/MIT) """ import time from ustruct im...
[ 37811, 198, 13031, 37906, 4639, 329, 42776, 347, 11682, 21033, 5951, 11, 3833, 290, 27716, 314, 17, 34, 12694, 25, 198, 5450, 1378, 2503, 13, 39565, 354, 12, 82, 641, 419, 721, 13, 785, 14, 65, 301, 14, 29498, 14, 439, 62, 29498, ...
2.276471
340
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
4.041812
287
# -*- coding: utf-8 -*- """Computes distance between killmails by text similarity. Edit Distance Metrics - Levenshtein Distance - Damerau-Levenshtein Distance - Jaro Distance - Jaro-Winkler Distance - Match Rating Approach Comparison - Hamming Distance Vector Distance Metrics - Jaccard Similarity - Cosine Distance W...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 7293, 1769, 5253, 1022, 1494, 26165, 416, 2420, 26789, 13, 198, 198, 18378, 34600, 3395, 10466, 198, 12, 1004, 574, 1477, 22006, 34600, 198, 12, 360, 2382, 559, 1...
2.542869
2,496
import numpy as np from itertools import product from typing import List from src.config import ConfigChess from src.chess.board import Board from src.chess.move import Move
[ 11748, 299, 32152, 355, 45941, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 12351, 13, 11250, 1330, 17056, 7376, 824, 198, 6738, 12351, 13, 2395, 824, 13, 3526, 1330, 5926, 198, 6738, 12351, 13, ...
3.666667
48
from random import gauss
[ 6738, 4738, 1330, 31986, 1046, 628 ]
4.333333
6
import re from typing import Any, ClassVar, Dict, List, NoReturn, Union from cryptography.exceptions import UnsupportedAlgorithm from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from requests import Response, Session from .exc import ( AccountDoesNo...
[ 11748, 302, 198, 6738, 19720, 1330, 4377, 11, 5016, 19852, 11, 360, 713, 11, 7343, 11, 1400, 13615, 11, 4479, 198, 198, 6738, 45898, 13, 1069, 11755, 1330, 791, 15999, 2348, 42289, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 1891, 2412,...
2.920128
313
import sys import os.path import timeit sys.path.insert( 0, os.path.normpath(os.path.join( os.path.dirname( __file__ ), '..') )) from aql_tests import skip, AqlTestCase, runLocalTests from aql.util_types import UniqueList, SplitListType, List, ValueListType #//=======================================================...
[ 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 11748, 640, 270, 198, 198, 17597, 13, 6978, 13, 28463, 7, 657, 11, 28686, 13, 6978, 13, 27237, 6978, 7, 418, 13, 6978, 13, 22179, 7, 28686, 13, 6978, 13, 15908, 3672, 7, 11593, 7753, ...
3.738095
126
from datetime import datetime from src.utils import uploaded_file import os
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 12351, 13, 26791, 1330, 19144, 62, 7753, 198, 11748, 28686, 628 ]
4.052632
19
# config params KB = 1024 MB = 1024*KB GB = 1024*MB # name of meta root dir META_DIR = ".metasync" # batching time for daemon SYNC_WAIT = 3 # blob size BLOB_UNIT = 32*MB # Increase of Paxos proposal number PAXOS_PNUM_INC = 10 # authentication directory import os AUTH_DIR = os.path.join(os.path.expanduser("~"), "...
[ 2, 4566, 42287, 198, 198, 22764, 796, 28119, 198, 10744, 796, 28119, 9, 22764, 198, 4579, 796, 28119, 9, 10744, 198, 198, 2, 1438, 286, 13634, 6808, 26672, 198, 44, 20892, 62, 34720, 796, 27071, 4164, 292, 13361, 1, 198, 198, 2, 154...
2.614173
127
import unittest from py.tests.utils import test from py import valid_parentheses as vp
[ 11748, 555, 715, 395, 198, 6738, 12972, 13, 41989, 13, 26791, 1330, 1332, 198, 6738, 12972, 1330, 4938, 62, 8000, 39815, 355, 410, 79, 628 ]
3.52
25
import tensorflow as tf import numpy as np import time import cv2 from hitnet.utils_hitnet import * drivingStereo_config = CameraConfig(0.546, 1000)
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 269, 85, 17, 198, 6738, 2277, 3262, 13, 26791, 62, 17945, 3262, 1330, 1635, 628, 198, 24255, 1273, 32934, 62, 11250, 796, 20432, 1693...
2.945455
55
from django import forms from fobi.base import FormFieldPlugin, form_element_plugin_registry from .forms import HouseholdTenureForm form_element_plugin_registry.register(HouseholdTenurePlugin)
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 277, 13411, 13, 8692, 1330, 5178, 15878, 37233, 11, 1296, 62, 30854, 62, 33803, 62, 2301, 4592, 198, 198, 6738, 764, 23914, 1330, 37306, 24893, 495, 8479, 628, 198, 198, 687, 62, 30854, ...
3.535714
56
__all__ = ['EnemyBucketWithStar', 'Nut', 'Beam', 'Enemy', 'Friend', 'Hero', 'Launcher', 'Rotor', 'SpikeyBuddy', 'Star', 'Wizard', 'EnemyEquipedRotor', 'CyclingEnemyObject', 'Joi...
[ 834, 439, 834, 796, 37250, 4834, 3065, 33, 38811, 3152, 8248, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 49004, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 3856, 321, 3256, 198, 220, 22...
1.508197
244
from __future__ import print_function from six.moves import range import torchvision.transforms as transforms import torch.backends.cudnn as cudnn import torch import torch.nn as nn from torch.autograd import Variable import torch.optim as optim import torchvision.utils as vutils import numpy as np import os import ti...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 2237, 13, 76, 5241, 1330, 2837, 198, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 11748, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 355, 269, 463, 20471, 198, 11...
3.520179
223
from bottle import TEMPLATE_PATH, route, run, template, redirect, get, post, request, response, auth_basic, Bottle, abort, error, static_file import bottle import controller from controller import dobi_parcele_za_prikaz, dobi_info_parcele, dodaj_gosta_na_rezervacijo, naredi_rezervacijo, dobi_rezervacijo_po_id, zakljuci...
[ 6738, 9294, 1330, 309, 3620, 6489, 6158, 62, 34219, 11, 6339, 11, 1057, 11, 11055, 11, 18941, 11, 651, 11, 1281, 11, 2581, 11, 2882, 11, 6284, 62, 35487, 11, 33608, 11, 15614, 11, 4049, 11, 9037, 62, 7753, 198, 11748, 9294, 198, 1...
2.717949
156
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Parameter initialization for transducer RNN/Transformer parts.""" import six from espnet.nets.pytorch_backend.initialization import lecun_normal_init_parameters from espnet.nets.pytorch_backend.initialization import set_forget_bias_to_one from espnet.nets.pytorch_ba...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 36301, 37588, 329, 1007, 646, 2189, 371, 6144, 14, 8291, 16354, 3354, 526, 15931, 198, 198, 11748, 2237...
2.384913
517
import model import numpy as np import datasetReader as df import main # Number of traces loaded T T = 1 # Generate traces traces_factory = df.DatasetFactory() traces_factory.createDataset(T) traces = traces_factory.traces P0 = np.matrix("[ .02 0;" "0 0 0.5;" "0 0 0]") P1 = np.matrix(...
[ 11748, 2746, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 27039, 33634, 355, 47764, 198, 11748, 1388, 198, 198, 2, 7913, 286, 20675, 9639, 309, 198, 51, 796, 352, 198, 2, 2980, 378, 20675, 198, 2213, 2114, 62, 69, 9548, 796, 47764,...
1.812261
261
#!/usr/bin/env python import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Use the painter to draw using colors. # This is not a pipeline object. It will support pipeline objects. # Please do not use this object directly. imageCanvas = vtk.vtkImageCanvasSource2D() imageCanvas.SetNumb...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 410, 30488, 198, 6738, 410, 30488, 13, 22602, 13, 44374, 1330, 410, 30488, 3855, 6601, 30016, 198, 36392, 42, 62, 26947, 62, 13252, 2394, 796, 410, 30488, 3855, 6601, 30016, 3419,...
2.523659
951
import csv
[ 11748, 269, 21370, 198 ]
2.75
4
# Copyright 2020 - 2021 MONAI Consortium # 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, 12131, 532, 33448, 25000, 20185, 42727, 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.659831
829
#!/usr/bin/env python3 import sys import logging import yaml import pandas as pd import numpy as np from collections import defaultdict from sklearn.model_selection import train_test_split from sklearn.ensemble import IsolationForest from sklearn.impute import SimpleImputer from anoflows.hpo import find_best_flows ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 331, 43695, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 4277, 11600, 198, 198,...
2.413863
981
__all__ = ['VERSION', 'version_info'] VERSION = '1.4a1'
[ 834, 439, 834, 796, 37250, 43717, 3256, 705, 9641, 62, 10951, 20520, 198, 198, 43717, 796, 705, 16, 13, 19, 64, 16, 6, 628 ]
2.416667
24
from scheme import Structure __all__ = ('Configurable', 'Registry')
[ 6738, 7791, 1330, 32522, 198, 198, 834, 439, 834, 796, 19203, 16934, 11970, 3256, 705, 8081, 4592, 11537, 198 ]
3.631579
19
from .command import * from .database import * from .entrypoint import * from .group import * from .http import * from .messaging import * from .method import * from .operation import * from .stack import * from .threads import *
[ 198, 6738, 764, 21812, 1330, 1635, 198, 6738, 764, 48806, 1330, 1635, 198, 6738, 764, 13000, 4122, 1330, 1635, 198, 6738, 764, 8094, 1330, 1635, 198, 6738, 764, 4023, 1330, 1635, 198, 6738, 764, 37348, 3039, 1330, 1635, 198, 6738, 764, ...
3.609375
64
#!/usr/bin/env python3 # # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Extracts random constraints from reference files.""" import argparse import random import sys from sacrebleu imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 2429...
2.861199
317
# Copyright 2020 Alexis Lopez Zubieta # # 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, publi...
[ 2, 220, 15069, 220, 12131, 31078, 22593, 47828, 1155, 64, 198, 2, 198, 2, 220, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 2, 220, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, ...
4.267516
157
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import csv import furl import json import re import sys from collections import defaultdict if __name__ == '__main__': parser = argparse.ArgumentParser( description="Process a file with zenon json records and print some informatio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 277, 6371, 198, 11748, 33918, 198, 11748, 302, 198, 11...
3.38
550
# ================================================================================================== # Copyright 2012 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
[ 2, 38093, 10052, 28, 198, 2, 15069, 2321, 3009, 11, 3457, 13, 198, 2, 16529, 3880, 438, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 670, 2845, 287, ...
4.99505
202
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2018-2020 BigML # # 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 requi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 2864, 12, 42334, 4403, 5805, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 1...
3.099034
414
days_of_week = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday', 'Sunday'] operation = '' options = ['Info', 'Check-in/Out', 'Edit games', 'Back'] admins = ['admin1_telegram_nickname', 'admin2_telegram_nickname'] avail_days = [] TOKEN = 'bot_token' group_id = id_of_group_chat
[ 12545, 62, 1659, 62, 10464, 796, 37250, 23810, 41707, 26133, 41707, 27150, 41707, 25381, 41707, 20610, 41707, 19844, 3256, 705, 21934, 20520, 198, 27184, 796, 10148, 198, 25811, 796, 37250, 12360, 3256, 705, 9787, 12, 259, 14, 7975, 3256, ...
2.959184
98
''' Austin Richards 2/20/21 sandwich-maker.py uses pyinputplus to validate user input for sandwich preferences ''' import pyinputplus as ip def get_cost(food_name): '''gets the cost of items in sandwich_builder''' food_dict = { 'sourdough':1.75, 'rye':2.0, 'wheat':1.50, 'whi...
[ 7061, 6, 198, 40245, 14743, 362, 14, 1238, 14, 2481, 198, 198, 38142, 11451, 12, 10297, 13, 9078, 3544, 12972, 15414, 9541, 284, 26571, 2836, 5128, 329, 20433, 15387, 198, 7061, 6, 198, 11748, 12972, 15414, 9541, 355, 20966, 198, 198, ...
2.037791
344
# -*- coding: utf-8 -*- ''' HeaderUpdater class test ======================== ''' import unittest from tests.testutils import print_testtitle, validate_with_fail from builder.commands.scode import SCode, SCmd from builder.containers.chapter import Chapter from builder.containers.episode import Episode from builder.con...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 39681, 4933, 67, 729, 1398, 1332, 198, 4770, 2559, 198, 7061, 6, 198, 198, 11748, 555, 715, 395, 198, 6738, 5254, 13, 9288, 26791, 1330, 3601, 62, 9288, ...
3.603306
121
import numpy as np import h5py filename = "test_vlen_datasets_np_bool.h5" rows = [np.array([np.True_, np.False_]), np.array([np.True_, np.True_, np.False_])] f = h5py.File(filename, 'x') # create file, fails if exists vlen_data_type = h5py.special_dtype(vlen=np.bool_) dset = f.create_dataset("vlen_matrix",...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 198, 198, 34345, 796, 366, 9288, 62, 85, 11925, 62, 19608, 292, 1039, 62, 37659, 62, 30388, 13, 71, 20, 1, 198, 198, 8516, 796, 685, 37659, 13, 18747, 26933, 37659, 13, 17821...
1.858311
367
import os, time import numpy as np import scipy.signal import scipy.misc import scipy.ndimage.filters import matplotlib.pyplot as plt import PIL from PIL import ImageDraw import angles import cv2 import SimpleITK as sitk def fig2data(fig): """ @brief Convert a Matplotlib figure to a 4...
[ 11748, 28686, 11, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 629, 541, 88, 13, 12683, 282, 198, 11748, 629, 541, 88, 13, 44374, 198, 11748, 629, 541, 88, 13, 358, 9060, 13, 10379, 1010, 198, 198, 11748, 2603, 294...
2.511905
336
from __future__ import absolute_import import re from email.mime.text import MIMEText from smtplib import SMTP from weasyl import define, macro EMAIL_ADDRESS = re.compile(r"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+\Z") def normalize_address(address): """ Converts an e-mail address to a consistent re...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 302, 198, 6738, 3053, 13, 76, 524, 13, 5239, 1330, 337, 3955, 2767, 2302, 198, 6738, 895, 83, 489, 571, 1330, 9447, 7250, 198, 198, 6738, 356, 292, 2645, 1330, 8160, 1...
2.425926
594
import pytest from rdflib import Graph, Namespace, Literal from rdflib.namespace import RDF, RDFS from sphinx_probs_rdf.directives import PROBS SYS = Namespace("http://example.org/system/")
[ 11748, 12972, 9288, 198, 198, 6738, 374, 67, 2704, 571, 1330, 29681, 11, 28531, 10223, 11, 25659, 1691, 198, 6738, 374, 67, 2704, 571, 13, 14933, 10223, 1330, 371, 8068, 11, 371, 8068, 50, 198, 6738, 599, 20079, 87, 62, 1676, 1443, ...
2.782609
69
#analysis function for three level game
[ 2, 20930, 2163, 329, 1115, 1241, 983, 628 ]
5.125
8
notice = """ Cone Demo ----------------------------------- | Copyright 2022 by Joel C. Alcarez | | [joelalcarez1975@gmail.com] | |-----------------------------------| | We make absolutely no warranty | | of any kind, expressed or implied | |-----------------------------------| | This g...
[ 42138, 796, 37227, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 505, 34588, 201, 198, 20368, 6329, 201, 198, 91, 15069, 33160, 416, 18623, 327, 13, 978, 6651, 89, 930, 201, 198, 91, 685, 7639, 417, 28...
2.411371
299
""" Plot a training curve for the 6D data simulator of CT* """ import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import StandardScaler from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import RBF, WhiteKernel, Matern from sklearn.metrics imp...
[ 37811, 28114, 257, 3047, 12133, 329, 262, 718, 35, 1366, 35375, 286, 16356, 9, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 3866, 36948, ...
2.555556
783
import sqlite3 import subprocess, datetime from flask import Flask, request, session, g, redirect, url_for, \ abort, render_template, flash from contextlib import closing from tquery import get_latest_record from config import * app = Flask(__name__) app.config.from_object(__name__)...
[ 11748, 44161, 578, 18, 198, 11748, 850, 14681, 11, 4818, 8079, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 6246, 11, 308, 11, 18941, 11, 19016, 62, 1640, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.507826
1,150
"""Helper functions to tests.""" import numpy as np def norm(vs: np.array) -> float: """Compute the norm of a vector.""" return np.sqrt(np.dot(vs, vs)) def create_random_matrix(size: int) -> np.array: """Create a numpy random matrix.""" return np.random.normal(size=size ** 2).reshape(size, size) ...
[ 37811, 47429, 5499, 284, 5254, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 2593, 7, 14259, 25, 45941, 13, 18747, 8, 4613, 12178, 25, 198, 220, 220, 220, 37227, 7293, 1133, 262, 2593, 286, 257, 15879, 526, 1593...
2.456456
333
from typing import List if __name__ == "__main__": nums = [2, 3, 1, 0, 2, 5, 3] print(Solution().findRepeatNumber(nums))
[ 6738, 19720, 1330, 7343, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 997, 82, 796, 685, 17, 11, 513, 11, 352, 11, 657, 11, 362, 11, 642, 11, 513, 60, 198, 220, 220, 220, 3601, 7, 46344,...
2.433962
53
import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from gwu_nn.gwu_network import GWUNetwork from gwu_nn.layers import Dense from gwu_nn.activation_layers import Sigmoid np.random.seed(8) num_obs = 8000 # Create our features to draw from two distinct 2D...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 201, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 201, 198, 6738, 308, 43812, 62, 20471, 13,...
2.337912
728
import itertools as it import numpy as np import mdtraj as md from progressbar import ProgressBar from scattering.utils.utils import get_dt from scattering.utils.constants import get_form_factor def compute_van_hove(trj, chunk_length, water=False, r_range=(0, 1.0), bin_width=0.005, n_bins=None,...
[ 11748, 340, 861, 10141, 355, 340, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 45243, 9535, 73, 355, 45243, 198, 6738, 4371, 5657, 1330, 18387, 10374, 198, 198, 6738, 45765, 13, 26791, 13, 26791, 1330, 651, 62, 28664, 198, 6738,...
2.120191
2,937
# -*- coding: utf-8 -*- # nn_benchmark # author - Quentin Ducasse # https://github.com/QDucasse # quentin.ducasse@ensta-bretagne.org from __future__ import absolute_import __all__ = ["lenet","lenet5","quant_lenet5", "quant_cnv", "quant_tfc", "mobilenetv1","quant_mobilenetv1", "vggnet...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 299, 77, 62, 26968, 4102, 198, 2, 1772, 532, 42447, 24165, 21612, 198, 2, 3740, 1378, 12567, 13, 785, 14, 48, 35, 1229, 21612, 198, 2, 627, 31371, 13, 6077, ...
2.023196
388
#pylint:disable=no-member import cv2 as cv import numpy as np img = cv.imread('/Users/webileapp/Desktop/niharika_files/projects/opencv_course_master/Resources/Photos/cats.jpg') cv.imshow('Cats', img) # blank = np.zeros(img.shape[:2], dtype='uint8') cv.imshow('Blank', blank) gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)...
[ 2, 79, 2645, 600, 25, 40223, 28, 3919, 12, 19522, 198, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 198, 9600, 796, 269, 85, 13, 320, 961, 10786, 14, 14490, 14, 12384, 576, 1324, 14, 36881, 14, ...
2.222222
369
from . import fcosr_tools __all__ = ['fcosr_tools']
[ 6738, 764, 1330, 277, 6966, 81, 62, 31391, 198, 834, 439, 834, 796, 37250, 69, 6966, 81, 62, 31391, 20520 ]
2.55
20
# Copyright (c) 2022, Juve and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document
[ 2, 15069, 357, 66, 8, 33160, 11, 12585, 303, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 2, 1330, 5306, 27768, 198, 6738, 5306, 27768, 13, 19849, 13, 22897, 1330, 16854, 198 ]
3.948718
39
import sys from os import path import urllib; from urllib.request import urlretrieve from subprocess import call if __name__ == "__main__": if (len(sys.argv) < 2): print("Enter a directory to install hooks") else: if (path.exists(sys.argv[1])): install_hooks(sys.argv[1])
[ 11748, 25064, 198, 6738, 28686, 1330, 3108, 198, 11748, 2956, 297, 571, 26, 422, 2956, 297, 571, 13, 25927, 1330, 19016, 1186, 30227, 198, 6738, 850, 14681, 1330, 869, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, ...
2.421875
128
""" Micro webapp based on WebOb, Jinja2, WSGI with a simple router """ import os import hmac import hashlib import mimetypes from wsgiref.simple_server import WSGIServer, WSGIRequestHandler from webob import Request from webob import Response from jinja2 import Environment, FileSystemLoader
[ 37811, 198, 13031, 3992, 1324, 1912, 319, 5313, 5944, 11, 17297, 6592, 17, 11, 25290, 18878, 351, 257, 2829, 20264, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 289, 20285, 198, 11748, 12234, 8019, 198, 11748, 17007, 2963, 12272, 198, ...
3.397727
88
import logging from django.core import mail from django.conf import settings from django.core.management.base import BaseCommand import amo.utils from users.models import UserProfile log = logging.getLogger('z.mailer') FROM = settings.DEFAULT_FROM_EMAIL SUBJECT = 'Instructions for Automatic Upgrade to Add-on SDK...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 7295, 1330, 6920, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 11748, 716, 78, 13, 26791, 198, 6738,...
3.32914
477
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Specify and constraints to determine which targets are observable for an observer. """ from __future__ import (absolute_import, division, print_function, unicode_literals) # Standard library from abc import ABCMeta, abstractme...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 198, 22882, 1958, 290, 17778, 284, 5004, 543, 6670, 389, 42550, 329, 198, 272, 22890, 13, 198, 37811, 198, 198, 6738, 11...
2.472992
13,163
from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.core.urlresolvers import reverse from django.shortcuts import render from django.http import HttpResponseRedirect from core.models import Po...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 31525, 20900, 11, 7873, 3673, ...
3.701754
114
import dataclasses import io import multiprocessing as _mp import uuid import zipfile from concurrent.futures import Future from multiprocessing.connection import Connection from typing import List, Optional, Tuple import numpy from tiktorch import log from tiktorch.rpc import Shutdown from tiktorch.rpc import mp as ...
[ 11748, 4818, 330, 28958, 198, 11748, 33245, 198, 11748, 18540, 305, 919, 278, 355, 4808, 3149, 198, 11748, 334, 27112, 198, 11748, 19974, 7753, 198, 6738, 24580, 13, 69, 315, 942, 1330, 10898, 198, 6738, 18540, 305, 919, 278, 13, 38659,...
2.705686
598
from openpype.modules.ftrack.lib import BaseEvent from openpype.modules.ftrack.lib.avalon_sync import CUST_ATTR_ID_KEY from openpype.modules.ftrack.event_handlers_server.event_sync_to_avalon import ( SyncToAvalonEvent ) def register(session): '''Register plugin. Called when used as an plugin.''' DelAvalo...
[ 6738, 1280, 79, 2981, 13, 18170, 13, 701, 39638, 13, 8019, 1330, 7308, 9237, 198, 6738, 1280, 79, 2981, 13, 18170, 13, 701, 39638, 13, 8019, 13, 9226, 261, 62, 27261, 1330, 327, 7759, 62, 1404, 5446, 62, 2389, 62, 20373, 198, 6738, ...
2.853659
123
import unittest import tests.settings_mock as settings_mock from tests.activity.classes_mock import FakeLogger from workflow.workflow_IngestAcceptedSubmission import workflow_IngestAcceptedSubmission
[ 11748, 555, 715, 395, 198, 11748, 5254, 13, 33692, 62, 76, 735, 355, 6460, 62, 76, 735, 198, 6738, 5254, 13, 21797, 13, 37724, 62, 76, 735, 1330, 33482, 11187, 1362, 198, 6738, 30798, 13, 1818, 11125, 62, 27682, 395, 38855, 276, 700...
3.722222
54
from urllib import urlencode import urlparse from django.shortcuts import Http404, redirect from django.contrib.auth.views import logout from django.contrib import messages from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from vumi.utils import load_class_by_strin...
[ 6738, 2956, 297, 571, 1330, 2956, 11925, 8189, 198, 11748, 19016, 29572, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 367, 29281, 26429, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 33571, 1330, 2604, 448, ...
3.302752
109
from typogrify.filters import amp, caps, initial_quotes, smartypants, titlecase, typogrify, widont, TypogrifyError from functools import wraps from django.conf import settings from django import template from django.utils.safestring import mark_safe from django.utils.encoding import force_unicode register = template....
[ 6738, 2170, 519, 81, 1958, 13, 10379, 1010, 1330, 20766, 11, 11022, 11, 4238, 62, 421, 6421, 11, 4451, 4464, 1187, 11, 3670, 7442, 11, 2170, 519, 81, 1958, 11, 9214, 756, 11, 17134, 519, 81, 1958, 12331, 198, 6738, 1257, 310, 10141,...
3.114391
271
"""Read, write, create Brainvoyager VMR file format.""" import struct import numpy as np from bvbabel.utils import (read_variable_length_string, write_variable_length_string) # ============================================================================= def read_vmr(filename): """Read...
[ 37811, 5569, 11, 3551, 11, 2251, 14842, 40024, 3536, 569, 13599, 2393, 5794, 526, 15931, 198, 198, 11748, 2878, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 275, 85, 65, 9608, 13, 26791, 1330, 357, 961, 62, 45286, 62, 13664, 62, 884...
2.425483
7,448
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.15625
416
# (c) Copyright [2018-2022] Micro Focus or one of its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ 2, 357, 66, 8, 15069, 685, 7908, 12, 1238, 1828, 60, 4527, 17061, 393, 530, 286, 663, 29116, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 921, 743, 407, 779, 428, 2393, ...
2.086783
1,256
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ example.py ~~~~~~~~~ A simple command line application to run flask apps. :copyright: 2019 Miller :license: BSD-3-Clause """ # Known bugs that can't be fixed here: # - synopsis() cannot be prevented from clobbering existing # loaded modules. ...
[ 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, 220, 220, 220, 1672, 13, 9078, 198, 220, 220, 220, 220, 15116, 93, 198, 220, 220, 220, 317, 2829, 3...
3.034934
458
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628 ]
3.833333
6
# -*- coding: utf-8 -*- __author__ = """Hendrix Demers""" __email__ = 'hendrix.demers@mail.mcgill.ca' __version__ = '0.1.0'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 37227, 39, 437, 8609, 1897, 364, 37811, 198, 834, 12888, 834, 796, 705, 15631, 8609, 13, 9536, 364, 31, 4529, 13, 23209, 70, 359, 13, 6888, ...
2.118644
59
import os import logging from tempfile import mkstemp, mkdtemp from shutil import rmtree from zipfile import ZipFile, ZIP_DEFLATED from datetime import datetime from boto.s3.connection import S3Connection from boto.s3.key import Key __version__ = "0.1.8" __author__ = "Mark Embling" __email__ = "mark@markembling.info" ...
[ 11748, 28686, 198, 11748, 18931, 198, 6738, 20218, 7753, 1330, 33480, 927, 79, 11, 33480, 67, 29510, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 6738, 19974, 7753, 1330, 38636, 8979, 11, 42977, 62, 7206, 3697, 11617, 198, 6738, 48...
2.683019
265
# Generated by Django 2.0.2 on 2019-03-08 13:03 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 17, 319, 13130, 12, 3070, 12, 2919, 1511, 25, 3070, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 if __name__ == '__main__': print(date_time("01.01.2018 00:00")) assert date_time("01.01.2018 00:00") == "1 January 2018 year 0 hours 0 minutes" assert date_time("04.08.1984 08:15") == "4 August 1984 year 8 hours 15 minutes" assert date_time("17.12.1990 07:42") == "17 December 199...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 4475, 62, 2435, 7203, 486, 13, 486, 13, 7908, 3571, 25, 405, 48774, 198, 220, 220, 2...
2.710938
128
# Copyright (c) 2017, Neil Booth # # All rights reserved. # # The MIT License (MIT) # # 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 r...
[ 2, 15069, 357, 66, 8, 2177, 11, 15929, 36389, 198, 2, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727,...
2.501712
1,752
"""Test deCONZ diagnostics.""" from unittest.mock import patch from pydeconz.websocket import STATE_RUNNING from homeassistant.const import Platform from .test_gateway import DECONZ_CONFIG, setup_deconz_integration from tests.components.diagnostics import get_diagnostics_for_config_entry
[ 37811, 14402, 390, 10943, 57, 6689, 34558, 526, 15931, 198, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 279, 5173, 721, 13569, 13, 732, 1443, 5459, 1330, 35454, 62, 49, 4944, 15871, 198, 198, 6738, 1363, 562, ...
3.206522
92
# Copyright 2019 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 13130, 3012, 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, 921, 743, 733...
2.667341
3,953
"""Run from rhucrl_experiments.evaluate folder.""" import socket from lsf_runner import init_runner, make_commands from rhucrl_experiments.evaluate.utilities import ENVIRONMENTS RARL_DIR = "../../runs/RARLAgent" ZERO_SUM_DIR = "../../runs/ZeroSumAgent" SCRIPT = "evaluate_mass_change.py" EXPERIMENTS = { "supermod...
[ 37811, 10987, 422, 9529, 1229, 45895, 62, 23100, 6800, 13, 49786, 9483, 526, 15931, 198, 11748, 17802, 198, 198, 6738, 300, 28202, 62, 16737, 1330, 2315, 62, 16737, 11, 787, 62, 9503, 1746, 198, 198, 6738, 9529, 1229, 45895, 62, 23100, ...
2.446701
394