content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# _*_ coding: utf-8 _*_ """ @copyright Copyright (c) 2014 Submit Consulting @author Angel Sullon (@asullom) @package home Descripcion: Implementacion de los controladores de la app home """ from django.utils.translation import ugettext as _ from django.shortcuts import render from django.http import HttpRes...
[ 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 37811, 198, 31, 22163, 4766, 220, 220, 15069, 357, 66, 8, 1946, 39900, 41005, 198, 31, 9800, 220, 220, 220, 220, 220, 3905, 311, 724, 261, 4275, 292, 724, 296, 8, ...
2.722449
245
from collections import defaultdict from msg import Message from plyer import notification import time import requests import sys # DO NOT COMMIT FILES WITH CREDENTIALS. Modify variables below as necessary. email = 'EMAIL' password = 'PASSWORD' notification_flag = True # receivers_carriers = [('000-000-0000', 'carrie...
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 31456, 1330, 16000, 198, 6738, 35960, 263, 1330, 14483, 198, 11748, 640, 198, 11748, 7007, 198, 11748, 25064, 220, 198, 198, 2, 8410, 5626, 22240, 2043, 34020, 1546, 13315, 8740, 1961, 3525, 1257...
2.707527
930
from ._base import BodyComponent from ..helpers import parse_int, widthParser from ..lib import merge_dicts __all__ = ['MjDivider']
[ 198, 6738, 47540, 8692, 1330, 12290, 21950, 198, 6738, 11485, 16794, 364, 1330, 21136, 62, 600, 11, 9647, 46677, 198, 6738, 11485, 8019, 1330, 20121, 62, 11600, 82, 628, 198, 834, 439, 834, 796, 37250, 44, 73, 24095, 1304, 20520, 628 ]
3.317073
41
import keras.backend as K
[ 11748, 41927, 292, 13, 1891, 437, 355, 509 ]
3.125
8
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 33160, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.418504
2,313
from .printfn import PrintFn from .printlnfn import PrintlnFn from .readfn import ReadFn
[ 6738, 764, 4798, 22184, 1330, 12578, 37, 77, 198, 6738, 764, 35235, 22184, 1330, 12578, 18755, 37, 77, 198, 6738, 764, 961, 22184, 1330, 4149, 37, 77, 198 ]
3.178571
28
""" This is is a part of the DeepLearning.AI TensorFlow Developer Professional Certificate offered on Coursera. All copyrights belong to them. I am sharing this work here to showcase the projects I have worked on Course: Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning ...
[ 201, 198, 37811, 201, 198, 1212, 318, 318, 257, 636, 286, 262, 10766, 41730, 13, 20185, 309, 22854, 37535, 23836, 18612, 27895, 4438, 319, 2734, 2655, 64, 13, 201, 198, 201, 198, 3237, 2243, 49158, 5594, 284, 606, 13, 314, 716, 7373, ...
2.755459
1,145
""" Copyright 2020 Fazt Community ~ All rights reserved. MIT license. """ from typing import List from discord import Color, Embed, Role, TextChannel from discord.ext.commands import Bot, Cog, Context, group, has_permissions from .. import crud from ..enums import GuildSetting from ..utils import to_code_list_str ch...
[ 37811, 198, 15269, 12131, 376, 1031, 83, 8108, 5299, 1439, 2489, 10395, 13, 17168, 5964, 13, 198, 37811, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 36446, 1330, 5315, 11, 13302, 276, 11, 20934, 11, 8255, 29239, 198, 6738, 36446, 13, ...
3.077844
167
if __name__=='__main__':main() """3 0 1 1 2 2 0"""
[ 201, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 12417, 3419, 201, 198, 201, 198, 37811, 18, 201, 198, 15, 352, 201, 198, 16, 362, 201, 198, 17, 657, 37811, 201, 198 ]
1.714286
35
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
4.141463
205
import numpy as np import os os.chdir('C:/Users/DELL/Desktop/Luis/Pset2') import matplotlib.pyplot as plt import test3 as ks ks_g = ks.K_S(Gam = 2, state='bad') Structure, Lgrid = ks_g.r_w_update() N = Structure['Intensive Margin Policy'] K = Structure['Optimal Choice Capital'] plt.plot(K)
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 418, 13, 354, 15908, 10786, 34, 14079, 14490, 14, 7206, 3069, 14, 36881, 14, 25596, 271, 14, 47, 2617, 17, 11537, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 35...
2.388889
126
# Imports from 3rd party libraries import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import dash_table import plotly.express as px import pandas as pd # Imports from this application from app import app...
[ 2, 1846, 3742, 422, 513, 4372, 2151, 12782, 198, 11748, 14470, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 39...
2.048264
10,484
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup setup( name='words', version='1.0', description='Words has two functions: verify if a given word is a palindrome, and to spell check in ptbr a word or phrase', author='Bruno Casella', author_email='brunocasella@gmail.com', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 10879, 3256, 198, 220, ...
2.35782
422
from turtle import * from snake import * from random import *
[ 6738, 28699, 1330, 1635, 198, 6738, 17522, 1330, 1635, 198, 6738, 4738, 1330, 1635, 628 ]
4.2
15
if __name__ == "__main__": print(generate_nth_primes(10001)[-1:][0])
[ 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 8612, 378, 62, 77, 400, 62, 1050, 999, 7, 3064, 486, 38381, 12, 16, 25, 7131, 15, 12962, 198 ]
2.027027
37
import logging import numpy as np import pandas as pd from ConfigSpace.hyperparameters import CategoricalHyperparameter, \ UniformFloatHyperparameter, UniformIntegerHyperparameter __author__ = "Marius Lindauer" __license__ = "BSD" class FeatureGroupFiltering(object): ''' based on the selected featur...
[ 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 17056, 14106, 13, 49229, 17143, 7307, 1330, 327, 2397, 12409, 38197, 17143, 2357, 11, 3467, 198, 220, 220, 220, 35712, 43879, 3...
2.140741
1,890
from django.shortcuts import render, redirect from django.contrib.auth.models import Permission from django.urls import reverse def index(request): """ A view to return the index page """ user = request.user # Check if user has already logged in and redirect to the payment page if unpaid or to definitio...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 2448, 3411, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 628, 198, 4299, 6376, 7, 25927, 2599, 198, ...
3.258373
209
from i2b2tools.helpers.utils import has_overlapping_phi from i2b2tools.lib.standoff_annotations import StandoffAnnotation from i2b2tools.converters.common import * from lxml import etree """Potential Improvements: - These conversions follow the same pattern over and over, it could potentially be abstracted. - LBJ out...
[ 6738, 1312, 17, 65, 17, 31391, 13, 16794, 364, 13, 26791, 1330, 468, 62, 2502, 75, 5912, 62, 34846, 198, 6738, 1312, 17, 65, 17, 31391, 13, 8019, 13, 1481, 2364, 62, 34574, 602, 1330, 5751, 2364, 2025, 38983, 198, 6738, 1312, 17, ...
2.503774
1,590
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from layers import * from data import v2_512 import os class SSD(nn.Module): """Single Shot Multibox Architecture The network is composed of a base VGG network followed by the added multibox conv layers....
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 11685, 1330, 1635, 198, 6738, 1366, 1330, 410, 17, 62, 25836, ...
2.126718
1,673
from app.database.conn import db from app.database.schema import Users def test_create_get_apikey(client, session, login): """ 레버 로그인 :param client: :param session: :return: """ key = dict(user_memo="ryan__key") res = client.post("api/user/apikeys", json=key, headers=login) res_bod...
[ 6738, 598, 13, 48806, 13, 37043, 1330, 20613, 198, 6738, 598, 13, 48806, 13, 15952, 2611, 1330, 18987, 628, 198, 4299, 1332, 62, 17953, 62, 1136, 62, 499, 522, 88, 7, 16366, 11, 6246, 11, 17594, 2599, 198, 220, 220, 220, 37227, 198,...
2.401674
239
import logging import time from brewtils import parameter, system, Plugin __version__ = "3.0.0.dev0" @system if __name__ == "__main__": main()
[ 11748, 18931, 198, 11748, 640, 198, 198, 6738, 9059, 83, 4487, 1330, 11507, 11, 1080, 11, 42636, 198, 198, 834, 9641, 834, 796, 366, 18, 13, 15, 13, 15, 13, 7959, 15, 1, 628, 198, 31, 10057, 628, 198, 198, 361, 11593, 3672, 834, ...
2.701754
57
from tests import JsonFixture from forecastiowrap.models import Location
[ 6738, 5254, 1330, 449, 1559, 37, 9602, 198, 6738, 11092, 72, 322, 2416, 13, 27530, 1330, 13397, 198 ]
4.055556
18
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import onnx import numpy as np from onnx.helper import make_graph, make_model, make_tensor_value_info import pytest from openvino.frontend import FrontEndManager from tests.runtime import get_runtime # FrontEndManager sh...
[ 2, 15069, 357, 34, 8, 2864, 12, 1238, 1828, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 28686, 198, 11748, 319, 77, 87, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 319...
2.513742
473
from speaksee.data import TextField import os, sys sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) from data import FlickrDetectionField, FlickrControlSetField_Verb from data.dataset import FlickrEntities from speaksee.data import DataLoader, DictionaryDataset, RawField from models import S...
[ 6738, 2740, 3826, 13, 7890, 1330, 8255, 15878, 198, 11748, 28686, 11, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753...
1.758208
6,183
# j'importe les modules que je vais utiliser par la suite import datetime import typing # typing contient des objets pour indiquer à l'éditeur de texte/code quels sont les types de variable import requests # requests est un module qui doit être téléchargé avec pip # c'est juste un type de variable qui ne peux c...
[ 2, 474, 6, 11748, 68, 10287, 13103, 8358, 11223, 410, 15152, 7736, 5847, 1582, 8591, 18389, 198, 11748, 4818, 8079, 198, 11748, 19720, 220, 1303, 19720, 542, 1153, 748, 26181, 1039, 12797, 773, 1557, 263, 28141, 300, 6, 2634, 67, 578, ...
2.752312
1,514
import logging import torch.nn.functional as F from torch.distributions import Normal import numpy as np import torch from demotivational_policy_descent.agents.agent_interface import AgentInterface from demotivational_policy_descent.agents.policy_gradient import PolicyGradient from demotivational_policy_descent.utils....
[ 11748, 18931, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 17080, 2455, 507, 1330, 14435, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 1357, 313, 452, 864, 62, 30586, 62, 8906, 1087,...
3.783505
97
# Generated by Django 3.2.7 on 2021-10-13 05:30 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 940, 12, 1485, 8870, 25, 1270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/env python3 import sys import os import argparse import subprocess import textwrap import helpers def parser(default_args, args): """Return parsed command line arguments.""" parser = argparse.ArgumentParser( description=( 'Extracts the results of the NGWF CG optimisation steps ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 2420, 37150, 198, 11748, 49385, 628, 198, 198, 4299, 30751, 7, 12286, 62, 22046, 11, 264...
2.151578
1,458
from rest_framework import serializers
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 628, 198 ]
4.555556
9
if __name__ == "__main__": with open("test2.in", "r") as f: lines = f.readlines() data = [[int(term) for term in line.strip().split()] for line in lines] n, m = data[0] next, output = [], [] for i in range(1, n + 1): next.append(data[i][0:m]) output.append(data[i][m:]) comp = [[1 for i in range(n)] for ...
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 4480, 1280, 7203, 9288, 17, 13, 259, 1600, 366, 81, 4943, 355, 277, 25, 198, 197, 197, 6615, 796, 277, 13, 961, 6615, 3419, 628, 197, 7890, 796, 16410, 600, 7...
2.09068
397
# [Stone Colossus] Risen from Stone GUWARU = 2210011 sm.setSpeakerID(GUWARU) sm.flipDialogue() sm.sendNext("Greetings #h0#! Can you hear me? Have you spoken with the colossus?\r\n" "#b(It sounds like Guwaru. You tell him all about the Stone Colossus.)") sm.flipDialogue() sm.sendSay("The birth of this cre...
[ 2, 685, 34346, 44920, 60, 371, 13254, 422, 8026, 198, 198, 38022, 16279, 52, 796, 31566, 405, 1157, 198, 198, 5796, 13, 2617, 5248, 3110, 2389, 7, 38022, 16279, 52, 8, 198, 5796, 13, 2704, 541, 41099, 3419, 198, 5796, 13, 21280, 100...
3.291845
466
from itertools import cycle from random import choice from time import time from C4Board import C4Board from C4_MCTSAgent import C4_MCTSAgent import matplotlib.pyplot as plt import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description='Connect4 Human vs AI (Monte Carlo Tree Search)') pars...
[ 6738, 340, 861, 10141, 1330, 6772, 198, 6738, 4738, 1330, 3572, 198, 6738, 640, 1330, 640, 198, 6738, 327, 19, 29828, 1330, 327, 19, 29828, 220, 198, 6738, 327, 19, 62, 44, 4177, 4090, 6783, 1330, 327, 19, 62, 44, 4177, 4090, 6783, ...
2.987745
408
# mock import json from fastapi.encoders import jsonable_encoder with open('mock.json', 'r') as f: db = json.load(f) # from typing import Optional from fastapi import FastAPI, Query, HTTPException from pydantic import BaseModel tags_metadata = [ { "name": "Tasks", "description": "Tasks related fe...
[ 2, 15290, 198, 11748, 33918, 198, 6738, 3049, 15042, 13, 12685, 375, 364, 1330, 33918, 540, 62, 12685, 12342, 198, 198, 4480, 1280, 10786, 76, 735, 13, 17752, 3256, 705, 81, 11537, 355, 277, 25, 20613, 796, 33918, 13, 2220, 7, 69, 8...
2.708371
1,111
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/core/io/location.proto """Generated protocol buffer code.""" # third party from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _r...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 44876, 14, 7295, 14, 952, 14, 24886, 13, 1676, 1462, 198, 37811, 8645, 5...
2.152215
1,603
year = int(input("Which year do you want to check? ")) #Rules: on every year that is evenly divisible by 4, except every year that is evenly divisible by 100, unless the year is also evenly divisible by 400` #Ex: The year 2000: #2000 ÷ 4 = 500 (Leap) #2000 ÷ 100 = 20 (Not Leap) #2000 ÷ 400 = 5 (Leap!) #So the year 2000...
[ 1941, 796, 493, 7, 15414, 7203, 13828, 614, 466, 345, 765, 284, 2198, 30, 366, 4008, 198, 2, 37766, 25, 319, 790, 614, 326, 318, 21894, 2659, 12843, 416, 604, 11, 2845, 790, 614, 326, 318, 21894, 2659, 12843, 416, 1802, 11, 4556, ...
2.742105
190
from pvfree.settings import * # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'testserver'] # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases # PSQL_PSWD = get_secret('PSQL_PSWD', '.postgre') DATABASES = { 'default...
[ 6738, 279, 85, 5787, 13, 33692, 1330, 1635, 198, 198, 2, 10729, 4261, 9050, 39410, 25, 836, 470, 1057, 351, 14257, 2900, 319, 287, 3227, 0, 198, 30531, 796, 6407, 198, 198, 7036, 3913, 1961, 62, 39, 10892, 50, 796, 37250, 36750, 325...
2.209205
239
import datetime import json from typing import Any, Callable, List, Optional, Tuple from ee.clickhouse.client import sync_execute from posthog.models import Team from posthog.queries.base import BaseQuery from posthog.queries.session_recording import DistinctId from posthog.queries.session_recording import SessionReco...
[ 11748, 4818, 8079, 198, 11748, 33918, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 7343, 11, 32233, 11, 309, 29291, 198, 198, 6738, 304, 68, 13, 12976, 4803, 13, 16366, 1330, 17510, 62, 41049, 198, 6738, 1281, 31897, 13, 27530, 13...
2.654867
452
import numpy as np import os import torch import gym import pickle # from ppo.PPO import PPO, Memory # from ppo.utils import ReplayBuffer from env_exp import SocTwoEnv from MADDPG import Maddpg from memory import ReplayMemory from copy import deepcopy import time from torch.distributions import Categorical import tenso...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 11550, 198, 11748, 2298, 293, 198, 2, 422, 279, 7501, 13, 10246, 46, 1330, 350, 16402, 11, 14059, 198, 2, 422, 279, 7501, 13, 26791, 1330, 23635, 28632, ...
2.712
750
# -*- coding:utf-8 -*- import os def check(dirname): """This function creates a directory in case it doesn't exist""" if not os.path.exists(dirname): os.makedirs(dirname) return dirname # The project directory EVAL_DIR = os.path.dirname(os.path.realpath(__file__)) # Folder with datasets #D...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 628, 198, 4299, 2198, 7, 15908, 3672, 2599, 198, 220, 220, 220, 37227, 1212, 2163, 8075, 257, 8619, 198, 220, 220, 220, 287, 1339, 340, 1595, 470, 2152, ...
2.583099
355
from rest_framework.decorators import action from rest_framework import viewsets, status from utils.permissions import IsRememberAccount from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from .models import Device from .serializers import DeviceSerializer from apis.acco...
[ 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 2223, 198, 6738, 1334, 62, 30604, 1330, 5009, 1039, 11, 3722, 198, 6738, 3384, 4487, 13, 525, 8481, 1330, 1148, 16676, 30116, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 1148, 47...
4.481013
79
import silbot from silbot.helper import InlineKBMarkup, inlineKBRow, inlineKBData, inlineKBUrl, replyKeyboard, replyKBRow, replyKBbutton token = "12345:sadsfsdfsdfsd" # Put bot token here bot = silbot.botapi.BotApi(token, "HTML") r, response = bot.getMe() if not response.ok: print("Error, wrong bot Token") ...
[ 11748, 3313, 13645, 198, 6738, 3313, 13645, 13, 2978, 525, 1330, 554, 1370, 22764, 9704, 929, 11, 26098, 42, 11473, 322, 11, 26098, 22764, 6601, 11, 26098, 22764, 28165, 11, 10971, 9218, 3526, 11, 10971, 42, 11473, 322, 11, 10971, 22764...
2.673077
156
from __future__ import annotations from jsonclasses import jsonclass @jsonclass(validate_all_fields=True)
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 33918, 37724, 1330, 33918, 4871, 628, 198, 31, 17752, 4871, 7, 12102, 378, 62, 439, 62, 25747, 28, 17821, 8, 198 ]
3.724138
29
# Tests for the brainviewer script. # # These tests require the package `pytest-console-scripts`. import os import pytest import tempfile import shutil THIS_DIR = os.path.dirname(os.path.abspath(__file__)) TEST_DATA_DIR = os.path.join(THIS_DIR, os.pardir, 'test_data')
[ 2, 30307, 329, 262, 3632, 1177, 263, 4226, 13, 198, 2, 198, 2, 2312, 5254, 2421, 262, 5301, 4600, 9078, 9288, 12, 41947, 12, 46521, 44646, 198, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 20218, 7753, 198, 11748, 4423, 346...
2.808081
99
#!/bin/python3 import math import os import random import re import sys # # Complete the 'sherlockAndAnagrams' function below. # # The function is expected to return an INTEGER. # The function accepts STRING s as parameter. # if __name__ == '__main__': # fptr = open(os.environ['OUTPUT_PATH'], 'w') # q = int(input...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 25064, 198, 198, 2, 198, 2, 13248, 262, 705, 82, 372, 5354, 1870, 2025, 6713, 82, 6, 2163, 2174, 13, 198, 2, ...
2.520408
196
import logging import logging.config import datetime from libs import os_get_env as os_lib from libs import traf_tester as remote_libs from configobj import ConfigObj from argparse import ArgumentParser logging.config.fileConfig('conf/logging.ini') logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) a...
[ 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 11748, 4818, 8079, 198, 6738, 9195, 82, 1330, 28686, 62, 1136, 62, 24330, 355, 28686, 62, 8019, 198, 6738, 9195, 82, 1330, 1291, 69, 62, 4879, 353, 355, 6569, 62, 8019, 82, 198, 6738, ...
3.184564
298
from os import listdir from os import path import codecs
[ 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 1330, 3108, 198, 11748, 40481, 82, 198 ]
3.8
15
from ptb import get_leaves_with_labels from collections import Counter def token_freq(trees): """ Collect token frequency statistics from trees >>> trees = [(1, (1, (2, 'a'), (3, 'b')), (1, (1, 'c'), (2, 'd'))), \ (1, (1, (2, 'b'), (3, 'b')), (1, (1, 'c'), (2, 'a')))] >>> token_freq(trees...
[ 6738, 42975, 65, 1330, 651, 62, 293, 3080, 62, 4480, 62, 23912, 1424, 201, 198, 6738, 17268, 1330, 15034, 201, 198, 201, 198, 4299, 11241, 62, 19503, 80, 7, 83, 6037, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, ...
2.169884
259
# -*- coding:utf-8 -*- """ @Author:Charles Van @E-mail: williananjhon@hotmail.com @Time:2019-08-12 15:18 @Project:InterView_Book @Filename:String7.py @description: 正则表达式引擎的设计和实施 """ ''' 题目描述: 一个简单的正则化表达式的数字和字符以及一些特殊符号组成。给定一个正在表达式r以及字符串s, 后者能匹配前者就必须满足以下几个条件: 1、如果r是以数字或字符开头,并且r的第二个字符不是“*”,那么s要匹配r,就必须以相同的数字或字母开头 ...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 13838, 171, 120, 248, 28711, 6656, 198, 31, 36, 12, 4529, 25, 220, 481, 666, 272, 73, 24130, 31, 8940, 4529, 13, 785, 198, 31, 7575, 171, 120, 248, 2334...
0.691839
821
import numpy as np from svgpathtools import svg2paths, wsvg from svgpathtools.path import Line, CubicBezier import matplotlib.pyplot as pl from matplotlib.animation import FuncAnimation import seaborn as sns from shutil import rmtree from os.path import join, exists from os import makedirs sns.set_context('paper...
[ 11748, 299, 32152, 355, 45941, 220, 198, 198, 6738, 38487, 70, 6978, 31391, 1330, 38487, 70, 17, 6978, 82, 11, 266, 21370, 70, 198, 6738, 38487, 70, 6978, 31391, 13, 6978, 1330, 6910, 11, 7070, 291, 3856, 89, 959, 198, 198, 11748, 2...
2.900376
532
from sympy.liealgebras.weyl_group import WeylGroup from sympy.matrices import Matrix
[ 6738, 10558, 88, 13, 14485, 282, 469, 1671, 292, 13, 732, 2645, 62, 8094, 1330, 775, 2645, 13247, 201, 198, 6738, 10558, 88, 13, 6759, 45977, 1330, 24936, 201, 198 ]
2.9
30
import unittest from datalakebundle.table.schema.TableSchema import TableSchema from pyspark.sql import types as t if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 4818, 282, 539, 65, 31249, 13, 11487, 13, 15952, 2611, 13, 10962, 27054, 2611, 1330, 8655, 27054, 2611, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 3858, 355, 256, 628, 198, 198, 361, 11593, 3672, 834...
2.79661
59
from django.shortcuts import render, redirect from django.conf import settings from django.core.files.storage import FileSystemStorage # from os import rename, listdir from uploads.core.models import Document from uploads.core.forms import DocumentForm import sys import os import sqlite3 sys.path.insert(0, './upload...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 16624, 13, 35350, 1330, 9220, 11964, 31425, 198, 198, 2, 422, 28686, 1330, 36265, 11, 13...
3.491379
116
...
[ 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 1...
1.429216
1,109
plugin_identifier = "Change_Filament" plugin_package = "octoprint_Change_Filament" plugin_name = "Change_Filament" plugin_version = "0.3.2" plugin_description = """Facilitates changing filament (unloads old, loads new)""" plugin_author = "Jim Pingle" plugin_author_email = "jim@pingle.org" plugin_url = "https://g...
[ 33803, 62, 738, 7483, 796, 366, 19400, 62, 11928, 3263, 1, 201, 198, 33803, 62, 26495, 796, 366, 38441, 404, 22272, 62, 19400, 62, 11928, 3263, 1, 201, 198, 33803, 62, 3672, 796, 366, 19400, 62, 11928, 3263, 1, 201, 198, 33803, 62, ...
3.545151
897
from datetime import date, timedelta import pytest from django.db.utils import IntegrityError, InternalError from model_mommy import mommy from bpp.models.autor import Autor_Jednostka @pytest.mark.django_db @pytest.mark.django_db @pytest.mark.django_db @pytest.mark.django_db @pytest.mark.django_db
[ 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 9945, 13, 26791, 1330, 39348, 12331, 11, 18628, 12331, 198, 6738, 2746, 62, 32542, 1820, 1330, 1995, 1820, 198, 198, 6738, 275, 3...
2.681034
116
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # __all__ = ["link_list_node", "single_link_list", "single_link_list_end"]
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 11593, 439, 834, 796, 14631, 8726, 62, 4868, 62, 17440, 1600, 366, 29762, 62, 8726, 62, 4868, 1600, 366, ...
2.277778
54
# project/server/server_config.py import os from os.path import dirname basedir = os.path.abspath(os.path.dirname(__file__)) import yaml from logging.config import dictConfig class BaseConfig(object): """Base configuration.""" APP_NAME = os.getenv("APP_NAME", "data_science_ci") BCRYPT_LOG_ROUNDS = 4 ...
[ 2, 1628, 14, 15388, 14, 15388, 62, 11250, 13, 9078, 198, 198, 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 198, 3106, 343, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, ...
2.421725
626
# Copyright 2021 qclib project. # 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, ...
[ 2, 15069, 33448, 10662, 565, 571, 1628, 13, 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, 13789, 13, 198, 2, 92...
2.220159
2,262
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 34, 8, 12131, 13, 43208, 21852, 1766, 1539, 12052, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
3.133612
479
import numpy as np import pandas as pd def check_nulls(df): '''Pass in dataframe to chech for null values''' na_df = df.isna().sum() print('Null Values for Features\n') print(na_df)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 4299, 2198, 62, 8423, 82, 7, 7568, 2599, 198, 220, 220, 220, 705, 7061, 14478, 287, 1366, 14535, 284, 1125, 354, 329, 9242, 3815, 7061, 6, 198, 220, 220,...
2.531646
79
''' Copyright (c) 2001-2019 by SAP SE, Walldorf, Germany. All rights reserved. Confidential and proprietary. ''' import os import sys import re import utils import yaml import uuid import glob import shutil import argparse from os.path import join from string import Template if __name__ == "__main__": sys.exit(m...
[ 7061, 6, 198, 15269, 357, 66, 8, 5878, 12, 23344, 416, 48323, 7946, 11, 6445, 335, 24263, 11, 4486, 13, 198, 3237, 2489, 10395, 13, 7326, 35599, 290, 20622, 13, 198, 7061, 6, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 30...
3.227723
101
"""This is the demo script to show how administrator can monitor and manage jobs This script will not work without replacing parameters with real values. Its basic goal is to present what can be done with this module and to ease its usage. Note: Some functionality is missing when working with 11.3.2 I-Server vers...
[ 37811, 1212, 318, 262, 13605, 4226, 284, 905, 703, 18382, 460, 5671, 290, 6687, 3946, 198, 198, 1212, 4226, 481, 407, 670, 1231, 13586, 10007, 351, 1103, 3815, 13, 198, 20459, 4096, 3061, 318, 284, 1944, 644, 460, 307, 1760, 351, 428,...
3.242126
1,016
''' Support for Eix ''' import salt.utils def __virtual__(): ''' Only work on Gentoo systems with eix installed ''' if __grains__['os'] == 'Gentoo' and salt.utils.which('eix'): return 'eix' return False def sync(): ''' Sync portage/overlay trees and update the eix database ...
[ 7061, 6, 198, 15514, 329, 412, 844, 198, 198, 7061, 6, 198, 198, 11748, 8268, 13, 26791, 198, 198, 4299, 11593, 32844, 834, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 5514, 670, 319, 27391, 2238, 3341, 351, 304, 844, ...
2.278388
273
import processor import shutil
[ 11748, 12649, 628, 198, 11748, 4423, 346, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220 ]
1.925926
27
import numpy as numpy a=[0,1,4,2,3,5,2,4,3,5,5,3,5,5,4,1,2,5,5,3,4,4,4,4,5,5] print('Mean= ',numpy.mean(a)) print('\nStandard Deviation= ',numpy.std(a)) print('\nVriance= ',numpy.var(a)) numpy.histogram(a) print('\nCoefficient of Variance= ',numpy.std(a)/numpy.mean(a))
[ 11748, 299, 32152, 355, 299, 32152, 201, 198, 64, 41888, 15, 11, 16, 11, 19, 11, 17, 11, 18, 11, 20, 11, 17, 11, 19, 11, 18, 11, 20, 11, 20, 11, 18, 11, 20, 11, 20, 11, 19, 11, 16, 11, 17, 11, 20, 11, 20, 11, 18, 11, ...
1.810458
153
#! /usr/bin/env python """pyqmlscene - Basic Python port of the qmlscene utility""" import sys from PyQt5.QtGui import QGuiApplication from PyQt5.QtCore import QUrl from PyQt5.QtQuick import QQuickView, QQuickWindow, QQuickItem from PyQt5.QtQml import QQmlApplicationEngine, QQmlComponent
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 9078, 80, 4029, 29734, 532, 14392, 11361, 2493, 286, 262, 10662, 4029, 29734, 10361, 37811, 198, 198, 11748, 25064, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1...
2.780952
105
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. #...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 201, 198, 2, 49962, 739, 262, 17168, 5964, 13, 201, 198, 201, 198, 2, 19617, 28, 40477, 12, 23, 201, 198, 2, 16529, 35937, 201, 198, 2, 6127, 7560, 416, 5413, 357, 49, 8, 11160, 19452, 6127...
3.1875
384
# <<BEGIN-copyright>> # Copyright 2021, Lawrence Livermore National Security, LLC. # See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: BSD-3-Clause # <<END-copyright>> """ Photon incoherent double difference cross section form and its supporting classes. """ import math from pqu import PQU ...
[ 2, 9959, 33, 43312, 12, 22163, 4766, 4211, 198, 2, 15069, 33448, 11, 13914, 45036, 3549, 2351, 4765, 11, 11419, 13, 198, 2, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 220, 198, 2, 30628, 55, 12, 34...
3.526012
173
"""Track current version. This module exists for version information only. It makes it easier to update the version because we only need to change it in one place. """ __version__ = '0.1.0' VERSION = tuple(int(x) for x in __version__.split('.'))
[ 37811, 24802, 1459, 2196, 13, 198, 198, 1212, 8265, 7160, 329, 2196, 1321, 691, 13, 632, 1838, 340, 4577, 284, 4296, 198, 1169, 2196, 780, 356, 691, 761, 284, 1487, 340, 287, 530, 1295, 13, 198, 37811, 198, 198, 834, 9641, 834, 796,...
3.492958
71
from attr import attrs, attrib @attrs(slots=True) @attrs(slots=True) @attrs(slots=True)
[ 6738, 708, 81, 1330, 708, 3808, 11, 708, 822, 628, 198, 31, 1078, 3808, 7, 6649, 1747, 28, 17821, 8, 628, 198, 31, 1078, 3808, 7, 6649, 1747, 28, 17821, 8, 628, 198, 31, 1078, 3808, 7, 6649, 1747, 28, 17821, 8, 198 ]
2.186047
43
from django import forms from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy from datetime import date
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 198, 6738, 4818, 8079, 1330, 3128, 628, 198 ]
3.85
40
from abc import abstractmethod BaseEncoding = ASCIIEncoding()
[ 6738, 450, 66, 1330, 12531, 24396, 628, 628, 198, 14881, 27195, 7656, 796, 37101, 27195, 7656, 3419, 198 ]
3.666667
18
"""一个简单的类实例""" #方法 #类有一个名为 __init__() 的特殊方法(构造方法),该方法在类实例化时会自动调用 # 类的私有属性 # __private_attrs:两个下划线开头,声明该属性为私有 # 类的私有方法 # __private_method:两个下划线开头,声明该方法为私有方法 # 实例化类 x = MyClass() # 访问类的属性和方法 print("MyClass 类的属性 i 为:", x.i) print("MyClass 类的方法 f 输出为:", x.f()) # self代表类的实例,而非类 # 类的方法与普通的函数只有一个特别的区别——它们必须有一个额外的第一个参...
[ 37811, 31660, 10310, 103, 163, 106, 222, 39355, 243, 21410, 163, 109, 119, 22522, 252, 160, 122, 233, 37811, 198, 2, 43095, 37345, 243, 198, 198, 2, 163, 109, 119, 17312, 231, 31660, 10310, 103, 28938, 235, 10310, 118, 11593, 15003, 8...
0.820635
630
import math #region global vars lipidclass_dict = { 'Fatty acyls': ['FA', 'NAGly', 'NAGlySer', 'NAOrn', 'NAE', 'CAR', 'FAHFA'], 'Glycerolipids': ['DG', 'EtherDG', 'DGDG', 'EtherDGDG', 'MGDG', 'EtherMGDG', 'SQDG', 'EtherSMGDG', 'MG', 'ADGGA', 'DGCC', 'DGGA', 'DGTS...
[ 11748, 10688, 628, 198, 2, 36996, 3298, 410, 945, 198, 40712, 312, 4871, 62, 11600, 796, 220, 1391, 198, 220, 220, 220, 705, 33804, 774, 936, 2645, 82, 10354, 37250, 7708, 3256, 705, 4535, 38, 306, 3256, 705, 4535, 38, 306, 7089, 32...
1.535042
1,912
import smtplib from os.path import basename from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import COMMASPACE, formatdate from datetime import datetime import CommonConfiguration as cc
[ 171, 119, 123, 11748, 895, 83, 489, 571, 198, 198, 6738, 28686, 13, 6978, 1330, 1615, 12453, 198, 6738, 3053, 13, 76, 524, 13, 31438, 1330, 337, 12789, 23416, 198, 6738, 3053, 13, 76, 524, 13, 16680, 541, 433, 1330, 337, 3955, 3620,...
3.383721
86
import random import numpy as np from deeprobust.graph.global_attack import BaseAttack
[ 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2769, 22609, 436, 13, 34960, 13, 20541, 62, 20358, 1330, 7308, 27732, 628 ]
3.6
25
#! /usr/bin/env python """ File: disorder2 Copyright (c) 2016 Chinmai Raman License: MIT Course: PHYS227 Assignment: 8.37 Date: April 26th, 2016 Email: raman105@mail.chapman.edu Name: Chinmai Raman Description: Implements a random walk class that can handle boundaries. THANK YOU MICHAEL!!!! """ from Particles import ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 8979, 25, 8967, 17, 198, 15269, 357, 66, 8, 1584, 22604, 76, 1872, 7431, 272, 198, 34156, 25, 17168, 198, 49046, 25, 9370, 16309, 24403, 198, 8021, 16747, 25, 807,...
2.992537
134
import re
[ 11748, 302, 628 ]
3.666667
3
# pylint: disable=missing-docstring,no-self-use,no-member,misplaced-comparison-constant,expression-not-assigned import logging from unittest.mock import patch, Mock import pytest from expecter import expect import yorm from yorm import common from yorm.decorators import attr from yorm.types import Dictionary, List f...
[ 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 11, 3919, 12, 944, 12, 1904, 11, 3919, 12, 19522, 11, 25413, 21820, 12, 785, 1845, 1653, 12, 9979, 415, 11, 38011, 12, 1662, 12, 562, 3916, 198, 198, 11748, 18931, 198, 673...
2.488995
1,681
# #scraping of give india # def give_india(): # import json # import requests # import pprint # from bs4 import BeautifulSoup # response = requests.get("https://www.giveindia.org/certified-indian-ngos") #this link is working # # print(response) # soup = BeautifulSoup(response.text,"html.parser") # #finding th...
[ 2, 1303, 1416, 2416, 278, 286, 1577, 773, 544, 198, 198, 2, 825, 1577, 62, 521, 544, 33529, 198, 2, 220, 197, 11748, 33918, 198, 2, 220, 197, 11748, 7007, 198, 2, 220, 197, 11748, 279, 4798, 198, 2, 220, 197, 6738, 275, 82, 19, ...
2.095808
1,002
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from spectral import SpectralNorm import numpy as np class Generator_DC(nn.Module): """Generator.""" class Discriminator_DC(nn.Module): """Discriminator, Auxiliary Classifier."""
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 37410, 1330, 13058, 1373, 35393, 198, 11748, 299, 32152, 355, 45...
3.266667
90
import os try: user_paths = os.environ['PYTHONPATH'].split(os.pathsep) except KeyError: user_paths = [] print ("paths:",user_paths) import sys print(sys.path) for p in sys.path: print ("====",p) if os.path.isdir(p): for f in os.listdir(p): print (f) import utils print("cool")
[ 11748, 28686, 198, 28311, 25, 198, 220, 220, 220, 2836, 62, 6978, 82, 796, 28686, 13, 268, 2268, 17816, 47, 56, 4221, 1340, 34219, 6, 4083, 35312, 7, 418, 13, 6978, 325, 79, 8, 198, 16341, 7383, 12331, 25, 198, 220, 220, 220, 2836...
2.276923
130
from django.db import models from xpinyin import Pinyin # Create your models here. class CurTripStatus(): ''' 当前行程状态 ''' Cancel = 0 # 取消 Ing = 1 # 行程进行中 Gone = 2 # 行程已出发 Done = 3 # 完成 class StatusTrueManager(models.Manager): ''' #首先,定义一个Manager的子类 如果使用,会覆盖默认的objects ''' class...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 36470, 3541, 259, 1330, 350, 3541, 259, 198, 2, 13610, 534, 4981, 994, 13, 198, 4871, 4424, 51, 5528, 19580, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 10263, 121, ...
1.985549
3,114
"""Main package for Putio-Autodelete.""" from .__version__ import __version__
[ 37811, 13383, 5301, 329, 5930, 952, 12, 16541, 1098, 5807, 526, 15931, 198, 198, 6738, 764, 834, 9641, 834, 1330, 11593, 9641, 834, 198 ]
3.291667
24
# -*- coding: utf-8 -*- """ A module providing functions, classes to be included in the package. """ import numpy as np from .utils import export @export # adds myFunction to __all__ def my_function(x): """Returns root of x.""" return(np.sqrt(x))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 32, 8265, 4955, 5499, 11, 6097, 284, 307, 3017, 287, 262, 5301, 13, 198, 37811, 628, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 26791, 1330, 10784, ...
2.858696
92
# Copyright 2021-present, Nike, Inc. # All rights reserved. # # This source code is licensed under the Apache-2.0 license found in # the LICENSE file in the root directory of this source tree. import six import logging from abc import ABCMeta, abstractmethod from collections import namedtuple from sqlalchemy import ...
[ 2, 15069, 33448, 12, 25579, 11, 23817, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 24843, 12, 17, 13, 15, 5964, 1043, 287, 198, 2, 262, 38559, 24290, 2393, 287, 262, 6808, ...
2.985623
626
# <%= projectID %>: <%= desc %> # # Copyright (C) <%= user %> # # This file is part of <%= projectID %>. # # @author = '<%= user %>' # @email = '<%= email %>' name = '<%= projectID %>'
[ 2, 1279, 4, 28, 1628, 2389, 4064, 31175, 1279, 4, 28, 1715, 4064, 29, 198, 2, 198, 2, 15069, 357, 34, 8, 1279, 4, 28, 2836, 4064, 29, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 1279, 4, 28, 1628, 2389, 4064, 28401, 198, 2, 19...
2.176471
85
######################################################################################################################## # File: # # Description: # # Input: # # Author: # # Contributors: # # Change History: # # Version By Desc # ------- -- ---- #...
[ 29113, 29113, 29113, 14468, 7804, 198, 2, 220, 220, 9220, 25, 198, 2, 198, 2, 220, 220, 12489, 25, 198, 2, 198, 2, 220, 220, 23412, 25, 198, 2, 198, 2, 220, 220, 6434, 25, 198, 2, 198, 2, 220, 220, 25767, 669, 25, 198, 2, 19...
5.084697
1,039
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A test runner for gtest application tests.""" import logging import os import platform import subprocess import sys _logging = log...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1946, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043,...
3.116844
659
from env.account import Account
[ 6738, 17365, 13, 23317, 1330, 10781 ]
5.166667
6
# ----------------------------------------------------------------------------- # Copyright (c) 2019-, PKSHA Technology Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # --------------------------------------...
[ 2, 16529, 32501, 198, 2, 15069, 357, 66, 8, 13130, 20995, 350, 27015, 7801, 8987, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635, 5964, 1043, 287, 262, 198, 2, ...
1.877873
1,523
""" Custom management command to cleanup old settings that are not defined anymore """ from django.core.management.base import BaseCommand class Command(BaseCommand): """ Cleanup old (undefined) settings in the database """
[ 37811, 198, 15022, 4542, 3141, 284, 27425, 1468, 6460, 326, 389, 407, 5447, 7471, 198, 37811, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 628, 198, 4871, 9455, 7, 14881, 21575, 2599, 198, 220, 220, ...
3.734375
64
from cvnn import cli import sys import logging from pdb import set_trace cli.cli()
[ 6738, 269, 85, 20471, 1330, 537, 72, 198, 11748, 25064, 198, 11748, 18931, 198, 6738, 279, 9945, 1330, 900, 62, 40546, 198, 198, 44506, 13, 44506, 3419, 198 ]
3
28
import sys from pyneuroml import pynml lems_file = 'LEMS_test_Ca.xml' results = pynml.run_lems_with_jneuroml(lems_file, max_memory='2G', nogui=True, load_saved_data=True) if not '-nogui' in sys.argv: from pylab import plot, show, figure, title for key in results.keys(): if key != 't': ...
[ 11748, 25064, 198, 6738, 12972, 710, 333, 296, 75, 1330, 279, 2047, 4029, 628, 198, 46367, 62, 7753, 796, 705, 2538, 5653, 62, 9288, 62, 24334, 13, 19875, 6, 198, 198, 43420, 796, 279, 2047, 4029, 13, 5143, 62, 46367, 62, 4480, 62, ...
2.123223
211
import pyglet from pyglet.window import key from player import Player from network import Network from projectile import Projectile from vector import Vector window = pyglet.window.Window(800, 600) network = Network() event_loop = pyglet.app.EventLoop() players = {} projectiles = [] ''' while(True): try: ...
[ 11748, 12972, 70, 1616, 198, 6738, 12972, 70, 1616, 13, 17497, 1330, 1994, 198, 198, 6738, 2137, 1330, 7853, 198, 6738, 3127, 1330, 7311, 198, 6738, 26489, 1330, 4935, 576, 198, 6738, 15879, 1330, 20650, 628, 198, 17497, 796, 12972, 70,...
2.075094
799
# Copyright (c) Stanford University, The Regents of the University of # California, and others. # # All Rights Reserved. # # See Copyright-SimVascular.txt for additional details. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentatio...
[ 2, 15069, 357, 66, 8, 13863, 2059, 11, 383, 3310, 658, 286, 262, 2059, 286, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3442, 11, 290, 1854, 13, 198, 2, 198, 2, 1439, 6923, 33876, 13, 198, 2, ...
3.513216
454
from torchbenchmark.util.framework.vision.model_factory import TorchVisionModel from torchbenchmark.tasks import COMPUTER_VISION
[ 6738, 28034, 26968, 4102, 13, 22602, 13, 30604, 13, 10178, 13, 19849, 62, 69, 9548, 1330, 34868, 44206, 17633, 198, 6738, 28034, 26968, 4102, 13, 83, 6791, 1330, 24301, 3843, 1137, 62, 29817, 2849, 198 ]
3.685714
35
r""" Lambda Bracket Algebras AUTHORS: - Reimundo Heluani (2019-10-05): Initial implementation. """ #****************************************************************************** # Copyright (C) 2019 Reimundo Heluani <heluani@potuz.net> # # This program is free software: you can redistribute it and/or modify #...
[ 81, 37811, 198, 43, 4131, 6814, 1709, 8317, 978, 469, 1671, 292, 198, 198, 32, 24318, 20673, 25, 198, 198, 12, 797, 320, 41204, 5053, 84, 3216, 357, 23344, 12, 940, 12, 2713, 2599, 20768, 7822, 13, 198, 37811, 198, 198, 2, 17174, ...
2.569268
1,256
from ast import literal_eval from collections import Counter from time import time from typing import Any, Dict, List, Optional import numpy as np import pandas as pd from anndata import AnnData from natsort import natsorted from rich.progress import track from spatialtis.config import Config, console from spatialtis...
[ 6738, 6468, 1330, 18875, 62, 18206, 198, 6738, 17268, 1330, 15034, 198, 6738, 640, 1330, 640, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, ...
2.240363
1,323
from django.shortcuts import render from employeeapp.models import employee # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 6538, 1324, 13, 27530, 1330, 6538, 198, 2, 13610, 534, 5009, 994, 13 ]
4.391304
23