content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
#importing necessary libraries import numpy as np import pandas as pd import string import streamlit as st header = st.container() dataset = st.container() fearure = st.container() model_training = st.container() with header: st.title("Emotion detection using Text") with dataset: st.header("Emotion Detect...
[ 2, 11748, 278, 3306, 12782, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 4731, 198, 198, 11748, 4269, 18250, 355, 336, 198, 198, 25677, 796, 336, 13, 34924, 3419, 198, 19608, 292, 316...
2.581162
1,497
#!/usr/bin/env python # -*- coding:utf-8 -*- SECRET_KEY = 'some secret key' TEMPLATES_AUTO_RELOAD = True PROJECT_NAME = 'SpiderManage' # Redis Config REDIS_HOST = '120.25.227.8' REDIS_PORT = 6379 REDIS_PASSWORD = 'xuxinredis' # SQLite # SQLALCHEMY_DATABASE_URI = 'sqlite:///C:/Users/sheep3/workplace/SpiderManage/data.d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 23683, 26087, 62, 20373, 796, 705, 11246, 3200, 1994, 6, 198, 51, 3620, 6489, 29462, 62, 39371, 46, 62, 16448, 41048,...
2.177419
248
from PyPrometheusQueryClient import PrometheusQueryClient import json from pathlib import Path from datetime import datetime
[ 6738, 9485, 24129, 36916, 20746, 11792, 1330, 42696, 20746, 11792, 198, 11748, 33918, 220, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4818, 8079, 1330, 4818, 8079 ]
4.62963
27
import pytest import os import json import jsonschema from ruamel.yaml import YAML
[ 11748, 12972, 9288, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 44804, 684, 2395, 2611, 198, 6738, 7422, 17983, 13, 88, 43695, 1330, 575, 2390, 43, 628 ]
3.111111
27
import vkrpg
[ 11748, 410, 38584, 6024, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
1.615385
13
import secrets from flask import Flask , render_template , url_for , send_from_directory from flaskprediction import app from flaskprediction.utils.predict import Predictor from flaskprediction.forms import CarDetailsForm , TitanicDetailsForm , BostonDetailsForm , HeightDetailsForm, CatImageForm from PIL import Imag...
[ 11748, 13141, 198, 198, 6738, 42903, 1330, 46947, 837, 8543, 62, 28243, 837, 19016, 62, 1640, 837, 3758, 62, 6738, 62, 34945, 220, 220, 198, 6738, 42903, 28764, 2867, 1330, 598, 198, 6738, 42903, 28764, 2867, 13, 26791, 13, 79, 17407, ...
2.974895
239
import requests import re from time import sleep from datetime import datetime import shutil import elasticsearch2 from elasticsearch_dsl import Search, Q from collections import OrderedDict from sqlalchemy import create_engine from subprocess import Popen, PIPE, STDOUT import shlex import glob import csv # from api...
[ 198, 198, 11748, 7007, 198, 11748, 302, 198, 6738, 640, 1330, 3993, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 4423, 346, 198, 11748, 27468, 12947, 17, 198, 6738, 27468, 12947, 62, 67, 6649, 1330, 11140, 11, 1195, 198, 6738, ...
3.663717
113
import enum import re import lxml.html from typing import Any, Dict, List, Union, Optional from typing import TYPE_CHECKING if TYPE_CHECKING: from .atserver import AternosServer DAT_PREFIX = 'Data:' DAT_GR_PREFIX = 'Data:GameRules:' # checking timezone format tzcheck = re.compile(r'(^[A-Z]\w+\/[A-Z]\w+...
[ 11748, 33829, 201, 198, 11748, 302, 201, 198, 11748, 300, 19875, 13, 6494, 201, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 4479, 11, 32233, 201, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 201, 198, 201, 198, 361, ...
2.494681
188
from __future__ import print_function import unittest import numpy as np from openmdao.api import Problem, Group, pyOptSparseDriver, DirectSolver, SqliteRecorder from dymos import Phase from dymos.utils.indexing import get_src_indices_by_row from dymos.phases.components import ControlInterpComp from CADRE.odes_dym...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1280, 9132, 5488, 13, 15042, 1330, 20647, 11, 4912, 11, 12972, 27871, 50, 29572, 32103, 11, 4128, ...
2.19408
5,405
from deso.utils import getUserJWT import requests
[ 6738, 748, 78, 13, 26791, 1330, 651, 12982, 41, 39386, 198, 11748, 7007, 628 ]
3.642857
14
# This file is executed on every boot (including wake-boot from deepsleep) import esp esp.osdebug(None) import wifi wifi.connect(repl=False) import gc gc.collect()
[ 2, 770, 2393, 318, 10945, 319, 790, 6297, 357, 8201, 7765, 12, 18769, 422, 2769, 42832, 8, 198, 198, 11748, 15024, 198, 9774, 13, 418, 24442, 7, 14202, 8, 198, 198, 11748, 43121, 198, 86, 22238, 13, 8443, 7, 35666, 28, 25101, 8, 1...
3.072727
55
import pytest from app.models import AVScanResult
[ 11748, 12972, 9288, 198, 6738, 598, 13, 27530, 1330, 14661, 33351, 23004, 628, 628, 628, 198 ]
3.5
16
# -*- coding: utf-8 -*- """Activate virtualenv for current interpreter: Source: https://github.com/pypa/virtualenv Use exec(open(this_file).read(), {'__file__': this_file}). """ import os import site import sys try: abs_file = os.path.abspath(__file__) except NameError: raise AssertionError( "You must...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 25526, 378, 7166, 24330, 329, 1459, 28846, 25, 198, 7416, 25, 3740, 1378, 12567, 13, 785, 14, 79, 4464, 64, 14, 32844, 24330, 198, 198, 11041, 2452, 7, 9654, 7,...
2.608059
546
from sqlalchemy import create_engine from sqlalchemy import ( Table, Column, Integer, String, Text, Boolean, ForeignKey, Enum, DateTime ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, backref, sessionmaker Session = sessionmaker() Model = declarative_base() ...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 1330, 357, 198, 220, 220, 220, 8655, 11, 29201, 11, 34142, 11, 10903, 11, 8255, 11, 41146, 11, 198, 220, 220, 220, 8708, 9218, 11, 2039, 388, 11, 7536, 75...
3.222222
207
from keychain import Keychain
[ 6738, 1994, 7983, 1330, 7383, 7983, 198 ]
4.285714
7
# PYTHON STANDARD LIBRARY IMPORTS --------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import deque from collections import OrderedDict from math import radians from math import pi from operator import...
[ 2, 350, 56, 4221, 1340, 49053, 9795, 45651, 49, 13153, 30023, 33002, 20368, 32501, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6...
1.853216
77,917
# from binary_tree import * # # root = Node(8) # # root.insert(3) # root.insert(10) # root.insert(1) # root.insert(6) # root.insert(4) # root.insert(7) # root.insert(14) # root.insert(13) # node, parent = root.lookup(6) # print(node, parent) # root.print_tree() # # root.delete(10) # # root.print_tree() import tkinter...
[ 2, 422, 13934, 62, 21048, 1330, 1635, 198, 2, 198, 2, 6808, 796, 19081, 7, 23, 8, 198, 2, 198, 2, 6808, 13, 28463, 7, 18, 8, 198, 2, 6808, 13, 28463, 7, 940, 8, 198, 2, 6808, 13, 28463, 7, 16, 8, 198, 2, 6808, 13, 28463, ...
2.70566
265
import requests import json from concurrent.futures import ProcessPoolExecutor as Executor from concurrent.futures import ThreadPoolExecutor from time import sleep, time from couchbase.bucket import Bucket from cbagent.collectors import Latency, Collector from logger import logger from perfrunner.helpers.misc impor...
[ 11748, 7007, 198, 11748, 33918, 198, 198, 6738, 24580, 13, 69, 315, 942, 1330, 10854, 27201, 23002, 38409, 355, 8393, 38409, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 198, 6738, 640, 1330, 3993, 11, 640,...
3.636364
154
from jnpr.junos import Device from jnpr.junos.utils.config import Config clean_routing_table()
[ 6738, 474, 77, 1050, 13, 29741, 418, 1330, 16232, 198, 6738, 474, 77, 1050, 13, 29741, 418, 13, 26791, 13, 11250, 1330, 17056, 628, 198, 27773, 62, 81, 13660, 62, 11487, 3419, 628 ]
2.969697
33
""" Author : vakhet at gmail.com This script gets all your NPC names from the original rAthena folder and updates their lines in navi_npc_krpri.lub wherever matches the map_name and coords """ import re import os import random import sqlite3 NPC_match = r'^[\w\d_]+,\d+,\d+,\d+\tscript\t[\w\d_ -]+#*[...
[ 37811, 201, 198, 220, 220, 220, 6434, 1058, 410, 461, 3202, 379, 308, 4529, 13, 785, 201, 198, 201, 198, 1212, 4226, 3011, 477, 534, 15888, 3891, 422, 262, 2656, 374, 2953, 831, 64, 9483, 201, 198, 392, 5992, 511, 3951, 287, 6812, ...
2.170552
815
from rpicarserver import ext
[ 6738, 374, 16564, 945, 18497, 1330, 1070, 198 ]
3.625
8
"""Test nest diagnostics.""" from typing import Any from .conftest import ComponentSetup from tests.common import MockConfigEntry from tests.components.diagnostics import get_diagnostics_for_config_entry THERMOSTAT_TYPE = "sdm.devices.types.THERMOSTAT"
[ 37811, 14402, 16343, 6689, 34558, 526, 15931, 198, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 764, 1102, 701, 395, 1330, 35100, 40786, 198, 198, 6738, 5254, 13, 11321, 1330, 44123, 16934, 30150, 198, 6738, 5254, 13, 5589, 3906, 13, 4...
3.394737
76
import pandas as pd import numpy as np df = pd.read_csv('poblacion.csv') pd.options.display.float_format = '{:,.1f}'.format df = pd.read_csv('poblacion.csv') df['year'] = pd.Categorical(df['year'].apply(str)) idx_filtro = df['Country'].isin(['Mexico','Panama']) df_filtro_country = df[idx_filtro] df_filtro_country =df...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 79, 45292, 49443, 13, 40664, 11537, 198, 30094, 13, 25811, 13, 13812, 13, 22468, 62, 18982, 796, 705, 90, 25, 3...
2.376068
234
from django.contrib.auth.models import User from django.db import models
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 628, 198 ]
3.347826
23
# # Py-Alpha-AMD Registration Framework # Author: Johan Ofverstedt # Reference: Fast and Robust Symmetric Image Registration Based on Distances Combining Intensity and Spatial Information # # Copyright 2019 Johan Ofverstedt # # Permission is hereby granted, free of charge, to any person obtaining a copy of this softwa...
[ 198, 2, 198, 2, 9485, 12, 38077, 12, 28075, 24610, 25161, 198, 2, 6434, 25, 16053, 272, 3226, 332, 30679, 83, 198, 2, 20984, 25, 12549, 290, 3851, 436, 1632, 3020, 19482, 7412, 24610, 13403, 319, 4307, 1817, 14336, 3191, 2558, 6377, ...
3.92
350
# Generated by Django 3.0.8 on 2020-07-28 12:46 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 23, 319, 12131, 12, 2998, 12, 2078, 1105, 25, 3510, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from math import factorial n = int(input('Digite um nmero, para obter seu fatorial: ')) print('{}! {}'.format(n, factorial(n)))
[ 6738, 10688, 1330, 1109, 5132, 198, 77, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 299, 647, 78, 11, 31215, 909, 353, 384, 84, 277, 21592, 25, 705, 4008, 198, 4798, 10786, 90, 92, 0, 220, 23884, 4458, 18982, 7, 77, 11, 1109, 51...
2.6875
48
#!/usr/bin/env python3 from setuptools import setup, Extension setup( ext_modules=[ Extension('bloom._hashc', ['bloom/_hashcmodule.c']) ])
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 27995, 198, 198, 40406, 7, 198, 220, 220, 220, 1070, 62, 18170, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 27995, 10786, 2436, 4...
2.453125
64
#!/usr/bin/env python3 import atexit import logging import os import random import subprocess import sys import time import msgpack logger = logging.getLogger(__name__) def unmsgpack(ob): "convert dict from msgpack.loads() with byte string keys to text string keys" if isinstance(ob, dict): od = {} ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 379, 37023, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 31456, 8002, 198, 198, 64...
1.859532
598
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------------------------------------------------- # INFO: # ----------------------------------------------------------------------------------------------------------------------- """ Author: Evan Hub...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 16529, 3880, 19351, 6329, 198, 2, 24890, 25, 198, 2, 16529, 3880, 19351, 6329, 198, 198, 37811, 198, 13838, 2...
2.467292
4,479
#!/usr/bin/env python # -*- coding: utf-8 -*- import random from python_hll.hlltype import HLLType from python_hll.hll import HLL from python_hll.serialization import SerializationUtil """Unit tests for BitVector.""" def test_add_basic(): """ Tests basic set semantics of ``HLL.add_raw()``. """ # Ad...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4738, 198, 198, 6738, 21015, 62, 71, 297, 13, 71, 297, 4906, 1330, 367, 3069, 6030, 198, 6738, 21015, 62,...
2.370867
2,087
from weixin.utils.WeiXinUtils import * # 5.main() # 5.main() if __name__ == '__main__': # names = input("") # hours = int(input("")) # minutes = int(input("")) # number = input("") # hello(names, hours, minutes, number) names = input("") hours = int(input("")) minutes = int(input("...
[ 6738, 356, 844, 259, 13, 26791, 13, 1135, 72, 55, 259, 18274, 4487, 1330, 1635, 628, 198, 2, 642, 13, 12417, 3419, 628, 198, 2, 642, 13, 12417, 3419, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 22...
1.763756
1,363
from .models import Dealer from .models import Employee from .models import Customer from .models import Medicine from .models import Purchase from django.shortcuts import render from django.db import IntegrityError
[ 6738, 764, 27530, 1330, 44480, 198, 6738, 764, 27530, 1330, 36824, 198, 6738, 764, 27530, 1330, 22092, 198, 6738, 764, 27530, 1330, 11558, 198, 6738, 764, 27530, 1330, 27637, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 673...
3.920635
63
from django.shortcuts import render from .models import Profile # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 764, 27530, 1330, 13118, 220, 198, 198, 2, 13610, 534, 5009, 994, 13, 628, 220 ]
3.76
25
# Generated by Django 3.0.4 on 2021-03-20 12:41 import phone_field.models from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 19, 319, 33448, 12, 3070, 12, 1238, 1105, 25, 3901, 198, 198, 11748, 3072, 62, 3245, 13, 27530, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.945946
37
#!/usr/bin/env python # coding=utf-8 ''' Author: Shuangchi He / Yulv Email: yulvchi@qq.com Date: 2022-01-28 14:21:09 Motto: Entities should not be multiplied unnecessarily. LastEditors: Shuangchi He LastEditTime: 2022-04-06 11:40:23 FilePath: /Model_Inference_Deployment/src/PyTorch2ONNX/PyTorch2ONNX_Run_in_ONNX_RUNTIME...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 7061, 6, 198, 13838, 25, 32344, 648, 11072, 679, 1220, 575, 377, 85, 198, 15333, 25, 331, 377, 85, 11072, 31, 38227, 13, 785, 198, 10430, 25, 3316...
2.277778
2,070
import numpy as np import tensorflow as tf from sklearn.model_selection import StratifiedKFold # Set dataset seed np.random.seed(seed=842102) if __name__ == "__main__": dataset = Dataset();
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 29186, 1431, 42, 37, 727, 198, 198, 2, 5345, 27039, 9403, 198, 37659, 13, 25120, 13, 28826, 7, 28826, 28, 23...
2.882353
68
# -*- coding: utf-8 -*- """ Created on Thu Oct 15 14:03:52 2015 @author: jemanjohnson """ import numpy as np import matplotlib.pyplot as plt import os import scipy.io from sklearn import preprocessing from time import time from sklearn.preprocessing import MinMaxScaler # Image Reshape Function def img_as_array(img...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 2556, 1315, 1478, 25, 3070, 25, 4309, 1853, 198, 198, 31, 9800, 25, 474, 8463, 30686, 1559, 198, 37811, 198, 198, 11748, 299, 32152, 355, ...
2.358173
832
""" Tests for the finsignia.gae.controllers module. """ import os import sys from finsignia.gae import loader import unittest def test_cases(): return [ApplicationControllerTest, ResourceControllerTest] if '__main__' == __name__: unittest.main()
[ 37811, 198, 51, 3558, 329, 262, 957, 12683, 544, 13, 25002, 13, 3642, 36667, 8265, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 957, 12683, 544, 13, 25002, 1330, 40213, 198, 198, 11748, 555, 715, 395, 198...
3.109756
82
from tweepypoll.tweepypoll import visualize_poll import pandas as pd import altair as alt def test_visualize_poll(): """Test visualize_poll on a dictionary input""" sample_poll_obj = [ { "text": "Important research!!!", "duration": 1440, "date": "2022-01-22T04:01:0...
[ 6738, 4184, 538, 4464, 692, 13, 83, 732, 538, 4464, 692, 1330, 38350, 62, 30393, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 5988, 958, 355, 5988, 628, 198, 4299, 1332, 62, 41464, 1096, 62, 30393, 33529, 198, 220, 220, 220, 37...
2.362187
878
""" Avahi Network Service Scripting """ import Queue import threading import avahi, dbus, gobject from dbus import DBusException from dbus.mainloop.glib import DBusGMainLoop __all__ = ["QuiltAvahiServer", "QuiltAvahiClient"] TYPE = '_quilt._tcp' from threading import Thread
[ 37811, 220, 198, 220, 220, 220, 5184, 32810, 7311, 4809, 12327, 278, 198, 37811, 198, 11748, 4670, 518, 198, 11748, 4704, 278, 198, 11748, 1196, 32810, 11, 288, 10885, 11, 48484, 752, 198, 6738, 288, 10885, 1330, 360, 16286, 16922, 220,...
2.927835
97
from appium import webdriver from .utils import PATH desired_caps = dict( platformName='Android', platformVersion='10', automationName='uiautomator2', deviceName='Android Emulator', app=PATH('app/ApiDemos-debug.apk.zip') ) driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
[ 6738, 598, 1505, 1330, 3992, 26230, 198, 198, 6738, 764, 26791, 1330, 46490, 628, 198, 8906, 1202, 62, 27979, 796, 8633, 7, 198, 220, 220, 220, 3859, 5376, 11639, 25934, 3256, 198, 220, 220, 220, 3859, 14815, 11639, 940, 3256, 198, 22...
2.823009
113
import json import os import argparse HOME = os.environ['HOME']+'/results/' parser = argparse.ArgumentParser(description="Python script generates the SCFiles using MSPIDs") parser.add_argument("-m", "--mspids", nargs="+", required=True, help="1 or more MSPIDs") parser.add_argument("-n", "--networkId", metavar='', req...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 39069, 796, 28686, 13, 268, 2268, 17816, 39069, 20520, 10, 26488, 43420, 14, 6, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 37906, 4226, ...
2.979866
149
import re #Regular expression library from django import forms from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.template import RequestContext from django.contrib.auth.forms import AuthenticationForm from catalogue.models import Submitted from models import...
[ 11748, 302, 220, 220, 1303, 40164, 5408, 5888, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, ...
3.547009
234
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F """ modified by zyl 2021/3/2 """ # class BatchMultiHeadGraphAttention(nn.Module): # """ # graph attetion layer(GAL) # """ # def __init__(self, n_head, f_in, f_out, attn_dropout, bias=True): # supe...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 628, 198, 198, 37811, 198, 220, 220, 220, 9518, 416, 1976, 2645, 33448, 14, 18, 14, ...
1.775221
3,737
#!/usr/bin/python # # Generates ipfixtypes.hh from IPFIX spec and schema # # Copyright (c) 2006 Mazu Networks, Inc. # # $Id: ipfixtypes.py,v 1.1 2006/05/12 16:43:44 eddietwo Exp $ # import xml.dom.minidom import sys import time def main(): if len(sys.argv) < 2: print "Usage: %s [OPTION]... [FILE]..." % sy...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 2980, 689, 20966, 69, 6346, 9497, 13, 12337, 422, 6101, 47084, 1020, 290, 32815, 198, 2, 198, 2, 15069, 357, 66, 8, 4793, 21625, 84, 27862, 11, 3457, 13, 198, 2, 198, 2, 720,...
2.245044
1,261
import enum
[ 11748, 33829, 628 ]
4.333333
3
# -*- coding: utf-8 -*- ''' Created on 24 Aug 2010 @author: Matthew Wilcoxson functions convert from one value to another in the form: def conversion(value): #do something return new_value ''' import time
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 41972, 319, 1987, 2447, 3050, 198, 198, 31, 9800, 25, 9308, 5187, 40359, 1559, 198, 198, 12543, 2733, 10385, 422, 530, 1988, 284, 1194, 287, 262, 1296, 2...
2.92
75
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2018 QiaoPeng. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any l...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 554, 574, 952, 13, 198, 2, 15069, 357, 34, 8, 2864, 45724, 47, 1516, 13, 198, 2, 198, 2, 554, 574, 952, 318, 1479, 3788, 26,...
3.385666
293
from absl import app from absl import flags from absl import logging import csv import importlib import numpy as np import os.path as path import random from sklearn.model_selection import train_test_split import time from transformations.reader.matrix import test_argument_and_file, load_and_log import transformations...
[ 6738, 2352, 75, 1330, 598, 198, 6738, 2352, 75, 1330, 9701, 198, 6738, 2352, 75, 1330, 18931, 198, 11748, 269, 21370, 198, 11748, 1330, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 13, 6978, 355, 3108, 198, 11748, 4738, ...
3.074074
567
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Jan 10 09:45:23 2018 @author: www.github.com/GustavZ """ import os import sys import numpy as np from rod.config import Config from rod.helper import get_model_list, check_if_optimized_model from rod.model import ObjectDetectionModel, DeepLabModel RO...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2365, 838, 7769, 25, 2231, 25, 1954, 2864, 198, 198, 31, 9800, 25, 7324, 13, 12567,...
2.544828
725
# Copyright 2021, Robotics Lab, City College of New York # 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 ...
[ 2, 15069, 33448, 11, 47061, 3498, 11, 2254, 5535, 286, 968, 1971, 198, 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, ...
2.599515
824
import sys
[ 11748, 25064, 628 ]
4
3
from bs4 import BeautifulSoup from ricecooker.classes import nodes
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 6738, 11464, 27916, 263, 13, 37724, 1330, 13760, 628, 198 ]
3.5
20
from __future__ import absolute_import, division, print_function import six.moves.cPickle as pickle from glob import glob import os import pytest from dxtbx.model import Experiment, ExperimentList from dxtbx.model.experiment_list import ExperimentListFactory, \ ExperimentListDumper, ExperimentListDict # def test_...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 2237, 13, 76, 5241, 13, 66, 31686, 293, 355, 2298, 293, 198, 6738, 15095, 1330, 15095, 198, 11748, 28686, 198, 198, 11748, 12972, 9288, 198...
3.090909
275
from sys import argv if __name__=="__main__": make_new_reference_files(argv[1], argv[2], argv[3], argv[4])
[ 6738, 25064, 1330, 1822, 85, 198, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 220, 220, 787, 62, 3605, 62, 35790, 62, 16624, 7, 853, 85, 58, 16, 4357, 1822, 85, 58, 17, 4357, 1822, 85, 58, 18, 4357, 1822...
2.24
50
"""Module which defines collaborating app ids. This module is used by: settings.py scripts/deploy.sh """ import os # List of (playground appid, mimic app id, playground app id alias) _APP_ID_TUPLES = [ # production environment ('try-appengine', 'shared-playground', 'cloud-playground'), # developmen...
[ 37811, 26796, 543, 15738, 38152, 598, 220, 2340, 13, 198, 198, 1212, 8265, 318, 973, 416, 25, 198, 220, 6460, 13, 9078, 198, 220, 14750, 14, 2934, 1420, 13, 1477, 198, 37811, 628, 198, 11748, 28686, 628, 198, 2, 7343, 286, 357, 1759...
2.666667
444
# 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 # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
2.26258
4,372
from sys import modules from importlib import import_module modules['server'] = import_module('src') from werkzeug.serving import run_simple from server.app import App from server.mode import Mode if __name__=='__main__': app = App(mode=Mode.Development) run_simple('localhost', 8000, app, use_reloader=Tr...
[ 6738, 25064, 1330, 13103, 201, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 201, 198, 18170, 17816, 15388, 20520, 796, 1330, 62, 21412, 10786, 10677, 11537, 201, 198, 201, 198, 6738, 266, 9587, 2736, 1018, 13, 31293, 1330, 1057, 62, 36...
3.037383
107
""" An abstraction layer for metadata fetchers. Supports both syncronous and asyncronous fetchers with cache. """ from .logs import get_log import os import requests from .constants import config from datetime import datetime from collections import deque import six from concurrent import futures import traceback fr...
[ 37811, 198, 198, 2025, 34651, 7679, 329, 20150, 11351, 3533, 13, 45267, 1111, 17510, 1313, 516, 290, 30351, 1313, 516, 11351, 3533, 351, 12940, 13, 198, 198, 37811, 198, 198, 6738, 764, 6404, 82, 1330, 651, 62, 6404, 198, 11748, 28686, ...
3.602041
196
from pychonet.EchonetInstance import EchonetInstance
[ 6738, 12972, 354, 36823, 13, 36, 354, 36823, 33384, 1330, 412, 354, 36823, 33384, 198 ]
3.533333
15
from IPython.core.magic import Magics, magics_class, line_cell_magic from sys import stdout from os import linesep from os.path import join, expanduser from adlmagics.version import adlmagics_version from adlmagics.converters.dataframe_converter import DataFrameConverter from adlmagics.utils.json_file_persister impo...
[ 6738, 6101, 7535, 13, 7295, 13, 32707, 1330, 2944, 873, 11, 2153, 873, 62, 4871, 11, 1627, 62, 3846, 62, 32707, 198, 6738, 25064, 1330, 14367, 448, 198, 6738, 28686, 1330, 3951, 538, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 4292, ...
3.035264
794
import asyncio import json from datetime import datetime, timedelta from aiohttp import web from .utils import read_body, get_week_times, get_formatted_time from ..data.models import RunRow from ..data.postgres_async_db import AsyncPostgresDB import logging
[ 11748, 30351, 952, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 6738, 764, 26791, 1330, 1100, 62, 2618, 11, 651, 62, 10464, 62, 22355, 11, 651, 62, 687, 1689...
3.453333
75
# -*- coding: utf-8 -*- from setup_teardown import start_db, stop_db from nose.tools import * from pykt import KyotoTycoon, KTException
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 9058, 62, 660, 446, 593, 1330, 923, 62, 9945, 11, 2245, 62, 9945, 198, 6738, 9686, 13, 31391, 1330, 1635, 198, 6738, 12972, 21841, 1330, 36298, 25492, 20912, 11, ...
2.914894
47
import Resources import Colors import pygame screen = None # Base class for drawable objects # Created from image and coordinates, stores image and rect
[ 198, 11748, 13864, 198, 11748, 29792, 198, 198, 11748, 12972, 6057, 198, 198, 9612, 796, 6045, 198, 198, 2, 7308, 1398, 329, 3197, 540, 5563, 198, 2, 15622, 422, 2939, 290, 22715, 11, 7000, 2939, 290, 13621, 198 ]
4.131579
38
import re import datetime import bs4 from typing import Dict, Tuple, Optional, TYPE_CHECKING, ClassVar, Pattern, cast, Match, Any from .base import BaseMangaExtractor, MangaExtractorData from ..constants import STATUS_IDS, CENSOR_IDS if TYPE_CHECKING: from ..ext_info import ExternalInfo
[ 11748, 302, 198, 11748, 4818, 8079, 198, 198, 11748, 275, 82, 19, 198, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 11, 32233, 11, 41876, 62, 50084, 2751, 11, 5016, 19852, 11, 23939, 11, 3350, 11, 13225, 11, 4377, 198, 198, 673...
3.193548
93
#!/usr/bin/env python3 import os.path import threading from .. import cryptfile from ..util import * from ..client import create_client from ..syncdir import FsProvider, FsListener
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 13, 6978, 198, 11748, 4704, 278, 198, 198, 6738, 11485, 1330, 8194, 7753, 198, 6738, 11485, 22602, 1330, 1635, 198, 6738, 11485, 16366, 1330, 2251, 62, 16366, 198, 6738...
3.345455
55
#!/usr/bin/env python ####################################################### # Copyright (c) 2018, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ###############################...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 14468, 4242, 21017, 198, 2, 15069, 357, 66, 8, 2864, 11, 15690, 13543, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2393, 318, 9387, 739, 513, 12, 565, 682, 347,...
3.09589
219
import numpy as np from scipy.linalg import sqrtm from sklearn.preprocessing import StandardScaler
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 75, 1292, 70, 1330, 19862, 17034, 76, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 628 ]
3.333333
30
#!/usr/bin/env python3 # encoding: utf-8 """ fake-registration-server.py Created by nano on 2018-11-22. Copyright (c) 2018 VTRUST. All rights reserved. """ import tornado.web import tornado.locks from tornado.options import define, options, parse_command_line define("port", default=80, help="run on the given port", t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 30706, 12, 2301, 33397, 12, 15388, 13, 9078, 198, 41972, 416, 38706, 319, 2864, 12, 1157, 12, 1828, 13, 198, 15269, 357, 66, 8,...
2.778926
484
import numpy as np import fast_carpenter.summary.binning_config as mgr from . import dummy_binning_descriptions as binning
[ 11748, 299, 32152, 355, 45941, 198, 11748, 3049, 62, 66, 5117, 9255, 13, 49736, 13, 8800, 768, 62, 11250, 355, 285, 2164, 198, 6738, 764, 1330, 31548, 62, 8800, 768, 62, 20147, 1968, 507, 355, 9874, 768, 628, 628, 628, 198 ]
3.146341
41
from __future__ import division from constants import * import numpy as np import os precueITIs = np.random.exponential(standard_parameters['mean_iti_precue'], standard_parameters['n_targets']) + standard_parameters['min_iti_precue'] np.save('ITIs/precueITIs.npy',precueITIs) postcueITIs = np.random.exponential(standa...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 38491, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 3866, 15509, 2043, 3792, 796, 45941, 13, 25120, 13, 11201, 35470, 7, 20307, 62, 17143, 7307, 17816, 32604,...
2.738776
245
''' PUT FUNCTION HERE !! Author Davinci '''
[ 7061, 6, 198, 30076, 29397, 4177, 2849, 15698, 37867, 198, 198, 13838, 2544, 259, 979, 198, 7061, 6, 628 ]
2.421053
19
# Implementation of the Set ADT container using a Python list. # An iterator for the Set ADT.
[ 2, 46333, 286, 262, 5345, 5984, 51, 9290, 1262, 257, 11361, 1351, 13, 198, 198, 2, 1052, 41313, 329, 262, 5345, 5984, 51, 13, 198 ]
3.8
25
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
input() S=input() dot=S.count(".") ans=dot count=0 for s in S: if s=="#":count+=1 else:dot-=1 ans=(min(ans,count+dot)) print(ans)
[ 15414, 3419, 198, 50, 28, 15414, 3419, 198, 26518, 28, 50, 13, 9127, 7203, 19570, 198, 504, 28, 26518, 198, 9127, 28, 15, 198, 1640, 264, 287, 311, 25, 198, 220, 220, 220, 611, 264, 855, 1, 2, 1298, 9127, 47932, 16, 198, 220, 22...
1.985915
71
from flask import (Blueprint, abort, flash, redirect, render_template, request, url_for) from flask_login import current_user, login_required from app import db from app.billing.forms import CreateBillingForm from app.models import Billing from sqlalchemy import desc billing = Blueprint('billing', ...
[ 6738, 42903, 1330, 357, 14573, 4798, 11, 15614, 11, 7644, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19016, 62, 1640, 8, 198, 6738, ...
3.160377
106
""" Author: Ryan Faulkner Date: October 19th, 2014 Container for mashup logic. """ import json import random from sqlalchemy.orm.exc import UnmappedInstanceError from flickipedia.redisio import DataIORedis from flickipedia.model.articles import ArticleModel, ArticleContentModel from flickipedia.config ...
[ 37811, 198, 220, 220, 220, 6434, 25, 6047, 44760, 74, 1008, 198, 220, 220, 220, 7536, 25, 220, 220, 3267, 678, 400, 11, 1946, 628, 220, 220, 220, 43101, 329, 30407, 929, 9156, 13, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 4738...
2.251296
4,051
from bluedot import BlueDot from gpiozero import PWMLED from signal import pause led = PWMLED(27) bd = BlueDot() bd.when_moved = set_brightness pause()
[ 6738, 698, 1739, 313, 1330, 4518, 35, 313, 198, 6738, 27809, 952, 22570, 1330, 44141, 5805, 1961, 198, 6738, 6737, 1330, 14985, 198, 198, 992, 796, 44141, 5805, 1961, 7, 1983, 8, 198, 17457, 796, 4518, 35, 313, 3419, 198, 17457, 13, ...
2.75
56
from django.urls import path from . import views app_name = 'blog' urlpatterns = [ path('', views.post_list, name='post_list'), path('<slug:post>/',views.post_detail,name="post_detail"), path('comment/reply/', views.reply_page, name="reply"), path('tag/<slug:tag_slug>/',views.post_list, name='post_tag...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 14036, 6, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 7353, 62, 4868, 11, 1438, ...
2.503817
131
import os from tempfile import TemporaryDirectory import codecs import logging from grizzled.file.includer import * from grizzled.os import working_directory from grizzled.text import strip_margin import pytest
[ 11748, 28686, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 11748, 40481, 82, 198, 11748, 18931, 198, 6738, 46307, 992, 13, 7753, 13, 259, 758, 263, 1330, 1635, 198, 6738, 46307, 992, 13, 418, 1330, 1762, 62, 34945, 198, 6738, 46307,...
3.944444
54
from output.models.nist_data.list_pkg.unsigned_short.schema_instance.nistschema_sv_iv_list_unsigned_short_min_length_2_xsd.nistschema_sv_iv_list_unsigned_short_min_length_2 import NistschemaSvIvListUnsignedShortMinLength2 __all__ = [ "NistschemaSvIvListUnsignedShortMinLength2", ]
[ 6738, 5072, 13, 27530, 13, 77, 396, 62, 7890, 13, 4868, 62, 35339, 13, 43375, 62, 19509, 13, 15952, 2611, 62, 39098, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 4868, 62, 43375, 62, 19509, 62, 1084, 62, 13664, 62, 17, 62, ...
2.553571
112
from django.conf.urls import url from simple.localsite.views import example urlpatterns = [ url(r'example/', example), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 2829, 13, 17946, 874, 578, 13, 33571, 1330, 1672, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 20688, 14, 3256, 1672, 828, 198, ...
2.822222
45
from django.test import TestCase from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase from tbconnect.models import TBCheck, TBTest from userprofile.models import Hea...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 2448, 3411, 198, 6738, 42625, 14208,...
3.66129
124
import nltk import random from preprocess import compile_corpus from nltk.translate import IBMModel1, AlignedSent, Alignment def get_rand_sent(): ''' Redirect the standard output of the program -- i.e. the random sentences -- and transfer it over to the appropriate file. From there we will take a lo...
[ 11748, 299, 2528, 74, 198, 11748, 4738, 198, 6738, 662, 14681, 1330, 17632, 62, 10215, 79, 385, 198, 6738, 299, 2528, 74, 13, 7645, 17660, 1330, 19764, 17633, 16, 11, 978, 3916, 31837, 11, 978, 16747, 628, 198, 4299, 651, 62, 25192, ...
2.586826
334
from os import environ, path from .server import Server from .config import configure
[ 6738, 28686, 1330, 551, 2268, 11, 3108, 198, 198, 6738, 764, 15388, 1330, 9652, 198, 6738, 764, 11250, 1330, 17425, 628 ]
4.190476
21
# -*- coding: utf-8 -*- from checker.backends import BaseBackend from checker import logger log = logger.getLogger(__name__)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 2198, 263, 13, 1891, 2412, 1330, 7308, 7282, 437, 198, 6738, 2198, 263, 1330, 49706, 198, 198, 6404, 796, 49706, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8...
2.782609
46
import os import re from time import time from vial import vfunc, vim from vial.fsearch import get_files from vial.utils import get_projects, redraw MAX_FILESIZE = 10 * 1024 * 1024
[ 11748, 28686, 198, 11748, 302, 198, 198, 6738, 640, 1330, 640, 198, 198, 6738, 410, 498, 1330, 410, 20786, 11, 43907, 198, 6738, 410, 498, 13, 69, 12947, 1330, 651, 62, 16624, 198, 6738, 410, 498, 13, 26791, 1330, 651, 62, 42068, 11...
3.1
60
# -*- coding: utf-8 -*- """ Unit tests for new Project/Flight data classes, including JSON serialization/de-serialization """ import time from datetime import datetime from typing import Tuple from uuid import uuid4 from pathlib import Path import pytest import pandas as pd from dgp.core import DataType from dgp.cor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 26453, 5254, 329, 649, 4935, 14, 43069, 1366, 6097, 11, 1390, 19449, 198, 46911, 1634, 14, 2934, 12, 46911, 1634, 198, 37811, 198, 11748, 640, 198, 6738...
3.255556
180
from django.conf.urls import include, url from rest_framework.documentation import include_docs_urls from examples.rest import router from .views import index urlpatterns = [ url(r'^$', index, name='index'), url(r'^', include(router.urls)), url(r'^dynamicforms/', include('dynamicforms.urls')), url(r'^...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 1334, 62, 30604, 13, 22897, 341, 1330, 2291, 62, 31628, 62, 6371, 82, 198, 198, 6738, 6096, 13, 2118, 1330, 20264, 198, 6738, 764, 33571, 1330, 6376, 198, ...
2.818841
138
"""Test cases for concepts.""" from typing import Any import pytest import requests
[ 37811, 14402, 2663, 329, 10838, 526, 15931, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 12972, 9288, 198, 11748, 7007, 628 ]
4.095238
21
''' Mostly these are internal imports related to django and rest_framework. The os and io imports are for creating files, paths and parsing bytes objects respectively ''' from django.db import models from django.contrib.auth.models import User from rest_framework.renderers import JSONRenderer from rest_framework.par...
[ 7061, 6, 220, 198, 6943, 306, 777, 389, 5387, 17944, 3519, 284, 42625, 14208, 290, 1334, 62, 30604, 13, 198, 464, 28686, 290, 33245, 17944, 389, 329, 4441, 3696, 11, 13532, 290, 32096, 9881, 5563, 8148, 220, 198, 7061, 6, 198, 198, ...
2.740741
540
#! /usr/bin/python # coding=utf-8 import struct import os import hashlib import Instruction Access_Flag = {'public': 1, 'private': 2, 'protected': 4, 'static': 8, 'final': 0x10, 'synchronized': 0x20, 'volatile': 0x40, 'bridge': 0x40, 'transient': 0x80, 'varargs': 0x80, 'native': ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 201, 198, 2, 19617, 28, 40477, 12, 23, 201, 198, 11748, 2878, 201, 198, 11748, 28686, 201, 198, 11748, 12234, 8019, 201, 198, 11748, 46486, 201, 198, 201, 198, 15457, 62, 34227, 796, 1391, 6, ...
2.22981
1,845
from rest_framework import serializers from api.models import User, UserProfile, Post, News, Video from datetime import datetime
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 40391, 13, 27530, 1330, 11787, 11, 11787, 37046, 11, 2947, 11, 3000, 11, 7623, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 628 ]
4.125
32
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 16529, 30934, 198, 2, 15069, 357, 66, 8, 2321, 3899, 28238, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2...
3.581583
619
import markovify import re import nltk import os import urllib.request from shutil import copyfile # We need a temporary(ish) place to store the data we retrieve. # If you are running this in a docker container you may want to mount a volume and use it. # Also be sure to make a symlink between it and the assets direc...
[ 11748, 1317, 709, 1958, 198, 11748, 302, 198, 11748, 299, 2528, 74, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 13, 25927, 198, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 198, 2, 775, 761, 257, 8584, 7, 680, 8, 1295, 284, 3650,...
2.832139
1,674
import environs env = environs.Env() env.read_env() from wsgi_microservice_middleware.cors import CORSMiddleware from wsgi_microservice_middleware.request_id import ( RequestIdFilter, RequestIdMiddleware, current_request_id, RequestIdJsonLogFormatter ) __all__ = [ 'CORSMiddleware', 'Re...
[ 11748, 17365, 343, 684, 198, 198, 24330, 796, 17365, 343, 684, 13, 4834, 85, 3419, 198, 24330, 13, 961, 62, 24330, 3419, 198, 198, 6738, 266, 82, 12397, 62, 24055, 15271, 62, 27171, 1574, 13, 66, 669, 1330, 23929, 12310, 2509, 1574, ...
2.482558
172
import turtle as t import random COLORS = ["red", "orange", "yellow", "green", "blue", "purple"] STARTING_MOVE_DISTANCE = 5 MOVE_INCREMENT = 1
[ 11748, 28699, 355, 256, 198, 11748, 4738, 198, 198, 25154, 20673, 796, 14631, 445, 1600, 366, 43745, 1600, 366, 36022, 1600, 366, 14809, 1600, 366, 17585, 1600, 366, 14225, 1154, 8973, 198, 2257, 7227, 2751, 62, 11770, 6089, 62, 35, 880...
2.654545
55
""" Advent of code 2021 day 05 / 2 """ import math from os import path import re from collections import Counter def solution(data): """ Solution to the problem """ lines = preprocess(data) solver = Code(lines) return solver.solve() if __name__ == "__main__": with(open(path.join(path.dirname(...
[ 37811, 33732, 286, 2438, 33448, 1110, 8870, 1220, 362, 37227, 198, 198, 11748, 10688, 198, 6738, 28686, 1330, 3108, 198, 11748, 302, 198, 6738, 17268, 1330, 15034, 628, 628, 198, 4299, 4610, 7, 7890, 2599, 198, 220, 220, 220, 37227, 281...
2.80137
146
""" Tissue Corrections ================== """ ################################################################################################### # .. _tutorial_removing_autoflourescence: # # Removing autofluorescence # ========================= # # In addition to the bright spots (signal) that we want to detect, micr...
[ 37811, 198, 51, 21949, 40526, 198, 4770, 855, 198, 37811, 198, 198, 29113, 29113, 29113, 21017, 198, 2, 11485, 4808, 83, 44917, 62, 2787, 5165, 62, 2306, 1659, 75, 280, 411, 43696, 25, 198, 2, 198, 2, 3982, 5165, 1960, 1659, 2290, 4...
3.749077
542