content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import os from datetime import timedelta # ~~~~~ PATH ~~~~~ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # ~~~~~ TEST ~~~~~ TEST_RUN = getenv_boolean('TEST_RUN', False) # ~~~~~ API ~~~~~ # ~~~~~ SECRET ~~~~~ SECRET_KEY = os.getenv('SECRET_KEY', 'cuerno de unicornio :D') if not SECRE...
[ 11748, 28686, 198, 6738, 4818, 8079, 1330, 28805, 12514, 628, 628, 198, 2, 220, 8728, 93, 46490, 220, 8728, 93, 198, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, ...
2.228916
913
import skvideo.io import skvideo.utils import numpy as np import os import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest @unittest.skipIf(not skvideo._HAS_FFMPEG, "FFmpeg required for this test.") @unittest.skipIf(not skvideo._HAS_AVCONV, "LibAV required for this te...
[ 11748, 1341, 15588, 13, 952, 198, 11748, 1341, 15588, 13, 26791, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 361, 25064, 13, 9641, 62, 10951, 1279, 357, 17, 11, 767, 2599, 198, 220, 220, 220, 13...
2.681564
179
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... setup( ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 34030, 2163, 284, 1100, 262, 20832, 11682, 23...
2.574684
395
from .gan_attack import GAN_Attack # noqa: F401 from .generator_attack import Generator_Attack # noqa: F401 from .mi_face import MI_FACE # noqa: F401
[ 6738, 764, 1030, 62, 20358, 1330, 402, 1565, 62, 27732, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 764, 8612, 1352, 62, 20358, 1330, 35986, 62, 27732, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 764, 11632, 62, 2550, 1330...
2.886792
53
import functools import io import builtin_dataset_mocks import pytest from torchdata.datapipes.iter import IterDataPipe from torchvision.prototype import datasets from torchvision.prototype.utils._internal import sequence_to_str _loaders = [] _datasets = [] # TODO: this can be replaced by torchvision.prototype.data...
[ 11748, 1257, 310, 10141, 198, 11748, 33245, 198, 198, 11748, 3170, 259, 62, 19608, 292, 316, 62, 76, 3320, 198, 11748, 12972, 9288, 198, 6738, 28034, 7890, 13, 19608, 499, 18636, 13, 2676, 1330, 40806, 6601, 47, 3757, 198, 6738, 28034, ...
2.437209
430
from django.urls import path from . import views urlpatterns = [ path("signup/", views.SignUp.as_view(), name="signup"), path("manageuserprofile/", views.manage_user_profile, name="manageuserprofile"), path("followingprocessor/", views.follow, name="followuser"), path("unfollowingprocessor/", views.unf...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 12683, 929, 14, 1600, 5009, 13, 11712, 4933, 13, 292, 62, 1177, 22784, 1438, 2625, 12683, ...
2.991453
117
def format_client_list_result(result, exclude_attributes=None): """ Format an API client list return which contains a list of objects. :param exclude_attributes: Optional list of attributes to exclude from the item. :type exclude_attributes: ``list`` :rtype: ``list`` of ``dict`` """ format...
[ 4299, 5794, 62, 16366, 62, 4868, 62, 20274, 7, 20274, 11, 19607, 62, 1078, 7657, 28, 14202, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 18980, 281, 7824, 5456, 1351, 1441, 543, 4909, 257, 1351, 286, 5563, 13, 628, 220, 220,...
2.975155
161
__all__ = [ 'raytheon', 'vividsolutions' ]
[ 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 2433, 1169, 261, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 85, 1699, 82, 14191, 6, 198, 220, 220, 220, ...
1.471698
53
import os from unittest import TestCase from gene_loci_comparison import Locus import matplotlib import matplotlib.pyplot as plt from bokeh.plotting import output_file, show, save matplotlib.rcParams['font.family'] = "PT Sans Narrow" save_plots = False assert os.path.isfile('tests/test_loci.py'), f'Please set workin...
[ 11748, 28686, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 9779, 62, 75, 1733, 62, 785, 1845, 1653, 1330, 406, 10901, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1...
2.489627
241
import threading import unittest import mock from sia_load_tester import jobs from sia_load_tester import dataset_uploader from sia_load_tester import sia_client as sc from sia_load_tester import upload_queue
[ 11748, 4704, 278, 198, 11748, 555, 715, 395, 198, 198, 11748, 15290, 198, 198, 6738, 264, 544, 62, 2220, 62, 4879, 353, 1330, 3946, 198, 6738, 264, 544, 62, 2220, 62, 4879, 353, 1330, 27039, 62, 25850, 263, 198, 6738, 264, 544, 62, ...
3.117647
68
import torch from torch.autograd import grad from torch.functional import unique from deepmechanics import utilities import unittest
[ 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 3915, 198, 6738, 28034, 13, 45124, 1330, 3748, 198, 6738, 2769, 1326, 3147, 873, 1330, 20081, 198, 11748, 555, 715, 395, 628 ]
4.1875
32
""" Classes used to identify and build Construction objects """ import collections import copy import networkx as nx from positions import Dummy, Positions, PositionsTF, Walker from debugging import Debugger from .cx import Construction class CXbuilder(object): """Identifies and builds constructions using Text-Fa...
[ 37811, 198, 9487, 274, 973, 284, 5911, 290, 1382, 20395, 5563, 198, 37811, 198, 198, 11748, 17268, 198, 11748, 4866, 198, 11748, 3127, 87, 355, 299, 87, 198, 6738, 6116, 1330, 360, 13513, 11, 18574, 1756, 11, 18574, 1756, 10234, 11, 1...
2.04805
7,180
import os import re import argparse import datetime import pandas as pd from sklearn.model_selection import StratifiedKFold from classifier import MultiClassifierModel from classifier import BinaryClassifierModel from factory import get_dataset, get_model from util.seed import set_seed from util.yml import get_confi...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 29186, 1431, 42, 37, 727, 198, 198, 6738, 1398, 7483, 1330, ...
2.901042
192
''' tuple: is immutable once created (cannot append) ''' #my_tuple = 'a','b','c','d','e' #print(my_tuple) #my_second_tuple = ('a','b','c','d','e') #print(my_second_tuple) #not_a_tuple = ('a') #print( type(not_a_tuple) ) #a_tuple = ('a',) #print( type( a_tuple) ) #print(my_tuple[1]) #print(my_second_tuple[1:3])...
[ 7061, 6, 198, 83, 29291, 25, 318, 40139, 1752, 2727, 357, 66, 34574, 24443, 8, 198, 7061, 6, 198, 198, 2, 1820, 62, 83, 29291, 796, 705, 64, 41707, 65, 41707, 66, 41707, 67, 41707, 68, 6, 198, 2, 4798, 7, 1820, 62, 83, 29291, ...
2.22291
323
#!/usr/bin/python # fruits.py basket = ('oranges', 'pears', 'apples', 'bananas') fruits = {}.fromkeys(basket, 0) print(fruits) fruits['oranges'] = 12 fruits['pears'] = 8 fruits['apples'] = 4 print(fruits.setdefault('oranges', 11)) print(fruits.setdefault('kiwis', 11)) print(fruits)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15921, 13, 9078, 198, 198, 65, 11715, 796, 19203, 273, 6231, 3256, 705, 431, 945, 3256, 705, 1324, 829, 3256, 705, 3820, 15991, 11537, 198, 198, 69, 50187, 796, 23884, 13, 6738, 130...
2.38843
121
import math from mcts.node import Node
[ 11748, 10688, 198, 198, 6738, 285, 310, 82, 13, 17440, 1330, 19081, 628, 198 ]
3
14
# -*- coding: utf-8 -*- if __name__ == '__main__': main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
1.775
40
/anaconda3/lib/python3.7/hmac.py
[ 14, 272, 330, 13533, 18, 14, 8019, 14, 29412, 18, 13, 22, 14, 71, 20285, 13, 9078 ]
1.882353
17
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from space_api.proto import server_pb2 as server__pb2
[ 2, 2980, 515, 416, 262, 308, 49, 5662, 11361, 8435, 17050, 13877, 13, 8410, 5626, 48483, 0, 198, 11748, 1036, 14751, 198, 198, 6738, 2272, 62, 15042, 13, 1676, 1462, 1330, 4382, 62, 40842, 17, 355, 4382, 834, 40842, 17, 628, 628 ]
3.333333
42
# pylint: disable=line-too-long,too-many-lines,missing-docstring,arguments-differ,unused-argument __all__ = ['I3D_InceptionV1', 'i3d_inceptionv1_kinetics400'] from mxnet import nd from mxnet import init from mxnet.context import cpu from mxnet.gluon.block import HybridBlock from mxnet.gluon import nn from mxnet.gluon...
[ 2, 279, 2645, 600, 25, 15560, 28, 1370, 12, 18820, 12, 6511, 11, 18820, 12, 21834, 12, 6615, 11, 45688, 12, 15390, 8841, 11, 853, 2886, 12, 26069, 263, 11, 403, 1484, 12, 49140, 198, 198, 834, 439, 834, 796, 37250, 40, 18, 35, 6...
2.440599
2,138
from twitter.twitter_api import TwitterAPI import logging import requests from dotenv import load_dotenv from os import getenv load_dotenv('/opt/airflow/aws_twi_env/.env') # Creating a specific class to interact with get_users_id endpoint. logger = logging.getLogger(__name__) logging.basicConfig(level = logging.INFO)...
[ 6738, 17044, 13, 6956, 62, 15042, 1330, 3009, 17614, 198, 11748, 18931, 198, 11748, 7007, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 28686, 1330, 651, 24330, 198, 198, 2220, 62, 26518, 24330, 10786, 14, 8738, 14, ...
3.295
200
import weakref from .entity import Entity
[ 11748, 4939, 5420, 198, 198, 6738, 764, 26858, 1330, 20885, 198 ]
3.909091
11
import keras from keras.models import Sequential from keras.layers import Dense
[ 11748, 41927, 292, 201, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 201, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 201, 198, 201, 198 ]
3.035714
28
""" Unit tests for the Friedman module """ import math import numpy as np import vtk import glenoidplanefitting.algorithms.models as mdl def test_make_plane_model(): """ Tests that make_plane_model returns a plane centred on the plane centre with the correct normal vector """ plane_centre = [1.0, 3...
[ 37811, 198, 26453, 5254, 329, 262, 25865, 8265, 198, 37811, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 410, 30488, 198, 11748, 1278, 268, 1868, 11578, 891, 2535, 13, 282, 7727, 907, 13, 27530, 355, 285, 25404, 19...
2.382979
846
# pylint: disable=redefined-outer-name, no-member from copy import deepcopy import numpy as np import pytest from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal from scipy.stats import linregress from xarray import DataArray, Dataset from ...data import concat, convert_to_inferenc...
[ 2, 279, 2645, 600, 25, 15560, 28, 445, 18156, 12, 39605, 12, 3672, 11, 645, 12, 19522, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 299, 32152, 13, 33407, 1330, 6818,...
2.352751
4,326
import numpy as np def _ecdf(x): '''no frills empirical cdf used in fdrcorrection ''' nobs = len(x) return np.arange(1, nobs + 1) / float(nobs) def fdrcorrection(pvals, alpha=0.05, method='indep', is_sorted=False): '''pvalue correction for false discovery rate This covers Benjamini/Hochberg...
[ 11748, 299, 32152, 355, 45941, 628, 198, 4299, 4808, 721, 7568, 7, 87, 2599, 198, 220, 220, 220, 705, 7061, 3919, 1216, 2171, 21594, 269, 7568, 973, 287, 277, 67, 6015, 273, 8243, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, ...
2.448607
1,041
from django.conf import settings from django.conf.urls import url from .views import * branch_mode_urls = [ url(r'^merge_request/create/$', CreateMergeRequest.as_view(), name="create_merge_request"), url(r'^merge_request/list/$', MergeRequestList.as_view(), name="merge_requests_list"), url(r'^merge_reque...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 33571, 1330, 1635, 628, 198, 1671, 3702, 62, 14171, 62, 6371, 82, 796, 685, 198, 220, 220, 220, 19016, 7, ...
2.45011
4,079
""" Model collection from first batch of experiments Notes ----- Note that all models collected here are designed for fixed 256x256 patch normalization. Predifined shape helps theano to build more computationally efficient graph, so highly recommended to use this during training time. For testing, it is of course bet...
[ 37811, 9104, 4947, 422, 717, 15458, 286, 10256, 198, 198, 16130, 198, 30934, 198, 198, 6425, 326, 477, 4981, 7723, 994, 389, 3562, 329, 5969, 17759, 87, 11645, 8529, 3487, 1634, 13, 198, 39156, 361, 1389, 5485, 5419, 262, 5733, 284, 1...
2.428685
2,524
""" Contains Feed, which handles parsing the rss feed and User, which handles messaging """ from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import smtplib from bs4 import BeautifulSoup import feedparser as fp from jinja2 import Environment, PackageLoader, select_autoescape from requ...
[ 37811, 198, 4264, 1299, 18272, 11, 543, 17105, 32096, 262, 374, 824, 3745, 290, 11787, 11, 543, 17105, 19925, 198, 37811, 198, 6738, 3053, 13, 76, 524, 13, 16680, 541, 433, 1330, 337, 3955, 3620, 586, 541, 433, 198, 6738, 3053, 13, ...
2.33279
2,455
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 5878, 11, 6244, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, ...
4.00823
243
# flake8: noqa from .LivescoreBase import NoOverlayFoundException from .Livescore2017 import Livescore2017 from .Livescore2018 import Livescore2018 from .Livescore2019 import Livescore2019
[ 2, 781, 539, 23, 25, 645, 20402, 198, 6738, 764, 43, 1083, 7295, 14881, 1330, 1400, 5886, 10724, 21077, 16922, 198, 6738, 764, 43, 1083, 7295, 5539, 1330, 18965, 7295, 5539, 198, 6738, 764, 43, 1083, 7295, 7908, 1330, 18965, 7295, 790...
3.5
54
from dqn_globals import * import numpy as np import random # Fast and NOT random
[ 198, 6738, 288, 80, 77, 62, 4743, 672, 874, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 220, 220, ...
1.634409
93
""" # Copyright 2022 Red Hat # # 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 agr...
[ 37811, 198, 2, 220, 220, 220, 15069, 33160, 2297, 10983, 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, 2393, 284...
2.477778
1,170
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: qplot/scene.py author: Cyrus Harrison <cyrush@llnl.gov> description: Qt based off...
[ 2, 15069, 357, 66, 8, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 6911, 1026, 198, 2, 4935, 6505, 13, 220, 4091, 262, 1353, 12, 5715, 38559, 24290, 2393, 329, 9667, 290, 584, 198, 2, 3307, 13, 220, 1400, 6634, 16237, 318, ...
3.619048
168
# ########################################################## # FlatCAM: 2D Post-processing for Manufacturing # # File Author: Marius Adrian Stanciu (c) # # Date: 1/10/2020 # # MIT Licence # # #############...
[ 2, 1303, 29113, 14468, 7804, 2, 198, 2, 21939, 34, 2390, 25, 362, 35, 2947, 12, 36948, 329, 32760, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 9220, 6434, 25, 1526, 3754, 21462, 7299, 979, 84, 357, 66, 8...
2.503247
308
""" This file contains all image database (imdb) functionality, such as loading and reading information from a dataset. Generally, this file is meant to read in a dataset from disk into a simple custom format for the detetive framework. """ # ----------------------------------------- # modules # ---------------------...
[ 37811, 198, 1212, 2393, 4909, 477, 2939, 6831, 357, 320, 9945, 8, 11244, 11, 198, 10508, 355, 11046, 290, 3555, 1321, 422, 257, 27039, 13, 198, 198, 37058, 11, 428, 2393, 318, 4001, 284, 1100, 287, 257, 27039, 422, 11898, 656, 257, ...
1.862882
10,057
from . import BaseMeninggal
[ 6738, 764, 1330, 7308, 44, 3101, 13528, 628 ]
3.625
8
''' Permuted multiples It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits. ''' def st2set(n): '''stevke da v mnozico''' assert n...
[ 7061, 6, 201, 198, 5990, 76, 7241, 5021, 2374, 201, 198, 201, 198, 1026, 460, 307, 1775, 326, 262, 1271, 11, 1105, 3365, 4524, 11, 290, 663, 4274, 11, 201, 198, 1495, 1558, 2780, 11, 3994, 3446, 262, 976, 19561, 11, 475, 287, 257,...
2.052632
323
''' fasta2nj.py - convert fasta file to nj input ============================================ :Author: Andreas Heger :Release: $Id$ :Date: |today| :Tags: Python Purpose ------- convert a fasta file to NJ input. This script translates identifiers like species|transcripts|gene|class to transcript_species GENEID=gene...
[ 7061, 6, 198, 7217, 64, 17, 77, 73, 13, 9078, 532, 10385, 3049, 64, 2393, 284, 299, 73, 5128, 198, 10052, 25609, 198, 198, 25, 13838, 25, 33728, 679, 1362, 198, 25, 26362, 25, 720, 7390, 3, 198, 25, 10430, 25, 930, 40838, 91, 19...
2.05314
1,242
import runner1c
[ 11748, 17490, 16, 66, 628, 198 ]
3
6
#mcandrew import sys import numpy as np import pandas as pd if __name__ == "__main__": # SURVEY1 (2020-02-17) survey1 = truth() survey1.addQuestionLabels(['Q0-1','QR-1-0','QR-2-0','QF-1-0','QF-1-1_1','QF-2-0','QF-2-0_1','QF-2-2_1','QF-2-2_2','QF-2-2_3','QF-3-0']) survey1.addTruths([np.nan,np.nan,np.n...
[ 2, 23209, 392, 1809, 198, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 1303, 41016, 6089, 56, 16, ...
1.691847
4,011
from math import factorial
[ 6738, 10688, 1330, 1109, 5132, 628 ]
4.666667
6
import open3d as o3d import os import logging import numpy as np from util.trajectory import CameraPose from util.pointcloud import compute_overlap_ratio, \ make_open3d_point_cloud, make_open3d_feature_from_numpy from scipy import spatial ######################################################################...
[ 11748, 1280, 18, 67, 355, 267, 18, 67, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 7736, 13, 9535, 752, 652, 1330, 20432, 47, 577, 198, 6738, 7736, 13, 4122, 17721, 1330, 24061, 62, 2502, ...
3.468085
94
import os from typing import Dict, Tuple import hydra import pandas as pd import torch import wandb from omegaconf import DictConfig from pl_bolts.datamodules.kitti_datamodule import KittiDataModule from pytorch_lightning import Trainer, seed_everything from pytorch_lightning.loggers import WandbLogger from tqdm.auto ...
[ 11748, 28686, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 198, 198, 11748, 25039, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 11748, 11569, 65, 198, 6738, 267, 28917, 7807, 69, 1330, 360, 713, 16934, 198, 6738, ...
2.907489
227
# -*- coding: utf-8 -*- """Tests for the ``calculation launch matdyn`` command.""" from aiida_quantumespresso.cli.calculations.matdyn import launch_calculation def test_command_base(run_cli_process_launch_command, fixture_code, generate_force_constants_data): """Test invoking the calculation launch command with o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 262, 7559, 9948, 14902, 4219, 2603, 67, 2047, 15506, 3141, 526, 15931, 198, 6738, 257, 72, 3755, 62, 40972, 8139, 18302, 568, 13, 44506, 13, 9948, ...
3.035533
197
""" MIT License Copyright (c) 2020 Christoph Kreisl Copyright (c) 2021 Lukas Ruppert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without...
[ 37811, 198, 220, 220, 220, 17168, 13789, 628, 220, 220, 220, 15069, 357, 66, 8, 12131, 1951, 2522, 25732, 3044, 198, 220, 220, 220, 15069, 357, 66, 8, 33448, 28102, 292, 371, 7211, 861, 628, 220, 220, 220, 2448, 3411, 318, 29376, 75...
2.605195
1,540
# Machine Learning Search Techniques # # Base classes for search techniques that use machine-learning models # # Author: Hans Giesen (giesen@seas.upenn.edu) ####################################################################################################################### import abc, logging from opentuner.search...
[ 2, 10850, 18252, 11140, 49686, 198, 2, 198, 2, 7308, 6097, 329, 2989, 7605, 326, 779, 4572, 12, 40684, 4981, 198, 2, 198, 2, 6434, 25, 13071, 402, 444, 268, 357, 70, 444, 268, 31, 325, 292, 13, 929, 1697, 13, 15532, 8, 198, 2911...
3.006121
1,797
# source: https://github.com/PyTorchLightning/pytorch-lightning-bolts (Apache2) import logging from collections import Counter from typing import Any, Dict, Optional, Tuple import segmentation_models_pytorch as smp import pandas as pd import pytorch_lightning as pl import torch from deadtrees.loss.losses import ( ...
[ 2, 2723, 25, 3740, 1378, 12567, 13, 785, 14, 20519, 15884, 354, 15047, 768, 14, 9078, 13165, 354, 12, 2971, 768, 12, 28984, 912, 357, 25189, 4891, 17, 8, 198, 198, 11748, 18931, 198, 6738, 17268, 1330, 15034, 198, 6738, 19720, 1330, ...
2.97619
210
''' The pathExecutor is to use NetworkX as algorithm support to run path finding operations. After getting results from NetworkX, the pathExecutor will transform the results into a temp table in PostgreSQL @author: keshan ''' import os import networkx as nx #based on the path expression, choose different methods to ...
[ 7061, 6, 198, 464, 3108, 23002, 38409, 318, 284, 779, 7311, 55, 355, 11862, 1104, 284, 1057, 3108, 4917, 4560, 13, 198, 3260, 1972, 2482, 422, 7311, 55, 11, 262, 3108, 23002, 38409, 481, 6121, 262, 2482, 656, 257, 20218, 3084, 287, ...
1.625295
4,238
# coding: utf-8 import sys sys.path.append('../beta_code') import unittest import beta_code if __name__ == '__main__': unittest.main()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 31361, 62, 8189, 11537, 198, 198, 11748, 555, 715, 395, 198, 11748, 12159, 62, 8189, 198, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.545455
55
import json from unittest import TestCase from unittest.mock import MagicMock from tornado import gen from tornado.concurrent import Future import app from application_repository import ApplicationRepository __author__ = 'adrian'
[ 11748, 33918, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 6738, 33718, 1330, 2429, 198, 6738, 33718, 13, 1102, 14421, 1330, 10898, 198, 11748, 598, 198, 6738, 3586, 62,...
3.85
60
import os import re import rollbar import rollbar.contrib.flask from flask import Flask, render_template, Response from flask import got_request_exception from werkzeug.exceptions import NotFound app = Flask(__name__) MIN_PAGE_NAME_LENGTH = 2 @app.before_first_request @app.route("/<string:page>/") if __name__ =...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 4836, 5657, 198, 11748, 4836, 5657, 13, 3642, 822, 13, 2704, 2093, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18261, 198, 6738, 42903, 1330, 1392, 62, 25927, 62, 1069, 4516, 198, ...
2.887097
124
# ------------------------------------------------------------------- # # Copyright (c) 2007-2008 Hanzo Archives Limited. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file...
[ 201, 2, 16529, 6329, 220, 1303, 201, 2, 15069, 357, 66, 8, 4343, 12, 11528, 9530, 10872, 22275, 15302, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 201, 2, 22...
1.873824
2,338
import calendar hc = calendar.HTMLCalendar() print(hc.formatmonth(2019, 1, withyear=False)) # <table border="0" cellpadding="0" cellspacing="0" class="month"> # <tr><th colspan="7" class="month">January</th></tr> # <tr><th class="mon">Mon</th><th class="tue">Tue</th><th class="wed">Wed</th><th class="thu">Thu</th><th...
[ 11748, 11845, 198, 198, 71, 66, 796, 11845, 13, 6535, 44, 5639, 282, 9239, 3419, 198, 198, 4798, 7, 71, 66, 13, 18982, 8424, 7, 23344, 11, 352, 11, 351, 1941, 28, 25101, 4008, 198, 2, 1279, 11487, 4865, 2625, 15, 1, 2685, 39231, ...
2.361179
8,140
import sys, os import xml.etree.ElementTree as ET import json import textbase from tqdm import tqdm CIT_data = {} for x in textbase.parse("CIT.dmp"): CIT_data[x["ID.INV"][0]] = x # We only want to add image items for images that we also actually have on disk at time of import. # Read in a list of current filena...
[ 11748, 25064, 11, 28686, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 33918, 198, 11748, 2420, 8692, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 34, 2043, 62, 7890, 796, 23884, 198, 1640, 2...
2.351429
350
__all__ = ['pipeline'] import asyncio from .task_tui import start_tui import frunner as fr from asyncio.subprocess import PIPE from frunner import State from collections import deque
[ 198, 834, 439, 834, 796, 37250, 79, 541, 4470, 20520, 198, 11748, 30351, 952, 198, 6738, 764, 35943, 62, 83, 9019, 1330, 923, 62, 83, 9019, 198, 11748, 1216, 403, 1008, 355, 1216, 198, 6738, 30351, 952, 13, 7266, 14681, 1330, 350, 4...
3.152542
59
"""Flask application core logic.""" import os from dotenv import load_dotenv from flask import Flask, url_for from twitoff.models import db, migrate from twitoff.routes.home_routes import home_routes from twitoff.routes.twitter_routes import twitter_routes assert load_dotenv(), 'falied to initialize environment' SE...
[ 37811, 7414, 2093, 3586, 4755, 9156, 526, 15931, 198, 198, 11748, 28686, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 42903, 1330, 46947, 11, 19016, 62, 1640, 198, 198, 6738, 665, 270, 2364, 13, 27530, 1330, 20...
2.700297
337
# Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P. # # 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...
[ 2, 15069, 357, 66, 8, 1584, 30446, 15503, 12, 11869, 446, 14973, 7712, 5834, 11, 406, 13, 47, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 198, 2, 779, 4...
3.34891
963
try: # importlib.metadata is present in Python 3.8 and later import importlib.metadata as importlib_metadata except ImportError: # use the shim package importlib-metadata pre-3.8 import importlib_metadata as importlib_metadata # type: ignore import pathlib for distribution_name in [__package__, __nam...
[ 28311, 25, 198, 220, 220, 220, 1303, 1330, 8019, 13, 38993, 318, 1944, 287, 11361, 513, 13, 23, 290, 1568, 198, 220, 220, 220, 1330, 1330, 8019, 13, 38993, 355, 1330, 8019, 62, 38993, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220...
2.765734
286
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
2.393743
1,694
# !/usr/bin/env python # -*- coding: utf-8 -*- # # Filename: peewee_factory.py # Project: pwdbs # Author: Brian Cherinka # Created: Monday, 23rd March 2020 4:32:17 pm # License: BSD 3-clause "New" or "Revised" License # Copyright (c) 2020 Brian Cherinka # Last Modified: Monday, 23rd March 2020 5:34:56 pm # Modified By...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 198, 2, 7066, 12453, 25, 613, 413, 1453, 62, 69, 9548, 13, 9078, 198, 2, 4935, 25, 279, 16993, 1443, 1...
2.440439
638
##TO DO Consider adding in 'not suitable for test' """ Score population according to: 0: Number of hospitals 1: Mean time to thrombolysis 2: Max time to thrombolysis 3: Mean time to thrombectomy 4: Maximum time to thrombectomy 5: Minimum thrombolysis admissions to any one hospital 6:...
[ 2235, 10468, 8410, 12642, 4375, 287, 705, 1662, 11080, 329, 1332, 6, 198, 198, 37811, 198, 26595, 3265, 1864, 284, 25, 198, 220, 220, 220, 220, 657, 25, 7913, 286, 11301, 198, 220, 220, 220, 220, 352, 25, 22728, 640, 284, 294, 398, ...
3.403846
468
#!/usr/bin/env python from __future__ import division #from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import import os, sys from os.path import join # We require Python v2.7 or newer if sys.version_info[:2] < (2,7): raise RuntimeError("This requires Pyth...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 2, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443,...
2.452577
970
OntCversion = '2.0.0' #!/usr/bin/env python3 from ontology.builtins import print
[ 45984, 34, 9641, 796, 705, 17, 13, 15, 13, 15, 6, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 39585, 1435, 13, 18780, 1040, 1330, 3601, 198 ]
2.612903
31
from setuptools import setup setup() # Note: Everything should be in the local setup.cfg
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 3419, 220, 1303, 5740, 25, 11391, 815, 307, 287, 262, 1957, 9058, 13, 37581, 198 ]
3.791667
24
from aws_cdk import core, aws_dynamodb as dynamodb from . import names
[ 6738, 3253, 82, 62, 10210, 74, 1330, 4755, 11, 3253, 82, 62, 67, 4989, 375, 65, 355, 6382, 375, 65, 198, 6738, 764, 1330, 3891, 628 ]
2.769231
26
#%% # always check the input carefully after opening and splitting # split r and c indices for simplicity (instead of combining them into a tuple) # when using re, be sure to thing if greedy or nongreedy parsing is necessary # don't use re when split() suffices, whitespaces can be casted to int # make sure to experimen...
[ 2, 16626, 198, 2, 1464, 2198, 262, 5128, 7773, 706, 4756, 290, 26021, 198, 2, 6626, 374, 290, 269, 36525, 329, 21654, 357, 38070, 286, 19771, 606, 656, 257, 46545, 8, 198, 2, 618, 1262, 302, 11, 307, 1654, 284, 1517, 611, 31828, 3...
2.813559
944
# MobileInsight Recipe for python-for-android # Authors: Zengwen Yuan, Jiayao Li, # Update for py3: Yunqi Guo, 2020.04 import glob from os.path import exists, join, isdir, split import sh from pythonforandroid.logger import info, shprint, warning from pythonforandroid.toolchain import Recipe, current_directory LOCAL...
[ 2, 12173, 818, 18627, 26694, 329, 21015, 12, 1640, 12, 19411, 198, 2, 46665, 25, 1168, 1516, 21006, 34071, 11, 29380, 323, 5488, 7455, 11, 198, 2, 10133, 329, 12972, 18, 25, 20757, 40603, 1962, 78, 11, 12131, 13, 3023, 198, 198, 117...
3.324324
111
from ...utils import docval, getargs from ...build import ObjectMapper, BuildManager from ...spec import Spec from ..table import DynamicTable, VectorIndex from .. import register_map @register_map(DynamicTable)
[ 6738, 2644, 26791, 1330, 2205, 2100, 11, 651, 22046, 198, 6738, 2644, 11249, 1330, 9515, 44, 11463, 11, 10934, 13511, 198, 6738, 2644, 16684, 1330, 18291, 198, 6738, 11485, 11487, 1330, 26977, 10962, 11, 20650, 15732, 198, 6738, 11485, 13...
3.962963
54
# ====================================================================================== # # Minimal innovation model implementations and solutions. # # Author : Eddie Lee, edlee@csh.ac.at # ====================================================================================== # from numba import njit, jit from numba....
[ 2, 38093, 4770, 1421, 28, 1303, 198, 2, 1855, 4402, 11044, 2746, 25504, 290, 8136, 13, 198, 2, 220, 198, 2, 6434, 1058, 19478, 5741, 11, 1225, 7197, 31, 66, 1477, 13, 330, 13, 265, 198, 2, 38093, 4770, 1421, 28, 1303, 198, 6738, ...
2.087224
7,796
import unittest from pyqt2waybinding import BindingEndpoint from PyQt4.QtCore import QObject, pyqtSignal class RealPropertyModel(QObject): """ A simple model class for testing """ valueChanged = pyqtSignal(int) @property @value.setter if __name__ == '__main__': unittest....
[ 11748, 555, 715, 395, 198, 6738, 12972, 39568, 17, 1014, 30786, 1330, 38904, 12915, 4122, 198, 6738, 9485, 48, 83, 19, 13, 48, 83, 14055, 1330, 1195, 10267, 11, 12972, 39568, 11712, 282, 628, 198, 4871, 6416, 21746, 17633, 7, 48, 1026...
2.515385
130
from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from django.contrib.auth.models import User from .models import Post
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 11, 48191, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 6738...
3.73913
46
# Lists the assets' ID, hostname and note for active and inactive assets. # Displays the first 500 assets, because there is no pagination code. import os import sys import requests status_opt = "both" if len(sys.argv) > 1: opt = sys.argv[1] if (opt == "active") or (opt == "inactive"): status_opt = op...
[ 2, 44968, 262, 6798, 6, 4522, 11, 2583, 3672, 290, 3465, 329, 4075, 290, 28621, 6798, 13, 198, 2, 3167, 26024, 262, 717, 5323, 6798, 11, 780, 612, 318, 645, 42208, 1883, 2438, 13, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 1174...
2.728238
471
import yfinance as yf from maxpain import max_pain, get_current_price import warnings warnings.simplefilter(action='ignore', category=FutureWarning) if __name__ == "__main__": get_index_maxpain()
[ 11748, 331, 69, 14149, 355, 331, 69, 198, 6738, 3509, 35436, 1330, 3509, 62, 35436, 11, 651, 62, 14421, 62, 20888, 198, 11748, 14601, 198, 40539, 654, 13, 36439, 24455, 7, 2673, 11639, 46430, 3256, 6536, 28, 29783, 20361, 8, 628, 198,...
3.190476
63
from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ User = settings.AUTH_USER_MODEL
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 12982, 796, 6460, 13, 32, 24318, 62, 2...
3.282609
46
#funcion con parametros funcion_arg("Josaphat","Lopez")
[ 2, 20786, 295, 369, 5772, 316, 4951, 198, 220, 220, 220, 220, 198, 198, 20786, 295, 62, 853, 7203, 41, 418, 499, 5183, 2430, 43, 20808, 4943 ]
2.259259
27
# -*- coding: utf-8 -*- # Copyright 2018-2021 releng-tool from releng_tool.util.log import err import sys def platform_exit(msg=None, code=None): """ exit out of the releng-tool process Provides a convenience method to help invoke a system exit call without needing to explicitly use ``sys``. A caller...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2864, 12, 1238, 2481, 823, 1516, 12, 25981, 198, 198, 6738, 823, 1516, 62, 25981, 13, 22602, 13, 6404, 1330, 11454, 198, 11748, 25064, 198, 198, 4299, 3859, ...
2.938215
437
import torch import math import unittest from pvae.distributions import HypersphericalUniform if __name__ == '__main__': unittest.main()
[ 11748, 28034, 198, 11748, 10688, 198, 11748, 555, 715, 395, 198, 198, 6738, 279, 33353, 13, 17080, 2455, 507, 1330, 21209, 364, 17042, 605, 3118, 6933, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, ...
2.807692
52
from typing import Union from pyrogram import Client, filters from pyrogram.types import ( CallbackQuery, InlineKeyboardButton, InlineKeyboardMarkup, Message, ) import alisu from alisu.config import prefix from alisu.utils import commands from alisu.utils.localization import use_chat_lang bot_repo_l...
[ 6738, 19720, 1330, 4479, 198, 198, 6738, 12972, 39529, 1330, 20985, 11, 16628, 198, 6738, 12972, 39529, 13, 19199, 1330, 357, 198, 220, 220, 220, 4889, 1891, 20746, 11, 198, 220, 220, 220, 554, 1370, 9218, 3526, 21864, 11, 198, 220, 2...
2.879121
273
import os import sys if __name__ == '__main__': params = sys.argv[1] print(params) all_files(params)
[ 11748, 28686, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 42287, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 220, 220, 220, 3601, 7, 37266, 8, 198, 220, 220, 220, 477, 6...
2.354167
48
import tensorflow as tf def make_skip_gram_for_image(images_captions_pairs): ''' images_captions_pairs: [[image, captions], ...] image: [width, height, [channel]] captions: [[word1, word2, word3], [word1, word2, word3, word4], ...] return: [(image, word1), (image, word2), ....] ''' image_w...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 4299, 787, 62, 48267, 62, 4546, 62, 1640, 62, 9060, 7, 17566, 62, 27144, 507, 62, 79, 3468, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 4263, 62, 27144, 507, 62, 79, 346...
2.415459
207
# -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2020-01-25 23:47 from __future__ import unicode_literals from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 2075, 319, 12131, 12, 486, 12, 1495, 2242, 25, 2857, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.885417
96
from .base import Filth
[ 6738, 764, 8692, 1330, 7066, 400, 628 ]
3.571429
7
import graphing import random from flask import Flask, abort, request from imgurpython import ImgurClient from linebot import ( LineBotApi, WebhookHandler ) from linebot.exceptions import ( InvalidSignatureError ) from linebot.models import * import tempfile, os from config import client_id, client...
[ 11748, 23360, 722, 220, 201, 198, 11748, 4738, 201, 198, 6738, 42903, 1330, 46947, 11, 15614, 11, 2581, 201, 198, 6738, 33705, 333, 29412, 1330, 1846, 45073, 11792, 201, 198, 6738, 1627, 13645, 1330, 357, 201, 198, 220, 220, 220, 6910, ...
2.817869
291
from django.shortcuts import render, redirect from django.views import View from django.http import HttpResponse from django.contrib import messages, auth
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 11, 6284 ]
3.948718
39
import sys import os import json testCasesFileName = parseInputArgs(sys.argv) test = Test("dummy_app") test.loadFile(testCasesFileName) test.run()
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 628, 198, 9288, 34, 1386, 8979, 5376, 796, 21136, 20560, 42035, 7, 17597, 13, 853, 85, 8, 198, 198, 9288, 796, 6208, 7203, 67, 13513, 62, 1324, 4943, 198, 9288, 13, 2220, 8979, 7, ...
2.777778
54
import json import shlex, subprocess import re train_file = open('updated_train_nuro.txt').readlines() uuid_file = open('updated_uuid_nuro.txt').readlines() qa_reports = open('qa_reports.txt').read().split() subtasks = [] for report in qa_reports: # adding try except since some reports differ in structure i.e....
[ 11748, 33918, 198, 11748, 427, 2588, 11, 850, 14681, 220, 198, 11748, 302, 198, 198, 27432, 62, 7753, 796, 1280, 10786, 43162, 62, 27432, 62, 77, 1434, 13, 14116, 27691, 961, 6615, 3419, 198, 12303, 312, 62, 7753, 796, 1280, 10786, 43...
2.46049
734
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198 ]
3.444444
9
# Desafio 031: Dado uma distancia da viagem, calcule o valor, 0.50$ pra cada # quilometro até 200km e 0.45 para viagens acima de 200km. from cores import cor d = float(input('Digite a distância da viagem: ')) print('O custo será de R$ {}{:.2f}{} reais.'.format( cor.verde, d * 0.50 if d <= 200 else d * 0.45, ...
[ 2, 2935, 1878, 952, 657, 3132, 25, 360, 4533, 334, 2611, 1233, 1192, 544, 12379, 25357, 363, 368, 11, 2386, 23172, 267, 1188, 273, 11, 657, 13, 1120, 3, 7201, 269, 4763, 220, 198, 2, 627, 346, 908, 305, 379, 2634, 939, 13276, 304,...
2.261745
149
import os import re import sys import math import spacy import codecs import tarfile import logging import requests import collections import progressbar import torch as th import numpy as np from sklearn.cluster.k_means_ import k_means import bhabana.utils as utils import bhabana.utils.generic_utils as gu from bhab...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 10688, 198, 11748, 599, 1590, 198, 11748, 40481, 82, 198, 11748, 13422, 7753, 198, 11748, 18931, 198, 11748, 7007, 198, 11748, 17268, 198, 11748, 4371, 5657, 198, 198, 11748, 2...
2.239478
8,268
#!/usr/bin/env python2 import json import re import numpy as np START = "<" STOP = ">" SEP = "@" random = np.random.RandomState(0) N_EX = 5 with open("data.json") as data_f: data = json.load(data_f) with open("templates.json") as template_f: templates = json.load(template_f) with open("hints.json") as hi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2257, 7227, 796, 33490, 1, 198, 2257, 3185, 796, 366, 24618, 198, 5188, 47, 796, 44212, 1, 198, ...
2.256656
939
print(ackermann(2,2))
[ 198, 4798, 7, 441, 2224, 77, 7, 17, 11, 17, 4008 ]
2
11
# Copyright 2016 The TensorFlow Authors. 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 required by applica...
[ 2, 15069, 1584, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 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, ...
2.592287
2,178
# -*- coding: utf-8 -*- from django.db import models # from documents.models import Languages class WikiTexts(models.Model): """ Текст для вики """ nazv = models.CharField( max_length=255, blank=True, default='', verbose_name="Название" ) red_zag = models.CharField( ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 422, 4963, 13, 27530, 1330, 42860, 628, 198, 4871, 13078, 8206, 82, 7, 27530, 13, 17633, 2599, 198, 220, 22...
1.783674
6,162
from django.core.urlresolvers import reverse from website.apps.core.models import Source from website.testutils import WithEditor class Test_View_SourceEdit_NotLoggedIn(WithEditor): """Tests the source_edit view""" class Test_View_SourceEdit_LoggedIn(WithEditor): """Tests the source_edit view"""
[ 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 3052, 13, 18211, 13, 7295, 13, 27530, 1330, 8090, 198, 6738, 3052, 13, 9288, 26791, 1330, 2080, 17171, 628, 198, 4871, 6208, 62, 7680, 62, 7416, 18378, 62, ...
3.287234
94
import csv import json import threading import time import psutil import pygame from common import record_metadata, request_clients_end from config import UPDATE_RATE from network import receive, send from .config_finger_tapping_task import (COUNT_DOWN_MESSAGE, SECONDS_COUNT_D...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 26692, 22602, 198, 198, 11748, 12972, 6057, 198, 6738, 2219, 1330, 1700, 62, 38993, 11, 2581, 62, 565, 2334, 62, 437, 198, 6738, 4566, 1330, 35717...
2.033333
240
import urllib.request import requests from requests import auth import json # def getRows(userID): # me = auth.HTTPDigestAuth("admin", "admin") # row = [] # transactionAttributes = ["BookingDateTime", "TransactionInformation", "Amount", "Currency"] # id = str(userID) # res = requests.ge...
[ 11748, 2956, 297, 571, 13, 25927, 201, 198, 11748, 7007, 201, 198, 6738, 7007, 1330, 6284, 201, 198, 11748, 33918, 201, 198, 201, 198, 201, 198, 2, 825, 651, 49, 1666, 7, 7220, 2389, 2599, 201, 198, 2, 220, 220, 220, 220, 502, 796...
2.20284
493
""" Converting test folders into modules allows to use similar file names within structure:: test/ __init__.py integration/ __init__.py test_something.py unit/ __init__.py test_something.py .. seealso:: https://docs.pytest.org/en/latest/...
[ 37811, 198, 3103, 48820, 1332, 24512, 656, 13103, 3578, 284, 779, 2092, 2393, 3891, 1626, 198, 301, 5620, 3712, 628, 220, 220, 220, 1332, 14, 198, 220, 220, 220, 220, 220, 220, 220, 11593, 15003, 834, 13, 9078, 198, 220, 220, 220, 2...
2.259036
166
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # ---------------------------------------------------------------------...
[ 2, 19617, 28, 40477, 12, 23, 201, 198, 2, 16529, 35937, 201, 198, 2, 6127, 7560, 416, 5413, 357, 49, 8, 11160, 19452, 6127, 35986, 352, 13, 15, 13, 16, 13, 15, 201, 198, 2, 19179, 743, 2728, 11491, 4069, 290, 481, 307, 2626, 611...
5
74
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.891892
37