content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import FWCore.ParameterSet.Config as cms from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import * from RecoEgamma.EgammaElectronProducers.uncleanedOnlyElectronSequence_cff import * from RecoEgamma.EgammaPhotonProducers.photonSequence_cff import * from RecoEgamma.EgammaPhotonProducers.conversionSequence...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 6738, 3311, 78, 36, 28483, 2611, 13, 36, 28483, 2611, 19453, 1313, 11547, 7999, 13, 14542, 69, 19453, 1313, 44015, 594, 62, 66, 487, 1330, 1635, 198, 6738, 3311...
2.626428
2,013
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 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,...
3.627119
236
import json import pprint from urllib.request import urlopen with urlopen('http://pypi.python.org/pypi/Twisted/json') as url: http_info = url.info() raw_data = url.read().decode(http_info.get_content_charset()) project_info = json.loads(raw_data) pprint.pprint(project_info) print('-----------------------------...
[ 11748, 33918, 198, 11748, 279, 4798, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 4480, 19016, 9654, 10786, 4023, 1378, 79, 4464, 72, 13, 29412, 13, 2398, 14, 79, 4464, 72, 14, 5080, 6347, 14, 17752, 11537, 355, 19016...
2.896774
155
from argparse import Namespace from functools import partial from typing import Any import molotov from .formatters import DefaultFormatter from .record_table import RecordTable from .recorder import Recorder from .reporter import Reporter from .scenario import Scenario __all__ = ("Reporter", "register_reporter", "s...
[ 6738, 1822, 29572, 1330, 28531, 10223, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 18605, 313, 709, 198, 198, 6738, 764, 18982, 1010, 1330, 15161, 8479, 1436, 198, 6738, 764, 22105, 62, 11487, ...
3.636364
121
from slugify import slugify from services.viewcounts.models import PageViewsModel def get_page_views(url: str): """Returns the number of views for a given page object.""" # Pre-processing checks: Client should not pass full or partial URL. if not url.startswith("/"): raise Exception("Partial URL...
[ 6738, 31065, 1958, 1330, 31065, 1958, 198, 198, 6738, 2594, 13, 1177, 9127, 82, 13, 27530, 1330, 7873, 7680, 82, 17633, 628, 198, 4299, 651, 62, 7700, 62, 33571, 7, 6371, 25, 965, 2599, 198, 220, 220, 220, 37227, 35561, 262, 1271, 2...
2.827795
331
import tensorflow as tf import tensorflow_probability as tfp from scipy.stats import expon from videos.linalg import safe_cholesky from manim import * # shortcuts tfd = tfp.distributions kernels = tfp.math.psd_kernels
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 62, 1676, 65, 1799, 355, 256, 46428, 198, 198, 6738, 629, 541, 88, 13, 34242, 1330, 1033, 261, 198, 6738, 5861, 13, 75, 1292, 70, 1330, 3338, 62, 354, 4316, 2584, ...
2.835443
79
""" This module defines the base model and associated functions """ from flask import Flask, jsonify from psycopg2.extras import RealDictCursor from ....database import db_con
[ 37811, 198, 1212, 8265, 15738, 262, 2779, 2746, 290, 3917, 5499, 198, 37811, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 198, 6738, 17331, 22163, 70, 17, 13, 2302, 8847, 1330, 6416, 35, 713, 34, 21471, 198, 6738, 19424, 48806, 1330,...
3.869565
46
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # ================================================================================================ # # Project : Deep Learning for Conversion Rate Prediction (CVR) # # Version : 0.1.0 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 38093, 4770, 25609, 18604, 1303, 198, 2, 4935, 220, 1058, 10766, 18252, 329, 44101, 14806, 46690, 357, 34, 13024, 8...
2.282958
1,866
from typing import Set from numpy import ndarray
[ 6738, 19720, 1330, 5345, 198, 6738, 299, 32152, 1330, 299, 67, 18747, 628 ]
3.846154
13
"""traits/traitcommon.py - Common functionality across trait operations.""" import re from ..constants import UNIVERSAL_TRAITS VALID_TRAIT_PATTERN = re.compile(r"^[A-z_]+$") def validate_trait_names(*traits): """ Raises a ValueError if a trait doesn't exist and a SyntaxError if the syntax is bad. ""...
[ 37811, 9535, 896, 14, 9535, 270, 11321, 13, 9078, 532, 8070, 11244, 1973, 16708, 4560, 526, 15931, 198, 198, 11748, 302, 198, 198, 6738, 11485, 9979, 1187, 1330, 49677, 1847, 62, 51, 3861, 29722, 198, 198, 23428, 2389, 62, 51, 3861, 2...
2.504823
311
import unittest from ..model import RandomForestWithFeatureSelection from sklearn.model_selection import train_test_split import os import numpy as np if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 11485, 19849, 1330, 14534, 34605, 3152, 38816, 4653, 1564, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 628, 628, ...
3.258065
62
import matplotlib.pyplot as plt; plt.rcdefaults() import csv import sqlite3 as lite from calendar import monthrange from datetime import datetime, date, timedelta from datetimerange import DateTimeRange import numpy as np import pycountry_convert as pc from dateutil.relativedelta import relativedelta from forex_pytho...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 26, 198, 198, 489, 83, 13, 6015, 12286, 82, 3419, 198, 11748, 269, 21370, 198, 11748, 44161, 578, 18, 355, 300, 578, 198, 6738, 11845, 1330, 1227, 9521, 198, 6738, 4818, 8079, ...
2.976404
890
from flask import Flask, render_template, request, jsonify import numpy as np import pickle import sys import json import re app = Flask(__name__) app.config['JSON_AS_ASCII'] = False target_names = [ 'AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'OM','PL', 'QA', ...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 33918, 1958, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2298, 293, 201, 198, 11748, 25064, 201, 198, 11748, 33918, 201, 198, 11748, 302, 201, 198, 201, 198, 2...
1.990909
330
data = [i.strip() for i in open("input.txt").readlines()] two = 0 three = 0 for code in data: counts = {} for i in range(0,len(code)): if code[i] in counts.keys(): counts[code[i]] += 1 else: counts[code[i]] = 1 if (2 in counts.values()): two += 1 if (3 in...
[ 7890, 796, 685, 72, 13, 36311, 3419, 329, 1312, 287, 1280, 7203, 15414, 13, 14116, 11074, 961, 6615, 3419, 60, 198, 198, 11545, 796, 657, 198, 15542, 796, 657, 198, 1640, 2438, 287, 1366, 25, 198, 220, 220, 220, 9853, 796, 23884, 19...
2.010471
191
# -*- coding: utf-8 -*- import factory from symposion.speakers.models import Speaker from conf_site.accounts.tests.factories import UserFactory
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 8860, 198, 198, 6738, 5659, 1930, 295, 13, 4125, 3979, 13, 27530, 1330, 14931, 198, 198, 6738, 1013, 62, 15654, 13, 23317, 82, 13, 41989, 13, 22584, 1749, 1330, ...
3.12766
47
# flake8: noqa import pokediadb.dbuilder.version import pokediadb.dbuilder.type import pokediadb.dbuilder.ability import pokediadb.dbuilder.move import pokediadb.dbuilder.pokemon
[ 2, 781, 539, 23, 25, 645, 20402, 198, 11748, 47320, 72, 324, 65, 13, 9945, 3547, 263, 13, 9641, 198, 11748, 47320, 72, 324, 65, 13, 9945, 3547, 263, 13, 4906, 198, 11748, 47320, 72, 324, 65, 13, 9945, 3547, 263, 13, 1799, 198, 1...
2.594203
69
#!/usr/bin/python3 import sys import os import io from orderedset import OrderedSet from shell import Shell import logpath as LogPath VERSION = '1.1' HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' current_path...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 33245, 198, 6738, 6149, 2617, 1330, 14230, 1068, 7248, 198, 6738, 7582, 1330, 17537, 198, 11748, 2604, 6978, 355, 5972, 15235, 198, 198, 43717, ...
2.510029
349
# These were used when I was trying to map between controllers # To map to a wheel - but was defeated in that by using a driver # 2021 comment (What did I mean there?) GAMEPAD_TRIANGLE = (0, 0x08) GAMEPAD_CIRCLE = (0, 0x04) GAMEPAD_CROSS = (0, 0x02) GAMEPAD_SQUARE = (0, 0x01) GAMEPAD_DPAD_MASK = 0x0F GAMEPAD_DPAD_NON...
[ 2, 2312, 547, 973, 618, 314, 373, 2111, 284, 3975, 1022, 20624, 198, 2, 1675, 3975, 284, 257, 7825, 532, 475, 373, 9772, 287, 326, 416, 1262, 257, 4639, 198, 2, 33448, 2912, 357, 2061, 750, 314, 1612, 612, 10091, 198, 198, 38, 239...
1.737024
2,023
# Copyright (c) 2017 Huawei, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 15069, 357, 66, 8, 2177, 43208, 11, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287...
3.225653
421
import requests import re import sqlite3 db =sqlite3.connect("db_tver.db",check_same_thread =False) cur = db.cursor() cur.execute( '''CREATE TABLE if not exists `tver` ( `reference_id` TEXT NOT NULL, `service` TEXT NOT NULL, `player_id` TEXT NOT NULL, `name` TEXT NOT NULL, `title` TEXT, ...
[ 11748, 7007, 198, 11748, 302, 198, 11748, 44161, 578, 18, 198, 198, 9945, 220, 796, 25410, 578, 18, 13, 8443, 7203, 9945, 62, 83, 332, 13, 9945, 1600, 9122, 62, 31642, 62, 16663, 220, 796, 25101, 8, 198, 22019, 796, 20613, 13, 66, ...
1.588364
1,822
from pathlib import Path from click.testing import CliRunner from resolos.interface import res, res_run from resolos.shell import run_shell_cmd from tests.common import verify_result import logging logger = logging.getLogger(__name__)
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 6738, 581, 349, 418, 13, 39994, 1330, 581, 11, 581, 62, 5143, 198, 6738, 581, 349, 418, 13, 29149, 1330, 1057, 62, 29149, 62, 28758, 198, 6738, 5...
3.449275
69
import os import sys op_name = [] with open("name.txt") as lines: for line in lines: line = line.strip() op_name.append(line) with open("shape.txt") as lines: index = 0 for line in lines: name = op_name[index] line = line.strip() items = line.split("\t") if "conv" in name: input_shape = [int(s) for ...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 404, 62, 3672, 796, 17635, 198, 4480, 1280, 7203, 3672, 13, 14116, 4943, 355, 3951, 25, 198, 197, 1640, 1627, 287, 3951, 25, 198, 197, 197, 1370, 796, 1627, 13, 36311, 3419, 198, 197, 197, ...
2.285024
414
# Wrapper for Mesh Bee library # helping to easier communicate with Mesh Bee module # # Copyright (C) 2014 at seeedstudio # Author: Jack Shao (jacky.shaoxg@gmail.com) # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associate...
[ 2, 220, 220, 27323, 2848, 329, 47529, 24719, 5888, 198, 2, 220, 220, 5742, 284, 4577, 10996, 351, 47529, 24719, 8265, 198, 2, 198, 2, 220, 220, 15069, 357, 34, 8, 1946, 379, 766, 276, 19149, 952, 198, 2, 220, 220, 6434, 25, 3619, ...
3.447619
420
import unittest import json import requests from unittest import mock from .reqhandler import send_req from pythonapm.agent import Agent from pythonapm import constants
[ 11748, 555, 715, 395, 220, 198, 11748, 33918, 198, 11748, 7007, 198, 6738, 555, 715, 395, 1330, 15290, 198, 6738, 764, 42180, 30281, 1330, 3758, 62, 42180, 198, 6738, 21015, 499, 76, 13, 25781, 1330, 15906, 198, 6738, 21015, 499, 76, ...
3.804348
46
from django.contrib import admin # Register your models here. from .models import * # To import all the model from .models, then specify those in register admin.site.register(Customer) admin.site.register(Staff) admin.site.register(Service) admin.site.register(Appointment)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 6738, 764, 27530, 1330, 220, 1635, 1303, 1675, 1330, 477, 262, 2746, 422, 764, 27530, 11, 788, 11986, 883, 287, 7881, 198, 198, 28482, ...
3.597403
77
worlds_data = { 'around': {'avenues': 10, 'streets': 10, 'walls': [], 'beepers': {(1, 9): 1, (2, 10): 1, (8, 10): 1, (10, 10): 1, (9, 10): 1, (5, 10): 1, (10, 8): 1, (10, 4): 1, (10, 1): 1, (8, 1): 1, (7, 1): 1, (6, 1): 1, (5, 1): 1, (3, 1): 1, (1, 6): 1, (1, 5): 1, (1, 3): 1}}, 'around2': {'avenues': 10, 'str...
[ 198, 6894, 82, 62, 7890, 796, 1391, 198, 220, 220, 220, 705, 14145, 10354, 1391, 6, 4005, 947, 10354, 838, 11, 705, 22853, 1039, 10354, 838, 11, 705, 86, 5691, 10354, 685, 4357, 705, 1350, 538, 364, 10354, 1391, 7, 16, 11, 860, 25...
1.679877
9,437
from abc import ABCMeta, abstractproperty, abstractmethod import inspect import random import re import time from requests.exceptions import HTTPError def __call__(self,**kwargs): formatter = dict.fromkeys(self._path_keys) for _path_key, _validator in self._path_keys.items(): _value = k...
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 26745, 11, 12531, 24396, 198, 11748, 10104, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 640, 198, 6738, 7007, 13, 1069, 11755, 1330, 14626, 12331, 628, 220, 220, 220, 825, 11593, 13345, 83...
2.062016
1,161
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-01-06 00:30 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 2864, 12, 486, 12, 3312, 3571, 25, 1270, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738,...
2.754717
53
from flask import Flask from flask import render_template, redirect, url_for from flask import request import blockChain app = Flask(__name__) if __name__ == '__main__': app.run(debug=True) import hashlib import json import os from time import time BLOCKCHAIN_DIR = os.curdir + '/blocks/' if __name...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 42903, 1330, 2581, 198, 11748, 2512, 35491, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 361, 11593, 3672, 83...
2.596859
191
__author__ = 'TechWhizZ199'
[ 834, 9800, 834, 796, 705, 17760, 1199, 528, 57, 19104, 6 ]
2.454545
11
import os import wget import time import argparse import subprocess import geckodriver_autoinstaller import chromedriver_autoinstaller from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver import FirefoxOptions from selenium.webdriver import DesiredCapabilities fr...
[ 11748, 28686, 201, 198, 11748, 266, 1136, 201, 198, 11748, 640, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 850, 14681, 201, 198, 11748, 4903, 694, 375, 38291, 62, 23736, 17350, 263, 201, 198, 11748, 15358, 276, 38291, 62, 23736, 173...
2.09299
2,097
from kafka import KafkaProducer import json import random from time import sleep from datetime import datetime # Create an instance of the Kafka producer producer = KafkaProducer(bootstrap_servers='kafka-server:9092', value_serializer=lambda m: json.dumps( m).encod...
[ 6738, 479, 1878, 4914, 1330, 46906, 11547, 2189, 198, 11748, 33918, 198, 11748, 4738, 198, 6738, 640, 1330, 3993, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 2, 13610, 281, 4554, 286, 262, 46906, 9920, 198, 18230, 2189, 796, 4690...
2.359517
331
""":mod:`kinsumer.helpers` --- Implements various helpers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from threading import RLock _missing = object()
[ 15931, 1298, 4666, 25, 63, 5331, 6975, 13, 16794, 364, 63, 11420, 1846, 1154, 902, 2972, 49385, 198, 27156, 27156, 27156, 15116, 93, 198, 198, 37811, 198, 6738, 4704, 278, 1330, 371, 25392, 198, 198, 62, 45688, 796, 2134, 3419, 628, 1...
4.095238
42
import os import tempfile import unittest from py4j.protocol import Py4JJavaError from pyspark.ml import Pipeline from pyspark.sql import types as t from mleap.pyspark.feature.string_map import StringMap from mleap.pyspark.spark_support import SimpleSparkSerializer from tests.pyspark.lib.assertions import assert_df f...
[ 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 19, 73, 13, 11235, 4668, 1330, 9485, 19, 41, 29584, 12331, 198, 6738, 279, 893, 20928, 13, 4029, 1330, 37709, 198, 6738, 279, 893, 20928, 13, 254...
2.46
500
from .predict import YolactK from .data import * __version__ = "0.1.0"
[ 6738, 764, 79, 17407, 1330, 575, 349, 529, 42, 198, 6738, 764, 7890, 1330, 1635, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 16, 13, 15, 1, 198 ]
2.482759
29
#!/usr/bin/env python # coding: utf-8 # In[6]: import pandas as pd import io import requests import time import random # In[3]: # gets the hidden API keys api_key = pd.read_csv('secrets.csv').api_key.to_string().split()[1] # In[124]: # gets data using user's parameters def get_data(symbol, interval): """...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 21, 5974, 628, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 33245, 198, 11748, 7007, 198, 11748, 640, 198, 11748, 4738, 6...
2.441995
1,724
#!/bin/python3 from collections import Counter _ = int(input().strip()) socks = list(map(int, input().strip().split(' '))) print(pairs(socks))
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 6738, 17268, 1330, 15034, 628, 198, 198, 62, 796, 493, 7, 15414, 22446, 36311, 28955, 198, 82, 3320, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 36311, 22446, 35312, 10786, 705, 22305, 198, ...
2.882353
51
import os from dpsniper.utils.my_multiprocessing import initialize_parallel_executor from dpsniper.utils.paths import get_output_directory, set_output_directory from statdpwrapper.algorithms_ext import * from statdpwrapper.experiments.base import run_statdp from statdpwrapper.experiments.mechanism_config import statd...
[ 11748, 28686, 198, 198, 6738, 288, 862, 45554, 13, 26791, 13, 1820, 62, 16680, 541, 305, 919, 278, 1330, 41216, 62, 1845, 29363, 62, 18558, 38409, 198, 6738, 288, 862, 45554, 13, 26791, 13, 6978, 82, 1330, 651, 62, 22915, 62, 34945, ...
3.113475
141
__all__ = ['symimg'] from tempfile import mktemp from .reflect_image import reflect_image from .interface import registration from .apply_transforms import apply_transforms from ..core import image_io as iio def symimg(img, gs=0.25): """ Symmetrize an image Example ------- >>> import ants ...
[ 198, 198, 834, 439, 834, 796, 37250, 37047, 9600, 20520, 198, 198, 6738, 20218, 7753, 1330, 33480, 29510, 198, 198, 6738, 764, 35051, 62, 9060, 1330, 4079, 62, 9060, 198, 6738, 764, 39994, 1330, 9352, 198, 6738, 764, 39014, 62, 7645, ...
2.184971
519
import datetime time=datetime.datetime.today().strftime("%H-%M-%S") text_file = open("/home/pi/TutorCal/CRONtest/"+time+".txt", "w") text_file.write("Hello world!") text_file.close()
[ 11748, 4818, 8079, 198, 198, 2435, 28, 19608, 8079, 13, 19608, 8079, 13, 40838, 22446, 2536, 31387, 7203, 4, 39, 12, 4, 44, 12, 4, 50, 4943, 198, 198, 5239, 62, 7753, 796, 1280, 7203, 14, 11195, 14, 14415, 14, 51, 38409, 9771, 14,...
2.453333
75
import dlib import face_recognition import glob import pickle import cv2 import numpy as np import os from PIL import Image,ImageFont, ImageDraw, ImageEnhance # from google.colab.patches import cv2_imshow add_target_faces('known') faces = load_encoded_faces('encoded_faces.pkl') identify_faces_video('al.m...
[ 11748, 288, 8019, 201, 198, 11748, 1986, 62, 26243, 653, 201, 198, 11748, 15095, 201, 198, 11748, 2298, 293, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 6738, 350, 4146, 133...
2.737705
122
from . import text from .base import IFormatter try: from . import binary except ImportError: binary = None
[ 6738, 764, 1330, 2420, 198, 6738, 764, 8692, 1330, 314, 8479, 1436, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 764, 1330, 13934, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 13934, 796, 6045, 198 ]
3.162162
37
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^example/', include('pulpo_example.urls')), url(r'^pulpo/', include('pulpo_forms.urls'), name='base'), url(r'^admin/', include(admin.site.urls)), url(r'^model_field_form/$', 'pulpo_forms.views.rend...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 20688, 14, 3256, 2291, 10786, 79,...
2.319018
163
import codecs from contextlib import contextmanager import hashlib import logging from logging.handlers import RotatingFileHandler import random import string from pathlib import Path def random_string(length=32, prefix='', suffix=''): ''' Generate random string length : Length of string prefix :...
[ 11748, 40481, 82, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 6738, 18931, 13, 4993, 8116, 1330, 18481, 803, 8979, 25060, 198, 11748, 4738, 198, 11748, 4731, 198, 198, 6738, 3108, 8019, 1330,...
2.215256
957
from logging import lastResort from pydantic import BaseModel from invmonApi.database import Base from invmonInfra.enum import InventoryLastStatusEnum from sqlalchemy import Column, String, Boolean from uuid import uuid4
[ 6738, 18931, 1330, 938, 4965, 419, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 800, 2144, 32, 14415, 13, 48806, 1330, 7308, 198, 6738, 800, 2144, 18943, 430, 13, 44709, 1330, 35772, 5956, 19580, 4834, 388, 198, 6738, 44161...
3.578125
64
# coding: utf-8 """ Module `chatette.parsing.lexing.rule_slot_val` Contains the definition of the class that represents the lexing rule to tokenize a slot value being set within a unit rule (only for a slot). """ from chatette.parsing.lexing.lexing_rule import LexingRule from chatette.parsing.lexing import LexicalToke...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 26796, 4600, 17006, 5857, 13, 79, 945, 278, 13, 2588, 278, 13, 25135, 62, 43384, 62, 2100, 63, 198, 4264, 1299, 262, 6770, 286, 262, 1398, 326, 6870, 262, 31191, 278, 3896, 198, 146...
3.181102
127
# -*- coding: utf-8 -*- """ Created on Sun Feb 23 20:28:51 2020 @author: Administrator """ """ rand7()1~7,rand10(),1-10. """ import random if __name__ == "__main__": print(rand10())
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3825, 3158, 2242, 1160, 25, 2078, 25, 4349, 12131, 201, 198, 201, 198, 31, 9800, 25, 22998, 201, 198, 37811, 201, 198, 201, 198, 3781...
2.159574
94
from abc import ABC, abstractmethod from enum import Enum from functools import partial # from math import isinf from typing import Union, Optional, Any from typing import Callable, Tuple, Dict, List, Set, Type # noqa: F401 from ..builtin_values import Bool, ops_symbols from ..abstract_value import AbstractValue from...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 2, 422, 10688, 1330, 318, 10745, 198, 6738, 19720, 1330, 4479, 11, 32233, 11, 4377, 198, 6738, 19720, 1330, ...
3.490196
153
import keras import tensorflow as tf import numpy.random as rng from keras.datasets import cifar10 from keras.utils import np_utils def data_cifar10(**kwargs): """ Preprocess CIFAR10 dataset :return: """ # These values are specific to CIFAR10 img_rows = 32 img_cols = 32 nb_classes = ...
[ 11748, 41927, 292, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 13, 25120, 355, 374, 782, 198, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 269, 361, 283, 940, 198, 6738, 41927, 292, 13, 26791, 1330, 45941, ...
2.287651
664
#!/usr/bin/python #-*- coding:utf-8 -*- from . import const const.UK = 'UK' const.US = 'US'
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 764, 1330, 1500, 198, 198, 9979, 13, 15039, 796, 705, 15039, 6, 198, 9979, 13, 2937, 796, 705, 2937, 6, 198 ]
2.162791
43
# There are copyright holders. import pandapower as pp import pandapower.networks as pn net = pn.case9() pp.runpp(net) print ("Canvass NR Power Flow Results At The Buses") print ("------------------------------------------") print (net.res_bus)
[ 2, 1318, 389, 6634, 16392, 13, 220, 198, 11748, 19798, 499, 789, 355, 9788, 198, 11748, 19798, 499, 789, 13, 3262, 5225, 355, 279, 77, 198, 3262, 796, 279, 77, 13, 7442, 24, 3419, 628, 198, 381, 13, 5143, 381, 7, 3262, 8, 198, 1...
3.351351
74
from django.urls import include, path from . import arche_rdf_views app_name = "archeutils" urlpatterns = [ path('<app_name>/<model_name>/<pk>', arche_rdf_views.res_as_arche_graph, name='res_as_arche_graph'), path('<app_name>/<model_name>', arche_rdf_views.qs_as_arche_graph, name='qs_as_arche_graph'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 11, 3108, 198, 6738, 764, 1330, 20944, 62, 4372, 69, 62, 33571, 198, 198, 1324, 62, 3672, 796, 366, 283, 2395, 26791, 1, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, ...
2.316176
136
import sys from shutil import copyfile if __name__== "__main__": main()
[ 11748, 25064, 198, 6738, 4423, 346, 1330, 4866, 7753, 220, 220, 220, 220, 198, 198, 361, 11593, 3672, 834, 855, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.53125
32
x = 2 ** (1/2) y = 3 ** (1/3) z = 5 ** (1/5) print(x) print(y) print(z) print() if x>y and x>z: print(x,'jest najwiksza') elif y>x and y>z: print(y,'jest najwiksza') elif z>x and z>y: print(z,'jest najwiksza') print() if x<y and x<z: print(x,'jest najmniejsza') elif y<x and y<z: print(y,'jest na...
[ 87, 796, 362, 12429, 357, 16, 14, 17, 8, 198, 88, 796, 513, 12429, 357, 16, 14, 18, 8, 198, 89, 796, 642, 12429, 357, 16, 14, 20, 8, 198, 198, 4798, 7, 87, 8, 198, 4798, 7, 88, 8, 198, 4798, 7, 89, 8, 198, 4798, 3419, 19...
1.75576
217
title=open("file.txt","w") title.write("\n" ) title.close() sum=0 while 1: sentence=open("file.txt","a") sum+=1 if sum>4: sentence.close() break k =input("") sentence.write(f"{k}\n") sentence.close()
[ 7839, 28, 9654, 7203, 7753, 13, 14116, 2430, 86, 4943, 198, 7839, 13, 13564, 7203, 59, 77, 1, 1267, 198, 7839, 13, 19836, 3419, 198, 16345, 28, 15, 198, 4514, 352, 25, 198, 220, 220, 220, 6827, 28, 9654, 7203, 7753, 13, 14116, 243...
2.077586
116
import bluesky.plan_stubs as bps import bluesky.plans as bp from xpdacq.beamtime import _configure_area_det from xpdacq.glbl import glbl from xpdacq.xpdacq import open_shutter_stub, close_shutter_stub from xpdacq.xpdacq_conf import xpd_configuration # below is the code to run at the beamtime # register the scanplan #...
[ 11748, 25570, 2584, 13, 11578, 62, 301, 23161, 355, 275, 862, 198, 11748, 25570, 2584, 13, 489, 504, 355, 275, 79, 198, 6738, 2124, 30094, 330, 80, 13, 40045, 2435, 1330, 4808, 11250, 495, 62, 20337, 62, 15255, 198, 6738, 2124, 30094,...
2.622093
172
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-08-09 17:25 from __future__ import unicode_literals import django.core.validators import django.db.models.deletion import kolibri.content.models from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 22, 319, 1584, 12, 2919, 12, 2931, 1596, 25, 1495, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.806818
88
from setuptools import setup, find_packages setup( name='picker-my-sticker', version='0.0.1', description='Stickers for Slack', long_description='S t i c k e r s', url='https://github.com/kennydo/pick-my-stick', author='Kenny Do', author_email='chinesedewey@gmail.com', classifiers=[ ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 79, 15799, 12, 1820, 12, 13915, 263, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 16, 3256, 198, 220, 220, 22...
2.488789
223
import numpy as np import time import matplotlib.pyplot as plt import imageio from scipy.optimize import fsolve from body import Body def get_position_from_Kepler(semimajor_axis, eccentricity, inclination, ascending_node, argument_of_periapsis, mean_anomaly, mass_orbit, G=6.67430 * 10**(-11)): """ Get the pos...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2939, 952, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 43458, 6442, 198, 198, 6738, 1767, 1330, 12290, 198, ...
2.259019
3,243
""" Copyright (c) 2015 Marshall Farrier license http://opensource.org/licenses/MIT lib/ui/handlers.py Handlers for edit menu """ from bson.codec_options import CodecOptions import datetime as dt from functools import partial import json from pymongo.errors import BulkWriteError from ..dbschema import SPREADS from ...
[ 37811, 198, 15269, 357, 66, 8, 1853, 13606, 6755, 5277, 198, 43085, 2638, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 36393, 198, 198, 8019, 14, 9019, 14, 4993, 8116, 13, 9078, 198, 198, 12885, 8116, 329, 4370, 6859, 198, 37811, ...
3.339181
171
# class SidebarView(GenericAPIView): # permission_classes = [AllowAny] # def get(self, request, *args, **kwargs): # org_id = request.GET.get("org", None) # user_id = request.GET.get("user", None) # room = settings.ROOM_COLLECTION # plugin_id = settings.PLUGIN_ID # roomi...
[ 2, 1398, 12075, 5657, 7680, 7, 46189, 2969, 3824, 769, 2599, 198, 2, 220, 220, 220, 220, 7170, 62, 37724, 796, 685, 35265, 7149, 60, 198, 198, 2, 220, 220, 220, 220, 825, 651, 7, 944, 11, 2581, 11, 1635, 22046, 11, 12429, 46265, ...
1.737263
2,375
# -*- coding: utf-8 -*- """ Load Duqa labeled dataset. """ from __future__ import absolute_import, division, print_function import collections import json import logging import math from io import open from tqdm import tqdm from transformers.tokenization_bert import BasicTokenizer, whitespace_tokenize logger = log...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 8778, 10343, 20402, 15494, 27039, 13, 37227, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 17268, 198, ...
2.159489
1,486
from typing import Any if __name__ == '__main__': main()
[ 6738, 19720, 1330, 4377, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.73913
23
import collections import colorsys from typing import Iterable, List, Tuple import matplotobjlib as plot from backports import zoneinfo from matplotlib.colors import ListedColormap import utils from gui.components import PlotComponent from gui.options import ArtistChooser, ColorMap, Spinbox from track import Track
[ 11748, 17268, 198, 11748, 7577, 893, 198, 6738, 19720, 1330, 40806, 540, 11, 7343, 11, 309, 29291, 198, 198, 11748, 2603, 29487, 26801, 8019, 355, 7110, 198, 6738, 736, 3742, 1330, 6516, 10951, 198, 6738, 2603, 29487, 8019, 13, 4033, 66...
3.890244
82
# [h] interpolated nudge dialog '''a simple RoboFont dialog for the famous "interpolated nudge" script''' # Interpolated Nudge for RoboFont -- Travis Kochel # http://tktype.tumblr.com/post/15254264845/interpolated-nudge-for-robofont # Interpolated Nudge -- Christian Robertson # http://betatype.com/node/18 from vani...
[ 2, 685, 71, 60, 39555, 515, 299, 12587, 17310, 198, 198, 7061, 6, 64, 2829, 39702, 23252, 17310, 329, 262, 5863, 366, 3849, 16104, 515, 299, 12587, 1, 4226, 7061, 6, 198, 198, 2, 4225, 16104, 515, 399, 12587, 329, 39702, 23252, 1377...
3.015385
130
""" This module defines a mixin, which can be used by all implementations for all databases. All the databases have a different hierarchy of DatabaseWrapper, but all of them derive from BaseDatabaseWrapper """ from abc import ABC from typing import Optional from django.db.backends.base.base import BaseDatabaseWrapper...
[ 37811, 198, 1212, 8265, 15738, 257, 5022, 259, 11, 543, 460, 307, 973, 416, 477, 25504, 329, 477, 20083, 13, 198, 3237, 262, 20083, 423, 257, 1180, 18911, 286, 24047, 36918, 2848, 11, 475, 477, 286, 606, 27099, 422, 7308, 38105, 36918...
3.890625
128
''' Webserver for the Penguin Guano Classification AI4Earth API To run: export FLASK_APP=frontend-server.py python -m flask run --host=0.0.0.0 To access the website, enter your IP address:5000 into a browser. e.g., http://127.0.0.1:5000/ ''' from flask import Flask, send_from_directory, request import requests pri...
[ 7061, 6, 198, 1135, 1443, 18497, 329, 262, 34424, 1962, 5733, 40984, 9552, 19, 22840, 7824, 198, 198, 2514, 1057, 25, 198, 39344, 9977, 1921, 42, 62, 24805, 28, 8534, 437, 12, 15388, 13, 9078, 198, 29412, 532, 76, 42903, 1057, 1377, ...
2.713592
206
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-06-29 13:56 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb import django.db.models.deletion from django.db import migrations, models import brouwers.shop.models.utils
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1238, 319, 13130, 12, 3312, 12, 1959, 1511, 25, 3980, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.773196
97
# # # Copyright (C) 2015, 2016 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of condition...
[ 2, 198, 2, 198, 198, 2, 15069, 357, 34, 8, 1853, 11, 1584, 3012, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 1043...
2.675316
3,160
# Donk Project # Copyright (c) 2021 Warriorstar Orion <orion@snowfrost.garden> # SPDX-License-Identifier: MIT import pathlib from typing import Dict from iconparse.reader import DmiData, Reader from iconparse.extractor import Extractor
[ 2, 2094, 74, 4935, 198, 2, 15069, 357, 66, 8, 33448, 14019, 7364, 26153, 1279, 273, 295, 31, 82, 2197, 69, 23341, 13, 70, 5872, 29, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 11748, 3108, 8019, 198, 6738, 19720...
3.352113
71
from .gan import SNPatchGAN
[ 6738, 764, 1030, 1330, 25632, 963, 45028, 198 ]
3.5
8
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013 MATOBA Akihiro <matobaa+trac-hacks@gmail.com> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. from trac.core import * from trac.config imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 15069, 357, 34, 8, 2211, 36775, 46, 4339, 48663, 49907, 1279, 6759, 672, 7252, 10, 2213, ...
2.40013
1,542
#Author: Matthew Wicker # Impliments the BayesByBackprop optimizer for BayesKeras import os import math import logging import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tensorflow.keras.models import * from tensorflow.keras.layers import * from tqdm import tqdm from tqdm import tran...
[ 2, 13838, 25, 9308, 370, 15799, 198, 2, 34347, 6800, 262, 4696, 274, 3886, 7282, 22930, 6436, 7509, 329, 4696, 274, 42, 263, 292, 198, 198, 11748, 28686, 198, 11748, 10688, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 1...
3.280488
164
#!/usr/bin/env python """Create a .cxx file that performs explicit instantiation over float/double and dimensions 1, 2, and 3. Writes the file to the current directory.""" usage = "ExplicitInstantiation.py <class_name>" import sys if len(sys.argv) < 2 or sys.argv[1] == '-h' or sys.argv[1] == '--help': print(us...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 16447, 257, 764, 66, 5324, 2393, 326, 17706, 7952, 9113, 3920, 625, 12178, 14, 23352, 290, 198, 27740, 5736, 352, 11, 362, 11, 290, 513, 13, 220, 12257, 274, 262, 2393, 2...
2.928571
490
from concurrent.futures import ThreadPoolExecutor from functools import partial from time import time try: from gpsoauth import perform_master_login, perform_oauth except ImportError: perform_oauth = perform_master_login from .auth import Auth from .exceptions import AuthException, InvalidCredentialsException...
[ 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 640, 1330, 640, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 27809, 568, 18439, 1330, 1620, 62, 9866, 62, 38235, 11...
3.701149
87
def evenly_parallelize(input_list): '''return evenly partitioned spark resilient distributed dataset (RDD)''' import numpy as np from pyspark.sql.session import SparkSession spark = SparkSession.builder.getOrCreate() sc = spark.sparkContext n_input = len(input_list) n_parts = sc.paralleliz...
[ 4299, 21894, 62, 1845, 29363, 1096, 7, 15414, 62, 4868, 2599, 198, 220, 220, 220, 705, 7061, 7783, 21894, 18398, 276, 9009, 30738, 9387, 27039, 357, 49, 16458, 8, 7061, 6, 628, 220, 220, 220, 1330, 299, 32152, 355, 45941, 198, 220, ...
2.861878
181
"""Model helper module. """ from __future__ import annotations from typing import Union import numpy as np import torch
[ 37811, 17633, 31904, 8265, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 4479, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 628, 628 ]
4.1
30
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file acc...
[ 2, 15069, 13130, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 27691, 921, 198, 2, 743, 407, 779, 428, 2393, ...
3.705
200
#!/usr/bin/python2.5 # Copyright (C) 2019 KUWAYAMA, Masayuki # # 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 applic...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 20, 198, 198, 2, 15069, 357, 34, 8, 13130, 509, 52, 27285, 25087, 11, 11066, 323, 11308, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, ...
3.715789
380
# Generated by Django 2.2.5 on 2020-09-30 09:47 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 20, 319, 12131, 12, 2931, 12, 1270, 7769, 25, 2857, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# Exerccio Python 076: Crie um programa que tenha uma tupla nica com nomes de produtos e seus respectivos preos, na sequncia. # No final, mostre uma listagem de preos, organizando os dados em forma tabular. produtos = ('LPIS', 1.75, 'BORRACHA', 2, 'CADERNO', 20, 'CANETAS', 7, ...
[ 2, 1475, 263, 535, 952, 11361, 657, 4304, 25, 327, 5034, 23781, 1430, 64, 8358, 3478, 3099, 334, 2611, 12777, 489, 64, 299, 3970, 401, 299, 2586, 390, 40426, 315, 418, 304, 384, 385, 2461, 452, 418, 662, 418, 11, 12385, 33756, 19524...
1.90785
293
import unittest from unittest.mock import patch from libsimba.simba import Simba
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 9195, 14323, 7012, 13, 14323, 7012, 1330, 3184, 7012, 628, 628, 198 ]
2.965517
29
from golem import actions description = 'Verify wait_for_element_enabled action'
[ 6738, 467, 10671, 1330, 4028, 628, 198, 11213, 796, 705, 13414, 1958, 4043, 62, 1640, 62, 30854, 62, 25616, 2223, 6, 198 ]
3.772727
22
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 3050, 3517, 32250, 10501, 290, 509, 1689, 25418, 25767, 669, 7, 16, 8, 198, 2, 198, 2, 357, 16, ...
3.036364
550
from rest_framework.routers import SimpleRouter from transactions.api.views import TransactionsViewSet router_v1 = SimpleRouter(trailing_slash=False) router_v1.register(r'transactions', TransactionsViewSet, base_name='transactions')
[ 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 17427, 49, 39605, 198, 198, 6738, 8945, 13, 15042, 13, 33571, 220, 1330, 46192, 7680, 7248, 198, 198, 472, 353, 62, 85, 16, 796, 17427, 49, 39605, 7, 9535, 4386, 62, 6649, 1077, 28, 25101,...
3.371429
70
#!/usr/bin/python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 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.846774
1,240
import collections from cluster import Cluster import logging logging.basicConfig(format='%(asctime)s - %(levelname)s: %(message)s', datefmt='%H:%M:%S', level=logging.INFO) VoteResult = collections.namedtuple('VoteResult', ['term', 'vote_granted', 'id'])
[ 11748, 17268, 198, 198, 6738, 13946, 1330, 38279, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 18982, 11639, 4, 7, 292, 310, 524, 8, 82, 532, 4064, 7, 5715, 3672, 8, 82, 25, 4064, 7, 20500, 8, 82, 3256, 3128, 69, ...
2.877778
90
#!/usr/bin/env python # encoding: utf-8 import _load_lib import sys import logging import os from unicorn.language.app\ import main as languae_main if __name__ == '__main__': try: languae_main() except Exception as ex: logging.exception("main except") os._exit(1)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 4808, 2220, 62, 8019, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 44986, 13, 16129, 13, 1324, 59, 198, 2...
2.463415
123
import incremental_evaluation.utils as IE import incremental_evaluation.scenario_sets as SS import incremental_evaluation.visualisation_helper as VH import models.basic_predictor_interfaces import models.ensgendel_interface import incremental_evaluation.data_file_helper as DFH import os import argparse SS_MNIST012 = "...
[ 11748, 29497, 62, 18206, 2288, 13, 26791, 355, 28157, 198, 11748, 29497, 62, 18206, 2288, 13, 1416, 39055, 62, 28709, 355, 6723, 198, 11748, 29497, 62, 18206, 2288, 13, 41464, 5612, 62, 2978, 525, 355, 569, 39, 198, 11748, 4981, 13, 3...
2.174945
4,510
import os import re from bs4 import BeautifulSoup from django.core.exceptions import ObjectDoesNotExist from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.db import models from django.db.models import Case, Count, Q, Value, When from django.utils.encoding import python_2_unicode_compa...
[ 11748, 28686, 198, 11748, 302, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 3...
2.86252
611
#!/usr/bin/python from calvin.utilities import certificate import os print "Trying to create a new domain configuration." testconfig = certificate.Config(domain="test") # testconfig2 = certificate.Config(domain="evil") print "Reading configuration successfull." print "Creating new domain." certificate.new_domain(test...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 2386, 7114, 13, 315, 2410, 1330, 10703, 198, 11748, 28686, 198, 4798, 366, 51, 14992, 284, 2251, 257, 649, 7386, 8398, 526, 198, 9288, 11250, 796, 10703, 13, 16934, 7, 27830, 2625,...
3.02439
287
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-23 05:30 from __future__ import unicode_literals import django.core.validators 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, 1157, 13, 18, 319, 2177, 12, 940, 12, 1954, 8870, 25, 1270, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.807692
78
# _*_ coding:utf-8 _*_ # arr=["aaa",True,100,"ccc"] print arr print arr[::-1]
[ 2, 4808, 9, 62, 19617, 25, 40477, 12, 23, 4808, 9, 62, 198, 2, 198, 198, 3258, 28, 14692, 46071, 1600, 17821, 11, 3064, 553, 535, 66, 8973, 198, 198, 4798, 5240, 198, 198, 4798, 5240, 58, 3712, 12, 16, 60 ]
1.95122
41
''' EASY 441. Arranging Coins You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. '''
[ 7061, 6, 198, 36, 26483, 604, 3901, 13, 943, 32319, 30108, 198, 198, 1639, 423, 257, 2472, 286, 299, 10796, 326, 345, 765, 284, 1296, 287, 220, 198, 64, 27656, 5485, 11, 810, 790, 479, 12, 400, 5752, 1276, 423, 3446, 479, 10796, 1...
3.297872
47
# Written by Minh Nguyen and CBIG under MIT license: # https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md import unittest import torch import cbig.Nguyen2020.rnn as rnn
[ 2, 22503, 416, 1855, 71, 42379, 290, 47970, 38, 739, 17168, 5964, 25, 198, 2, 3740, 1378, 12567, 13, 785, 14, 22405, 35543, 78, 17822, 14, 34, 3483, 38, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290, 13, 9132, 198, 11748, 555, 715,...
2.84127
63
from django import forms from django.forms import ModelForm from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django.core.validators import EmailValidator from . import models from .models import ProfileModel from io import BytesIO from PIL import Image, ExifTags ...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27...
2.906926
462
from up.utils.general.registry_factory import MODULE_ZOO_REGISTRY from up.tasks.cls.models.heads import BaseClsHead, ConvNeXtHead __all__ = ['SparseBaseClsHead', 'SparseConvNeXtHead']
[ 6738, 510, 13, 26791, 13, 24622, 13, 2301, 4592, 62, 69, 9548, 1330, 33893, 62, 57, 6684, 62, 31553, 1797, 40405, 198, 6738, 510, 13, 83, 6791, 13, 565, 82, 13, 27530, 13, 16600, 1330, 7308, 2601, 82, 13847, 11, 34872, 8199, 55, 8...
2.633803
71
# Copyright (c) 2019. Partners HealthCare and other members of # Forome Association # # Developed by Sergey Trifonov based on contributions by Joel Krier, # Michael Bouzinier, Shamil Sunyaev and other members of Division of # Genetics, Brigham and Women's Hospital # # Licensed under the Apache License, Version 2....
[ 2, 220, 15069, 357, 66, 8, 13130, 13, 14205, 3893, 17784, 290, 584, 1866, 286, 198, 2, 220, 1114, 462, 5396, 198, 2, 198, 2, 220, 6013, 276, 416, 36106, 833, 361, 261, 709, 1912, 319, 9284, 416, 18623, 509, 5277, 11, 198, 2, 220...
3.776224
286
import pyttsx3 import speech_recognition as sr import os import subprocess #from requests import request , session #from pprint import pprint as pp import json import requests import datetime from datetime import date import time import calendar import warnings import random import wikipedia import web...
[ 11748, 12972, 83, 912, 87, 18, 201, 198, 11748, 4046, 62, 26243, 653, 355, 19677, 201, 198, 11748, 28686, 201, 198, 11748, 850, 14681, 201, 198, 2, 6738, 7007, 1330, 2581, 837, 6246, 201, 198, 2, 6738, 279, 4798, 1330, 279, 4798, 35...
2.615561
437
import random # najprej konstante STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = "+" PONOVLJENA_CRKA = "o" NAPACNA_CRKA = "-" ZMAGA = "W" PORAZ = "X" bazen_besed = [] with open("besede.txt", encoding ="utf8") as input_file: bazen_besed = input_file.readlines()
[ 11748, 4738, 198, 198, 2, 299, 1228, 3866, 73, 479, 261, 301, 12427, 198, 2257, 20114, 4146, 46, 62, 35, 8874, 3535, 41, 1677, 40, 39, 62, 45, 2969, 10206, 796, 838, 198, 198, 47, 3861, 53, 4146, 4535, 62, 9419, 25123, 796, 43825,...
1.964029
139