content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
"""Bosch quirks.""" BOSCH = "Bosch"
[ 37811, 33, 418, 354, 48072, 526, 15931, 198, 198, 33, 2640, 3398, 796, 366, 33, 418, 354, 1, 198 ]
1.947368
19
# -*- coding: utf-8 -*- # This file is part of dj-cookieauth released under the Apache 2 license. # See the NOTICE for more information. import base64 import hmac import hashlib import time from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.contrib.auth.models import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 770, 2393, 318, 636, 286, 42625, 12, 44453, 18439, 2716, 739, 262, 24843, 362, 5964, 13, 220, 198, 2, 4091, 262, 28536, 329, 517, 1321, 13, 198, 198, 11748, 2779, ...
3.355769
104
import sys import fileinput from collections import defaultdict from itertools import chain if __name__ == '__main__' and not sys.flags.interactive: lines = [line.strip() for line in fileinput.input()] print(solve(lines[0], lines[2:], 2)) print(solve(lines[0], lines[2:], 50))
[ 11748, 25064, 198, 11748, 2393, 15414, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 340, 861, 10141, 1330, 6333, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 6, 290, 407, 25064, 13, 33152, 13, 3849, 5275, ...
2.854369
103
# Definition for a Node. """ 11:23 - 11:36 7/30 high level: BFS, level order traversal mid level: queue store cur level res, for the popped node, for its all children, add them to queue test: size = 2 cur_res = [5, 6] q = [] cur = 6 res = [[1], [3, 2, 4], [5, 6]] time: O(# of nodes) -> O(n) space:O(max(width of no...
[ 2, 30396, 329, 257, 19081, 13, 198, 37811, 198, 1157, 25, 1954, 532, 1367, 25, 2623, 220, 220, 767, 14, 1270, 198, 198, 8929, 1241, 25, 347, 10652, 11, 1241, 1502, 33038, 282, 198, 13602, 1241, 25, 16834, 3650, 1090, 1241, 581, 11, ...
2.614286
140
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-payfast', version='0.3.dev', author='Mikhail Korobov', author_email='kmike84@gmail.com', maintainer='Piet Delport', maintainer_email='pjdelport@gmail.com', packages=find_packages(exclude=['payfast_tests']...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 28241, 14208, 12, 15577, 7217, 3256, 198, 220, 220, 220, 2196, 11639, 15,...
2.723529
340
from utils import * from mpmath import ellipe, ellipk, ellippi from scipy.integrate import quad import numpy as np C1 = 3.0 / 14.0 C2 = 1.0 / 3.0 C3 = 3.0 / 22.0 C4 = 3.0 / 26.0 def el2(x, kc, a, b): """ Vectorized implementation of the `el2` function from Bulirsch (1965). In this case, `x` is a *vec...
[ 6738, 3384, 4487, 1330, 1635, 198, 6738, 285, 4426, 776, 1330, 30004, 3757, 11, 30004, 541, 74, 11, 30004, 12715, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 15094, 198, 11748, 299, 32152, 355, 45941, 628, 198, 34, 16, 796, 513, ...
1.798807
2,515
from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.translation import gettext_lazy as _
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 261, 7249, 1330, 37431, 7249, 856, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 35...
3.72093
43
from bolt_srl.model import BoltSRLModel from bolt_srl.predictor import BoltSRLPredictor from bolt_srl.reader import BoltSRLReader
[ 6738, 18100, 62, 27891, 75, 13, 19849, 1330, 21764, 50, 7836, 17633, 198, 6738, 18100, 62, 27891, 75, 13, 79, 17407, 273, 1330, 21764, 50, 7836, 47, 17407, 273, 198, 6738, 18100, 62, 27891, 75, 13, 46862, 1330, 21764, 50, 7836, 33634,...
3.023256
43
from __future__ import print_function import sys import importlib from django.conf import settings import graphene from .base import sharedql for imports in settings.INSTALLED_APPS: imports = imports + ".schema" try: mod = importlib.import_module(imports + ".schema") except ImportError: ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 25064, 198, 11748, 1330, 8019, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 42463, 198, 198, 6738, 764, 8692, 1330, 4888, 13976, 198, 198, 1640, 17944, 287, 6460, ...
2.824786
234
test = Solution() print test.numIslands( [[1, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 0, 0, 1, 1], [0, 0, 0, 0, 0], [0, 0, 0, 0, 1]])
[ 198, 9288, 796, 28186, 3419, 198, 4798, 1332, 13, 22510, 3792, 4447, 7, 198, 16410, 16, 11, 352, 11, 657, 11, 657, 11, 657, 4357, 198, 220, 685, 15, 11, 352, 11, 657, 11, 657, 11, 352, 4357, 198, 220, 685, 15, 11, 657, 11, 657...
1.746835
79
""" import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()) print(p.get_device_info_by_index(i)) """ import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()): info = p.get_device_info_by_index(i) print(info['index'], info['name'])
[ 37811, 198, 11748, 12972, 24051, 198, 79, 796, 12972, 24051, 13, 20519, 21206, 3419, 198, 1640, 1312, 287, 2837, 7, 79, 13, 1136, 62, 25202, 62, 9127, 28955, 198, 220, 220, 220, 3601, 7, 79, 13, 1136, 62, 25202, 62, 10951, 62, 1525,...
2.405172
116
A_0203_11 = {0: {'A': -0.12570904708437197, 'C': -0.20260572185781892, 'E': -4.0, 'D': -4.0, 'G': -4.0, 'F': -4.0, 'I': 0.7830374415420228, 'H': -0.6847918068824875, 'K': -0.6847918068824875, 'M': 0.981018297402464, 'L': 1.1760718746127061, 'N': -0.09649609424570203, 'Q': 0.39410708558422325, 'P': -4.0, 'S': -0.2026057...
[ 32, 62, 15, 22416, 62, 1157, 796, 1391, 15, 25, 1391, 6, 32, 10354, 532, 15, 13, 11623, 31495, 3023, 2154, 5705, 2718, 24991, 11, 705, 34, 10354, 532, 15, 13, 19004, 1899, 3553, 28727, 38907, 1507, 5892, 11, 705, 36, 10354, 532, 1...
1.80656
2,683
import werkzeug try: import dotmap except: dotmap = None try: import addict except: addict = None
[ 11748, 266, 9587, 2736, 1018, 198, 28311, 25, 198, 220, 220, 220, 1330, 16605, 8899, 198, 16341, 25, 198, 220, 220, 220, 16605, 8899, 796, 6045, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 19678, 198, 16341, 25, 198, 220, 220, 22...
2.468085
47
# Generated by Django 2.2.1 on 2019-05-26 00:42 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 16, 319, 13130, 12, 2713, 12, 2075, 3571, 25, 3682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import sys MASTER_PASSWORD = "opensesame" password = input("Please enter the super secret password: ") attempt_count = 1 while password != MASTER_PASSWORD: if attempt_count > 3: sys.exit("Too many invalid password attempts") password = input("Invalid password, try again: ") attempt_count += 1 pri...
[ 11748, 25064, 198, 198, 31180, 5781, 62, 47924, 54, 12532, 796, 366, 404, 4541, 480, 1, 198, 28712, 796, 5128, 7203, 5492, 3802, 262, 2208, 3200, 9206, 25, 366, 8, 198, 1078, 1791, 62, 9127, 796, 352, 198, 198, 4514, 9206, 14512, 32...
3.088496
113
import json import os from typing import Dict, Tuple, List import numpy as np import tensorflow as tf from keras import backend as K from textgenrnn.model import textgenrnn_model def rnn_guess(models_dir: str, check_models: List[str], in_str: str, reset=False) -> Dict[str, float]: """Keyword arguments for get_...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 11, 7343, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 198, 198, 673...
2.249694
1,634
from datetime import datetime from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, no_translations from note.models import NoteIndexPage from note.models import NotePage
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 645, 62, 7645, 49905, 198, 198,...
3.728814
59
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-16 12:55 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 21, 319, 2177, 12, 3070, 12, 1433, 1105, 25, 2816, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
from flask_unchained import BundleConfig
[ 6738, 42903, 62, 3316, 1328, 1330, 25282, 16934, 628 ]
4.666667
9
from .norms.api import * from .losses.api import * from .sampler import selective_sampler_MH
[ 6738, 764, 27237, 82, 13, 15042, 1330, 1635, 198, 6738, 764, 22462, 274, 13, 15042, 1330, 1635, 198, 198, 6738, 764, 37687, 20053, 1330, 21792, 62, 37687, 20053, 62, 36208, 198 ]
3.032258
31
from rest_framework import serializers from .models import Category, Brand, Supply, Unit, SupplyItem, Packaging, Product
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 764, 27530, 1330, 21743, 11, 13512, 11, 22663, 11, 11801, 11, 22663, 7449, 11, 6400, 3039, 11, 8721, 628, 628, 628, 628 ]
4.129032
31
from flask import url_for, request, current_app from app.auth.models import User, PreAllowedUser from app.extensions import db
[ 6738, 42903, 1330, 19016, 62, 1640, 11, 2581, 11, 1459, 62, 1324, 198, 198, 6738, 598, 13, 18439, 13, 27530, 1330, 11787, 11, 3771, 3237, 6972, 12982, 198, 6738, 598, 13, 2302, 5736, 1330, 20613, 628 ]
3.583333
36
from django.forms import ModelForm, ModelChoiceField from django.contrib import admin from django.utils.translation import gettext_lazy as _ from dal import autocomplete from .models import ( DiscountCategory, DiscountCombo, DiscountComboComponent, PointGroup, PricingTierGroup, RegistrationDiscount, Custo...
[ 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 11, 9104, 46770, 15878, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 288,...
3.591667
240
#!/usr/bin/env python # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 220, 220, 220, 21015, 198, 2, 15069, 2211, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 3...
2.279039
3,831
from dataclasses import dataclass # https://community.finicity.com/s/article/207505363-Multi-Factor-Authentication-MFA
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 198, 2, 3740, 1378, 28158, 13, 15643, 8467, 13, 785, 14, 82, 14, 20205, 14, 1238, 15426, 20, 35447, 12, 29800, 12, 41384, 12, 47649, 3299, 12, 44, 7708, 198 ]
3.102564
39
from __future__ import absolute_import import base64 import os import pathlib import unittest import conjur from OpenSSL import crypto, SSL CERT_DIR = pathlib.Path('config/https') SSL_CERT_FILE = 'ca.crt' CONJUR_CERT_FILE = 'conjur.crt' CONJUR_KEY_FILE = 'conjur.key' def generateKey(type, bits): """Generates a...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 2779, 2414, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 555, 715, 395, 198, 198, 11748, 11644, 333, 198, 198, 6738, 4946, 31127, 1330, 21473, 11, 25952, 198, 19...
2.392544
456
import os import pandas as pd
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67 ]
3.222222
9
import asyncio from asyncio.events import AbstractEventLoop import json import logging import zlib from aiohttp import ClientSession, ClientWebSocketResponse from ..cert import Cert from ..hardcoded import API_URL from ..net_client import BaseClient
[ 11748, 30351, 952, 198, 6738, 30351, 952, 13, 31534, 1330, 27741, 9237, 39516, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 1976, 8019, 198, 198, 6738, 257, 952, 4023, 1330, 20985, 36044, 11, 20985, 13908, 39105, 31077, 198, 198, 673...
4.015873
63
from abc import ABC from typing import List, Type from reamber.base.lists.notes.NoteList import NoteList
[ 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 7343, 11, 5994, 198, 198, 6738, 302, 7789, 13, 8692, 13, 20713, 13, 17815, 13, 6425, 8053, 1330, 5740, 8053, 628, 198 ]
3.483871
31
import os import sys import re import json import logging ###from pylons import request, response, session, app_globals, tmpl_context, url as c, config from pylons import request, response, session, app_globals, tmpl_context as c, config, url from pylons.controllers.util import abort, redirect from pylons.decorators ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 21017, 6738, 279, 2645, 684, 1330, 2581, 11, 2882, 11, 6246, 11, 598, 62, 4743, 672, 874, 11, 256, 76, 489, 62, 22866, 11, 19016, 355, ...
3.156915
376
import flair import numpy as np import spacy import tensorflow_hub as hub import torch from flair.data import Sentence from flair.models import SequenceTagger from nltk.tokenize.treebank import TreebankWordDetokenizer from sklearn.metrics.pairwise import cosine_similarity from string import punctuation from transformer...
[ 11748, 37457, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 599, 1590, 198, 11748, 11192, 273, 11125, 62, 40140, 355, 12575, 198, 11748, 28034, 198, 6738, 37457, 13, 7890, 1330, 11352, 594, 198, 6738, 37457, 13, 27530, 1330, 45835, 51, ...
3.551471
136
# Insert Interval if __name__ == "__main__": sol = Solution() intervals = [[1,3],[6,9]] newInterval = [2,5] intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]] newInterval = [4,18] print(sol.insert(intervals, newInterval))
[ 2, 35835, 4225, 2100, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1540, 796, 28186, 3419, 198, 220, 220, 220, 20016, 796, 16410, 16, 11, 18, 38430, 21, 11, 24, 11907, 198, 220, 220, 220, ...
2.218182
110
# encoding: UTF-8 """" 1min 5min 1. 2. 3. """ import talib import numpy as np from cyvn.trader.vtObject import VtBarData from cyvn.trader.vtConstant import EMPTY_STRING from cyvn.trader.app.ctaStrategy.ctaTemplate import CtaTemplate, BarGenerator, ArrayManager from cyvn.trader.vtConstant import * ##########...
[ 2, 21004, 25, 41002, 12, 23, 198, 198, 15931, 15931, 198, 198, 16, 1084, 198, 20, 1084, 198, 198, 16, 13, 220, 198, 17, 13, 220, 198, 18, 13, 220, 198, 37811, 628, 198, 198, 11748, 3305, 571, 198, 11748, 299, 32152, 355, 45941, ...
2.379791
1,148
# -*- coding: utf-8 -*- import os import re from selenium import webdriver from xvfbwrapper import Xvfb from cabu.exceptions import DriverException from cabu.utils.headers import Headers from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium import webdriver try: from urllib....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 2124, 85, 21855, 48553, 1330, 1395, 85, 21855, 198, 6738, 16212, 84, 13, 1...
2.556983
1,790
import pygame as pg display = pg.display.set_mode((900,600)) clock = pg.time.Clock() jump = 10 step = 0 img = 0 left = [pg.image.load('images/character/l1.png'),pg.image.load('images/character/l2.png'),pg.image.load('images/character/l3.png'),pg.image.load('images/character/l4.png'),pg.image.load('images/character/l5.p...
[ 11748, 12972, 6057, 355, 23241, 198, 13812, 796, 23241, 13, 13812, 13, 2617, 62, 14171, 19510, 12865, 11, 8054, 4008, 198, 15750, 796, 23241, 13, 2435, 13, 44758, 3419, 198, 43327, 796, 838, 198, 9662, 796, 657, 198, 9600, 796, 657, 1...
2.629703
505
#!/usr/bin/env python3 import picamera import file_utils import os
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 8301, 18144, 198, 11748, 2393, 62, 26791, 198, 11748, 28686, 628 ]
3
23
_base_ = [ '../_base_/models/flownets.py', '../_base_/datasets/flyingchairs_384x448.py', '../_base_/schedules/schedule_s_long.py', '../_base_/default_runtime.py' ]
[ 62, 8692, 62, 796, 685, 198, 220, 220, 220, 705, 40720, 62, 8692, 62, 14, 27530, 14, 2704, 593, 1039, 13, 9078, 3256, 198, 220, 220, 220, 705, 40720, 62, 8692, 62, 14, 19608, 292, 1039, 14, 45928, 49655, 62, 22842, 87, 31115, 13, ...
2.095238
84
from CalibTracker.SiStripCommon.shallowTree_test_template import * process.TFileService.fileName = 'test_shallowRechitClustersProducer.root' process.load('RecoTracker.TrackProducer.TrackRefitters_cff') process.load('CalibTracker.SiStripCommon.ShallowRechitClustersProducer_cfi') process.testTree = cms.EDAnalyzer( "S...
[ 6738, 2199, 571, 35694, 13, 42801, 1273, 5528, 17227, 13, 1477, 12154, 27660, 62, 9288, 62, 28243, 1330, 1635, 198, 14681, 13, 51, 8979, 16177, 13, 7753, 5376, 796, 705, 9288, 62, 1477, 12154, 3041, 354, 270, 2601, 13654, 11547, 2189, ...
2.540909
220
from typing import Sequence import numpy as np import h5py from easistrain.EDD.io import ( create_info_group, peak_dataset_data, save_fit_data, ) from easistrain.EDD.utils import fit_detector_data, run_from_cli def fitEDD_with_scan_number_parse(**config): """Wrapper function to allow scanNumber to be...
[ 6738, 19720, 1330, 45835, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 198, 6738, 1396, 396, 3201, 13, 1961, 35, 13, 952, 1330, 357, 198, 220, 220, 220, 2251, 62, 10951, 62, 8094, 11, 198, 220, 220, 220, 9103, 62, ...
2.216216
481
from sys import argv script, filename = argv print "We are going to erase %r." % filename print "If you don't want that, hit CTRL-C (^C)." print "If you do want that, hit RETURN." raw_input("?") print "Opening the file..." target = open(filename, 'w') print "Truncating the file. Goodbye!" target.truncate() print ...
[ 6738, 25064, 1330, 1822, 85, 198, 198, 12048, 11, 29472, 796, 1822, 85, 198, 198, 4798, 366, 1135, 389, 1016, 284, 28602, 4064, 81, 526, 4064, 29472, 198, 4798, 366, 1532, 345, 836, 470, 765, 326, 11, 2277, 45249, 12, 34, 357, 61, ...
2.867769
726
# Generated by Django 2.0.6 on 2018-11-01 14:26 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 21, 319, 2864, 12, 1157, 12, 486, 1478, 25, 2075, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from django.test import TestCase from filler.plain_classes.teams_data import TeamsData
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 41134, 13, 25638, 62, 37724, 13, 660, 4105, 62, 7890, 1330, 24690, 6601, 628 ]
3.56
25
from dungeon_model import Monsters, Players import re import math def initiative_sort(init_order): """sorts all the characters for a given combat by initiative""" print("passed into sort function: ", init_order) for i in range(len(init_order)): check = init_order[i] print("the check is: ",...
[ 6738, 18974, 62, 19849, 1330, 21464, 11, 13094, 198, 11748, 302, 198, 11748, 10688, 198, 198, 4299, 10219, 62, 30619, 7, 15003, 62, 2875, 2599, 198, 220, 220, 220, 37227, 82, 2096, 477, 262, 3435, 329, 257, 1813, 5249, 416, 10219, 378...
1.908156
1,459
""" Created on Mon Jun 7 12:57:10 2021 @author: horvat """
[ 198, 37811, 198, 41972, 319, 2892, 7653, 220, 767, 1105, 25, 3553, 25, 940, 33448, 198, 198, 31, 9800, 25, 3076, 85, 265, 198, 37811, 628, 198 ]
2.37037
27
# administrative username and password for development ADMIN_USERNAME = 'admin' ADMIN_PASSWORD = 'password' ADMIN_TYPE = 'admin' # for production # ADMIN_USERNAME = 'environ.get('ADMIN_USERNAME') # ADMIN_PASSWORD = 'environ.get('ADMIN_PASSWORD') # ADMIN_TYPE = 'environ.get('ADMIN_TYPE')
[ 2, 11553, 20579, 290, 9206, 329, 2478, 198, 2885, 23678, 62, 29904, 20608, 796, 705, 28482, 6, 198, 2885, 23678, 62, 47924, 54, 12532, 796, 705, 28712, 6, 198, 2885, 23678, 62, 25216, 796, 705, 28482, 6, 198, 2, 329, 3227, 198, 2, ...
2.823529
102
from agents.agent import Agent from models.actor_critic_mlp import ActorCriticMLP import numpy as np import torch import torch.optim as optim from utils import plot_grad_flow
[ 6738, 6554, 13, 25781, 1330, 15906, 198, 6738, 4981, 13, 11218, 62, 22213, 291, 62, 4029, 79, 1330, 27274, 18559, 291, 5805, 47, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, ...
3.52
50
from common import google_cloud training_param = GANTrainParameters()
[ 6738, 2219, 1330, 23645, 62, 17721, 628, 198, 198, 34409, 62, 17143, 796, 402, 1565, 44077, 48944, 3419, 198 ]
3.842105
19
#!/usr/bin/env python # -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Xinlei Chen, based on code from Ross Girshick # -------------------------------------------------------- """ Demo script showing detections...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 20368, 22369, 198, 2, 309, 22854, 11125, 38996, 371, 12, 18474, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 22503, 416, 25426, 293, ...
2.193866
3,456
# pylint:disable=too-many-lines import os import time from faker import Faker from unittest.mock import patch import pytest from hestia.internal_services import InternalServices from rest_framework import status import conf import stores from api.experiments import queries from api.experiments.serializers import (...
[ 2, 279, 2645, 600, 25, 40223, 28, 18820, 12, 21834, 12, 6615, 198, 11748, 28686, 198, 11748, 640, 198, 198, 6738, 277, 3110, 1330, 376, 3110, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 12972, 9288, 198, 198,...
3.373596
712
import pygame import speech_recognition as sr from time import sleep import events import objects as obj_types from settings import SPEECH_CRED_FILE from speech_helpers import correct_text, either_side, get_after, get_position, get_positions, get_size, is_in_objects, process_relative, select_obj_type # A variable lis...
[ 11748, 12972, 6057, 198, 11748, 4046, 62, 26243, 653, 355, 19677, 198, 6738, 640, 1330, 3993, 198, 198, 11748, 2995, 198, 11748, 5563, 355, 26181, 62, 19199, 198, 6738, 6460, 1330, 6226, 36, 25994, 62, 9419, 1961, 62, 25664, 198, 6738, ...
2.355774
2,139
import gin from colosseum.loops import human_loop from colosseum.mdps import EpisodicMDP from colosseum.mdps.river_swim.river_swim import RiverSwimMDP if __name__ == "__main__": mdp = RiverSwimEpisodic( seed=42, randomize_actions=False, size=15, lazy=0.01, random_action_...
[ 11748, 39733, 198, 198, 6738, 951, 418, 325, 388, 13, 5439, 2840, 1330, 1692, 62, 26268, 198, 6738, 951, 418, 325, 388, 13, 9132, 862, 1330, 4551, 271, 29512, 44, 6322, 198, 6738, 951, 418, 325, 388, 13, 9132, 862, 13, 38291, 62, ...
2.066986
209
# How to add a test: # Copy this file # Rename TestTemplate to TestWhatever in line 9 # Rename machine path and config file in lines 11 and 14 from mpfmc.tests.MpfMcTestCase import MpfMcTestCase
[ 2, 1374, 284, 751, 257, 1332, 25, 198, 2, 17393, 428, 2393, 198, 2, 7152, 480, 6208, 30800, 284, 6208, 21875, 287, 1627, 860, 198, 2, 7152, 480, 4572, 3108, 290, 4566, 2393, 287, 3951, 1367, 290, 1478, 198, 198, 6738, 29034, 69, 2...
3.283333
60
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/availability-msgs.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _m...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 44876, 14, 47274, 12, 907, 14542, 13, 1676, 1462, 198, 37811, 8645, 515, ...
2.530827
1,330
import numpy as np import pandas as pd import datetime from okokyst_metadata import surveys_lookup_table import os import re import glob import gsw from okokyst_tools import pressure_to_depth encoding = "ISO-8859-1" __author__ = 'Elizaveta Protsenko' __email__ = 'Elizaveta.Protsenko@niva.no' __created__ = datet...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4818, 8079, 198, 6738, 12876, 31375, 301, 62, 38993, 1330, 16255, 62, 5460, 929, 62, 11487, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 15095, 198, 117...
2.054313
2,504
import pytest from tartiflette.language.ast import InterfaceTypeExtensionNode
[ 11748, 12972, 9288, 198, 198, 6738, 35842, 361, 21348, 13, 16129, 13, 459, 1330, 26491, 6030, 11627, 3004, 19667, 628, 628 ]
3.904762
21
'''Given two arrays, write a function to compute their intersection. '''
[ 7061, 6, 15056, 734, 26515, 11, 3551, 257, 2163, 284, 24061, 511, 16246, 13, 198, 7061, 6, 628, 198 ]
3.947368
19
from collections import defaultdict import json from pandas.core import frame import torch import pandas as pd import os import pickle as pkl import numpy as np import cv2 import h5py import tqdm import functools import lmdb
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 33918, 198, 6738, 19798, 292, 13, 7295, 1330, 5739, 198, 11748, 28034, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 2298, 293, 355, 279, 41582, 198, 11748, 299, 32152, ...
3.323529
68
''' Merge Two Sorted Lists Asked in: Microsoft Yahoo Amazon Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists, and should also be sorted. For example, given following linked lists : 5 -> 8 -> 20 4 -> 11 -> 15 The merged ...
[ 7061, 6, 198, 13102, 469, 4930, 311, 9741, 44968, 198, 18932, 287, 25, 220, 220, 198, 15905, 198, 56, 12992, 198, 24888, 198, 13102, 469, 734, 23243, 6692, 8341, 290, 1441, 340, 355, 257, 649, 1351, 13, 198, 464, 649, 1351, 815, 307...
3.351351
111
v = int(input('Digite um valor: ')) validador = 0 contador = 1 while contador < v: if v % contador == 0: validador += 1 contador +=1 if validador > 1: print(f'Esse nmero NO primo, pois divisvel por {validador+1} nmeros diferentes ') else: print('Esse nmero primo')
[ 85, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 1188, 273, 25, 705, 4008, 198, 12102, 7079, 796, 657, 198, 3642, 7079, 796, 352, 198, 4514, 542, 7079, 1279, 410, 25, 198, 220, 220, 220, 611, 410, 4064, 542, 7079, 6624, 657, 25, ...
2.273438
128
"""Testing methods that need Handle server read access""" import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import requests import json import mock import b2handle from b2handle.handleclient import EUDATHandleClient from b2handle.handleexceptions import * # Load some...
[ 37811, 44154, 5050, 326, 761, 33141, 4382, 1100, 1895, 37811, 198, 198, 11748, 25064, 198, 361, 25064, 13, 9641, 62, 10951, 1279, 357, 17, 11, 767, 2599, 198, 220, 220, 220, 1330, 555, 715, 395, 17, 355, 555, 715, 395, 198, 17772, 2...
3.375566
221
# !/usr/bin/env python # -*- coding: utf-8 -*- # # Filename: models.py # Project: core # Author: Brian Cherinka # Created: Saturday, 12th September 2020 12:55:22 pm # License: BSD 3-clause "New" or "Revised" License # Copyright (c) 2020 Brian Cherinka # Last Modified: Saturday, 12th September 2020 12:55:22 pm # Modifie...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 7066, 12453, 25, 4981, 13, 9078, 198, 2, 4935, 25, 4755, 198, 2, 6434, 25, 8403, 19305, 48955, 198, ...
2.734365
3,102
import re import html import pandas as pd re1 = re.compile(r' +') # https://github.com/prajjwal1/language-modelling/blob/master/ULMfit.py
[ 11748, 302, 198, 11748, 27711, 198, 11748, 19798, 292, 355, 279, 67, 198, 260, 16, 796, 302, 13, 5589, 576, 7, 81, 6, 220, 1343, 11537, 628, 198, 198, 2, 3740, 1378, 12567, 13, 785, 14, 79, 430, 41098, 16783, 16, 14, 16129, 12, ...
2.448276
58
from .core import Config
[ 6738, 764, 7295, 1330, 17056, 198 ]
4.166667
6
from xd.build.core.data.namespace import * from xd.build.core.data.expr import Expression from xd.build.core.data.string import String from xd.build.core.data.list import List from xd.build.core.data.dict import Dict from xd.build.core.data.func import Function from xd.build.core.data.num import * import unittest
[ 6738, 2124, 67, 13, 11249, 13, 7295, 13, 7890, 13, 14933, 10223, 1330, 1635, 198, 6738, 2124, 67, 13, 11249, 13, 7295, 13, 7890, 13, 31937, 1330, 41986, 198, 6738, 2124, 67, 13, 11249, 13, 7295, 13, 7890, 13, 8841, 1330, 10903, 198,...
2.981132
106
from google.appengine.ext import ndb from protorpc import messages from google.appengine.ext.ndb import msgprop from csvmodel import CsvModel
[ 6738, 23645, 13, 1324, 18392, 13, 2302, 1330, 299, 9945, 198, 6738, 1237, 273, 14751, 1330, 6218, 198, 6738, 23645, 13, 1324, 18392, 13, 2302, 13, 358, 65, 1330, 31456, 22930, 198, 6738, 269, 21370, 19849, 1330, 327, 21370, 17633, 198 ]
3.463415
41
##*** ##class Base: ## def methodBase(self): ## print("In base class") ##class child(Base): ## def methodchild(Base): ## print("In child class") ##c1=child() ##c1.methodBase() ##c1.methodchild() ##*** ##class Base: ## def ___init__(self): ## print('base') ##class child(Base): ## pass ...
[ 2235, 8162, 198, 2235, 4871, 7308, 25, 198, 2235, 220, 220, 220, 825, 2446, 14881, 7, 944, 2599, 198, 2235, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 818, 2779, 1398, 4943, 198, 2235, 4871, 1200, 7, 14881, 2599, 198, 2235, 220,...
2.110169
236
from ._bounding_box import * from ._user_IDs import * from ._user_points import *
[ 6738, 47540, 7784, 278, 62, 3524, 1330, 1635, 198, 6738, 47540, 7220, 62, 47954, 1330, 1635, 198, 6738, 47540, 7220, 62, 13033, 1330, 1635, 198 ]
3.28
25
import appdaemon.plugins.hass.hassapi as hass # # Listen for presence sensor change state and change alarm control panel state. # # Args: # sensor - home presence 'sensor' # ha_panel - alarm control panel entity (to arm and disarm). # constraint - (optional, input_boolen), if turned off - alarm panel will be n...
[ 11748, 598, 6814, 7966, 13, 37390, 13, 71, 562, 13, 71, 562, 15042, 355, 468, 82, 201, 198, 201, 198, 2, 201, 198, 2, 20600, 329, 4931, 12694, 1487, 1181, 290, 1487, 10436, 1630, 6103, 1181, 13, 201, 198, 2, 201, 198, 2, 943, 14...
3.117188
128
from random import randint import datetime lvl = 10 base_rounds = 10 rounds = lvl * base_rounds print("You have", rounds, "rounds to try to get through.") for i in range(rounds): r = randint(1, 100) print(r) if r >= 96: break print("Number of rounds:", i) if i == rounds - 1: print("Nothing ...
[ 6738, 4738, 1330, 43720, 600, 198, 11748, 4818, 8079, 198, 198, 47147, 796, 838, 198, 8692, 62, 744, 82, 796, 838, 220, 198, 744, 82, 796, 33309, 1635, 2779, 62, 744, 82, 198, 198, 4798, 7203, 1639, 423, 1600, 9196, 11, 366, 744, ...
2.567742
155
from ._version import get_versions from .contexts import cd from .prompting import error, prompt, status, success from .unix import cp, ln_s __all__ = ["prompt", "status", "success", "error", "cp", "cd", "ln_s"] __version__ = get_versions()["version"] del get_versions
[ 6738, 47540, 9641, 1330, 651, 62, 47178, 198, 6738, 764, 22866, 82, 1330, 22927, 198, 6738, 764, 16963, 457, 278, 1330, 4049, 11, 6152, 11, 3722, 11, 1943, 198, 6738, 764, 403, 844, 1330, 31396, 11, 300, 77, 62, 82, 198, 198, 834, ...
3.05618
89
"""Test Trotter Hamiltonian methods from `qibo/core/hamiltonians.py`.""" import pytest import numpy as np import qibo from qibo import hamiltonians, K from qibo.tests.utils import random_state, random_complex, random_hermitian def test_trotter_hamiltonian_scalar_mul(nqubits=3): """Test multiplication of Trotter ...
[ 37811, 14402, 8498, 83, 353, 11582, 666, 5050, 422, 4600, 80, 26762, 14, 7295, 14, 2763, 9044, 1547, 13, 9078, 63, 526, 15931, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10662, 26762, 198, 6738, 10662, 2676...
2.289416
1,814
import asyncio
[ 11748, 30351, 952, 628 ]
4
4
import warnings import torch.nn as nn def conv1x1_group(in_planes, out_planes, stride=1, groups=1): """ 1x1 convolution with group, without bias - Normal 1x1 convolution when groups == 1 - Grouped 1x1 convolution when groups > 1 """ return nn.Conv2d(in_channels=in_planes, ...
[ 11748, 14601, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 198, 4299, 3063, 16, 87, 16, 62, 8094, 7, 259, 62, 22587, 11, 503, 62, 22587, 11, 33769, 28, 16, 11, 2628, 28, 16, 2599, 198, 220, 220, 220, 37227, 198, 220, 22...
1.95005
1,001
from sanic import Sanic from sanic.response import json from sanic_openapi import doc, swagger_blueprint from util import authorized app = Sanic(__name__) app.config["API_TITLE"] = "My-DataHub-OpenAPI" app.config["API_VERSION"] = "0.1.0" app.config["API_DESCRIPTION"] = "An example Swagger from Sanic-OpenAPI" app.co...
[ 6738, 5336, 291, 1330, 2986, 291, 198, 6738, 5336, 291, 13, 26209, 1330, 33918, 198, 6738, 5336, 291, 62, 9654, 15042, 1330, 2205, 11, 1509, 7928, 62, 17585, 4798, 198, 198, 6738, 7736, 1330, 10435, 628, 198, 1324, 796, 2986, 291, 7, ...
2.572016
243
# -*- coding: utf-8 -*- import contextlib import sqlalchemy import sqlalchemy.orm from twisted.application.service import Service from zope.interface.declarations import implementer from bouser.helpers.plugin_helpers import Dependency, BouserPlugin from .interfaces import IDataBaseService __author__ = 'mmalkov'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4732, 8019, 198, 198, 11748, 44161, 282, 26599, 198, 11748, 44161, 282, 26599, 13, 579, 198, 6738, 19074, 13, 31438, 13, 15271, 1330, 4809, 198, 6738, 1976, 3008, ...
3.3125
96
# -*- coding: utf-8 -*- from pydub import AudioSegment import sys import glob if __name__ == "__main__": args = sys.argv folder = glob.glob(args[1] + "/*.wav") initial = False for file in folder: soundfile = AudioSegment.from_file(file, "wav") if initial == False: soundfil...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 279, 5173, 549, 1330, 13491, 41030, 434, 198, 11748, 25064, 198, 11748, 15095, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 22...
2.17603
267
import numpy as np import pandas as pd from utils import calculate_q from scipy import stats def calculate_deg_fold_change(data1_df, data2_df, fc_cutoff=1, alternative='two-sided'): """ This function calculates differentially expressed genes (DEGs) between two DataFrames or Series...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3384, 4487, 1330, 15284, 62, 80, 198, 6738, 629, 541, 88, 1330, 9756, 198, 198, 4299, 15284, 62, 13500, 62, 11379, 62, 3803, 7, 7890, 16, 62, 7568, 11, ...
2.566474
1,557
""" This is a test that we're using to gather example data from our two example models. This is passed a list of image names, image numbers, and the vector representing the face in the photo, and this script takes that and a split of testing vs training data to determine how accurate the model was by simply checking wh...
[ 37811, 198, 1212, 318, 257, 1332, 326, 356, 821, 1262, 284, 6431, 1672, 1366, 422, 674, 734, 1672, 4981, 13, 198, 1212, 318, 3804, 257, 1351, 286, 2939, 3891, 11, 2939, 3146, 11, 290, 262, 15879, 10200, 262, 1986, 287, 262, 4590, 11...
3.567568
333
import numpy as np random_split_train_test("/home/bassel/data/oa_kinetics/lbls/actions_stack_list.txt", "/home/bassel/data/oa_kinetics/lbls/action_train_stacks_list.txt", "/home/bassel/data/oa_kinetics/lbls/action_test_stacks_list.txt")
[ 11748, 299, 32152, 355, 45941, 628, 198, 198, 25120, 62, 35312, 62, 27432, 62, 9288, 7203, 14, 11195, 14, 12093, 741, 14, 7890, 14, 12162, 62, 5116, 14596, 14, 75, 2436, 82, 14, 4658, 62, 25558, 62, 4868, 13, 14116, 1600, 198, 220, ...
1.97931
145
""" Functions and classes for interacting with the CodeRED data format """ from dataclasses import dataclass from typing import List, Optional, Union import pandas as pd from .types import FilenameType # The required headers for CodeRED EXCEL_HEADERS = ( "Command", "CustomKey", "ContactId", "First Na...
[ 37811, 198, 24629, 2733, 290, 6097, 329, 24986, 351, 262, 6127, 22083, 1366, 5794, 198, 37811, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 4479, 198, 198, 11748, 19798, 292, 355, 279...
2.627737
685
from imagekit.admin import AdminThumbnail from django.contrib.admin import TabularInline from core.admin.forms import LimitedInlineFormSet from core.admin.utils import ( get_change_view_link, get_changelist_view_link ) from ..models import PremierProduct
[ 6738, 2939, 15813, 13, 28482, 1330, 32053, 35523, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 28482, 1330, 16904, 934, 818, 1370, 198, 198, 6738, 4755, 13, 28482, 13, 23914, 1330, 15302, 818, 1370, 8479, 7248, 198, 6738, 4755, 13, ...
3.283951
81
import unittest from src.cumulator.base import Cumulator if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 12351, 13, 36340, 8927, 13, 8692, 1330, 27843, 8927, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.74359
39
#!/usr/bin/python3 import argparse import logging as log from aiohttp import web from api.databasemanager import DictionaryDatabaseManager from api.dictionary import \ entry, \ definition, \ translation, \ configuration from api.dictionary import \ get_dictionary, \ get_dictionary_xml, \ g...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 1822, 29572, 198, 11748, 18931, 355, 2604, 198, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 198, 6738, 40391, 13, 19608, 397, 292, 8463, 3536, 1330, 28261, 38105, 13511, 198, 6738, ...
2.606343
1,608
from output.models.nist_data.list_pkg.any_uri.schema_instance.nistschema_sv_iv_list_any_uri_enumeration_1_xsd.nistschema_sv_iv_list_any_uri_enumeration_1 import ( NistschemaSvIvListAnyUriEnumeration1, NistschemaSvIvListAnyUriEnumeration1Type, ) __all__ = [ "NistschemaSvIvListAnyUriEnumeration1", "Nists...
[ 6738, 5072, 13, 27530, 13, 77, 396, 62, 7890, 13, 4868, 62, 35339, 13, 1092, 62, 9900, 13, 15952, 2611, 62, 39098, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 4868, 62, 1092, 62, 9900, 62, 268, 6975, 341, 62, 16, 62, 87, ...
2.181818
165
import torch import numpy as np import re import itertools from textwrap import wrap import matplotlib.pyplot as plt def padding_mask(lengths, batch_size, time_size=None): """ Computes a [batch_size, time_size] binary mask which selects all and only the non padded values in the input tensor :param t...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 302, 198, 11748, 340, 861, 10141, 198, 6738, 2420, 37150, 1330, 14441, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 4299, 24511, 62, 27932, 7,...
2.551508
796
from faq_module.storage import FAQManager # , FAQConfig, FAQData # from faq_module.commands import text # from discord.ext import commands # import faq_module.text # import logging import discord # import typing import re
[ 6738, 24685, 80, 62, 21412, 13, 35350, 1330, 18749, 13511, 220, 1303, 837, 18749, 16934, 11, 18749, 6601, 198, 2, 422, 24685, 80, 62, 21412, 13, 9503, 1746, 1330, 2420, 198, 2, 422, 36446, 13, 2302, 1330, 9729, 198, 2, 1330, 24685, ...
3.546875
64
from tests.utils import hass_mock, get_instances import devices as devices_module from core import Controller from core import type as type_module
[ 6738, 5254, 13, 26791, 1330, 468, 82, 62, 76, 735, 11, 651, 62, 8625, 1817, 198, 11748, 4410, 355, 4410, 62, 21412, 198, 6738, 4755, 1330, 22741, 198, 6738, 4755, 1330, 2099, 355, 2099, 62, 21412, 628, 628, 628 ]
3.897436
39
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='iocfg', version='0.1', description='Configuration for IO modules on Novus IHM', author='Thomas Del Grande', author_email='tgrande@pd3.com.br', packages=find_packages(), scripts=[ 'scripts/diocfg',...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 3672, 11639, 72, 420, 40616, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198...
2.217021
235
# Import pandas using the alias pd import pandas as pd # Print the head of the homelessness data print(homelessness.head()) # Print the values of homelessness print(homelessness.values) # Print the column index of homelessness print(homelessness.columns) # Print the row index of homelessness print(homelessness.i...
[ 198, 2, 17267, 19798, 292, 1262, 262, 16144, 279, 67, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 12578, 262, 1182, 286, 262, 28822, 1366, 198, 4798, 7, 26452, 5321, 1108, 13, 2256, 28955, 628, 198, 198, 2, 12578, 262, 3815, ...
3.285223
582
import aiohttp from time import time import json from hashlib import sha512 import hmac from .fetcher import Fetcher
[ 11748, 257, 952, 4023, 198, 6738, 640, 1330, 640, 198, 11748, 33918, 198, 6738, 12234, 8019, 1330, 427, 64, 25836, 198, 11748, 289, 20285, 198, 198, 6738, 764, 34045, 2044, 1330, 44649, 2044, 628 ]
3.5
34
import time import pytest from tango.common.logging import initialize_logging from tango.common.testing import TangoTestCase from tango.executors.multicore_executor import MulticoreExecutor from tango.step_graph import StepGraph from tango.workspaces import LocalWorkspace from test_fixtures.package.steps import Sleep...
[ 11748, 640, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 13875, 78, 13, 11321, 13, 6404, 2667, 1330, 41216, 62, 6404, 2667, 198, 6738, 13875, 78, 13, 11321, 13, 33407, 1330, 309, 14208, 14402, 20448, 198, 6738, 13875, 78, 13, 18558, ...
3.574468
94
import cv2 import numpy as np face_classifier=cv2.CascadeClassifier('HaarCascade/haarcascade_frontalface_default.xml') cap=cv2.VideoCapture(0) count=0 while True: ret, frame=cap.read() if face_extractor(frame)is not None: count+=1 face=cv2.resize(face_extractor(frame),(200,200)) ...
[ 11748, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 2550, 62, 4871, 7483, 28, 33967, 17, 13, 34, 28966, 9487, 7483, 10786, 23303, 283, 34, 28966, 14, 3099, 5605, 28966, 62, 8534, 1604, 558, 62, 12286, 13...
2.044156
385
import time import torch from torch import nn from transformers import GPT2Tokenizer, GPT2LMHeadModel, GPT2Config import lightseq.inference as lsi from lightseq.training.ops.pytorch.quantization import ( qat_mode, QuantLinear, TensorQuantizer, weight_quant_config, ) from lightseq.training.ops.pytorch.t...
[ 11748, 640, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 6121, 364, 1330, 402, 11571, 17, 30642, 7509, 11, 402, 11571, 17, 31288, 13847, 17633, 11, 402, 11571, 17, 16934, 198, 11748, 1657, 41068, 13, 259, 4288, ...
2.792899
169
# Copyright (C) 2015-2021 Regents of the University of California # # 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 app...
[ 2, 15069, 357, 34, 8, 1853, 12, 1238, 2481, 3310, 658, 286, 262, 2059, 286, 3442, 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, ...
3.498039
255
""" 1. Clarification 2. Possible solutions - Cheat - Binary search II 3. Coding 4. Tests """ # T=O(n), S=O(1) # T=O(lgn), S=O(1)
[ 37811, 198, 16, 13, 15420, 2649, 198, 17, 13, 33671, 8136, 198, 220, 220, 220, 532, 2580, 265, 198, 220, 220, 220, 532, 45755, 2989, 2873, 198, 18, 13, 327, 7656, 198, 19, 13, 30307, 198, 37811, 628, 198, 2, 309, 28, 46, 7, 77, ...
2.043478
69
import time from unittest import TestCase import grpc_testing from grpc import StatusCode from grpc.framework.foundation import logging_pool from cowsay_client import CowsayClient from cowsay_pb2 import DESCRIPTOR as COWSAY_DESCRIPTOR, QuoteRequest, QuoteResponse from cowsay_pb2_grpc import CowsayStub target_service...
[ 11748, 640, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 1036, 14751, 62, 33407, 198, 6738, 1036, 14751, 1330, 12678, 10669, 198, 6738, 1036, 14751, 13, 30604, 13, 42526, 1330, 18931, 62, 7742, 198, 198, 6738, 22575, 32...
3.236842
114
SPEC = 'swagger.yaml' IMPLEMENTATION = 'flask' OUTPUT = 'build' FLASK_SERVER_NAME = 'my_flask_server'
[ 48451, 796, 705, 2032, 7928, 13, 88, 43695, 6, 198, 3955, 16437, 10979, 6234, 796, 705, 2704, 2093, 6, 198, 2606, 7250, 3843, 796, 705, 11249, 6, 198, 3697, 1921, 42, 62, 35009, 5959, 62, 20608, 796, 705, 1820, 62, 2704, 2093, 62, ...
2.217391
46
# coding: utf-8 """ Web API Swagger specification No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 5313, 7824, 2451, 7928, 20855, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042...
2.926829
246
from dataclasses import dataclass from typing import List from source.device_manager.database import get_database_connection,release_database_connection def get_user_scripts(user: int) -> List[Script]: scripts=[] conn = get_database_connection() with conn: with conn.cursor() as cursor: ...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 198, 6738, 2723, 13, 25202, 62, 37153, 13, 48806, 1330, 651, 62, 48806, 62, 38659, 11, 20979, 62, 48806, 62, 38659, 628, 628, 198, 4299, 651, 62, 7220, 62, ...
2.154611
1,811
#! /usr/bin/env python3 import sys import math import argparse as ap from json import dumps as jdumps from random import choices if __name__ == '__main__': main()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 10688, 198, 11748, 1822, 29572, 355, 2471, 198, 6738, 33918, 1330, 45514, 355, 474, 67, 8142, 198, 6738, 4738, 1330, 7747, 628, 628, 628, 628, 628,...
2.966667
60