content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from .alaska_temperature import AlaskaTemperature from .bmi import AlaskaTemperatureBMI __all__ = ["AlaskaTemperature", "AlaskaTemperatureBMI"]
[ 6738, 764, 282, 8480, 62, 11498, 21069, 1330, 12926, 42492, 198, 6738, 764, 65, 11632, 1330, 12926, 42492, 33, 8895, 628, 198, 834, 439, 834, 796, 14631, 2348, 8480, 42492, 1600, 366, 2348, 8480, 42492, 33, 8895, 8973, 198 ]
3.74359
39
import re t = int(input()) for i in range(0, t): chars = input() m1, m2 = [None] * len(chars), [None] * len(chars) for j in range(0, len(chars)): m1[j] = "3" if chars[j] == "4" else chars[j] m2[j] = "1" if chars[j] == "4" else "0" s1 = ''.join(m1) s2 = ''.join(m2) print("C...
[ 11748, 302, 198, 198, 83, 796, 493, 7, 15414, 28955, 220, 198, 1640, 1312, 287, 2837, 7, 15, 11, 256, 2599, 198, 220, 220, 220, 34534, 796, 5128, 3419, 198, 220, 220, 220, 285, 16, 11, 285, 17, 796, 685, 14202, 60, 1635, 18896, ...
1.843902
205
#!/usr/bin/env python # coding: utf-8 # Scraper movies data from Imdb # In[ ]: import csv import pandas as pd # Year range to collect data. # In[ ]: startYear=int(input("startYear: ")) finishYear=int(input("finishYear: ")) # File path to save. Ex: C:\Users\User\Desktop\newFile # In[ ]: filePath = input("F...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1446, 38545, 6918, 1366, 422, 1846, 9945, 198, 198, 2, 554, 58, 2361, 25, 628, 198, 11748, 269, 21370, 198, 11748, 19798, 292, 355, 279...
1.993939
825
""" @author: magician @file: descriptor_demo.py @date: 2020/1/14 """ from weakref import WeakKeyDictionary # class Exam(object): # """ # Exam # """ # def __init__(self): # self._writing_grade = 0 # self._math_grade = 0 # # @staticmethod # def _check_grade(value): # ...
[ 37811, 198, 31, 9800, 25, 42055, 198, 31, 7753, 25, 220, 220, 43087, 62, 9536, 78, 13, 9078, 198, 31, 4475, 25, 220, 220, 12131, 14, 16, 14, 1415, 198, 37811, 198, 6738, 4939, 5420, 1330, 28788, 9218, 35, 14188, 628, 198, 198, 2, ...
2.302023
692
import torch import numpy as np import torch.nn.functional as F def masked_softmax(x, m=None, axis=-1): ''' x: batch x time x hid m: batch x time (optional) ''' x = torch.clamp(x, min=-15.0, max=15.0) if m is not None: m = m.float() x = x * m e_x = torch.exp(x - torch.max(x...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198, 4299, 29229, 62, 4215, 9806, 7, 87, 11, 285, 28, 14202, 11, 16488, 10779, 16, 2599, 198, 220, 220, 220, 705, 7061, 198, 2...
2.059829
234
# -*- coding: utf-8 -*- """ create on 2019-03-20 04:17 author @lilia """ from sklearn.neighbors import KNeighborsClassifier from analysis_llt.ml.cv.base import BaseCV
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 17953, 319, 13130, 12, 3070, 12, 1238, 8702, 25, 1558, 198, 198, 9800, 2488, 75, 17517, 198, 37811, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 509, ...
2.615385
65
import threading from zds_client.oas import schema_fetcher
[ 11748, 4704, 278, 198, 198, 6738, 1976, 9310, 62, 16366, 13, 78, 292, 1330, 32815, 62, 34045, 2044, 628, 628 ]
3.15
20
""" Display tools for TTrees. """ from __future__ import annotations import dataclasses import functools from pathlib import Path from typing import Any, Dict import uproot from rich.console import Console from rich.markup import escape from rich.text import Text from rich.tree import Tree console = Console() __al...
[ 37811, 198, 23114, 4899, 329, 26653, 6037, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 4818, 330, 28958, 198, 11748, 1257, 310, 10141, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, ...
2.878238
386
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver from apps.core.models import BaseModel from apps.core.utils import HASH_MAX_LENGTH, create_hash, truncate from django.utils.encoding import python_2_unicode_compat...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 6381,...
2.811321
212
# Copyright 2019 Elasticsearch BV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ 2, 220, 15069, 13130, 48567, 12947, 347, 53, 198, 2, 198, 2, 220, 220, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 220, 220, 345, 743, 407, 779, 428, ...
3.246914
243
# Copyright 2021 Roots # # 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, softwa...
[ 2, 15069, 33448, 34341, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257...
4.056338
213
import logging from sqlalchemy import create_engine, event from configuration import config as cnf from helpers.DbHelper import on_connect, db_session, assert_database_type from models import Base, Flow # from models.depreciated import Metric logging.basicConfig() logging.getLogger('sqlalchemy.engine').setLevel(logg...
[ 11748, 18931, 198, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 1785, 198, 198, 6738, 8398, 1330, 4566, 355, 269, 77, 69, 198, 6738, 49385, 13, 43832, 47429, 1330, 319, 62, 8443, 11, 20613, 62, 29891, 11, 6818, 62, 48806, ...
3.553191
94
from tests.utils import W3CTestCase
[ 6738, 5254, 13, 26791, 1330, 370, 18, 4177, 395, 20448, 628 ]
3.363636
11
# AARD: function: __main__ # AARD: #1:1 -> :: defs: %1 / uses: [@1 4:1-4:22] { call } 'value: {}'.format(3) # AARD: @1 = constant_attribute.py
[ 2, 317, 9795, 25, 2163, 25, 11593, 12417, 834, 198, 198, 2, 317, 9795, 25, 1303, 16, 25, 16, 4613, 220, 220, 7904, 220, 825, 82, 25, 4064, 16, 1220, 3544, 25, 220, 685, 31, 16, 604, 25, 16, 12, 19, 25, 1828, 60, 220, 1391, 8...
2.054795
73
from tensorflow.python.keras.layers import Layer from tensorflow.python.keras import backend as K
[ 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 75, 6962, 1330, 34398, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 1330, 30203, 355, 509, 628 ]
3.413793
29
from typing import Container from asts.typed import Name as TypedName from asts import base, visitor, types_ as types PREDEFINED_TYPES: Container[str] = ( ",", "->", "Bool", "Float", "Int", "List", "String", "Unit", ) def resolve_type_vars( node: base.ASTNode, defined_types: ...
[ 6738, 19720, 1330, 43101, 198, 198, 6738, 257, 6448, 13, 774, 9124, 1330, 6530, 355, 17134, 276, 5376, 198, 6738, 257, 6448, 1330, 2779, 11, 21493, 11, 3858, 62, 355, 3858, 198, 198, 4805, 1961, 36, 20032, 1961, 62, 9936, 47, 1546, ...
2.498667
375
# -*- coding: utf-8 -*- """ cdist-plugin implementation. Author: Andrea Cervesato <andrea.cervesato@mailbox.org> """ import pytest from cdist import __version__ from cdist.redis import RedisResource from cdist.resource import ResourceError def pytest_addoption(parser): """ Plugin configurations. """ ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 10210, 396, 12, 33803, 7822, 13, 198, 198, 13838, 25, 198, 220, 220, 220, 23174, 327, 11184, 5549, 1279, 392, 21468, 13, 66, 11184, 5549, 31, 4529, 3524, 1...
2.424036
441
# Copyright 2015 Rackspace, 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 agreed to in writin...
[ 2, 15069, 1853, 37927, 13200, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2,...
2.676995
1,065
#!/usr/bin/python # -*- coding: utf-8 -*- from cloudshell.cli.service.cli_service_impl import CliServiceImpl from cloudshell.huawei.cli.huawei_cli_handler import HuaweiCli, HuaweiCliHandler from cloudshell.huawei.wdm.cli.huawei_command_modes import ( WDMConfigCommandMode, WDMEnableCommandMode, )
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 6279, 29149, 13, 44506, 13, 15271, 13, 44506, 62, 15271, 62, 23928, 1330, 1012, 72, 16177, 29710, 198, 6738, 6279, 29149...
2.75
112
# Generated by Django 2.2.7 on 2019-11-20 14:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 22, 319, 13130, 12, 1157, 12, 1238, 1478, 25, 940, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 142...
3.019231
52
# 4 LED 0-11 6 LED 0-59 # # LED 0 1 # # # # 3:25 # # n LED # # : # # : n = 1 # : ["1:00", "2:00", "4:00", "8:00", "0:01", "0:02", "0:04", "0:08", "0:16", "0:32"] # # # : # # # 01:00 1:00 # 10:2 10:02 # # # LeetCode # https://leetcode-cn.com/problems/binary-watch # from typing import List if __name__ ==...
[ 2, 220, 604, 220, 12365, 657, 12, 1157, 718, 220, 12365, 657, 12, 3270, 198, 2, 198, 2, 220, 12365, 220, 657, 220, 352, 198, 2, 198, 2, 198, 2, 198, 2, 220, 513, 25, 1495, 198, 2, 198, 2, 220, 299, 12365, 220, 198, 2, 198, ...
1.7713
223
from __future__ import division, print_function, absolute_import import numpy as np import torch, sys import os.path as osp from torchreid import metrics from torchreid.losses import TripletLoss, CrossEntropyLoss from torchreid.losses import ClassMemoryLoss from ..engine import Engine from ..pretrainer impo...
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 11, 25064, 201, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 201, 198, 6738, 2803...
3.193694
222
from setuptools import setup setup( name="cartotools", version="1.2.1", description="Making cartopy suit my needs", license="MIT", packages=[ "cartotools", "cartotools.crs", "cartotools.img_tiles", "cartotools.osm", ], author="Xavier Olive", install_requi...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 26674, 313, 10141, 1600, 198, 220, 220, 220, 2196, 2625, 16, 13, 17, 13, 16, 1600, 198, 220, 220, 220, 6764, 2625, 23874, 6383, 11081, 6050, 61...
2.202614
153
""" Functional testing for /models/* endpoints. """ import os import json import importlib import logging import pytest from pytest_bdd import scenario, given, then, when from fastapi.testclient import TestClient import app.main from app.tests import load_sqlalchemy_response_from_json from app.tests import load_json_fi...
[ 37811, 44224, 4856, 329, 1220, 27530, 15211, 886, 13033, 13, 198, 37811, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 1330, 8019, 198, 11748, 18931, 198, 11748, 12972, 9288, 198, 6738, 12972, 9288, 62, 65, 1860, 1330, 8883, 11, 1813,...
3.37037
189
from django.contrib import admin from Module_DeploymentMonitoring import views from django.urls import path,re_path urlpatterns = [ path('instructor/ITOperationsLab/setup/awskeys/',views.faculty_Setup_GetAWSKeys,name='itopslab_setup_AWSKeys'), path('instructor/ITOperationsLab/monitor/',views.faculty_Monitor_Ba...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 19937, 62, 49322, 434, 35479, 278, 1330, 5009, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 260, 62, 6978, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, ...
2.860783
1,099
if __name__=="__main__": obj=Akash() obj.question_answer()
[ 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 26181, 28, 33901, 1077, 3419, 198, 220, 26181, 13, 25652, 62, 41484, 3419, 198 ]
2.37037
27
from django.contrib.auth.models import User from django.db import models from mainapp.functions.search import params_to_search_string, search_string_to_params from mainapp.functions.search_notification_tools import ( params_to_human_string, params_are_equal, )
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 1388, 1324, 13, 12543, 2733, 13, 12947, 1330, 42287, 62, 1462, 62, 12947, 62, 8841, 11, 2989, 62, 884...
3.114943
87
#!/usr/bin/env python # # fatdisk.py - Unit test cases for COT.helpers.fatdisk submodule. # # March 2015, Glenn F. Matthews # Copyright (c) 2014-2017 the COT project developers. # See the COPYRIGHT.txt file at the top-level directory of this distribution # and at https://github.com/glennmatthews/cot/blob/master/COPYRIG...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 3735, 39531, 13, 9078, 532, 11801, 1332, 2663, 329, 327, 2394, 13, 16794, 364, 13, 17359, 39531, 850, 21412, 13, 198, 2, 198, 2, 2805, 1853, 11, 17551, 376, 13, 22233, 1...
3.241692
331
#!/usr/bin/env python import baxter_interface import rospy if __name__ == '__main__': rospy.init_node("set_left_arm_py") names = ['left_e0', 'left_e1', 'left_s0', 'left_s1', 'left_w0', 'left_w1', 'left_w2'] joints = [-0.8022719520640714, 1.7184419776286348, 0.21399031991001521, 0.324436936637765, 2.586291...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 275, 40864, 62, 39994, 198, 11748, 686, 2777, 88, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 686, 2777, 88, 13, 15003, 62, 17...
2.217213
244
#------------------------------------------------------------------------------ # Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # Sess...
[ 2, 10097, 26171, 198, 2, 15069, 357, 66, 8, 13130, 11, 18650, 290, 14, 273, 663, 29116, 13, 1439, 2489, 10395, 13, 198, 2, 10097, 26171, 198, 198, 2, 10097, 26171, 198, 2, 23575, 47258, 6489, 17861, 13, 9078, 198, 2, 198, 2, 7814,...
3.712363
1,189
"""Reward wrapper that gives rewards for positive change in z axis. Based on MOPO: https://arxiv.org/abs/2005.13239""" from gym import Wrapper
[ 37811, 48123, 29908, 326, 3607, 11530, 329, 3967, 1487, 287, 1976, 16488, 13, 198, 220, 220, 13403, 319, 337, 3185, 46, 25, 3740, 1378, 283, 87, 452, 13, 2398, 14, 8937, 14, 14315, 13, 1485, 23516, 37811, 198, 198, 6738, 11550, 1330, ...
3.288889
45
import matplotlib.pyplot as plt import numpy as np import cv2 from thresholding import * # list of lists img = cv2.imread("challenge_video_frames/02.jpg") #""" colorspace1 = cv2.cvtColor(img, cv2.COLOR_BGR2Luv) channels1 = [ ("L", colorspace1[:, :, 0]), ("u", colorspace1[:, :, 1]), ("v", colorspace1[:,...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 6738, 11387, 278, 1330, 1635, 198, 198, 2, 1351, 286, 8341, 628, 198, 9600, 796, 269, 85, 17, 13, 320, 961, ...
2.075
760
import signal import ConfigParser # HUP signal.signal(signal.SIGHUP, update_config) # ctrl+c signal.signal(signal.SIGINT, ctrl_c) print("test signal") get_config() while True: pass
[ 11748, 6737, 198, 11748, 17056, 46677, 628, 628, 198, 198, 2, 367, 8577, 198, 12683, 282, 13, 12683, 282, 7, 12683, 282, 13, 50, 18060, 8577, 11, 4296, 62, 11250, 8, 198, 2, 269, 14859, 10, 66, 198, 12683, 282, 13, 12683, 282, 7, ...
2.43038
79
#!/usr/bin/env python # coding: utf-8 # In[ ]: import flask from flask import request, jsonify import time import sqlite3 import random # import the necessary packages from keras.preprocessing.image import img_to_array from keras.models import load_model from keras import backend from imutils import build_montages ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 2361, 25, 628, 198, 11748, 42903, 198, 6738, 42903, 1330, 2581, 11, 33918, 1958, 198, 11748, 640, 198, 11748, 44161, 578, 18, ...
3.067073
328
from django.shortcuts import render from django.http import HttpResponseRedirect from django.contrib.auth.models import User from rest_framework import permissions, status from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.views import APIView from .serialize...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 1334, 62, 30604, 1330, 21627, ...
4.125
112
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .filter_tweets import filter_tweets_from_directories from .filter_tweets import filter_tweets_from_files from .download_tweets import get_tweets_by_user from .embed_tweets import SentenceEncoder from .embed_tweets import embed_tweets_from_file from .embed_tweets impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 24455, 62, 83, 732, 1039, 1330, 8106, 62, 83, 732, 1039, 62, 6738, 62, 12942, 1749, 198, 6738, 764, ...
2.728682
129
from django.db import models from scenarios.models import ScenarioData # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 13858, 13, 27530, 1330, 1446, 39055, 6601, 198, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.96
25
import logging from flask import Flask, render_template, request, redirect, flash, session, jsonify from flask_sqlalchemy import SQLAlchemy from flask_login import UserMixin, LoginManager, login_user, logout_user from datetime import datetime from passlib.hash import sha256_crypt import msnotifier.bot.siteMonitor as s...
[ 11748, 18931, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 11, 7644, 11, 6246, 11, 33918, 1958, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 38235, 1330, 11787, 356...
2.764238
2,265
import sys, os import gym import gym_urbandriving as uds import cProfile import time import numpy as np import pickle import skimage.transform import cv2 import IPython import pygame from random import shuffle from gym_urbandriving.agents import KeyboardAgent, AccelAgent, NullAgent, TrafficLightAgent#, RRTAgent from g...
[ 11748, 25064, 11, 28686, 198, 11748, 11550, 198, 11748, 11550, 62, 333, 3903, 380, 1075, 355, 334, 9310, 198, 11748, 269, 37046, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 1341, 9060, 13, 356...
3.418803
117
import os import tempfile import time import urllib import urllib.parse import pexpect import maccli.dao.api_instance import maccli.helper.cmd import maccli.helper.simplecache import maccli.helper.metadata from maccli.helper.exception import InstanceDoesNotExistException, InstanceNotReadyException def list_instance...
[ 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 640, 198, 11748, 2956, 297, 571, 198, 11748, 2956, 297, 571, 13, 29572, 198, 198, 11748, 613, 87, 806, 198, 198, 11748, 8352, 44506, 13, 67, 5488, 13, 15042, 62, 39098, 198, 11748, 83...
2.365847
3,414
""" The 'helpers' module provides various helper functions. """ import getpass import json import os import subprocess import sys from odml import fileio from odml.dtypes import default_values from odml.tools.parser_utils import SUPPORTED_PARSERS from .treemodel import value_model try: # Python 3 from urllib.p...
[ 37811, 198, 464, 705, 16794, 364, 6, 8265, 3769, 2972, 31904, 5499, 13, 198, 37811, 198, 198, 11748, 651, 6603, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 6738, 16298, 4029, 1330, 2393, 95...
2.545898
2,255
# Copyright 2019 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 13130, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.942623
244
import re from CGATReport.Tracker import * from CGATReport.Utils import PARAMS as P # get from config file UCSC_DATABASE = "hg19" EXPORTDIR = "export" ################################################################### ################################################################### ##############################...
[ 11748, 302, 198, 198, 6738, 29925, 1404, 19100, 13, 35694, 1330, 1635, 198, 6738, 29925, 1404, 19100, 13, 18274, 4487, 1330, 29463, 40834, 355, 350, 198, 198, 2, 651, 422, 4566, 2393, 198, 9598, 6173, 62, 35, 1404, 6242, 11159, 796, 3...
3.283668
349
from typing import List
[ 6738, 19720, 1330, 7343, 628 ]
5
5
import csv # Finding States' Laziness Rankings: # dataDict = {} with open('data.csv', 'rU') as csvfile: dataReader = csv.reader(csvfile, delimiter=',') for row in dataReader: state = row[0] row.pop(0) dataDict[state] = row projectedmeans = [] with open('rafadata.csv', 'rb') as csvfile: dataReader = csv....
[ 11748, 269, 21370, 198, 197, 197, 197, 197, 2, 27063, 1829, 6, 22807, 1272, 40284, 25, 1303, 198, 7890, 35, 713, 796, 23884, 198, 198, 4480, 1280, 10786, 7890, 13, 40664, 3256, 705, 81, 52, 11537, 355, 269, 21370, 7753, 25, 198, 197...
2.893499
2,169
#/bin/python3 import numpy as np from PIL import Image img = Image.open('checker.png') #array = 255 - array #invimg = Image.fromarray(array) #invimg.save('testgrey-inverted.png') img = Image.fromarray(process(img,0,0,0)) img.save("newchecker.png")
[ 2, 14, 8800, 14, 29412, 18, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 628, 198, 198, 9600, 796, 7412, 13, 9654, 10786, 9122, 263, 13, 11134, 11537, 198, 198, 2, 18747, 796, 14280, 532, 7177, 198, 2, 16340...
2.581633
98
import click from esque import validation from esque.cli.autocomplete import list_topics from esque.cli.helpers import edit_yaml, ensure_approval from esque.cli.options import State, default_options from esque.cli.output import pretty_topic_diffs from esque.resources.topic import copy_to_local
[ 11748, 3904, 198, 198, 6738, 1658, 4188, 1330, 21201, 198, 6738, 1658, 4188, 13, 44506, 13, 2306, 42829, 6677, 1330, 1351, 62, 4852, 873, 198, 6738, 1658, 4188, 13, 44506, 13, 16794, 364, 1330, 4370, 62, 88, 43695, 11, 4155, 62, 21064...
3.413793
87
# -*- coding: utf-8 -*- """Main entry point into euporie.""" from euporie.app import App if __name__ == "__main__": App.launch()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 13383, 5726, 966, 656, 304, 929, 19257, 526, 15931, 198, 6738, 304, 929, 19257, 13, 1324, 1330, 2034, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834,...
2.481481
54
# Original work Copyright 2018 Brainwy Software Ltda (Dual Licensed: LGPL / Apache 2.0) # From https://github.com/fabioz/pyvmmonitor-core # See ThirdPartyNotices.txt in the project root for license information. # All modifications Copyright (c) Robocorp Technologies Inc. # All rights reserved. # # Licensed under the Ap...
[ 2, 13745, 670, 15069, 2864, 14842, 21768, 10442, 19090, 6814, 357, 36248, 49962, 25, 17370, 6489, 1220, 24843, 362, 13, 15, 8, 198, 2, 3574, 3740, 1378, 12567, 13, 785, 14, 36434, 952, 89, 14, 9078, 14761, 41143, 12, 7295, 198, 2, 4...
3.12462
658
version_info = (0, 5, 2)
[ 9641, 62, 10951, 796, 357, 15, 11, 642, 11, 362, 8, 198 ]
2.083333
12
""" ``hippynn`` currently has interfaces to the following other codes: 1. ``ase`` for atomic simulation 2. ``pyseqm`` for combined ML-seqm models 3. ``schnetpack`` for usage of schnet models in ``hippynn``. This subpackage is not available by default; you must import it explicitly. """
[ 37811, 198, 198, 15506, 71, 3974, 2047, 77, 15506, 3058, 468, 20314, 284, 262, 1708, 584, 12416, 25, 198, 198, 16, 13, 7559, 589, 15506, 329, 17226, 18640, 198, 17, 13, 7559, 9078, 41068, 76, 15506, 329, 5929, 10373, 12, 41068, 76, ...
3.306818
88
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- Author: ClarkYAN -*- import requests
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 532, 9, 12, 6434, 25, 11264, 56, 1565, 532, 9, 12, 198, 198, 11748, 7007, 628 ]
2.275
40
""" use of script to create the login method use a fake account! """ from selenium import webdriver from time import sleep from bs4 import BeautifulSoup as bs
[ 37811, 198, 1904, 286, 4226, 284, 2251, 262, 17594, 2446, 198, 1904, 257, 8390, 1848, 0, 198, 37811, 198, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 640, 1330, 3993, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355,...
3.555556
45
# -*- coding: utf-8 -*- import joblib import torch import numpy as np from ntee.utils.my_tokenizer import RegexpTokenizer from ntee.utils.vocab_joint import JointVocab from ntee.utils.vocab import Vocab class PyTorchModelReader(object): def get_word_vector(self, word, default=None): index = self._vocab.g...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1693, 8019, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 660, 68, 13, 26791, 13, 1820, 62, 30001, 7509, 1330, 797, 25636, 79, 30642...
2.085754
723
from setuptools import setup import importlib version = importlib.import_module('sputr.config').version setup( name='sputr', version=version, description='Simple Python Unit Test Runner', long_description="An intuitive command line and Python package interface for Python's unit testing framework.", ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 11748, 1330, 8019, 198, 198, 9641, 796, 1330, 8019, 13, 11748, 62, 21412, 10786, 82, 1996, 81, 13, 11250, 27691, 9641, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 82, 1996, 81, 3256, ...
2.590193
571
#!/usr/bin/env python3 # Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University, ETH Zurich, and University of Washington # SPDX-License-Identifier: BSD-2-Clause import matplotlib import matplotlib.pyplot as plt import numpy as np import re #import json parse()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 2864, 12, 1238, 2481, 37754, 11, 3457, 1539, 5413, 3457, 1539, 33976, 49808, 2059, 11, 35920, 43412, 11, 290, 2059, 286, 2669, 198, 2, 30628, 55, 12, 34156, 12, 33...
3.197802
91
# -*- coding: utf-8 -*- """ oy.models.mixins.polymorphic_prop ~~~~~~~~~~ Provides helper mixin classes for special sqlalchemy models :copyright: (c) 2018 by Musharraf Omer. :license: MIT, see LICENSE for more details. """ import sqlalchemy.types as types from sqlalchemy import literal_column, ev...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 197, 198, 220, 220, 220, 35104, 13, 27530, 13, 19816, 1040, 13, 35428, 24503, 291, 62, 22930, 198, 220, 220, 220, 220, 15116, 4907, 628, 220, 220, 220, 47081, 3...
3.053571
168
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383, 7054, 37, ...
3.804196
286
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test Project Template The code below is derived from several locations: REFERENCES: REF1: https://docs.pytest.org/en/latest/contents.html REF2: https://github.com/hackebrot/pytest-cookies LOCATIONS LOC1: https://github.com/audreyr/cook...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 14402, 4935, 37350, 198, 198, 464, 2438, 2174, 318, 10944, 422, 1811, 7064, 25, 628, 220, 220, 220, 4526, ...
3.900238
842
import json from msilib.schema import Directory import pandas as pd import csv with open('./result-#succubus Drawings, Best Fan Art on pixiv, Japan-1647491083659.json', 'r',encoding="utf-8") as f: data = json.load(f) Tags_Directory = {} print(f"{len(data)}tag") n = len(data) for i in range(0,n): #print(f"idNum:{da...
[ 11748, 33918, 198, 6738, 13845, 22282, 13, 15952, 2611, 1330, 27387, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 269, 21370, 198, 198, 4480, 1280, 7, 4458, 14, 20274, 12, 2, 2385, 535, 549, 385, 15315, 654, 11, 6705, 13836, 3683...
2.248864
880
from abc import abstractmethod from typing import Dict, Tuple from curse_manager import CursesManager from telegram import TelegramBot
[ 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 198, 198, 6738, 17328, 62, 37153, 1330, 327, 46998, 13511, 198, 6738, 573, 30536, 1330, 50203, 20630, 628 ]
4.151515
33
from django import forms from django.utils.encoding import force_text from django.utils.translation import pgettext, ugettext_lazy as _ from fluent_contents.extensions import ContainerPlugin, plugin_pool, ContentItemForm from . import appsettings from .models import BootstrapRow, BootstrapColumn GRID_COLUMNS = appset...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 13, 12685, 7656, 1330, 2700, 62, 5239, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 279, 1136, 5239, 11, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, ...
2.967742
217
import logging import json from datetime import datetime, timedelta from getpass import getpass import uuid import requests from Cryptodome.PublicKey import RSA import utils NONE, SIGN, TICKET = 0, 1, 2 SERVER = 'https://appstudentapi.zhihuishu.com' SSL_VERIFY = True TAKE_EXAMS = True SKIP_FINAL_EXAM = False EXAM_AU...
[ 11748, 18931, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 651, 6603, 1330, 651, 6603, 198, 11748, 334, 27112, 198, 11748, 7007, 198, 6738, 15126, 375, 462, 13, 15202, 9218, 1330, 42319, 198, ...
2.129147
2,532
import autogl if autogl.backend.DependentBackend.is_dgl(): from ._base_feature_engineer_dgl import BaseFeatureEngineer else: from ._base_feature_engineer_pyg import BaseFeatureEngineer
[ 11748, 1960, 28678, 198, 198, 361, 1960, 28678, 13, 1891, 437, 13, 35, 8682, 7282, 437, 13, 271, 62, 67, 4743, 33529, 198, 220, 220, 220, 422, 47540, 8692, 62, 30053, 62, 18392, 263, 62, 67, 4743, 1330, 7308, 38816, 13798, 263, 198,...
2.954545
66
import os import urllib.request from flask import Flask, request, redirect, render_template, jsonify from flask import Blueprint, request, current_app as app from controllers.sc_judgment_header_ner_eval import SC_ner_annotation import json from models.response import CustomResponse from models.status import Status ner_...
[ 11748, 28686, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 18941, 11, 8543, 62, 28243, 11, 33918, 1958, 198, 6738, 42903, 1330, 39932, 11, 2581, 11, 1459, 62, 1324, 355, 598, 198, 6738, 20624, 13...
3.81
100
import sys import os import unittest import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging import numpy as np # # HandGenerator # # # HandGeneratorWidget #
[ 11748, 25064, 220, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 11748, 410, 30488, 11, 10662, 83, 11, 269, 30488, 11, 14369, 263, 198, 6738, 14369, 263, 13, 7391, 276, 8912, 540, 26796, 1330, 1635, 198, 11748, 18931, 198, 11748, ...
2.893939
66
from django.urls import path from . import views urlpatterns = [ path('movie/', views.MovieListView.as_view()), path('movie/<int:pk>/', views.MovieDetailView.as_view()), path('review/', views.ReviewCreateView.as_view()), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 41364, 14, 3256, 5009, 13, 25097, 8053, 7680, 13, 292, 62, 1177, 3419, 828, 198, 22...
2.586957
92
import re import uuid import time from typing import (Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, Union, Text) def camelcase_to_snakecase(_str: str) -> str: """camelcase_to_snakecase. Transform a camelcase string to snakecase Args: _str (str): String to apply ...
[ 11748, 302, 198, 11748, 334, 27112, 198, 11748, 640, 198, 198, 6738, 19720, 1330, 357, 7149, 11, 4889, 540, 11, 360, 713, 11, 7343, 11, 32233, 11, 309, 29291, 11, 5994, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.329493
434
#!/usr/bin/env python3 # Pesquisa binaria # Read num = int(input("Number to find the sqrt of? ")) index = 0 step = num / 2 prox = True while abs(index * index - num) > 1e-10: if (prox): index += step else: index -= step step = step / 2 if (index * index) < num: prox = True ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 38434, 421, 9160, 9874, 10312, 198, 2, 4149, 198, 22510, 796, 493, 7, 15414, 7203, 15057, 284, 1064, 262, 19862, 17034, 286, 30, 366, 4008, 198, 198, 9630, 796, 657, 198,...
2.333333
186
import pandas as pd import os import random if __name__ == '__main__': data = MakeDataset(path=r'D:\GitRepos\EIC\MathmaticalModeling\HUST-EIC-MathematicalModeling\final\NerualNetworks\Data\Preprocessed_original.xlsx')
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 4738, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1366, 796, 6889, 27354, 292, 316, 7, 6978, 28, 81, 6, 35, ...
2.549451
91
from math import sqrt from numpy import matrix from intpm import intpm A = matrix([[1, 0, 1, 0], [0, 1, 0, 1]]) b = matrix([1, 1]).T c = matrix([-1, -2, 0, 0]).T mu = 100 x1 = 0.5 * (-2 * mu + 1 + sqrt(1 + 4*mu*mu)) x2 = 0.5 * (-mu + 1 + sqrt(1 + mu * mu)) x0 = matrix([x1, x2, 1 - x1, 1 - x2]).T intpm(A, b, c, x0, ...
[ 6738, 10688, 1330, 19862, 17034, 198, 6738, 299, 32152, 1330, 17593, 198, 6738, 493, 4426, 1330, 493, 4426, 198, 198, 32, 796, 17593, 26933, 58, 16, 11, 657, 11, 352, 11, 657, 4357, 685, 15, 11, 352, 11, 657, 11, 352, 11907, 8, 19...
1.987805
164
import psycopg2 # encoding=utf-8 __author__ = 'Hinsteny' def select_data(conn): ''' :param conn: :return: ''' cur = conn.cursor() cur.execute("SELECT id, name, address, salary from COMPANY ORDER BY id ASC;") rows = cur.fetchall() for row in rows: print("ID = ", row[0]) ...
[ 11748, 17331, 22163, 70, 17, 198, 198, 2, 21004, 28, 40477, 12, 23, 198, 834, 9800, 834, 796, 705, 39, 8625, 28558, 6, 628, 628, 198, 198, 4299, 2922, 62, 7890, 7, 37043, 2599, 198, 220, 220, 220, 705, 7061, 628, 220, 220, 220, ...
2.296667
300
# # PySNMP MIB module DHCP-Server-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DHCP-SERVER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:31:49 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 43729, 12, 10697, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562, 19,...
2.671547
7,992
from cv_utils.object_detection.dataset.converter import coco_to_yolo from cv_utils.object_detection.dataset.converter import yolo_to_coco ''' COCO --> YOLO This code uses the ultralytics/yolov5 format. The converted dataset will be saved as follow: - {output_folder} - images - {output_set_name} ...
[ 6738, 269, 85, 62, 26791, 13, 15252, 62, 15255, 3213, 13, 19608, 292, 316, 13, 1102, 332, 353, 1330, 8954, 78, 62, 1462, 62, 88, 14057, 198, 6738, 269, 85, 62, 26791, 13, 15252, 62, 15255, 3213, 13, 19608, 292, 316, 13, 1102, 332,...
1.954878
820
from django.db import models from django.contrib import admin from .country import Country from .filter import Filter from .setting import Setting from .site import Site
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 19315, 1330, 12946, 198, 6738, 764, 24455, 1330, 25853, 198, 6738, 764, 33990, 1330, 25700, 198, 6738, 764, 15654, 1330, ...
4.046512
43
# -*- coding: utf-8 -*- # Copyright 2017 Chris Meyers <cmeyers@ansible.com> # # This file is part of Ansible # # Ansible 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 3 of the License, or # (...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 2177, 5180, 2185, 21200, 1279, 66, 1326, 21200, 31, 504, 856, 13, 785, 29, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 28038, 856, 198, 2, 198, 2, 280...
3.553459
318
import time from flask import render_template, flash, redirect, url_for from flask.globals import request from flask_login.utils import logout_user from werkzeug.urls import url_parse # from flask.helpers import flash # from app import app, db # app initapp from app.forms import LoginForm, RegistrationForm from fla...
[ 11748, 640, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 7644, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 42903, 13, 4743, 672, 874, 1330, 2581, 198, 6738, 42903, 62, 38235, 13, 26791, 1330, 2604, 448, 62, 7220, 198, 6738, 266, 9587, ...
3.616071
112
import math from collections import OrderedDict import json from asr_deepspeech.decoders import GreedyDecoder import os from ascii_graph import Pyasciigraph from asr_deepspeech.data.loaders import AudioDataLoader from asr_deepspeech.data.samplers import BucketingSampler from .blocks import * from asr_deepspeech.data.da...
[ 11748, 10688, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 33918, 198, 6738, 355, 81, 62, 22089, 45862, 13, 12501, 375, 364, 1330, 11955, 4716, 10707, 12342, 198, 11748, 28686, 198, 6738, 355, 979, 72, 62, 34960, 1330, 9485...
3.440678
118
n,k = [int(x) for x in input().split()] arr = [int(x) for x in input().split()] arr.sort() total = 0 for i in range(k): if arr[i] < 0: total += -arr[i] print(total)
[ 77, 11, 74, 796, 685, 600, 7, 87, 8, 329, 2124, 287, 5128, 22446, 35312, 3419, 60, 198, 3258, 796, 685, 600, 7, 87, 8, 329, 2124, 287, 5128, 22446, 35312, 3419, 60, 198, 198, 3258, 13, 30619, 3419, 198, 198, 23350, 796, 657, 198...
2.105882
85
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\ensemble\ensemble_interactions.py # Compiled at: 2016-07-13 03:28:12 # Size of source mod 2**32: 107...
[ 2, 34318, 2349, 21, 2196, 513, 13, 22, 13, 19, 198, 2, 11361, 18022, 8189, 513, 13, 22, 357, 2091, 5824, 8, 198, 2, 4280, 3361, 3902, 422, 25, 11361, 513, 13, 22, 13, 24, 357, 31499, 14, 85, 18, 13, 22, 13, 24, 25, 1485, 66,...
2.751592
157
import socket from typing import Optional, List __version__ = '0.1.0'
[ 198, 11748, 17802, 198, 6738, 19720, 1330, 32233, 11, 7343, 628, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 628, 198 ]
3
25
"""Game map resource manager.""" __all__ = ("get_map_template",) _cache = {} def get_map_template(name: str): """ Get a map template by its ``name``. Returns ``None`` if not found. Loaded :class:`MapTemplate` will be cached until the application exits. :param name: name of the map template. ...
[ 37811, 8777, 3975, 8271, 4706, 526, 15931, 198, 834, 439, 834, 796, 5855, 1136, 62, 8899, 62, 28243, 1600, 8, 198, 198, 62, 23870, 796, 23884, 628, 198, 4299, 651, 62, 8899, 62, 28243, 7, 3672, 25, 965, 2599, 198, 220, 220, 220, 3...
2.740909
220
from evaluation_framework.manager import FrameworkManager if __name__ == "__main__": evaluation_manager = FrameworkManager() evaluation_manager.evaluate( "objectFrequencyS.h5", vector_file_format="hdf5", debugging_mode=False )
[ 6738, 12660, 62, 30604, 13, 37153, 1330, 25161, 13511, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 12660, 62, 37153, 796, 25161, 13511, 3419, 198, 220, 220, 220, 12660, 62, 37153, 13, 49786, ...
3.1
80
from django.conf import settings from django.contrib import messages as django_messages from django.urls import reverse_lazy from django.utils.decorators import method_decorator from django.views.decorators.http import require_POST from django.views.generic.base import RedirectView, TemplateView from django.views.gener...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 355, 42625, 14208, 62, 37348, 1095, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, 13, 26791, 13,...
3.410959
219
from MakeYourOwnGraph import * #user needs to import this line GraphOfMyAlgo(F1,2,[1,30,2,31]) #user needs to execute this line in his or her algorithm where the first argument is the name of the Algorithm Function, here F1 #the Second argument is the number of arguments that the algor...
[ 6738, 6889, 7120, 23858, 37065, 1330, 1635, 1303, 7220, 2476, 284, 1330, 428, 1627, 628, 198, 37065, 5189, 3666, 2348, 2188, 7, 37, 16, 11, 17, 17414, 16, 11, 1270, 11, 17, 11, 3132, 12962, 1303, 7220, 2476, 284, 12260, 428, 1627, 2...
3.046392
194
# The new robopilot training pipeline.
[ 2, 383, 649, 3857, 404, 23439, 3047, 11523, 13 ]
4.222222
9
import sys from PySide2 import QtCore from PySide2 import QtWidgets from shiboken2 import wrapInstance import maya.OpenMayaUI as omui def mayaMainWindow(): """ Get maya main window as QWidget :return: Maya main window as QWidget :rtype: PySide2.QtWidgets.QWidget """ mainWindowPtr = omui.MQtUt...
[ 11748, 25064, 198, 6738, 9485, 24819, 17, 1330, 33734, 14055, 198, 6738, 9485, 24819, 17, 1330, 33734, 54, 312, 11407, 198, 6738, 427, 571, 4233, 17, 1330, 14441, 33384, 198, 11748, 743, 64, 13, 11505, 6747, 64, 10080, 355, 39030, 9019,...
2.404
250
import math from django import template from django.utils.safestring import mark_safe register = template.Library()
[ 11748, 10688, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 628, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198 ]
3.666667
33
import csv with open('texts.csv', 'r') as f: reader = csv.reader(f) texts = list(reader) with open('calls.csv', 'r') as f: reader = csv.reader(f) calls = list(reader) create_lists_of_users()
[ 11748, 269, 21370, 198, 198, 4480, 1280, 10786, 5239, 82, 13, 40664, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 9173, 796, 269, 21370, 13, 46862, 7, 69, 8, 198, 220, 220, 220, 13399, 796, 1351, 7, 46862, 8, 198, 198, ...
2.276596
94
""" [1,2,3,4] 16 . [] [1] [1, 2] [1, 2, 3] [1, 2, 3, 4] [1, 2, 4] [1, 3] [1, 3, 4] [1, 4] [2] [2, 3] [2, 3, 4] [2, 4] [3] [3, 4] [4] blank list([]) 0 (subarray sum) 80. , . Input . . Output . Sample Input 1 3 26 -14 12 4 -2 Sample Output 1 928 """ ###################### # sorting ste...
[ 37811, 198, 58, 16, 11, 17, 11, 18, 11, 19, 60, 220, 220, 220, 220, 1467, 764, 198, 198, 21737, 198, 58, 16, 60, 198, 58, 16, 11, 362, 60, 198, 58, 16, 11, 362, 11, 513, 60, 198, 58, 16, 11, 362, 11, 513, 11, 604, 60, 19...
2.147887
284
"""Command line interface to the fastlite package """ import sys import argparse from .fastalite import fastalite, fastqlite, Opener from . import __version__ if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
[ 37811, 21575, 1627, 7071, 284, 262, 3049, 36890, 5301, 198, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 6738, 764, 7217, 282, 578, 1330, 3049, 282, 578, 11, 3049, 13976, 578, 11, 8670, 877, 198, 6738, 764, 1330, ...
2.935065
77
""" *Major Key* """ from abc import ABCMeta from ._key import ModedKey
[ 37811, 628, 220, 220, 220, 1635, 24206, 7383, 9, 198, 198, 37811, 198, 198, 6738, 450, 66, 1330, 9738, 48526, 198, 198, 6738, 47540, 2539, 1330, 3401, 276, 9218, 628 ]
2.666667
30
"""Simple python clients for the Gravitate BestBuy Services""" __version__ = "0.1.18" from .fc import get_fc_service from .ims import get_ims_service
[ 37811, 26437, 21015, 7534, 329, 262, 32599, 12027, 6705, 14518, 6168, 37811, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 16, 13, 1507, 1, 198, 6738, 764, 16072, 1330, 651, 62, 16072, 62, 15271, 198, 6738, 764, 12078, 1330, 651, 62, ...
3.282609
46
#!/usr/bin/python3 # -*- coding: utf-8 -*- from libGamePiratesAndFishers import assertIfIsWeelFormat,makeSureThatIsnumberLimited
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 9195, 8777, 46772, 689, 1870, 37, 39116, 1330, 6818, 1532, 3792, 1135, 417, 26227, 11, 15883, 19457, 2504, 3792...
2.804348
46
#!/usr/bin/env python3 """ Author : FabrizioPe Date : 2021-02-10 Purpose: Find and replace vowels in a given text """ import argparse import os # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Apple...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 13838, 1058, 14236, 47847, 952, 6435, 198, 10430, 220, 220, 1058, 33448, 12, 2999, 12, 940, 198, 30026, 3455, 25, 9938, 290, 6330, 23268, 1424, 287, 257, 1813, 2420, 19...
2.325301
664
import pandas as pd from openpyxl import worksheet def format_name(name: str) -> str: """ Limpa espaos antes e depois da palavra Nome em caps lock para evitar case sensitive """ name = name.strip() name = name.upper() return name
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1280, 9078, 87, 75, 1330, 2499, 25473, 628, 198, 198, 4299, 5794, 62, 3672, 7, 3672, 25, 965, 8, 4613, 965, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7576, 8957, 15024, 7495, 18...
2.64
100
from django.core.mail import send_mail from django.http import Http404 from django.shortcuts import render, redirect from django.contrib import messages from django.contrib.auth.models import User from django.utils.datastructures import MultiValueDictKeyError from django.utils import timezone from django.contrib.auth i...
[ 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 3758, 62, 4529, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 62...
2.256674
2,922
def fixAnchorMidroll(newAdDuration=61, oldAdDuration=0): '''For fixing issue #8: https://github.com/critrolesync/critrolesync.github.io/issues/8''' anchor_podcast_episodes = data[1]['episodes'][19:] for ep in anchor_podcast_episodes: if 'timestampsBitrate' in ep: # need to adjust for n...
[ 198, 4299, 4259, 2025, 354, 273, 22622, 2487, 7, 3605, 2782, 26054, 28, 5333, 11, 1468, 2782, 26054, 28, 15, 2599, 198, 220, 220, 220, 705, 7061, 1890, 18682, 2071, 1303, 23, 25, 3740, 1378, 12567, 13, 785, 14, 22213, 305, 829, 1336...
1.96732
612
# Adafruit CircuitPython 2.2.0 # Adafruit CircuitPlayground Express import board ; import neopixel; import time pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=.2) pixels.fill((0,0,0)) pixels.show() blue(); pixels.show(); time.sleep(0.7); magenta(); pixels.show(); time.sleep(1.4); pixels.fill((0,0,0)); p...
[ 2, 1215, 1878, 4872, 13588, 37906, 362, 13, 17, 13, 15, 198, 2, 1215, 1878, 4872, 13588, 11002, 2833, 10604, 198, 198, 11748, 3096, 2162, 1330, 497, 404, 7168, 26, 1330, 640, 198, 79, 14810, 796, 497, 404, 7168, 13, 8199, 78, 40809,...
2.601563
128
# Generated by Django 2.1.15 on 2021-03-15 15:04 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 1314, 319, 33448, 12, 3070, 12, 1314, 1315, 25, 3023, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32