content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright 2020 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, 12131, 3012, 11, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, ...
2.938272
567
from django.apps import apps from django.utils.translation import ugettext_lazy as _ from mayan.apps.acls.classes import ModelPermission from mayan.apps.acls.links import link_acl_list from mayan.apps.acls.permissions import permission_acl_edit, permission_acl_view from mayan.apps.common.apps import MayanAppConf...
[ 6738, 42625, 14208, 13, 18211, 1330, 6725, 201, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 201, 198, 201, 198, 6738, 743, 272, 13, 18211, 13, 330, 7278, 13, 37724, 1330, 9104, 5990,...
2.861915
449
import builtins from importlib import import_module from fhirbug.exceptions import ( MappingValidationError, UnsupportedOperationError, MappingException, ) from fhirbug.Fhir import resources as fhir from fhirbug.config import import_searches, import_models, settings from fhirbug.server import get_request_co...
[ 11748, 3170, 1040, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 6738, 277, 71, 343, 25456, 13, 1069, 11755, 1330, 357, 198, 220, 220, 220, 337, 5912, 7762, 24765, 12331, 11, 198, 220, 220, 220, 791, 15999, 32180, 12331, 11, 198,...
2.64708
2,808
# Crie uma função que recebe 4 notas de um aluno, e exiba a média dele. nota1 = int(input('Primeira nota: ')) nota2 = int(input('Segunda nota: ')) nota3 = int(input('Terceira nota: ')) nota4 = int(input('Quarta nota: ')) media(nota1, nota2, nota3, nota4)
[ 2, 327, 5034, 334, 2611, 1257, 16175, 28749, 8358, 1407, 1350, 604, 407, 292, 390, 23781, 435, 36909, 11, 304, 409, 23718, 257, 285, 2634, 67, 544, 10881, 13, 198, 198, 1662, 64, 16, 796, 493, 7, 15414, 10786, 26405, 8704, 407, 64, ...
2.236842
114
from data_import_scripts.api_import import get_uniprot_api_data, \ get_pubchem_api_data from PhosQuest_app.data_access.sqlalchemy_declarative import Kinase, \ Substrate, Inhibitor kin_uniprot_df = get_uniprot_api_data(Kinase) subs_uniprot_df = get_uniprot_api_data(Substrate) inh_pubch_df = get_pubchem_api_dat...
[ 6738, 1366, 62, 11748, 62, 46521, 13, 15042, 62, 11748, 1330, 651, 62, 403, 541, 10599, 62, 15042, 62, 7890, 11, 3467, 198, 220, 220, 220, 651, 62, 12984, 15245, 62, 15042, 62, 7890, 198, 6738, 1380, 418, 12166, 62, 1324, 13, 7890, ...
2.430657
137
# Generated by Django 4.0.2 on 2022-02-11 19:21 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 17, 319, 33160, 12, 2999, 12, 1157, 678, 25, 2481, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# add path to upload the class which we will inherit import sys sys.path.append('../Q1/') from SVM import * class SVM_decompose(SVM): ############################################################################################################## """ Create constrains and initialize the alpha ...
[ 2, 751, 3108, 284, 9516, 262, 1398, 543, 356, 481, 16955, 220, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 48, 16, 14, 11537, 198, 198, 6738, 311, 15996, 1330, 1635, 628, 628, 198, 4871, 311, 15996, 62, 12501, ...
2.269321
1,708
from torch import device as th_dev from torch.cuda import is_available as cuda_avail #
[ 6738, 28034, 1330, 3335, 355, 294, 62, 7959, 198, 6738, 28034, 13, 66, 15339, 1330, 318, 62, 15182, 355, 269, 15339, 62, 615, 603, 198, 198, 2, 198 ]
3.142857
28
from input_data import InputData import numpy from model import SkipGramModel from torch.autograd import Variable import torch import torch.nn as nn import torch.optim as optim from tqdm import tqdm import sys if __name__ == '__main__': w2v = Word2Vec(input_file_name=sys.argv[1], output_file_name=sys.argv[2]) ...
[ 6738, 5128, 62, 7890, 1330, 23412, 6601, 198, 11748, 299, 32152, 198, 6738, 2746, 1330, 32214, 38, 859, 17633, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748...
2.760331
121
# coding: utf-8 """ FastScore API (proxy) No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.7 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # import models...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 12549, 26595, 7824, 357, 36436, 8, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, ...
3.2125
480
from court_scraper.case_info import CaseInfo
[ 6738, 2184, 62, 1416, 38545, 13, 7442, 62, 10951, 1330, 8913, 12360, 628, 628 ]
3.428571
14
import tempfile from ..common import check_call
[ 11748, 20218, 7753, 198, 6738, 11485, 11321, 1330, 2198, 62, 13345, 628 ]
4.083333
12
# Copyright 2016-19 Steven Cooper # # 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 writ...
[ 2, 15069, 1584, 12, 1129, 8239, 10382, 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,...
2.723204
9,451
''' 1. given a configuration in a dictionary, generate a corresponding Coq representation 2. call coqc to check validate with configuration, and return true or false needed information: 1. parameters' modules ''' import pandas as pd from sysconf import cfg from util import util import os import subprocess
[ 7061, 6, 198, 16, 13, 1813, 257, 8398, 287, 257, 22155, 11, 7716, 257, 11188, 1766, 80, 10552, 198, 17, 13, 869, 763, 80, 66, 284, 2198, 26571, 351, 8398, 11, 290, 1441, 2081, 393, 3991, 198, 198, 27938, 1321, 25, 198, 220, 220, ...
3.9
80
from itertools import product import numpy as np import nose.tools as nt from ..convenience import lasso, step, threshold
[ 6738, 340, 861, 10141, 1330, 1720, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 9686, 13, 31391, 355, 299, 83, 198, 198, 6738, 11485, 1102, 574, 1240, 1330, 300, 28372, 11, 2239, 11, 11387, 628 ]
3.542857
35
""" This is a pure python implementation of the merge sort algorithm For doctests run following command: python -m doctest -v merge_sort.py or python3 -m doctest -v merge_sort.py For manual testing run: python merge_sort.py """ from __future__ import print_function def merge_sort(collection): """Pure implementa...
[ 37811, 198, 1212, 318, 257, 5899, 21015, 7822, 286, 262, 20121, 3297, 11862, 198, 198, 1890, 10412, 3558, 1057, 1708, 3141, 25, 198, 29412, 532, 76, 10412, 395, 532, 85, 20121, 62, 30619, 13, 9078, 198, 273, 198, 29412, 18, 532, 76, ...
2.238861
808
from http.server import HTTPServer from server.requests import RequestHandler from server.game import Game
[ 171, 119, 123, 6738, 2638, 13, 15388, 1330, 38288, 18497, 198, 6738, 4382, 13, 8897, 3558, 1330, 19390, 25060, 198, 6738, 4382, 13, 6057, 1330, 3776, 198 ]
4
27
"""Environment configuration API""" import os from flask import Flask app = Flask(__name__) # pylint: disable=invalid-name app.config['SECRET_KEY'] = 'secret!' VERSION = '0.2' ROOT_RESOURCE_NAME = os.environ.get('ROOT_RESOURCE_NAME') app.config['ROOT_RESOURCE_NAME'] = ROOT_RESOURCE_NAME from config_api...
[ 37811, 31441, 8398, 7824, 37811, 201, 198, 201, 198, 11748, 28686, 201, 198, 6738, 42903, 1330, 46947, 201, 198, 201, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 220, 1303, 279, 2645, 600, 25, 15560, 28, 259, 12102, 12, 3672, 201, ...
2.72973
148
import tensorflow as tf import pandas as pd from tensorflow import keras from tensorflow.keras import layers from sklearn.metrics import roc_curve import numpy as np keras.backend.set_floatx('float64')
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 11685, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 686, 66...
2.876712
73
import os import numpy as np import eval_performance import tensorflow as tf from keras import backend as K from keras.models import Sequential, Model from keras.layers import Dense, Dropout, Input, concatenate os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' num_epoch, batch_size = 45, 50 input_dim, random_dim, output_dim = ...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 5418, 62, 26585, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 11, 9104, 198, ...
2.706334
521
#!/usr/bin/env python import os import re import tempfile import unittest import libvirt_setup FIXTURE_DIR = os.path.join(os.path.dirname(__file__), 'fixtures') TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'templates') # helper class to pass arguments def filter_vm_xml(xmlstr): """filter libvirt V...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 198, 11748, 9195, 48940, 62, 40406, 198, 198, 47084, 51, 11335, 62, 34720, 796, 28686, 13, 6978, ...
2.756757
222
from flask import Flask from flask import jsonify from flask import request from flask_login import LoginManager, login_required, current_user from api.interfaces.ordering.version0 import API from api.domain.user import User from api.util import lowercase_all from api.domain import api_operations_v0 from functools impo...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 33918, 1958, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 38235, 1330, 23093, 13511, 11, 17594, 62, 35827, 11, 1459, 62, 7220, 198, 6738, 40391, 13, 3849, 32186, 13, 34555, 13, 96...
2.668383
971
from collections import defaultdict, deque, namedtuple import numpy as np import pybullet as p from pybullet_planning.utils import CLIENT, BASE_LINK, STATIC_MASS ##################################### # https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit# DynamicsInfo = namedtuple('D...
[ 198, 6738, 17268, 1330, 4277, 11600, 11, 390, 4188, 11, 3706, 83, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 15065, 1616, 355, 279, 198, 198, 6738, 12972, 15065, 1616, 62, 11578, 768, 13, 26791, 1330, 45148, 11, ...
2.258656
491
import pandas as pd import os import time
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 640, 198 ]
3.230769
13
# Each new term in the Fibonacci sequence is generated by adding the previous # two terms. By starting with 1 and 2, the first 10 terms will be: # # 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... # # By considering the terms in the Fibonacci sequence whose values do not exceed n, # find the sum of the even-valued ...
[ 2, 5501, 649, 3381, 287, 262, 41566, 261, 44456, 8379, 318, 7560, 416, 4375, 262, 2180, 198, 2, 734, 2846, 13, 2750, 3599, 351, 352, 290, 362, 11, 262, 717, 838, 2846, 481, 307, 25, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, ...
3.190083
121
import math from cctbx.crystal import symmetry from libtbx.phil import parse from dials.array_family import flex from dials.util import tabulate """ Class to find a reasonable cutoff for integration based on work in LABELIT. Bins the reflection table by resolution, then finds the first bin that goes under a given I/...
[ 11748, 10688, 198, 198, 6738, 269, 310, 65, 87, 13, 20470, 7757, 1330, 40686, 198, 6738, 9195, 83, 65, 87, 13, 28864, 1330, 21136, 198, 198, 6738, 5980, 82, 13, 18747, 62, 17989, 1330, 7059, 198, 6738, 5980, 82, 13, 22602, 1330, 740...
2.962162
370
# This functions must handle one or multiple columns # Must return None if the data type can not be handle from datetime import datetime, timedelta import dask.array as da import pandas as pd from dask.array import stats from dask.dataframe.core import Series # DataFrame = pd.DataFrame from optimus.engines.base.fun...
[ 2, 770, 5499, 1276, 5412, 530, 393, 3294, 15180, 198, 2, 12039, 1441, 6045, 611, 262, 1366, 2099, 460, 407, 307, 5412, 628, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 11748, 288, 2093, 13, 18747, 355, 12379, ...
3.532787
122
#waits in slenium from selenium import webdriver import time driver=webdriver.Chrome() #implicite wait- check again and again after 5 sec driver.implicitly_wait(5) driver.get("http://www.seleniumframework.com/practiceform/") element=driver.find_element_by_id("periodicElement") print(element.text) drive...
[ 2, 10247, 896, 287, 1017, 47477, 201, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 11748, 640, 201, 198, 201, 198, 26230, 28, 12384, 26230, 13, 1925, 5998, 3419, 201, 198, 201, 198, 2, 23928, 291, 578, 4043, 12, 2198, 7...
2.827586
116
#!/usr/bin/env /usr/bin/python3 # -*- coding: utf-8 -*- # ----------------------------------------------- # ROS Node # コンソールとステータスの制御 # # The MIT License (MIT) # Copyright (C) 2019 myasu. # ----------------------------------------------- import rclpy import time from rclpy.node import Node # カスタムメッセージ fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 1220, 14629, 14, 8800, 14, 29412, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 20368, 24305, 201, 198, 2, 48263, 19081, 201, 198, 2, 17433, 111, 6527, ...
1.545906
2,015
# # Copyright (C) 2020 Arm Mbed. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # import pathlib from unittest import TestCase, mock from datetime import datetime from tempfile import TemporaryDirectory from mbed_tools_ci_scripts.utils.configuration import configuration, ConfigurationVariable from mbed_tool...
[ 2, 198, 2, 15069, 357, 34, 8, 12131, 7057, 337, 3077, 13, 1439, 2489, 10395, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 11748, 3108, 8019, 198, 6738, 555, 715, 395, 1330, 6208, 204...
3.520661
121
from json import JSONDecoder, JSONEncoder import aiofiles from utils import run_command, Path import os decoder = JSONDecoder() encoder = JSONEncoder() async def stat_data(full_path: str, isFolder=False) -> dict: """ only call this on a validated full path """ file_stats = os.stat(full_path) file...
[ 6738, 33918, 1330, 19449, 10707, 12342, 11, 19449, 27195, 12342, 198, 11748, 257, 952, 16624, 198, 6738, 3384, 4487, 1330, 1057, 62, 21812, 11, 10644, 198, 11748, 28686, 198, 198, 12501, 12342, 796, 19449, 10707, 12342, 3419, 198, 12685, ...
2.417238
1,021
# # PySNMP MIB module MCC16-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MCC16-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:00:39 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 337, 4093, 1433, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562, 19, ...
2.404116
150,093
import os import logging APP_ROOT = os.path.dirname(os.path.abspath(__file__)) LOG_FORMAT = "%(asctime)s - %(levelname)s - %(message)s" LOG_LEVEL = logging.DEBUG
[ 11748, 28686, 198, 11748, 18931, 198, 198, 24805, 62, 13252, 2394, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 25294, 62, 21389, 1404, 796, 36521, 7, 292, 310, 524, 8, ...
2.397059
68
from celery_tasks.main import app from .yuntongxun.sms import CCP from . import constants # taks()中可以填写 任务名称, 如果不填, 则把当前任务作为 任务名称 @app.task(name='send_sms_code') def send_sms_code(mobile, sms_code): """ 发送短信的异步任务 :param mobile: 手机号 :param sms_code: 短信验证码 :return: None """ ccp = CCP() ti...
[ 6738, 18725, 1924, 62, 83, 6791, 13, 12417, 1330, 598, 198, 6738, 764, 88, 2797, 506, 87, 403, 13, 82, 907, 1330, 37963, 198, 6738, 764, 1330, 38491, 198, 198, 2, 256, 4730, 3419, 40792, 20998, 107, 20015, 98, 161, 94, 104, 37863, ...
1.611722
273
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import pytest from easy_python_requirements.parsed import parse_doc from easy_python_requirements.exceptions import MultipleStringError
[ 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, 11748, 12972, 9288, 198, 198, 6738, 2562, 62, 29412, 62, 8897, 18883, 13, 79, 945, 276, 1330, 21136, 62, 153...
3.04918
61
import pickle import scipy.io as sio import skimage.io as imgio from keras import optimizers from keras.models import model_from_json import pandas as pd import time import math from utilities import * from dataset import Dataset from adp_cues import ADPCues LOG_ROOT = './log' MODEL_ROOT = '../database/models_cnn' CK...
[ 11748, 2298, 293, 198, 11748, 629, 541, 88, 13, 952, 355, 264, 952, 198, 11748, 1341, 9060, 13, 952, 355, 545, 27769, 198, 6738, 41927, 292, 1330, 6436, 11341, 198, 6738, 41927, 292, 13, 27530, 1330, 2746, 62, 6738, 62, 17752, 198, ...
2.021283
15,693
''' Provides composition class, MetaPandasObject, which is an ordinary python object that stores a Dataframe and attempts to promote attributes and methods to the instance level (eg self.x instead of self.df.x). This object can be subclassed and ensures persistence of custom attributes. The goal of this MetaPandasOb...
[ 7061, 6, 47081, 11742, 1398, 11, 30277, 47206, 292, 10267, 11, 543, 318, 281, 8850, 21015, 2134, 326, 7000, 257, 6060, 14535, 290, 220, 198, 1078, 1791, 82, 284, 7719, 12608, 290, 5050, 284, 262, 4554, 1241, 357, 1533, 2116, 13, 87, ...
2.546283
4,721
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license """ Utilities to deal with multitenancy within a single Tree.io process """ from django.conf import settings from treeio.core.models import ConfigSetting from pandora import box
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 15069, 2813, 12200, 13, 952, 15302, 198, 2, 770, 2393, 318, 636, 286, 12200, 952, 13, 198, 2, 13789, 7324, 13, 21048, 13, 952, 14, 43085, 198, 198, 37811, 198, 18274, 2410, 284, 1730, 351, ...
3.53012
83
MESSAGES = { 'default': 'Hello to the World of Flask!', }
[ 44, 1546, 4090, 48075, 796, 1391, 198, 220, 220, 220, 705, 12286, 10354, 705, 15496, 284, 262, 2159, 286, 46947, 0, 3256, 198, 92, 198 ]
2.48
25
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
import rospy import subprocess import rosnode from sensor_msgs.msg import Imu import sys from crab_msgs.msg import apm_imu from crab_msgs.msg import BodyCommand from crab_msgs.msg import BodyState from crab_msgs.msg import GaitCommand from crab_msgs.msg import LegIKRequest from crab_msgs.msg import LegJointsState from ...
[ 11748, 686, 2777, 88, 198, 11748, 850, 14681, 198, 11748, 686, 16184, 1098, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, 1846, 84, 198, 11748, 25064, 198, 6738, 32202, 62, 907, 14542, 13, 19662, 1330, 2471, 76, 62, 320, 84, 198,...
2.435356
758
from django.db.models import Q from django.http import HttpResponse from django.shortcuts import render from django.views.generic import View from pure_pagination import Paginator, PageNotAnInteger from courses.models import Course from operation.models import UserFavorite from .foms import UserAskForm from .models im...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 3582, 198, 6738, ...
2.180233
344
import sys; from datetime import datetime, timedelta; from mikecore.DfsFile import *; from mikecore.DfsFileFactory import *; def DfsShowInfo(dfsFileName, showAxis = False): '''Writes dfs info to console ''' dfs = DfsFileFactory.DfsGenericOpen(dfsFileName) txt = sys.stdout txt.write('FileName ...
[ 11748, 25064, 26, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 26, 198, 6738, 285, 522, 7295, 13, 35, 9501, 8979, 1330, 1635, 26, 198, 6738, 285, 522, 7295, 13, 35, 9501, 8979, 22810, 1330, 1635, 26, 198, 198, 4299, 36...
2.156198
2,388
#!/usr/bin/env python if __name__ == "__main__": every = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 80, 96, 108, 120, 144, 168, 192, 216, 240, 288, 324, 360, 432, 504, 576, 648, 720, 864, 972, 1152, 1296, 1440, 1728, 2016, 2304, 2592, 2880, 3456, 3888, 4608, 5184, 57...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 790, 796, 685, 15, 11, 352, 11, 362, 11, 513, 11, 604, 11, 642, 11, 718, 11, 767, 11, 807, 11, ...
2.208381
1,766
# -*- coding: utf-8 -*- """ Created on Mon Apr 20 13:51:06 2020 @author: vgadi """ import numpy as np import pandas as pd amex = "378282246310000" if(validate_credit_card(amex) == 1): print("Credit card is legit!") else: print("Credit card is faulty") #def luhnalg(num): # ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 2758, 1160, 1511, 25, 4349, 25, 3312, 12131, 201, 198, 201, 198, 31, 9800, 25, 410, 70, 9189, 201, 198, 37811, 201, 198, 201, ...
1.538012
684
from .SemioticSquare import SemioticSquare
[ 6738, 764, 13900, 16357, 48011, 1330, 12449, 16357, 48011 ]
4.666667
9
#!/usr/bin/env python3 import client import client_tls
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 5456, 198, 11748, 5456, 62, 83, 7278, 198 ]
2.894737
19
#supervised learning model prediction from sklearn.linear_model import LinearRegression lr = LinearRegression() y_pred = lr.predict(X_test) from sklearn.svm import SVC svc = SVC(kernel='linear') y_pred = svc.predict(np.random.random((2,5))) from sklearn import neighbors knn = neighbors.KNeighborsClassifier(n_neighbor...
[ 2, 16668, 16149, 4673, 2746, 17724, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 198, 14050, 796, 44800, 8081, 2234, 3419, 198, 88, 62, 28764, 796, 300, 81, 13, 79, 17407, 7, 55, 62, 9288, 8, 198, 198, 6738...
2.730159
189
""" 10x-sequencing specific utility functions. """ import logging import itertools import os from collections import defaultdict import tempfile import time import glob import re import screed from tqdm import tqdm import pandas as pd CELL_BARCODES = ['CB', 'XC'] UMIS = ['UB', 'XM'] TENX_TAGS = "CB,UB,XC,XM" CELL_BA...
[ 37811, 198, 940, 87, 12, 3107, 9532, 2176, 10361, 5499, 13, 198, 37811, 198, 198, 11748, 18931, 198, 11748, 340, 861, 10141, 198, 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 20218, 7753, 198, 11748, 640, 198, 198, 117...
2.28512
9,617
from __future__ import absolute_import import copy import datetime import functools import logging import random import tempfile from collections import namedtuple from typing import (Any, Callable, Dict, Generator, Iterable, List, Mapping, MutableMapping, MutableSequence, Optio...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 4866, 198, 11748, 4818, 8079, 198, 11748, 1257, 310, 10141, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 20218, 7753, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738,...
2.473295
1,217
from discord.ext import commands import discord from Help import MyHelpCommand import inspect import db.db_adapter as db
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 36446, 198, 6738, 10478, 1330, 2011, 22087, 21575, 198, 11748, 10104, 198, 11748, 20613, 13, 9945, 62, 324, 3429, 355, 20613, 628, 220, 220, 220, 220 ]
3.705882
34
import mechanize, json, os, datetime, pytz, csv from bs4 import BeautifulSoup from dateutil import rrule import dateutil
[ 11748, 3962, 1096, 11, 33918, 11, 28686, 11, 4818, 8079, 11, 12972, 22877, 11, 269, 21370, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 3128, 22602, 1330, 374, 25135, 198, 11748, 3128, 22602 ]
3.333333
36
"""Community-inspired solution to day 4.""" class Board: """A bingo board.""" def __init__(self, values: list[int]) -> None: """Initialise the board. Args: values: The board values row-wise or column-wise. """ self.lines = [] # rows and columns for i in r...
[ 37811, 20012, 12, 24194, 4610, 284, 1110, 604, 526, 15931, 628, 198, 4871, 5926, 25, 198, 220, 220, 220, 37227, 32, 275, 32735, 3096, 526, 15931, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 3815, 25, 1351, 58, 600, 12962...
2.174586
905
li=[2,4,8,7,9,12,45] final_list = list(map(lambda x:x*2,li)) print(final_list) # Python code # map() with lambda() # to get double of a list.
[ 4528, 41888, 17, 11, 19, 11, 23, 11, 22, 11, 24, 11, 1065, 11, 2231, 60, 198, 20311, 62, 4868, 796, 1351, 7, 8899, 7, 50033, 2124, 25, 87, 9, 17, 11, 4528, 4008, 198, 4798, 7, 20311, 62, 4868, 8, 198, 2, 11361, 2438, 220, 22...
2.19403
67
import numpy as np import pandas as pd import os from Dataset import KaggleDataset from Models import LightGBM, RNN_LSTM, Ensembler, CatBoost, LiRegression from Submission import create_submission_file, load_submissions_as_data_for_ensembling, merge_leaky_and_ML_sub TRAIN_NAMES = [ 'Train_5FoldFull_CatBoost_GAgg_...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 6738, 16092, 292, 316, 1330, 509, 9460, 293, 27354, 292, 316, 198, 6738, 32329, 1330, 4401, 4579, 44, 11, 371, 6144, 62, 43, 2257, 44, 11, ...
1.861657
2,848
from json import loads, dumps from django.http import HttpRequest, HttpResponse from django.views import View from django.utils.decorators import method_decorator from django.views.decorators.http import require_POST from api.decorators import authenticated, handle_nonexistence from api.services import PostService fro...
[ 6738, 33918, 1330, 15989, 11, 45514, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 18453, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, ...
2.324215
1,974
import sys if __name__ == '__main__': main()
[ 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.380952
21
from functools import wraps from flask import g, redirect
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 42903, 1330, 308, 11, 18941 ]
4.384615
13
import unittest import ply.lex as lex import ply.yacc as yacc import jsparsing, jstokens, jsinterpretast if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 35960, 13, 2588, 355, 31191, 198, 11748, 35960, 13, 88, 4134, 355, 331, 4134, 198, 11748, 474, 2777, 945, 278, 11, 474, 301, 482, 641, 11, 44804, 27381, 459, 198, 198, 361, 11593, 3672, 834, 6624, 7...
2.655172
58
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. ''' brats_iteartor: load brats file, output format np array of shape [C, W, H, D] brats_transforms: data augmentation and turn input into ten...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 628, ...
2.141364
1,627
import constants as const
[ 11748, 38491, 355, 1500, 628 ]
5.4
5
from django.test.testcases import TestCase, override_settings from django.core.management import call_command from django.core.cache import cache from robber import expect
[ 6738, 42625, 14208, 13, 9288, 13, 9288, 33964, 1330, 6208, 20448, 11, 20957, 62, 33692, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 198, 6738, 29979...
3.954545
44
expected_output = { 'GigabitEthernet0/0/0/1': { 'address_family': { 'ipv4': { 'version': { 1: { 'groups': { 5: { 'active_ip_address': 'local', '...
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 220, 705, 38, 328, 29968, 36, 490, 3262, 15, 14, 15, 14, 15, 14, 16, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 21975, 62, 17989, 10354, 1391, 198, 220, 220, 220, 220, 2...
1.332523
4,111
from .mlclubsastra import app
[ 6738, 764, 4029, 18664, 82, 459, 430, 1330, 598 ]
3.222222
9
import torch import torchio as tio from ...utils import TorchioTestCase class TestClamp(TorchioTestCase): """Tests for :class:`tio.Clamp` class."""
[ 11748, 28034, 198, 11748, 28034, 952, 355, 256, 952, 198, 6738, 2644, 26791, 1330, 34868, 952, 14402, 20448, 628, 198, 4871, 6208, 2601, 696, 7, 15884, 40900, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 51, 3558, 329, 1058, 4871, 25,...
2.961538
52
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. from collections import namedtuple import datetime import logging from platform import python_version import requests import tweepy from tweepy.auth import OAuthHandler from tweepy.media import Media from tweepy.place import Place from tweepy...
[ 2, 24205, 538, 88, 198, 2, 15069, 3717, 12, 1238, 2481, 20700, 5564, 408, 33663, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 6738, 3859, 1330...
2.118
4,161
from decimal import Decimal from operator import eq, ne, lt, le, gt, ge import pytest from moneypy.exceptions import IncompatibleCurrencyError from moneypy.money import Money # =================================== TEST CONVERTERS ==================================== @pytest.mark.parametrize('amount, expected', [ ...
[ 6738, 32465, 1330, 4280, 4402, 198, 6738, 10088, 1330, 37430, 11, 497, 11, 300, 83, 11, 443, 11, 308, 83, 11, 4903, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1637, 9078, 13, 1069, 11755, 1330, 554, 38532, 34, 13382, 12331, 198, ...
2.434224
2,957
# -*- coding: cp1252 -*- # # This file is part of Zhockon Platform project. # # Copyright (C) 2009 William Oliveira de Lagos <williamx64@gmail.com> # Copyright (C) 2003 Nilo Menezes <nilo@nilo.pro.br> # # Zhockon is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
[ 2, 532, 9, 12, 19617, 25, 31396, 1065, 4309, 532, 9, 12, 201, 198, 2, 201, 198, 2, 770, 2393, 318, 636, 286, 10511, 735, 261, 19193, 1628, 13, 201, 198, 2, 220, 201, 198, 2, 15069, 357, 34, 8, 3717, 3977, 30012, 8704, 390, 210...
2.743961
414
from numpy import pi import pp from pp.components import taper from pp.components import bend_circular from pp.components import waveguide from pp.routing.manhattan import round_corners from pp.config import WG_EXPANDED_WIDTH, TAPER_LENGTH from pp.component import Component from typing import Callable @pp.autoname de...
[ 6738, 299, 32152, 1330, 31028, 198, 11748, 9788, 198, 6738, 9788, 13, 5589, 3906, 1330, 256, 2136, 198, 6738, 9788, 13, 5589, 3906, 1330, 19396, 62, 21170, 934, 198, 6738, 9788, 13, 5589, 3906, 1330, 6769, 41311, 198, 6738, 9788, 13, ...
2.088785
1,070
from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.Expresiones.Primitivo import Primitivo from storageManager.jsonMode import * class Campo(): 'Esta clase se utiliza para crear un campo'
[ 6738, 2262, 622, 535, 295, 274, 13, 33349, 5031, 8890, 28984, 418, 13, 6310, 622, 535, 295, 1330, 2262, 622, 535, 295, 198, 6738, 2262, 622, 535, 295, 274, 13, 16870, 411, 295, 274, 13, 23828, 270, 23593, 1330, 11460, 270, 23593, 19...
2.934211
76
from os import path from paused import paused from calorieMenu import * from defenseManager import * from gameOver import * import logging import threading import time # Initializes the game, screen size, title, clock object, and prepares to load map data. # Opens the map file and appends all the data to a li...
[ 6738, 28686, 1330, 3108, 198, 6738, 24487, 1330, 24487, 198, 6738, 28740, 23381, 1330, 1635, 198, 6738, 3761, 13511, 1330, 1635, 198, 6738, 983, 5886, 1330, 1635, 198, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 11748, 640, 198, 220, ...
3.741071
112
import sys import torch import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict sys.path.append('..') from tools.utils import *
[ 11748, 25064, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 17597, 13, 6978, 13, 33295, 10786, 492, 11537, 198, ...
3.288462
52
import hashlib import hmac __b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' def base_encode(v, base): """ encode v, which is a string of bytes, to base58.""" if base == 58: chars = __b58chars long_value = 0L for (i, c) in enumerate(v[::-1]): ...
[ 11748, 12234, 8019, 201, 198, 11748, 289, 20285, 201, 198, 201, 198, 834, 65, 3365, 354, 945, 796, 705, 10163, 2231, 3134, 4531, 24694, 32988, 17511, 41, 42, 31288, 22182, 48, 49, 2257, 52, 30133, 34278, 57, 39305, 4299, 456, 45961, 1...
2.033097
423
# _*_ coding:utf-8 _*_ import numpy as np import pandas as pd from sklearn.cross_validation import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error from sklearn.ensemble import RandomForestRegressor, ExtraTreesRegressor, ...
[ 2, 4808, 9, 62, 220, 19617, 25, 40477, 12, 23, 4808, 9, 62, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1341, 35720, 13, 19692, 62, 12102, 341, 1330, 4512, 62, 9288, 62, 35312, 19...
2.158351
922
from setuptools import setup, find_packages import versioneer requirements = [ # package requirements go here ] setup( name='intake-salesforce', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description="Intake driver to load Salesforce data", license="BSD", author=...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 2196, 28153, 198, 198, 8897, 18883, 796, 685, 198, 220, 220, 220, 1303, 5301, 5359, 467, 994, 198, 60, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 600, 5...
2.442661
436
# pylint: disable=line-too-long # pylint: disable=unused-argument # pylint: disable=redefined-outer-name import pytest from helpers.cluster import ClickHouseCluster cluster = ClickHouseCluster(__file__) node = cluster.add_instance("node_default", stay_alive=True) @pytest.fixture(scope="module", autouse=True)
[ 2, 279, 2645, 600, 25, 15560, 28, 1370, 12, 18820, 12, 6511, 198, 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 49140, 198, 2, 279, 2645, 600, 25, 15560, 28, 445, 18156, 12, 39605, 12, 3672, 198, 198, 11748, 12972, 9288, 198, ...
2.943925
107
# Time: O(n) # Space: O(n) # 947 # On a 2D plane, we place stones at some integer coordinate points. Each coordinate point may have at most one stone. # # Now, a move consists of removing a stone that shares a column or row with another stone on the grid. # # What is the largest possible number of moves we can make?...
[ 2, 3862, 25, 220, 440, 7, 77, 8, 198, 2, 4687, 25, 440, 7, 77, 8, 198, 198, 2, 860, 2857, 198, 2, 1550, 257, 362, 35, 6614, 11, 356, 1295, 14966, 379, 617, 18253, 20435, 2173, 13, 220, 5501, 20435, 966, 743, 423, 379, 749, 5...
2.806931
202
import sys sys.path.append("..") # common config for logging in the examples from logconfig import configure_logger_with_name configure_logger_with_name("demo") import remi.gui as gui from remi import start, App import remijquerytools import logging log = logging.getLogger("demo") if __name__ == "__main__": ...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 198, 2, 2219, 4566, 329, 18931, 287, 262, 6096, 198, 6738, 2604, 11250, 1330, 17425, 62, 6404, 1362, 62, 4480, 62, 3672, 198, 11250, 495, 62, 6404, 1362, 62, 4480, ...
2.912088
182
__author__ = 'jie' from strandrep.toehold_item import ToeholdItem from cadnano.cnproxy import ProxySignal,ProxyObject
[ 834, 9800, 834, 796, 705, 73, 494, 6, 198, 6738, 37923, 7856, 13, 44579, 2946, 62, 9186, 1330, 1675, 68, 2946, 7449, 198, 6738, 20603, 77, 5733, 13, 31522, 36436, 1330, 38027, 11712, 282, 11, 44148, 10267 ]
3.162162
37
"""Wirelab Client Settings.""" import os from dotenv import load_dotenv # load_dotenv will look for a .env file and if it finds one # it will load the environment variables from it ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) load_dotenv() # Config file: CONFIG_FILE = "config.json" # AWS QUEUE AWS_QUEUE ...
[ 37811, 29451, 23912, 20985, 16163, 526, 15931, 198, 11748, 28686, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 2, 3440, 62, 26518, 24330, 481, 804, 329, 257, 764, 24330, 2393, 290, 611, 340, 7228, 530, 198, 2, ...
2.701657
362
from txweb.web_site import website from twisted.application import service, internet as app_internet from twisted.web import static, server from twisted.internet import reactor from twisted.internet import threads from twisted.web.server import NOT_DONE_YET from twisted.internet.defer import inlineCallbacks, returnVa...
[ 6738, 27765, 12384, 13, 12384, 62, 15654, 1330, 3052, 198, 198, 6738, 19074, 13, 31438, 1330, 2139, 11, 5230, 355, 598, 62, 37675, 198, 6738, 19074, 13, 12384, 1330, 9037, 11, 4382, 198, 198, 6738, 19074, 13, 37675, 1330, 21905, 198, ...
3.093656
331
#!/usr/bin/env python ''' ---------------- About the script ---------------- Assignment 4: Network analysis: creating reusable network analysis pipeline This command-line tool takes a given dataset and perform simple network analysis. In particular, it builds networks based on entities appearing together in the sam...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 34400, 7994, 262, 4226, 34400, 198, 198, 8021, 16747, 604, 25, 7311, 3781, 25, 4441, 42339, 3127, 3781, 11523, 628, 198, 1212, 3141, 12, 1370, 2891, 2753, 257, 1813, 2703...
2.810651
2,366
import pathlib from pylum.config import CONFIG def mkdir(scripts_dict): """ creates a folder and returns the Path """ assert ( "name" in scripts_dict ), "the scripts dict needs a name, make sure you use the @autoname decorator in the function that returns your dict of scripts" dirpath = C...
[ 11748, 3108, 8019, 198, 198, 6738, 279, 11183, 13, 11250, 1330, 25626, 628, 198, 4299, 33480, 15908, 7, 46521, 62, 11600, 2599, 198, 220, 220, 220, 37227, 8075, 257, 9483, 290, 5860, 262, 10644, 198, 220, 220, 220, 37227, 198, 220, 22...
2.695876
388
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_compress import Compress from flask_debugtoolbar import DebugToolbarExtension from sqlalchemy import exc from sqlalchemy import event from sqlalchemy.pool import NullPool from sqlalchemy.pool import Pool import logging import sys import os imp...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 5589, 601, 1330, 3082, 601, 198, 6738, 42903, 62, 24442, 25981, 5657, 1330, 31687, 25391, 5657, 11627, 3004, 198, 198, 6738...
2.518542
1,591
import networkx as nx import numpy as np import pprint as pp import random from constants import * TEST_MODE = 0 # Standard Make-it-Easy Functions # CONSTRUCT GRAPH """ Create Nodes (Semi Custom)--> Initialize with name (gen), color (static), type (static), flow_rate (gen), *density (dynamic), parent (static) etc....
[ 11748, 3127, 87, 355, 299, 87, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 279, 4798, 355, 9788, 198, 11748, 4738, 198, 6738, 38491, 1330, 1635, 198, 198, 51, 6465, 62, 49058, 796, 657, 198, 198, 2, 8997, 6889, 12, 270, 12, 2840...
3.041667
408
# -*- coding:utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Lic...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, ...
2.164757
7,156
from typing import Dict, List import numpy as np import pandas as pd from core.pickle_utils import loadPickle from sinecosine_model.data_loader_static_sinecosine import ImageLoaderStaticSineCosine
[ 6738, 19720, 1330, 360, 713, 11, 7343, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 4755, 13, 27729, 293, 62, 26791, 1330, 3440, 31686, 293, 198, 6738, 264, 500, 6966, 500, 62, 19849, ...
3.206349
63
import sys import os import json workdir = os.getcwd() config_file = open(r'{0}/output-tmp/output'.format(workdir), 'r') give_status_error = False for line in config_file: data = json.loads(line) has_parse_failure = False if 'tags' in data.keys(): for element in data['tags']: if elemen...
[ 11748, 25064, 198, 11748, 28686, 220, 198, 11748, 33918, 198, 198, 1818, 15908, 796, 28686, 13, 1136, 66, 16993, 3419, 198, 11250, 62, 7753, 796, 1280, 7, 81, 6, 90, 15, 92, 14, 22915, 12, 22065, 14, 22915, 4458, 18982, 7, 1818, 159...
2.098655
446
""" URLConf for Satchmo Contacts. """ from django.conf.urls.defaults import patterns from signals_ahoy.signals import collect_urls from satchmo_store import contact urlpatterns = patterns('satchmo_store.contact.views', (r'^$', 'view', {}, 'satchmo_account_info'), (r'^update/$', 'update', {}, 'satchmo_profile_...
[ 37811, 198, 21886, 18546, 329, 311, 963, 5908, 2345, 8656, 13, 198, 37811, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 7572, 198, 6738, 10425, 62, 993, 726, 13, 12683, 874, 1330, 2824, 62, 6371, 82, 1...
2.627119
177
"""A library of useful sequences. Note: many of the 'infinite' sequences work well in conjuction with helper functions like itertools.takewhile in the repl you can use list coercion: [x for x in takewhile(lambda x: x <= 21, fibonacci())] """ def even(seq): """Filters by even numbers Args: ...
[ 37811, 32, 5888, 286, 4465, 16311, 13, 198, 198, 6425, 25, 198, 220, 220, 220, 867, 286, 262, 705, 10745, 9504, 6, 16311, 670, 880, 287, 11644, 8110, 351, 31904, 5499, 588, 340, 861, 10141, 13, 20657, 4514, 198, 220, 220, 220, 287, ...
2.56
300
import numpy as np from collections import OrderedDict from gym.spaces import Space, Box, Discrete, MultiDiscrete, MultiBinary, Tuple, Dict _BaseGymSpaces = (Box, Discrete, MultiDiscrete, MultiBinary) __all__ = ["_BaseGymSpaces", "batch_space"] def batch_space(space, n=1): """Create a (batched) space, containin...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 11550, 13, 2777, 2114, 1330, 4687, 11, 8315, 11, 8444, 8374, 11, 15237, 15642, 8374, 11, 15237, 33, 3219, 11, 309, 29291, 11, 360, 713, 198, ...
2.51944
643
"""Package version functions.""" import pkg_resources def get_version(): """Retrieve package version.""" version = 'Not installed.' try: version = pkg_resources.get_distribution(__package__).version except pkg_resources.DistributionNotFound: pass return version def print_versio...
[ 37811, 27813, 2196, 5499, 526, 15931, 198, 11748, 279, 10025, 62, 37540, 628, 198, 4299, 651, 62, 9641, 33529, 198, 220, 220, 220, 37227, 9781, 30227, 5301, 2196, 526, 15931, 198, 220, 220, 220, 2196, 796, 705, 3673, 6589, 2637, 628, ...
2.96124
129
__version__ = '0.1.7.dev'
[ 834, 9641, 834, 796, 705, 15, 13, 16, 13, 22, 13, 7959, 6, 198 ]
1.857143
14
#!/usr/bin/env python import os import sys def cmd(command): """ Run system command and exit on failure """ print command if os.system(command) != 0: print 'Error running "%s"' % command print 'Exiting' sys.exit(1) if __name__ == '__main__': # global params: scene = 's...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 628, 198, 4299, 23991, 7, 21812, 2599, 198, 220, 220, 220, 37227, 5660, 1080, 3141, 290, 8420, 319, 5287, 37227, 198, 220, 220, 220, 3601, 3141, 1...
1.998
1,000
from math import sqrt def square(number): '''return the square of a number''' return number * number def get_mean(dataset): '''returns the mean of the given data set''' return sum(dataset)/float(len(dataset)) def get_median(dataset): '''returns the median of the given data set''' sorted_data...
[ 6738, 10688, 1330, 19862, 17034, 198, 198, 4299, 6616, 7, 17618, 2599, 198, 220, 220, 220, 705, 7061, 7783, 262, 6616, 286, 257, 1271, 7061, 6, 198, 220, 220, 220, 1441, 1271, 1635, 1271, 198, 198, 4299, 651, 62, 32604, 7, 19608, 29...
2.282609
966
import pythoncom, time, win32api from win32com.taskscheduler import taskscheduler task_name='test_addtask_2.job' ts=pythoncom.CoCreateInstance(taskscheduler.CLSID_CTaskScheduler,None, pythoncom.CLSCTX_INPROC_SERVER,taskscheduler.IID_ITaskScheduler) tasks=ts.Enum() for task in tasks: pr...
[ 11748, 21015, 785, 11, 640, 11, 1592, 2624, 15042, 198, 6738, 1592, 2624, 785, 13, 83, 6791, 1740, 18173, 1330, 8861, 1740, 18173, 198, 35943, 62, 3672, 11639, 9288, 62, 2860, 35943, 62, 17, 13, 21858, 6, 198, 912, 28, 29412, 785, 1...
2.488619
659
from django.urls import path, include from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() # router.register('room', ) urlpatterns = [ path('create_room/', views.create_room), path('join_room/', views.join_room), path('disconnect/<str:hash>/', views.disconnect), ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 198, 6738, 764, 1330, 5009, 198, 198, 472, 353, 796, 15161, 49, 39605, 3419, 198, 2, 20264, 13, 30238, 1...
2.817518
137
from django.core.management.base import BaseCommand from django.utils.translation import gettext_lazy as _ from proxypay.api import api from proxypay.references import get from proxypay.configs import conf # ==============================================================================================================...
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 14793, 4464, 323, 13, 15042, 1330, 40391, 198, 6738, 14793, ...
5.030769
65
import csv import json from collections import defaultdict from itertools import zip_longest ############################## ######## MAIN PROGRAM ######## ############################## #random_name_to_url() #remove_bad_so()
[ 11748, 269, 21370, 198, 11748, 33918, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 340, 861, 10141, 1330, 19974, 62, 6511, 395, 198, 198, 14468, 7804, 4242, 2235, 198, 7804, 8779, 1268, 46805, 46424, 21017, 198, 14468, 7804, 4242, 2235...
3.8
60
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_keywords 1'] = '[{"lineno": 7, "source": [" a\\n"], "value": "1"}, {"lineno": 7, "source": [" a\\n"], "value": "2"}, {"lineno": 7,...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11495, 1477, 24879, 25, 410, 16, 532, 3740, 1378, 42469, 13, 4743, 14, 89, 34, 19, 88, 52, 66, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 19...
2.417625
261