content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgcallback" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgGA from osgpypp import osgUtil from osgpypp import osg...
[ 2, 48443, 8800, 14, 24330, 21015, 198, 198, 2, 17406, 4142, 14251, 21015, 2196, 286, 220, 198, 2, 4946, 36542, 37065, 1672, 1430, 366, 418, 70, 47423, 1, 198, 2, 220, 10185, 770, 1430, 481, 761, 10107, 24549, 878, 340, 481, 670, 13,...
2.907824
933
#!/usr/bin/env python #-*- coding: UTF-8 -*- import sys import uuid import logging; logger = logging.getLogger("underworlds.model_loader") try: from pyassimp import core as pyassimp from pyassimp.postprocess import * except BaseException as ae: logger.error("pyassimp could not be loaded: %s" % ae) pa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 334, 27112, 198, 198, 11748, 18931, 26, 49706, 796, 18931, 13, 1136, 11187, 1362, 7203, 4625, ...
2.440828
338
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Project : tql-Python. # @File : XGBOptimizer # @Time : 2019-09-16 11:58 # @Author : yuanjie # @Email : yuanjie@xiaomi.com # @Software : PyCharm # @Description : import numpy as np import catboost from catboost import CatBoostClassi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 16775, 220, 220, 220, 220, 220, 1058, 256, 13976, 12, 37906, 13, 198, 2, 2488, 8979, 220, 220, 220, 220, 2...
2.396648
179
### Biggest 2 digit palindrome is 9009 ### Just brute force ### palidrome is when a string is the same both ways # checks if the number is a palidrome # Computers are fast, so we can implement this solution directly without any clever math. ans = efficient_answer() print(ans)
[ 21017, 4403, 3495, 362, 16839, 6340, 521, 5998, 318, 15897, 24, 198, 21017, 2329, 33908, 2700, 198, 21017, 6340, 312, 5998, 318, 618, 257, 4731, 318, 262, 976, 1111, 2842, 198, 198, 2, 8794, 611, 262, 1271, 318, 257, 6340, 312, 5998, ...
3.710526
76
from django.db import models from django.utils.text import slugify from mptt.models import MPTTModel, TreeForeignKey class Skill(MPTTModel): """Skill terms tree model, eg. Categories""" name = models.CharField(max_length=200) slug = models.SlugField(unique=True) parent = TreeForeignKey( "self...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 31065, 1958, 198, 6738, 285, 457, 83, 13, 27530, 1330, 4904, 15751, 17633, 11, 12200, 33616, 9218, 628, 198, 4871, 16023, 7, 7378, 15751, 1763...
2.892086
139
import fs.s3fs import os, ast if db._dbname=='sqlite': sqlite_tf=True else: sqlite_tf=False # try: ## see if you can acces the heroku environment variables myfs = fs.s3fs.S3FS('threemusesglass','site_images',os.environ['AWS_ACCESS_KEY_ID'], os.environ['AWS_SECRET_ACCESS_KEY']) # ## what exception exactly? # exce...
[ 11748, 43458, 13, 82, 18, 9501, 198, 11748, 28686, 11, 6468, 628, 198, 361, 20613, 13557, 9945, 3672, 855, 6, 25410, 578, 10354, 198, 197, 25410, 578, 62, 27110, 28, 17821, 198, 17772, 25, 198, 197, 25410, 578, 62, 27110, 28, 25101, ...
3.045166
3,941
#!/usr/bin/env python """Testing seq_tools.py""" ######################################################################## # File: seq_tools_test.py # executable: seq_tools_test.py # # Author: Andrew Bailey # History: 02/15/18 Created ######################################################################## import os i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 44154, 33756, 62, 31391, 13, 9078, 37811, 198, 29113, 29113, 7804, 198, 2, 9220, 25, 33756, 62, 31391, 62, 9288, 13, 9078, 198, 2, 220, 28883, 25, 33756, 62, 31391, 62, 9288, ...
1.776016
2,460
""" services.tasks ============== This is the main runner of the background application. Celery Tasks - this handles all the required tether tasks - (check triggers -> applies action where necessary) """ from __future__ import absolute_import from celery import shared_task @shared_task
[ 37811, 198, 220, 220, 220, 2594, 13, 83, 6791, 198, 220, 220, 220, 796, 25609, 28, 628, 220, 220, 220, 770, 318, 262, 1388, 17490, 286, 262, 4469, 3586, 13, 628, 220, 220, 220, 15248, 1924, 309, 6791, 532, 428, 17105, 477, 262, 26...
3.670588
85
import ply.lex as lex from grease.core.indents import Indents reserved = { 'var': 'VAR', 'if': 'IF', 'else': 'ELSE', 'scan': 'SCAN', 'print': 'PRINT', 'and': 'AND', 'or': 'OR', 'Bool': 'BOOL', 'Int': 'INT', 'Float': 'FLOAT', 'Char': 'CHAR', 'fn': 'FN', 'interface': '...
[ 11748, 35960, 13, 2588, 355, 31191, 198, 6738, 35537, 13, 7295, 13, 521, 658, 1330, 1423, 658, 198, 198, 411, 8520, 796, 1391, 198, 220, 220, 220, 705, 7785, 10354, 705, 53, 1503, 3256, 198, 220, 220, 220, 705, 361, 10354, 705, 5064...
1.795396
1,173
""" Test Utilities * :py:class:`FileSystemTestCase`: Integration test with a temp directory """ # Imports import unittest import tempfile import pathlib # Test Helpers
[ 37811, 6208, 41086, 198, 198, 9, 1058, 9078, 25, 4871, 25, 63, 8979, 11964, 14402, 20448, 63, 25, 38410, 1332, 351, 257, 20218, 8619, 198, 198, 37811, 198, 198, 2, 1846, 3742, 198, 11748, 555, 715, 395, 198, 11748, 20218, 7753, 198, ...
3.326923
52
from aws_cdk import ( core, aws_lambda as _lambda, aws_iam as iam, aws_elasticloadbalancingv2 as elb, aws_elasticloadbalancingv2_targets as _targets, aws_ec2 as ec2, ) import time
[ 6738, 3253, 82, 62, 10210, 74, 1330, 357, 198, 220, 220, 220, 4755, 11, 198, 220, 220, 220, 3253, 82, 62, 50033, 355, 4808, 50033, 11, 198, 220, 220, 220, 3253, 82, 62, 1789, 355, 1312, 321, 11, 198, 220, 220, 220, 3253, 82, 62,...
2.05
100
"""Kata url: https://www.codewars.com/kata/5388f0e00b24c5635e000fc6.""" from typing import List
[ 37811, 42, 1045, 19016, 25, 3740, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 20, 30460, 69, 15, 68, 405, 65, 1731, 66, 3980, 2327, 68, 830, 16072, 21, 526, 15931, 198, 198, 6738, 19720, 1330, 7343, 628 ]
2.333333
42
from __future__ import with_statement import os import pytz import subprocess import sys _cache_tz = None if sys.version_info[0] == 2: else: from subprocess import Popen def get_localzone(): """Get the computers configured local timezone, if any.""" global _cache_tz if _cache_tz is None: _...
[ 6738, 11593, 37443, 834, 1330, 351, 62, 26090, 198, 11748, 28686, 198, 11748, 12972, 22877, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 62, 23870, 62, 22877, 796, 6045, 198, 198, 361, 25064, 13, 9641, 62, 10951, 58, 15, 60, 6...
2.8
200
FOOD_CONSUMPTION = 'food_consumption_indicators'
[ 6080, 3727, 62, 10943, 50, 5883, 11571, 2849, 796, 705, 19425, 62, 5936, 24098, 62, 521, 44549, 6, 198 ]
2.578947
19
# Copyright 2008-2018 Univa Corporation # # 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...
[ 2, 15069, 3648, 12, 7908, 791, 12151, 10501, 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.03534
3,056
import KratosMultiphysics import KratosMultiphysics.HDF5Application as KratosHDF5 from KratosMultiphysics.HDF5Application import core from KratosMultiphysics.HDF5Application.core import operations, file_io import KratosMultiphysics.KratosUnittest as KratosUnittest from KratosMultiphysics.HDF5Application.core.utils impo...
[ 11748, 509, 10366, 418, 15205, 13323, 23154, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 39, 8068, 20, 23416, 355, 509, 10366, 418, 39, 8068, 20, 198, 6738, 509, 10366, 418, 15205, 13323, 23154, 13, 39, 8068, 20, 23416, 1330, ...
2.974194
155
"""bla""" # pylint: disable=no-absolute-import from ..n.non import non_init_parent_called __revision__ = 'yo' class Aaaa(non_init_parent_called.AAAA): # [too-few-public-methods] """test dotted name in ancestors"""
[ 37811, 2436, 64, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 48546, 12, 11748, 198, 198, 6738, 11485, 77, 13, 13159, 1330, 1729, 62, 15003, 62, 8000, 62, 7174, 198, 198, 834, 260, 10178, 834, 796, 705, 8226, 6, 198, 19...
2.707317
82
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.446809
47
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Envía un mail en texto plano desde la línea de comandos o desde un script de python. Usa un archivo de configuración para tomar un usuario y password defaults, pero pueden pasarse como argumentos a la función. Example: python send_email.py "Hola mundo!" other_email...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 4834, 85, 29690, 555, 6920, 551, 2420, 78, 1410, 78, 748, 2934, 8591, 300, 8836, 39718, 390, 401, 39...
2.502475
404
from flask_restful import Api from App.api.user_login import LoginModel api = Api() # 例子 api.add_resource(LoginModel, '/user/')
[ 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 198, 198, 6738, 2034, 13, 15042, 13, 7220, 62, 38235, 1330, 23093, 17633, 198, 198, 15042, 796, 5949, 72, 3419, 198, 198, 2, 220, 160, 122, 233, 36310, 198, 15042, 13, 2860, 62, 31092, 7, ...
2.588235
51
#!/usr/bin/env python # -*- coding: UTF-8 -*- if True: print("True") else: print("False")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 361, 6407, 25, 198, 220, 220, 220, 3601, 7203, 17821, 4943, 198, 17772, 25, 198, 220, 220, 220, 3601, 7203, 25101, 4943, ...
2.177778
45
import sys import numpy as np import pandas as pd import sqlite3 import pickle # NLTKs import nltk nltk.download(['punkt', 'wordnet', 'stopwords', 'averaged_perceptron_tagger']) import re from nltk.stem.wordnet import WordNetLemmatizer from nltk.tokenize import word_tokenize from nltk.corpus import stopwords # Scikit...
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 44161, 578, 18, 198, 11748, 2298, 293, 198, 198, 2, 22879, 51, 42, 82, 198, 11748, 299, 2528, 74, 198, 77, 2528, 74, 13, 15002, 7, ...
2.452842
3,096
# encoding=utf-8 import os import unittest import tempfile from pyparsing import ParseException from jsgf import * from jsgf.parser import parse_expansion_string, parse_rule_string class ValidGrammarTests(unittest.TestCase): """ Tests for valid_grammar function. """ def test_no_header(self): ...
[ 2, 21004, 28, 40477, 12, 23, 198, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 11748, 20218, 7753, 198, 198, 6738, 279, 4464, 945, 278, 1330, 2547, 325, 16922, 198, 198, 6738, 44804, 70, 69, 1330, 1635, 198, 6738, 44804, 70, 6...
2.072848
1,208
#!/usr/bin/env python3 from goalee import Target, RedisMiddleware from goalee.area_goals import RectangleAreaGoal, CircularAreaGoal from goalee.types import Point if __name__ == '__main__': middleware = RedisMiddleware() t = Target(middleware) g1 = RectangleAreaGoal(topic='robot.pose', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 467, 1000, 68, 1330, 12744, 11, 2297, 271, 34621, 1574, 198, 6738, 467, 1000, 68, 13, 20337, 62, 2188, 874, 1330, 48599, 9248, 30547, 49045, 11, 7672, 934, 30547, 49045,...
1.772947
414
from django.urls import path, include from . import api apipatterns = [ path(r'', api.index, name='ara-unsecret-api'), path(r'rununsecretquery', api.runara, name='ara-unsecret-runquery') ] urlpatterns = [ path(r'api/', include(apipatterns)), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 764, 1330, 40391, 198, 198, 499, 541, 265, 759, 82, 796, 685, 198, 220, 220, 220, 3108, 7, 81, 6, 3256, 40391, 13, 9630, 11, 1438, 11639, 3301, 12, 403, 21078, 12,...
2.457143
105
import textract from textract.exceptions import ExtensionNotSupported from image_classify import classify_image from pathutils import is_img
[ 11748, 2420, 974, 198, 6738, 2420, 974, 13, 1069, 11755, 1330, 27995, 3673, 48181, 198, 6738, 2939, 62, 4871, 1958, 1330, 36509, 62, 9060, 198, 6738, 3108, 26791, 1330, 318, 62, 9600 ]
4.375
32
# Podemos tener diferentes tipos de datos # El primer tipo de datos es booleano # Que toma valores entre True y False boleano = True print(f'El valor de mi variable boleano es {boleano}') # Los numeros se pueden representar como int o float entero = 10 print(f'El valor de mi variable "entero" es {entero}') flotante ...
[ 2, 17437, 368, 418, 256, 877, 288, 361, 9100, 274, 8171, 418, 390, 4818, 418, 198, 198, 2, 2574, 33270, 8171, 78, 390, 4818, 418, 1658, 1489, 2305, 5733, 198, 2, 4670, 284, 2611, 1188, 2850, 920, 260, 6407, 331, 10352, 198, 45693, ...
2.428571
658
import datetime from django.contrib.auth.models import User from django.db import models from mentoring.util import generate_confirmation_token genders = ( ('a', 'Agender'), ('c', 'Cisgender'), ('m', 'Male'), ('n', 'Non-binary'), ('t', 'Transgender'), ('f', 'Female'), ('l', 'Another gende...
[ 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 6229, 3255, 13, 22602, 1330, 7716, 62, 10414, 36241, 62, 30001, 198, 198, ...
2.239645
676
import pyxel BORDER_OFFSETS = [(-1, 0), (1, 0), (0, -1), (0, 1)] BG_COLOR = 5 pyxel.init(223, 92, title="Offscreen Rendering") pyxel.load("assets/offscreen.pyxres") blt_figure = make_blt_figure() bltm_figure = make_bltm_figure() while True: if pyxel.btnp(pyxel.KEY_Q): pyxel.quit() figure = blt_...
[ 11748, 12972, 87, 417, 198, 198, 33, 12532, 1137, 62, 27977, 28480, 50, 796, 685, 32590, 16, 11, 657, 828, 357, 16, 11, 657, 828, 357, 15, 11, 532, 16, 828, 357, 15, 11, 352, 15437, 198, 40469, 62, 46786, 796, 642, 628, 628, 628...
2.143519
216
import logging from unittest import TestCase import pytest from foxylib.tools.log.foxylib_logger import FoxylibLogger
[ 11748, 18931, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 21831, 2645, 571, 13, 31391, 13, 6404, 13, 12792, 2645, 571, 62, 6404, 1362, 1330, 5426, 2645, 571, 11187, 1362, 628 ]
3.102564
39
from flask import ( Flask, render_template, redirect, flash, url_for, session ) from datetime import timedelta from sqlalchemy.exc import ( IntegrityError, DataError, DatabaseError, InterfaceError, InvalidRequestError, ) from werkzeug.routing import BuildError from flask_b...
[ 6738, 42903, 1330, 357, 198, 220, 220, 220, 46947, 11, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 18941, 11, 198, 220, 220, 220, 7644, 11, 198, 220, 220, 220, 19016, 62, 1640, 11, 198, 220, 220, 220, 6246, 198, ...
2.740642
374
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function __author__ = 'maxim' import numpy as np import gensim import string from keras.callbacks import LambdaCallback from keras.layers.recurrent import LSTM from keras.layers.embeddings import Embedding from keras.layers import Dense, Act...
[ 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, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 834, 9800, 834, 796, 705, 9806, 320, 6, 198, 198, 11748...
2.640698
860
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2021 all rights reserved # # the framework import pyre # externals import sys import subprocess # my superclass from pyre.shells.Script import Script # declaration class Launcher(Script, family="mpi.shells.mpirun"): """ Encapsulation o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 285, 40302, 257, 13, 70, 13, 257, 26884, 85, 6557, 89, 271, 198, 2, 29617, 39795, 198, 2, 357, 66, 8, 7795, 12, 1238, 2481, 477, 2489, 10395, 198, 2, ...
2.455465
2,077
import os import logging import ast # log_level = os.getenv("LOG_LEVEL", "INFO") log_level = "INFO" logging.basicConfig(format='%(asctime)s - %(levelname)s: %(message)s', level=log_level) URL_BLACKLIST = ast.literal_eval(os.getenv("URL_BLACKLIST", "")) logging.info("URL_BLACKLIST: {}".format(URL_BLACKLIST)) SLACK_TO...
[ 11748, 28686, 198, 11748, 18931, 198, 11748, 6468, 198, 198, 2, 2604, 62, 5715, 796, 28686, 13, 1136, 24330, 7203, 25294, 62, 2538, 18697, 1600, 366, 10778, 4943, 198, 6404, 62, 5715, 796, 366, 10778, 1, 198, 6404, 2667, 13, 35487, 16...
2.284768
302
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. """ Tests for the skhep.math.geometry module. """ # ----------------------------------------------------------------------------- # Import statements # -------------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 11, 766, 38559, 24290, 13, 198, 37811, 198, 51, 3558, ...
5
129
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File : mmbt.py # Author : Pranava Madhyastha <pranava@imperial.ac.uk> # Date : 01.11.2020 # Last Modified Date: 09.11.2021 # Last Modified By : Pranava Madhyastha <pranava@imperial.ac.uk> # # Copyright (c) 2020, Imperial College, Lon...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 9220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 285, 2022, 83, 13, 9078, 198, ...
3.201878
639
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # 程序入口文件,通过entry_point函数作为程序入口,接入程序主逻辑 # 然后通过命令行接口解析命令行参数,形成不同的入口分支 import os import six import click from importlib import import_module from bwtougu.utils.click_helper import Date from bwtougu.utils.config import parse_config, dump_config CONTEXT_SETTINGS={ 'defa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 13328, 101, 233, 41753, 237, 17739, 98, 20998, 96, 23877, 229, 20015, 114, 171, 120, 234, 34460, 248, ...
2.190279
1,687
import pyqtgraph as pg from software.thunderscope.field.field_layer import FieldLayer class Field(pg.PlotWidget): """Wrapper to handle Field Layers""" def keyPressEvent(self, event): """Propagate keypress event to all field layers :param event: The event """ ...
[ 11748, 12972, 80, 25297, 1470, 355, 23241, 198, 198, 6738, 3788, 13, 400, 41116, 66, 3008, 13, 3245, 13, 3245, 62, 29289, 1330, 7663, 49925, 628, 198, 4871, 7663, 7, 6024, 13, 43328, 38300, 2599, 628, 220, 220, 220, 37227, 36918, 2848...
2.311579
475
import logging from http import HTTPStatus from starlette.requests import Request from starlette.exceptions import HTTPException from .conf import TemplateResponse logger = logging.getLogger("app_server") _http_error_status = tuple(e for e in HTTPStatus if e.value >= 400)
[ 11748, 18931, 198, 6738, 2638, 1330, 14626, 19580, 198, 6738, 3491, 21348, 13, 8897, 3558, 1330, 19390, 198, 6738, 3491, 21348, 13, 1069, 11755, 1330, 14626, 16922, 198, 6738, 764, 10414, 1330, 37350, 31077, 198, 198, 6404, 1362, 796, 189...
3.693333
75
# Programação Orientada a Objetos # AC01 ADS-EaD - Números especiais # # Email Impacta: bianca.yabiku@aluno.faculdadeimpacta.com.br def lista_armstrong(n): """Função que lista os números e Armstrong até n Recebe um número natural n e retorna uma lista com todos o números de Armstrong estrit...
[ 2, 6118, 64, 16175, 28749, 35275, 4763, 257, 1835, 31173, 418, 201, 198, 2, 7125, 486, 44784, 12, 36, 64, 35, 532, 399, 21356, 647, 418, 1658, 431, 33743, 271, 201, 198, 2, 201, 198, 2, 9570, 17677, 64, 25, 275, 666, 6888, 13, 8...
2.059686
955
from vema import Page
[ 6738, 1569, 2611, 1330, 7873, 201, 198, 201, 198 ]
2.777778
9
""" =============================== qprof.file_formats.preprocessor =============================== This module provides an interface class to read GPROF preprocessor files. """ import logging from datetime import datetime import re import numpy as np import xarray from qprof.file_formats import retrieval from pathl...
[ 37811, 198, 4770, 25609, 18604, 198, 80, 5577, 13, 7753, 62, 687, 1381, 13, 3866, 41341, 198, 4770, 25609, 18604, 198, 198, 1212, 8265, 3769, 281, 7071, 1398, 284, 1100, 402, 4805, 19238, 662, 41341, 3696, 13, 198, 37811, 198, 11748, ...
2.104059
5,814
# import numpy as np # import pandas as pd # from footings.model import model, step # # from ..assumptions.stat_gaap.interest import get_interest_rate # from ..shared import param_n_simulations, param_seed # from .disabled_deterministic_base import DValBasePMD # # OUTPUT_COLS = [ # "MODEL_VERSION", # "LAST_COMM...
[ 2, 1330, 299, 32152, 355, 45941, 198, 2, 1330, 19798, 292, 355, 279, 67, 198, 2, 422, 2366, 654, 13, 19849, 1330, 2746, 11, 2239, 198, 2, 198, 2, 422, 11485, 562, 388, 8544, 13, 14269, 62, 4908, 499, 13, 9446, 1330, 651, 62, 944...
1.90874
2,071
from dragonfly import Key,MappingRule, Dictation, Choice,Text from castervoice.lib.merge.state.short import R from castervoice.lib.merge.additions import IntegerRef from castervoice.lib.ctrl.mgr.rule_details import RuleDetails
[ 6738, 10441, 12254, 1330, 7383, 11, 44, 5912, 31929, 11, 360, 713, 341, 11, 18502, 11, 8206, 198, 6738, 31680, 38888, 13, 8019, 13, 647, 469, 13, 5219, 13, 19509, 1330, 371, 198, 6738, 31680, 38888, 13, 8019, 13, 647, 469, 13, 2860,...
3.439394
66
'''input 1000000000 1000000000 1000000000 999999664 2 3 4 24 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem B if __name__ == '__main__': a, b, c = list(map(int, input().split())) print((a * b * c) % (10 ** 9 + 7))
[ 7061, 6, 15414, 201, 198, 16, 10535, 830, 1802, 24598, 1802, 24598, 201, 198, 24214, 38565, 2414, 201, 198, 201, 198, 17, 513, 604, 201, 198, 1731, 201, 198, 201, 198, 7061, 6, 201, 198, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, ...
2.096
125
# SPDX-License-Identifier: Apache-2.0 # ----------------------------------------------------------------------------- # Copyright 2020 Arm Limited # # 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...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 16529, 32501, 198, 2, 15069, 12131, 7057, 15302, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345...
3.559459
370
import logging import time from jiminy import pyprofile, vectorized logger = logging.getLogger(__name__) class Timer(vectorized.Wrapper): """ Calculate how much time was spent actually doing work. Display result via pyprofile. """
[ 11748, 18931, 198, 11748, 640, 198, 6738, 474, 320, 3541, 1330, 12972, 13317, 11, 15879, 1143, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 4871, 5045, 263, 7, 31364, 1143, 13, 36918, 2848, ...
3.305556
72
"""Ce fichier permet la transformation en html dans le style du site\ des données de synthese chantier dans le but de laisser\ a l'utilisateur la possibilité de rentrer les restes a dépenser.""" # from .postes_chantier import * # from pandas import Index from .date import get_month_name HTML_HEAD = ( ...
[ 37811, 34, 68, 277, 488, 959, 583, 4164, 8591, 13389, 551, 27711, 288, 504, 443, 3918, 7043, 2524, 59, 198, 220, 220, 220, 220, 220, 220, 220, 748, 836, 77, 2634, 274, 390, 7419, 258, 325, 33541, 959, 288, 504, 443, 475, 390, 8591...
2.363071
482
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2020 Fetch.AI Limited # # 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 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 26171, 198, 2, 198, 2, 220, 220, 15069, 2864, 12, 42334, 376, 7569, 13, 20185, 15302, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 3...
2.474608
2,166
def get_training_data(): """get training data from train.csv """ with open('../data/train.csv') as train_file: return train_file.read()
[ 4299, 651, 62, 34409, 62, 7890, 33529, 198, 220, 220, 220, 37227, 1136, 3047, 1366, 422, 4512, 13, 40664, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 351, 1280, 10786, 40720, 7890, 14, 27432, 13, 40664, 11537, 355, 4512, 62, 7753, ...
2.644068
59
import unittest from Cython import StringIOTree as stringtree code = """ cdef int spam # line 1 cdef ham(): a = 1 b = 2 c = 3 d = 4 def eggs(): pass cpdef bacon(): print spam print 'scotch' print 'tea?' print 'or coffee?' # line 16 """ linemap = dict(...
[ 11748, 555, 715, 395, 198, 198, 6738, 327, 7535, 1330, 10903, 40, 2394, 631, 355, 4731, 21048, 198, 198, 8189, 796, 37227, 198, 66, 4299, 493, 18084, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.127273
165
from django.utils import timezone from django.db.models import Q from datetime import datetime, date from core.general.appinit import app_init from core.general.exceptions import SIDException from core.general import settings import ast def extract_csv(): """ main function """ app_init() fr...
[ 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 198, 198, 6738, 4755, 13, 24622, 13, 1324, 15003, 1330, 598, 62, 15003, 198, ...
2.367263
727
from functools import wraps from webserver import bgecko from flask import redirect, flash
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 2639, 18497, 1330, 275, 469, 37549, 198, 6738, 42903, 1330, 18941, 11, 7644, 198 ]
4.136364
22
import requests import json import re import ast import adal from utilities.models import ConnectionInfo from infrastructure.models import CustomField ''' From Azure AD, grant application API access to Microsoft graph - Application permission -> Grant DirectoryReadAll and DirectoryReadWriteAll ''' CI = ConnectionInfo...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 6468, 198, 11748, 512, 282, 198, 6738, 20081, 13, 27530, 1330, 26923, 12360, 198, 6738, 6884, 13, 27530, 1330, 8562, 15878, 198, 198, 7061, 6, 198, 4863, 22134, 5984, 11, 7264...
3.313531
303
# -*- coding: utf-8 -*- import sys import pytest from textdata.eval import evaluation _PY2 = sys.version_info[0] == 2 _PY26 = sys.version_info[:2] == (2, 6)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 198, 11748, 12972, 9288, 198, 6738, 2420, 7890, 13, 18206, 1330, 12660, 198, 198, 62, 47, 56, 17, 796, 25064, 13, 9641, 62, 10951, 58, 15, 60, ...
2.319444
72
import sys from getpass import getpass import keyring from coinbase_api.api import CoinbaseApi from mint.api import MintApi from robinhood.api import RobinhoodApi # don't mind me, stupid utility function here to make it look like my code is a little cleaner below main()
[ 11748, 25064, 198, 6738, 651, 6603, 1330, 651, 6603, 198, 198, 11748, 1994, 1806, 198, 198, 6738, 10752, 8692, 62, 15042, 13, 15042, 1330, 45802, 32, 14415, 198, 6738, 21043, 13, 15042, 1330, 20873, 32, 14415, 198, 6738, 3857, 259, 2894...
3.531646
79
import random print("===== FRETBOARD TRAINER =====") print("\nIf you can complete level 2, 3, and 4 at 100bpm, you're done.\n") notes = ["A", "A#/Bb", "B", "C", "C#/Db", "D", "D#/Eb", "E", "F", "F#/Gb", "G", "G#/Ab"] #Level select print("0. Exit\n1. One note\n2. One note + metronome\n3. Two notes + metronome\n4. R...
[ 11748, 4738, 198, 198, 4798, 7203, 1421, 28, 376, 26087, 8202, 9795, 29125, 1268, 1137, 29335, 4943, 198, 198, 4798, 7203, 59, 77, 1532, 345, 460, 1844, 1241, 362, 11, 513, 11, 290, 604, 379, 1802, 65, 4426, 11, 345, 821, 1760, 13, ...
2.5
686
import asyncio import platform from typing import List from pathlib import Path from aiohttp.connector import TCPConnector from aiohttp import ClientSession, ClientResponse from aiohttp_socks import ProxyConnector from tools.XstreamDL_CLI.cmdargs import CmdArgs from tools.XstreamDL_CLI.models.stream import Stream from ...
[ 11748, 30351, 952, 198, 11748, 3859, 198, 6738, 19720, 1330, 7343, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 257, 952, 4023, 13, 8443, 273, 1330, 23633, 34525, 198, 6738, 257, 952, 4023, 1330, 20985, 36044, 11, 20985, 31077, 198, 6...
1.96129
1,705
# -*- coding:utf-8 -*- #!/usr/bin/env python from .package_utility import * __all__ = [ "cov_to_safer_package_name", 'cov_to_safer_package_version', 'cov_to_app_name', 'cov_to_program_name', 'cov_program_name_to_module_name', 'write_installer', 'walk_requirements' ]
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 764, 26495, 62, 315, 879, 1330, 1635, 198, 198, 834, 439, 834, 796, 685, 220, 198, 220, 220, 220, 366, 66, ...
2.209302
129
# GAME: PEDRA, PAPEL E TESOURA — Crie um programa que faça o computador jogar Jokenpô com você. from random import randint print('-=-' * 8) print('{: ^24}'.format('\033[32mPedra, Papel e Tesoura\033[m')) print('-=-' * 8, end='\n') escolha = str(input('Escolha um dos três:\n— Pedra\n— Papel\n— Tesoura\n\nDigite aqui a...
[ 2, 30517, 25, 350, 1961, 3861, 11, 350, 2969, 3698, 412, 309, 1546, 2606, 3861, 851, 327, 5034, 23781, 1430, 64, 8358, 24685, 50041, 267, 2653, 7079, 48342, 283, 449, 4233, 79, 27083, 401, 12776, 25792, 13, 198, 198, 6738, 4738, 1330,...
2.163701
562
# coding: utf-8 # In[4]: import tensorflow as tf # Generate the filename queue, and read the gif files contents filename_queue = tf.train.string_input_producer(tf.train.match_filenames_once("data/test.gif")) reader = tf.WholeFileReader() key, value = reader.read(filename_queue) image = tf.image.decode_gif(value) #...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 19, 5974, 628, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 2, 2980, 378, 262, 29472, 16834, 11, 290, 1100, 262, 9381, 3696, 10154, 198, 34345, 62, 36560, 796, 48700, 1...
2.441224
621
""" ## Module src.formula ### Contents - class Formula - class Assignment ### Side Effects - if python version < 3.6, a simple version of random.choices is added to module random """ import random import platform import os import re import multiprocessing as mp from collections.abc import Sequenc...
[ 37811, 198, 2235, 19937, 12351, 13, 687, 4712, 198, 198, 21017, 26714, 198, 220, 220, 220, 532, 1398, 19639, 198, 220, 220, 220, 532, 1398, 50144, 198, 198, 21017, 12075, 17417, 198, 220, 220, 220, 532, 611, 21015, 2196, 1279, 513, 13...
2.041457
7,357
import datetime import types import json # ENCODING def jsonify(model): """ Serialization of an object class, dict or list into JSON format Arguments: model {class object, dict or list} -- The model to be serialized Returns: [string] -- JSON Formatted string of the model """ ...
[ 11748, 4818, 8079, 198, 11748, 3858, 198, 11748, 33918, 220, 198, 198, 2, 412, 7792, 3727, 2751, 628, 198, 198, 4299, 33918, 1958, 7, 19849, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 23283, 1634, 286, 281, 2134, 1398, 11, ...
2.216332
698
from queue import PriorityQueue from typing import List if __name__ == "__main__": example_graph = { "U": {"V": 2, "W": 5, "X": 1}, "V": {"U": 2, "X": 2, "W": 3}, "W": {"V": 3, "U": 5, "X": 3, "Y": 1, "Z": 5}, "X": {"U": 1, "V": 2, "W": 3, "Y": 1}, "Y": {"X": 1, "W": 1, "Z...
[ 6738, 16834, 1330, 34416, 34991, 198, 6738, 19720, 1330, 7343, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1672, 62, 34960, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 52, ...
1.815385
260
a = "Địt con mẹ WeeBoo!" print(a)
[ 64, 796, 366, 128, 238, 157, 119, 233, 83, 369, 285, 157, 118, 117, 48643, 46120, 2474, 198, 198, 4798, 7, 64, 8, 628 ]
1.5
24
import os from google.cloud import storage, exceptions import google.auth import logging from datetime import datetime from modules.common import extract_date_from_file logger = logging.getLogger(__name__)
[ 11748, 28686, 198, 6738, 23645, 13, 17721, 1330, 6143, 11, 13269, 198, 11748, 23645, 13, 18439, 198, 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 13103, 13, 11321, 1330, 7925, 62, 4475, 62, 6738, 62, 7753, 198, 198,...
3.781818
55
from math import sqrt from scipy.stats import t from numpy import mean def degrees_of_freedom(s1, s2, n1, n2): """ Compute the number of degrees of freedom using the Satterhwaite Formula @param s1 The unbiased sample variance of the first sample @param s2 The unbiased sample variance of the secon...
[ 6738, 10688, 1330, 19862, 17034, 198, 198, 6738, 629, 541, 88, 13, 34242, 1330, 256, 198, 6738, 299, 32152, 1330, 1612, 198, 198, 4299, 7370, 62, 1659, 62, 41295, 7, 82, 16, 11, 264, 17, 11, 299, 16, 11, 299, 17, 2599, 198, 220, ...
2.711207
464
import datetime as dt import matplotlib.animation as animation import matplotlib.pyplot as plt import time import multiprocessing from ._base import term, show_header def rssi_to_colour_str(rssi): """ returns colorcoded rssi value based on range """ try: rssi = int(rssi) except TypeError: ...
[ 11748, 4818, 8079, 355, 288, 83, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 355, 11034, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 640, 198, 11748, 18540, 305, 919, 278, 198, 6738, 47540, 8692, 1330, ...
2.246228
1,856
# -*- encoding: utf8 -*- from setuptools import setup, find_packages import os setup( name = "nose-timelimit", version = "0.1.2", url = 'https://github.com/ionelmc/nose-timelimit', download_url = '', license = 'BSD', description = "Nose module that reorders tests so the quickest are run first....
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 23, 532, 9, 12, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 11748, 28686, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 796, 366, 77, 577, 12, 16514, 417, 320, 270...
2.436364
550
#!/usr/bin/env python """ verifies ssh key loaded in ssh-agent by fingerprint and loads passwords_db encrypted with the ssh key important: * DB is encrypted using absolute bytes of an SSH-KEY, therefore if you move the DB, you have to move the key you used in first run as well * .. to...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 37811, 201, 198, 332, 6945, 26678, 1994, 9639, 287, 26678, 12, 25781, 416, 25338, 201, 198, 392, 15989, 21442, 62, 9945, 19365, 351, 262, 26678, 1994, 201, 198, 201, 198...
2.260644
2,701
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
[ 2, 15069, 2321, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
2.517272
3,358
# This is the main Python code
[ 2, 770, 318, 262, 1388, 11361, 2438, 198 ]
3.875
8
# TODO edit the code # param n = int(input()) # solve ans = n # answer print(ans)
[ 2, 16926, 46, 4370, 262, 2438, 201, 198, 201, 198, 2, 5772, 201, 198, 77, 796, 493, 7, 15414, 28955, 201, 198, 201, 198, 2, 8494, 201, 198, 504, 796, 299, 201, 198, 201, 198, 2, 3280, 201, 198, 4798, 7, 504, 8, 201, 198 ]
2.111111
45
import torch import matplotlib.pyplot as plt import numpy as np device = torch.device("cuda") rays = torch.tensor([[[x,y,4,1],[0,0,-0.5,0]] for x in np.linspace(-0.9,0.9,20) for y in np.linspace(-0.1,0.1,3)],dtype=torch.float, device=device) mirror=torch.tensor( [ [ 0.2, 0 , 0 , 0 ], [ 0 , 0.2,...
[ 11748, 28034, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 628, 198, 25202, 796, 28034, 13, 25202, 7203, 66, 15339, 4943, 628, 628, 198, 20477, 796, 28034, 13, 83, 22854, 26933, 30109...
1.973635
531
# !/usr/bin/env python # -*- coding: UTF-8 -*- from base import BaseObject from datagit.graph.dmo.util import GraphNodeDefGenerator from datagit.graph.dmo.util import GraphNodeIdGenerator from datagit.graph.dmo.util import GraphTextSplitter from datamongo import CendantRecordParser class CommitNodeBuilder(BaseObjec...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 628, 198, 6738, 2779, 1330, 7308, 10267, 198, 6738, 4818, 363, 270, 13, 34960, 13, 67, 5908, 13, 22602, 1330, 29681, 19667, ...
1.980603
1,856
from flask import json init_product = { 'name': 'Product 1', 'rating': 9.0, 'brand_id': 5, 'items_in_stock': 9, 'categories': [1, 5, 16] }
[ 6738, 42903, 1330, 33918, 198, 198, 15003, 62, 11167, 796, 1391, 198, 220, 220, 220, 705, 3672, 10354, 705, 15667, 352, 3256, 198, 220, 220, 220, 705, 8821, 10354, 860, 13, 15, 11, 198, 220, 220, 220, 705, 17938, 62, 312, 10354, 642...
2.126582
79
import unittest import atomic if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 17226, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.6
30
from .enumerations import Enumerations
[ 6738, 764, 268, 6975, 602, 1330, 2039, 6975, 602, 198 ]
3.9
10
import sys if len(sys.stdin.readline()) >= len(sys.stdin.readline()): print "go" else: print "no"
[ 11748, 25064, 198, 198, 361, 18896, 7, 17597, 13, 19282, 259, 13, 961, 1370, 28955, 18189, 18896, 7, 17597, 13, 19282, 259, 13, 961, 1370, 3419, 2599, 198, 220, 220, 220, 3601, 366, 2188, 1, 198, 17772, 25, 198, 220, 220, 220, 3601,...
2.276596
47
from absl import flags from collections import deque import erdos import time from pylot.utils import time_epoch_ms flags.DEFINE_bool('visualize_tracker_output', False, 'True to enable visualization of tracker output')
[ 6738, 2352, 75, 1330, 9701, 198, 6738, 17268, 1330, 390, 4188, 198, 11748, 1931, 37427, 198, 11748, 640, 198, 198, 6738, 279, 2645, 313, 13, 26791, 1330, 640, 62, 538, 5374, 62, 907, 198, 198, 33152, 13, 7206, 29940, 62, 30388, 10786,...
3
80
import itertools import logging import operator import os from typing import Mapping, Sequence import orjson from peewee import ( CharField, DateTimeField, FixedCharField, ForeignKeyField, IntegerField, IPField, Model, ModelSelect, ModelUpdate, SqliteDatabase, ) from playhouse.s...
[ 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 10088, 198, 11748, 28686, 198, 6738, 19720, 1330, 337, 5912, 11, 45835, 198, 198, 11748, 393, 17752, 198, 6738, 613, 413, 1453, 1330, 357, 198, 220, 220, 220, 3178, 15878, 11, 198, ...
2.897561
205
import datetime import pytz import discord.ext.commands from typing import Optional, Tuple from stalkbroker import models, errors ONE_DAY: datetime.timedelta = datetime.timedelta(days=1) SUNDAY = 6 def validate_price_period( date: datetime.date, time_of_day: Optional[models.TimeOfDay] ) -> None: """ Va...
[ 11748, 4818, 8079, 198, 11748, 12972, 22877, 198, 11748, 36446, 13, 2302, 13, 9503, 1746, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 198, 6738, 31297, 7957, 6122, 1330, 4981, 11, 8563, 628, 198, 11651, 62, 26442, 25, 4818, 8079...
2.674717
3,354
import os from math import prod INPUT_FILE = os.path.join(os.path.dirname(__file__), "input") if __name__ == "__main__": result = part1() print(result) result = part2() print(result)
[ 11748, 28686, 198, 6738, 10688, 1330, 40426, 198, 198, 1268, 30076, 62, 25664, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 366, 15414, 4943, 628, 628, 198, 198, 361, 11593, 3672, 834, ...
2.481928
83
import numpy as np from scipy.optimize import check_grad ## logistic regression
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 2198, 62, 9744, 198, 198, 2235, 2604, 2569, 20683, 220, 628, 198, 220, 220, 220, 220, 628 ]
2.903226
31
import pysam import sys fn=sys.argv[1] rfh=open(sys.argv[1]+'_multi_split_aligned_temp.txt','w') IDs=[] align=[] splits=['1','1-1','1-2','1-3','2-3','2-2','2-1','2'] count=0 rfh.write('temp_ID\tID\t'+'\t'.join(splits)+'\n') dfh=pysam.AlignmentFile(fn, "rb") pre_ID='' count=0 locs=[] for i in splits: locs.append('...
[ 11748, 279, 893, 321, 198, 11748, 25064, 198, 22184, 28, 17597, 13, 853, 85, 58, 16, 60, 198, 41871, 71, 28, 9654, 7, 17597, 13, 853, 85, 58, 16, 48688, 6, 62, 41684, 62, 35312, 62, 41634, 62, 29510, 13, 14116, 41707, 86, 11537, ...
1.88151
768
""" The Azure ML pipeline for running a basic experiment for which the graph is dynamically generated based on a parameter value. to execute: > python pipelines/experiments/demo_dynamic_graph.py --config-dir pipelines/config --config-name experiments/demo_dynamic_graph run.submit=True """ # pylint: disable=no-member #...
[ 37811, 198, 464, 22134, 10373, 11523, 329, 2491, 257, 4096, 6306, 329, 543, 262, 4823, 318, 32366, 7560, 1912, 319, 257, 11507, 1988, 13, 198, 198, 1462, 12260, 25, 198, 29, 21015, 31108, 14, 23100, 6800, 14, 9536, 78, 62, 67, 28995, ...
2.859568
1,296
# Copyright (c) 2021-2022, InterDigital Communications, Inc # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted (subject to the limitations in the disclaimer # below) provided that the following conditions are met: # * Redistributions of source cod...
[ 2, 15069, 357, 66, 8, 33448, 12, 1238, 1828, 11, 4225, 27640, 14620, 11, 3457, 198, 2, 1439, 2489, 10395, 13, 198, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, ...
3.084795
1,026
database = {"name": "eccubevtt", "host": "localhost", "user_name": "root", "password": "root"} schema_folder = "schemas" model_folder = "models" list_tables = []
[ 48806, 796, 19779, 3672, 1298, 366, 68, 535, 549, 1990, 926, 1600, 366, 4774, 1298, 366, 36750, 1600, 366, 7220, 62, 3672, 1298, 366, 15763, 1600, 366, 28712, 1298, 366, 15763, 20662, 198, 15952, 2611, 62, 43551, 796, 366, 1416, 4411, ...
2.745763
59
from keras.applications.inception_resnet_v2 import InceptionResNetV2 from keras import * from keras.preprocessing import image from keras.applications.inception_resnet_v2 import preprocess_input, decode_predictions import numpy as np model = InceptionResNetV2(include_top=True, weights='imagenet', input_tensor=None, i...
[ 6738, 41927, 292, 13, 1324, 677, 602, 13, 924, 1159, 62, 411, 3262, 62, 85, 17, 1330, 554, 4516, 4965, 7934, 53, 17, 198, 6738, 41927, 292, 1330, 1635, 198, 6738, 41927, 292, 13, 3866, 36948, 1330, 2939, 198, 6738, 41927, 292, 13, ...
2.726154
325
import pygame from utils import Colors
[ 11748, 12972, 6057, 198, 6738, 3384, 4487, 1330, 29792, 628 ]
4
10
# -*- coding: utf-8 -*- """strategy inialization. """ _name2startegy_cls = {} def get_names(): """get strategy names """ return list(_name2startegy_cls.keys()) def get_strategy_cls(name): """name 2 strategy cls """ return _name2startegy_cls[name] def init_strategy(name, args): """init...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 2536, 4338, 287, 498, 1634, 13, 198, 37811, 198, 198, 62, 3672, 17, 9688, 68, 1360, 62, 565, 82, 796, 23884, 628, 198, 4299, 651, 62, 14933, 33529, 198, 220, ...
2.457045
291
# pylint: disable=no-self-use,invalid-name from allennlp.common.util import ensure_list from allennlp.data import Vocabulary from qasper_baselines.dataset_reader import QasperReader
[ 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 944, 12, 1904, 11, 259, 12102, 12, 3672, 198, 6738, 477, 1697, 34431, 13, 11321, 13, 22602, 1330, 4155, 62, 4868, 198, 6738, 477, 1697, 34431, 13, 7890, 1330, 47208, 22528, 198, 198, 6738,...
3.118644
59
import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap from ..cle.cle_image import CLEImageExplainer from ..explainer import Explainer from ..exceptions import XDeepError plt.rcParams.update({'font.size': 12})
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 4033, 669, 1330, 44800, 41030, 12061, 5216, 579, 499, 198, 198, 6738, 11485, 2375, 13, 2375, 62, 9060, 1330, ...
3.246914
81
from sklearn.linear_model.base import BaseEstimator, LinearClassifierMixin import sklearn import numpy as np from copy import deepcopy from utils import roc_auc_score_reversed import tt import logging class TTRegression(BaseEstimator, LinearClassifierMixin): """This class alows to optimize functions of the foll...
[ 6738, 1341, 35720, 13, 29127, 62, 19849, 13, 8692, 1330, 7308, 22362, 320, 1352, 11, 44800, 9487, 7483, 35608, 259, 198, 11748, 1341, 35720, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 3384, 4487, ...
2.043626
6,166
# -*- coding: utf-8 -*- # © 2017-2019, ETH Zurich, Institut für Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Implements line evaluation with the shortest path method. """ import networkx as nx from ..._cluster import _DISTANCE_KEY from ..._logging import IDENTIFY_LOGGER _WEIGHT_KEY = '_weight' ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 10673, 2177, 12, 23344, 11, 35920, 43412, 11, 37931, 315, 277, 25151, 383, 9997, 46097, 8687, 1134, 198, 2, 6434, 25, 11817, 1134, 402, 411, 354, 1279, 34239, ...
1.979798
2,772
from selenium import webdriver # def open_login_user_menu(self): # self.driver.get("https://demo23.opencart.pro/index.php?route=account/login") # def select_login(self): # self.driver.find_element_by_css_selector("//*[@id='input-email"]").click()
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 628, 198, 220, 220, 220, 1303, 825, 1280, 62, 38235, 62, 7220, 62, 26272, 7, 944, 2599, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 2116, 13, 26230, 13, 1136, 7203, 5450, 1378, 9536, 78, ...
2.490909
110
# =============================================================================== # Copyright 2017 ross # # 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/LICE...
[ 2, 38093, 25609, 855, 198, 2, 15069, 2177, 686, 824, 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...
4.469298
228
from __future__ import division from __future__ import print_function import numpy as np from scipy.stats import rv_discrete, entropy from copy import deepcopy class ToyWorldAction(object): ''' Up, down, left, right ''' class ToyWorldState(object): ''' Belief is just the curre...
[ 6738, 11593, 37443, 834, 1330, 7297, 201, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 629, 541, 88, 13, 34242, 1330, 374, 85, 62, 15410, 8374, 11, 40709, 201, ...
2.669231
130
import mayavi.mlab import numpy as np import argparse import os parser = argparse.ArgumentParser(description='Generate Libar') parser.add_argument('--image', type=str, default='0') args = parser.parse_args() dirname = os.path.dirname(__file__) pointcloud = np.fromfile(os.path.join(dirname, args.i...
[ 11748, 743, 15820, 13, 4029, 397, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 8645, 378, 7980, 283, 11537, 198, 48610, 13, 2...
2.115318
581
# encoding=utf-8 import matplotlib.pyplot as plt from search import * import datetime import numpy as np '''The running time for n=3 ''' Graph=nPuzzleGraph(3) initialState=get_random(Graph,3) time=[] table={0:BFS(Graph,initialState),1:DFS(Graph,initialState),2:DLS(Graph,initialState,1000),\ 3:IDS(Graph,initialState)} ...
[ 2, 21004, 28, 40477, 12, 23, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2989, 1330, 1635, 198, 11748, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 198, 7061, 6, 464, 2491, 640, 329, 299, 28, 18,...
2.463542
576