content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests that the seccomp filters don't let blacklisted syscalls through.""" import os from subprocess import run import pytest import host_tools.cargo_build as host # pylint:disable=import-error def...
[ 2, 15069, 2864, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 37811, 51, 3558, 326, 262, 384, 535, 3361, 16628, 836, 470, ...
2.79883
855
aa = a(1) aa.go()
[ 198, 7252, 796, 257, 7, 16, 8, 198, 7252, 13, 2188, 3419 ]
1.5
12
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.12 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. """ IDA Plugin SDK API wrapper: hexrays """ from sys import version_info if version_info >= (2,6,0): _ida_h...
[ 2, 770, 2393, 373, 6338, 7560, 416, 12672, 3528, 357, 4023, 1378, 2503, 13, 2032, 328, 13, 2398, 737, 198, 2, 10628, 362, 13, 15, 13, 1065, 198, 2, 198, 2, 2141, 407, 787, 2458, 284, 428, 2393, 4556, 345, 760, 644, 345, 389, 180...
2.265584
67,090
#!/usr/bin/env python3 """ @author: Sam Cook MySql Parser for graphical presentation """ import mysql.connector import datetime from mysql.connector import Error from datetime import datetime, timedelta import json
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 31, 9800, 25, 3409, 8261, 198, 3666, 50, 13976, 23042, 263, 329, 27831, 10470, 198, 37811, 198, 11748, 48761, 13, 8443, 273, 198, 11748, 4818, 8079, 198, 6738, 48761, 1...
3.557377
61
# test_fluxqubit.py # meant to be run with 'pytest' # # This file is part of scqubits. # # Copyright (c) 2019 and later, Jens Koch and Peter Groszkowski # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. ...
[ 2, 1332, 62, 69, 22564, 421, 2545, 13, 9078, 198, 2, 4001, 284, 307, 1057, 351, 705, 9078, 9288, 6, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 629, 421, 9895, 13, 198, 2, 198, 2, 220, 220, 220, 15069, 357, 66, 8, 13130, 290, ...
3.448276
145
import FWCore.ParameterSet.Config as cms patPFParticles = cms.EDProducer("PATPFParticleProducer", # General configurables pfCandidateSource = cms.InputTag("noJet"), # MC matching configurables addGenMatch = cms.bool(False), genParticleMatch = cms.InputTag(""), ## particles source to be used for ...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 8071, 47, 5837, 26845, 796, 269, 907, 13, 1961, 11547, 2189, 7203, 47, 1404, 47, 5837, 20205, 11547, 2189, 1600, 198, 220, 220, 220, 1303, 3611, 4566, 333, 2977...
2.192369
629
# coding: utf8 from __future__ import unicode_literals import pytest import spacy import json from api.server import parse, doc2json, load_model def test_server_parse(model, text, doc): load_model(model) json_doc = parse(model, text) direct_json_doc = doc2json(doc, model) assert json.dumps(json_...
[ 2, 19617, 25, 3384, 69, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 12972, 9288, 198, 11748, 599, 1590, 198, 11748, 33918, 198, 198, 6738, 40391, 13, 15388, 1330, 21136, 11, 2205, 17, 17752, 1...
2.382022
801
########################################################################## # # Copyright (c) 2018, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
[ 29113, 29113, 7804, 2235, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 2864, 11, 7412, 7117, 8495, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, ...
3.371522
611
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2022 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 26171, 198, 2, 198, 2, 220, 220, 15069, 33160, 3254, 652, 13077, 198, 2, 220, 220, 15069, 2864, 12, 1238, 2481, 376, 7569, 13, 20185, 15302, 198, 2, 198, 2...
2.380171
8,654
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import os import asyncio import json from unittest.mock import MagicMock, patch from collections import Counter from aiohttp import web import pytest from foglamp.services.core import routes from foglamp.services.core import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 376, 7730, 43, 23518, 62, 33, 43312, 198, 2, 4091, 25, 2638, 1378, 69, 28678, 696, 13, 961, 83, 704, 420, 82, 13, 952, 14, 198, 2, 376, 7730, 43, 23518, ...
3.072
250
""" Why need dimensional reduction The following is the use of dimensionality reduction in the data set: As data dimensions continue to decrease, the space required for data storage will also decrease. Low-dimensional data helps reduce calculation/training time. Some algorithms tend to perform poorly on high-dimens...
[ 37811, 198, 5195, 761, 38517, 7741, 198, 198, 464, 1708, 318, 262, 779, 286, 15793, 1483, 7741, 287, 262, 1366, 900, 25, 198, 1081, 1366, 15225, 2555, 284, 10070, 11, 262, 2272, 2672, 329, 1366, 6143, 481, 635, 10070, 13, 198, 7754, ...
4.705128
312
""" These methods can be called inside WebCAT to determine which tests are loaded for a given section/exam pair. This allows a common WebCAT submission site to support different project tests """
[ 37811, 198, 4711, 5050, 460, 307, 1444, 2641, 5313, 34, 1404, 284, 5004, 543, 5254, 389, 9639, 198, 1640, 257, 1813, 2665, 14, 1069, 321, 5166, 13, 220, 770, 3578, 257, 2219, 5313, 34, 1404, 14498, 2524, 284, 198, 11284, 1180, 1628, ...
4.234043
47
from datetime import datetime import scrapy import lxml from lxml.html.clean import Cleaner import re SOURCE = 'Pgina 12' LANGUAGE = 'es' cleaner = Cleaner(allow_tags=['p', 'br', 'b', 'a', 'strong', 'i', 'em'])
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 15881, 88, 198, 11748, 300, 19875, 198, 6738, 300, 19875, 13, 6494, 13, 27773, 1330, 5985, 263, 198, 11748, 302, 628, 198, 47690, 796, 705, 31743, 1437, 1105, 6, 198, 43, 15567, 52, 1187...
2.6625
80
from calendar import c from typing import Dict, List, Union from zlib import DEF_BUF_SIZE import json_lines import numpy as np import re from sklearn.preprocessing import MultiLabelBinarizer from sklearn.manifold import TSNE from sklearn.preprocessing import StandardScaler import pandas as pd import json from scipy.spa...
[ 6738, 11845, 1330, 269, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 4479, 198, 6738, 1976, 8019, 1330, 23449, 62, 19499, 37, 62, 33489, 198, 11748, 33918, 62, 6615, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 302, 198, 6738, 1...
2.471605
1,215
#!/usr/bin/env python # # Copyright (c) 2018, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information # see the Pycom Licence v1.0 document supplied with this file, or # available at https://www.pycom.io/opensource/licensing ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 11, 9485, 785, 15302, 13, 198, 2, 198, 2, 770, 3788, 318, 11971, 739, 262, 22961, 38644, 2196, 513, 393, 597, 198, 2, 1568, 2196, 11, 351, 104...
2.825137
366
import datetime from django.utils import timezone from django.contrib.auth.models import User from hknweb.events.models import Event, EventType, Rsvp
[ 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 289, 15418, 12384, 13, 31534, 13, 27530, 1330, 8558, 11, 8558, 6030...
3.4
45
from django.shortcuts import redirect from .forms import PrescriptionForm from core.views import is_doctor, is_nurse, is_admin, is_patient from core.models import * from .models import Prescription from django.contrib.auth.decorators import login_required, user_passes_test from django.utils import timezone from dja...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 198, 6738, 764, 23914, 1330, 1763, 6820, 8479, 198, 198, 6738, 4755, 13, 33571, 1330, 318, 62, 35580, 11, 318, 62, 77, 12321, 11, 318, 62, 28482, 11, 318, 62, 26029, 198, 198, ...
2.95612
433
""" 1. Clarification 2. Possible solutions - dfs + memoization - Topological sort 3. Coding 4. Tests """ # T=O(m*n), S=O(m*n) from functools import lru_cache # T=O(m*n), S=O(m*n)
[ 37811, 198, 16, 13, 15420, 2649, 198, 17, 13, 33671, 8136, 198, 220, 220, 220, 532, 288, 9501, 1343, 16155, 1634, 198, 220, 220, 220, 532, 5849, 2770, 3297, 198, 18, 13, 327, 7656, 198, 19, 13, 30307, 198, 37811, 628, 198, 2, 309,...
2.146067
89
#!/usr/bin/env python #coding=utf-8 ''' Remove tailing whitespaces and ensures one and only one empty ending line. ''' import os, re main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 7061, 6, 198, 27914, 7894, 278, 13216, 43076, 290, 19047, 530, 290, 691, 530, 6565, 7464, 1627, 13, 198, 7061, 6, 198, 198, 11748, 28686, ...
2.843137
51
from core import * from cameras import * from geometry import * from material import * from lights import * # instantiate and run the program TestPostprocessing2().run()
[ 6738, 4755, 1330, 1635, 198, 6738, 9073, 1330, 1635, 198, 6738, 22939, 1330, 1635, 198, 6738, 2587, 1330, 1635, 198, 6738, 7588, 1330, 1635, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
3.112903
62
#!/usr/bin/env python if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 1388, 3419, 198 ]
2.346154
26
import os import shutil import codecs import json from cuddlefish.runner import run_app from cuddlefish.rdf import RDFManifest
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 40481, 82, 198, 11748, 33918, 198, 198, 6738, 269, 24500, 11084, 13, 16737, 1330, 1057, 62, 1324, 198, 6738, 269, 24500, 11084, 13, 4372, 69, 1330, 371, 8068, 5124, 8409, 198 ]
3.282051
39
# PyRipple # # Copyright 2015 Gilles Pirio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 9485, 49, 18793, 198, 2, 198, 2, 15069, 1853, 12981, 274, 10334, 952, 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,...
3.454545
231
# -*- coding: utf-8 -*- """ Unit tests for Senna """ from __future__ import unicode_literals from os import environ, path, sep import logging import unittest from nltk.classify import Senna from nltk.tag import SennaTagger, SennaChunkTagger, SennaNERTagger # Set Senna executable path for tests if it is not specifie...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 26453, 5254, 329, 311, 13713, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 28686, 1330, 551, 2268, 11, 3108, ...
2.684466
206
#------------------------------------------------------------------------------- # # Project: EOxServer <http://eoxserver.org> # Authors: Fabian Schindler <fabian.schindler@eox.at> # #------------------------------------------------------------------------------- # Copyright (C) 2015 EOX IT Services GmbH # # Permission...
[ 2, 10097, 24305, 198, 2, 198, 2, 4935, 25, 412, 38208, 10697, 1279, 4023, 1378, 68, 1140, 15388, 13, 2398, 29, 198, 2, 46665, 25, 14236, 666, 3059, 521, 1754, 1279, 36434, 666, 13, 20601, 521, 1754, 31, 68, 1140, 13, 265, 29, 198,...
3.896811
533
text = ''' Victor Hugo's ({}) tale of injustice, heroism and love follows the fortunes of Jean Valjean, an escaped convict determined to put his criminal past behind him. But his attempts to become a respected member of the community are constantly put under threat: by his own conscience, when, owing to a case of mista...
[ 5239, 796, 705, 7061, 198, 21944, 273, 25930, 338, 37913, 30072, 12838, 286, 21942, 11, 48661, 290, 1842, 5679, 262, 27806, 286, 11320, 3254, 73, 11025, 11, 281, 13537, 38309, 5295, 284, 1234, 465, 4301, 1613, 2157, 683, 13, 887, 465, ...
2.715984
1,514
from typing import Any, Dict import argparse import numpy as np import torch import torch.nn as nn import torch.nn.functional as F FC1_DIM = 1024 FC2_DIM = 128
[ 6738, 19720, 1330, 4377, 11, 360, 713, 198, 11748, 1822, 29572, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 4851, ...
2.910714
56
from pygame import Surface, font from .basewidget import BaseWidget from frontend import Renderer, WidgetHandler
[ 6738, 12972, 6057, 1330, 20321, 11, 10369, 198, 6738, 764, 12093, 413, 17484, 1330, 7308, 38300, 198, 6738, 2166, 437, 1330, 28703, 11882, 11, 370, 17484, 25060, 628 ]
4.071429
28
import numpy as np import tensorflow as tf """ Do an MNIST classification line by line by LSTM """ (x_train, y_train), \ (x_test, y_test) = tf.keras.datasets.mnist.load_data() x_train, x_test = x_train/255.0, x_test/255.0 model = tf.keras.Sequential() model.add(tf.keras.layers.LSTM(128, input_shape=(None, 28))) ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 37811, 198, 5211, 281, 29060, 8808, 17923, 1627, 416, 1627, 416, 406, 2257, 44, 198, 37811, 198, 198, 7, 87, 62, 27432, 11, 331, 62, 27432, 828, 3467,...
2.279743
311
# coding: utf-8 # In[1]: import numpy as np import pandas as pd import os from random import shuffle from tqdm import tqdm DATA_DIR = '../input/amazon/' TRAIN_TIF_DIR = DATA_DIR + 'train-tif/' TRAIN_CSV = DATA_DIR + 'train.csv' TEST_TIF_DIR = DATA_DIR + 'test-tif/' IMG_SIZE = 100 LR = 1e-3 MODEL_NAME = 'amazon=-{...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 6738, 4738, 1330, 36273, 198, 6738, 256, 80, 36020, 1330, ...
2.256881
436
"""Base support for POSIX-like platforms.""" import py, os, sys from rpython.translator.platform import Platform, log, _run_subprocess import rpython rpydir = str(py.path.local(rpython.__file__).join('..'))
[ 37811, 14881, 1104, 329, 28069, 10426, 12, 2339, 9554, 526, 15931, 198, 198, 11748, 12972, 11, 28686, 11, 25064, 198, 198, 6738, 374, 29412, 13, 7645, 41880, 13, 24254, 1330, 19193, 11, 2604, 11, 4808, 5143, 62, 7266, 14681, 198, 198, ...
2.957746
71
import glob import bs4 import gzip import pickle import re import os from concurrent.futures import ProcessPoolExecutor as PPE import json from pathlib import Path from hashlib import sha256 import shutil Path('json').mkdir(exist_ok=True) #urls = [sha256(bytes(v, 'utf8')).hexdigest() for v in json.load(fp=open('./has...
[ 11748, 15095, 198, 11748, 275, 82, 19, 220, 198, 198, 11748, 308, 13344, 198, 11748, 2298, 293, 198, 11748, 302, 198, 11748, 28686, 198, 6738, 24580, 13, 69, 315, 942, 1330, 10854, 27201, 23002, 38409, 355, 350, 11401, 198, 11748, 33918...
2.486301
292
#!/usr/bin/python # # 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 ag...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 12131, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287...
3.708791
182
import functools import json from os.path import abspath, dirname, exists, join from typing import Dict, Sequence import numpy as np import pandas as pd import torch from pymatgen.core import Composition from torch.utils.data import Dataset def collate_batch(dataset_list): """ Collate a list of data and ret...
[ 11748, 1257, 310, 10141, 198, 11748, 33918, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 11, 26672, 3672, 11, 7160, 11, 4654, 198, 6738, 19720, 1330, 360, 713, 11, 45835, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292,...
2.196094
1,280
import unittest from dq import util
[ 11748, 555, 715, 395, 198, 198, 6738, 288, 80, 1330, 7736, 628 ]
3.166667
12
""" PermCheck Check whether array A is a permutation. https://codility.com/demo/results/demoANZ7M2-GFU/ Task description A non-empty zero-indexed array A consisting of N integers is given. A permutation is a sequence containing each element from 1 to N once, and only once. For example, array A such that: A[0] = 4...
[ 37811, 198, 198, 5990, 76, 9787, 198, 9787, 1771, 7177, 317, 318, 257, 9943, 7094, 13, 198, 5450, 1378, 19815, 879, 13, 785, 14, 9536, 78, 14, 43420, 14, 9536, 78, 1565, 57, 22, 44, 17, 12, 21713, 52, 14, 198, 198, 25714, 6764, ...
2.855835
437
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 33448, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
3.097561
164
'Author: Aimore Resende Riquetti Dutra' '''email: aimorerrd@hotmail.com''' # -------------------------------------------------------------------------------------------------- # # This code can run 4 different models of Reinforcement Learning: # Q-Learning (QL), DQN, SRL (DSRL), SRL+CS(DSRL_object_near) and some ot...
[ 6, 13838, 25, 317, 9401, 1874, 38396, 371, 1557, 24851, 360, 35076, 6, 201, 198, 7061, 6, 12888, 25, 4031, 11934, 4372, 31, 8940, 4529, 13, 785, 7061, 6, 201, 198, 2, 16529, 3880, 438, 1303, 201, 198, 2, 770, 2438, 460, 1057, 604,...
2.526812
2,760
import logging from typing import Tuple import bpy from mathutils import Vector from .object import get_objs logger = logging.getLogger(__name__) ################################################################################################ # Methods # # ========================================...
[ 198, 11748, 18931, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 275, 9078, 198, 6738, 10688, 26791, 1330, 20650, 198, 198, 6738, 764, 15252, 1330, 651, 62, 672, 8457, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, ...
2.535443
790
# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # 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...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 13130, 383, 309, 22854, 17, 51, 22854, 46665, 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, ...
2.377276
13,017
""" WS-DAN models Hu et al., "See Better Before Looking Closer: Weakly Supervised Data Augmentation Network for Fine-Grained Visual Classification", arXiv:1901.09891 """ import logging import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import models.resnet as resnet from models.incep...
[ 37811, 198, 19416, 12, 35, 1565, 4981, 198, 38202, 2123, 435, 1539, 198, 1, 6214, 11625, 7413, 15616, 1012, 13416, 25, 28788, 306, 3115, 16149, 6060, 2447, 14374, 7311, 329, 17867, 12, 8642, 1328, 15612, 40984, 1600, 198, 283, 55, 452, ...
3.117647
153
#!/usr/bin/env python import mirheo as mir dt = 0.001 ranks = (1, 1, 1) domain = (8, 16, 8) force = (1.0, 0, 0) density = 4 u = mir.Mirheo(ranks, domain, dt, debug_level=3, log_filename='log', no_splash=True) pv = mir.ParticleVectors.ParticleVector('pv', mass = 1) ic = mir.InitialConditions.Uniform(number_densit...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 5720, 258, 78, 355, 5720, 198, 198, 28664, 796, 657, 13, 8298, 198, 198, 81, 2283, 220, 796, 357, 16, 11, 352, 11, 352, 8, 198, 27830, 796, 357, 23, 11, 1467, 11, 807...
2.244118
680
#!/usr/bin/python # -*- coding: utf-8 -*- import abc import bs4 import functools import utilities def loadable(func_name): """Decorator for getters that require a load() upon first access. :type func_name: function :param func_name: class method that requires that load() be called if the class's _attribute val...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 450, 66, 198, 11748, 275, 82, 19, 198, 11748, 1257, 310, 10141, 198, 198, 11748, 20081, 198, 198, 4299, 3440, 540, 7,...
3.261905
126
"""p2 core http responses""" from wsgiref.util import FileWrapper from django.http import StreamingHttpResponse from p2.core.constants import ATTR_BLOB_MIME, ATTR_BLOB_SIZE_BYTES from p2.core.models import Blob
[ 37811, 79, 17, 4755, 2638, 9109, 37811, 198, 6738, 266, 45213, 557, 69, 13, 22602, 1330, 9220, 36918, 2848, 198, 198, 6738, 42625, 14208, 13, 4023, 1330, 43124, 43481, 31077, 198, 198, 6738, 279, 17, 13, 7295, 13, 9979, 1187, 1330, 51...
2.931507
73
# Generated by Django 3.0.6 on 2020-05-28 09:07 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 2713, 12, 2078, 7769, 25, 2998, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
""" Data: Temperature and Salinity time series from SIO Scripps Pier Salinity: measured in PSU at the surface (~0.5m) and at depth (~5m) Temp: measured in degrees C at the surface (~0.5m) and at depth (~5m) - Timestamp included beginning in 1990 """ # imports import sys,os import pandas as pd import numpy as...
[ 37811, 198, 198, 6601, 25, 34467, 290, 4849, 6269, 640, 2168, 422, 311, 9399, 1446, 14602, 82, 13762, 198, 220, 220, 220, 4849, 6269, 25, 8630, 287, 48189, 379, 262, 4417, 31034, 15, 13, 20, 76, 8, 290, 379, 6795, 31034, 20, 76, 8...
2.210482
4,751
from collections import namedtuple as Struct from sklearn.model_selection import GroupShuffleSplit, ShuffleSplit DataSplitConfig = Struct('DataSplitConfig', ['validation_size', 'test_size', 'random_seed']) DEFAULT_SPLIT_CONFIG = DataSplitConfig(0.2, 0.2, 1337)
[ 6738, 17268, 1330, 3706, 83, 29291, 355, 32112, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4912, 2484, 18137, 41205, 11, 911, 18137, 41205, 198, 198, 6601, 41205, 16934, 796, 32112, 10786, 6601, 41205, 16934, 3256, 37250, 12102, ...
3.207317
82
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import torch.nn as nn from mmcv.cnn import ConvModule from mmcv.runner import BaseModule from .make_divisible import make_divisible
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 8085, 33967, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 8085, 33967, 13, 66, 20471, 1330, 34872, 26796, 198, 6738, 8085, 33967, 13, 16737, ...
3.288136
59
from django.contrib import admin from .models import Images,Comments,Profile # Register your models here. admin.site.site_header='InstaPost Admin' admin.site.site_title='InstaPost Admin Dashboard' admin.site.register(Images,ImageInline) admin.site.register(Profile)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 5382, 11, 23903, 11, 37046, 198, 2, 17296, 534, 4981, 994, 13, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 28482, 13, 15654, 13, 15654, 62, 2567...
3.123596
89
import numpy as np _mandelbruh_GLOBAL_VARS = {}
[ 11748, 299, 32152, 355, 45941, 198, 198, 62, 22249, 417, 65, 622, 71, 62, 8763, 9864, 1847, 62, 53, 27415, 796, 23884, 198 ]
2.130435
23
""" recognize face landmark """ import json import os import requests import numpy as np FACE_POINTS = list(range(0, 83)) JAW_POINTS = list(range(0, 19)) LEFT_EYE_POINTS = list(range(19, 29)) LEFT_BROW_POINTS = list(range(29, 37)) MOUTH_POINTS = list(range(37, 55)) NOSE_POINTS = list(range(55, 65)) RIGHT_EYE_POINTS =...
[ 37811, 198, 26243, 1096, 1986, 20533, 198, 37811, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 7007, 198, 11748, 299, 32152, 355, 45941, 198, 198, 49836, 62, 16402, 1268, 4694, 796, 1351, 7, 9521, 7, 15, 11, 9698, 4008, 198, ...
2.184116
277
import requests import time from bs4 import BeautifulSoup import re def get_mag_var(lat, lon, year, month, day, elev=0): """Returns the magnetic variation at a particulat point on earth. Keyword Arguments lat -- latitude (e.g. -180.6 deg) lon -- longitude (e.g. -34.6 deg) elev -- elevation in km (...
[ 11748, 7007, 198, 11748, 640, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 302, 198, 198, 4299, 651, 62, 19726, 62, 7785, 7, 15460, 11, 300, 261, 11, 614, 11, 1227, 11, 1110, 11, 7662, 28, 15, 2599, 198, 220, 220, ...
2.272408
569
"""Generated message classes for datacatalog version v1beta1. A fully managed and highly scalable data discovery and metadata management service. """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.protorpclite import messages as _messages from apitools.base.py import encoding ...
[ 37811, 8645, 515, 3275, 6097, 329, 4818, 330, 10254, 519, 2196, 410, 16, 31361, 16, 13, 198, 198, 32, 3938, 5257, 290, 4047, 43865, 1366, 9412, 290, 20150, 4542, 198, 15271, 13, 198, 37811, 198, 2, 24550, 25, 770, 2393, 318, 1960, 5...
2.888
250
# Generated by Django 2.1.7 on 2019-04-22 21:08 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 3023, 12, 1828, 2310, 25, 2919, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# -*- coding:utf-8 -*- # ------------------------ # written by Songjian Chen # 2018-10 # ------------------------ import os import skimage.io from skimage.color import rgb2gray import skimage.transform from scipy.io import loadmat import numpy as np import cv2 import math import warnings import random import torch imp...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 220, 22369, 198, 2, 3194, 416, 10940, 73, 666, 12555, 198, 2, 2864, 12, 940, 198, 2, 220, 22369, 198, 198, 11748, 28686, 198, 11748, 1341, 9060, 13, 952, 198, 6738, ...
3.264
125
fruit='banana' x=len(fruit) print(x)
[ 34711, 11639, 3820, 2271, 6, 201, 198, 87, 28, 11925, 7, 34711, 8, 201, 198, 4798, 7, 87, 8 ]
2
19
# Generated by Django 3.1.7 on 2021-03-05 10:21 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 2713, 838, 25, 2481, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
''' Uses [[https://github.com/fabianonline/telegram_backup#readme][telegram_backup]] database for messages data ''' from pathlib import Path from textwrap import dedent from typing import Optional, Union, TypeVar from urllib.parse import unquote # TODO mm, make it easier to rememember to use... from ..common import P...
[ 7061, 6, 198, 5842, 274, 16410, 5450, 1378, 12567, 13, 785, 14, 36434, 666, 25119, 14, 660, 30536, 62, 1891, 929, 2, 961, 1326, 7131, 660, 30536, 62, 1891, 929, 11907, 6831, 329, 6218, 1366, 198, 7061, 6, 198, 198, 6738, 3108, 8019,...
3.138365
159
''' Created on Dec 27, 2019 @author: duane ''' DOLLAR = ord('$') LBRACE = ord('{') RBRACE = ord('}') LPAREN = ord('(') RPAREN = ord(')') def test_istr(): check(-1, -1, "") check(-1, -1, "a") check(-1, -1, "ab") check(-1, -1, "abc") check(-1, -1, "abcd") check(-1, -1, "abcde") check(-...
[ 7061, 6, 198, 41972, 319, 4280, 2681, 11, 13130, 198, 198, 31, 9800, 25, 7043, 1531, 198, 198, 7061, 6, 198, 198, 18227, 3069, 1503, 796, 2760, 10786, 3, 11537, 198, 43, 11473, 11598, 796, 2760, 10786, 90, 11537, 198, 49, 11473, 115...
1.800892
673
#!/usr/bin/env python3 """ CLI for Accessing Deenis """ # Standard Imports import sys from pathlib import Path # Module Imports import click # Path Fixes working_dir = Path(__file__).resolve().parent sys.path.append(str(working_dir)) # Project Imports from deenis import Deenis if __name__ == "__main__": add_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 5097, 40, 329, 8798, 278, 1024, 268, 271, 198, 37811, 198, 2, 8997, 1846, 3742, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 2, 19937, 1846, 3742, ...
2.844828
116
# coding: utf-8 from bigone import BigOneDog from common import gen_logger import logging import time import json def strategy_eth_big_bnc_eth(dog): """ BIG/ETH -> BIG/BNC -> ETH/BNC ETH/BNC -> BIG/BNC -> BIG/ETH :param dog: implemention of BigOneDog :return: """ big_eth_data = dog.get_...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 1263, 505, 1330, 4403, 3198, 32942, 198, 6738, 2219, 1330, 2429, 62, 6404, 1362, 198, 198, 11748, 18931, 198, 11748, 640, 198, 11748, 33918, 628, 198, 4299, 4811, 62, 2788, 62, 14261, ...
1.902677
2,353
import os import yaml import logging import importlib os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' logging.getLogger('tensorflow').disabled = True from cifar_training_tools import cifar_training, cifar_error_test print('\n' + '#' * 19) print("TESTING FOR ERRORS!") print('#' * 19) stream = open('experiments...
[ 11748, 28686, 198, 11748, 331, 43695, 198, 11748, 18931, 198, 11748, 1330, 8019, 198, 418, 13, 268, 2268, 17816, 10234, 62, 8697, 47, 62, 23678, 62, 25294, 62, 2538, 18697, 20520, 796, 705, 17, 6, 220, 198, 6404, 2667, 13, 1136, 11187...
2.422785
395
#!/usr/bin/python import sys import yaml import json if __name__ == '__main__': content = json.load(sys.stdin) print yaml.dump(content, indent=2, default_flow_style=False)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 2695, 796, 33918, 13, 2220, 7, 17597, 13, 19282, 25...
2.712121
66
# -*- coding: utf-8 -*- import os,sys from PyQt4 import QtGui,QtCore dataRoot = os.path.abspath(os.path.join(os.path.dirname(__file__),os.pardir,os.pardir,'histdata')) sys.path.append(dataRoot) import dataCenter as dataCenter from data.mongodb.DataSourceMongodb import Mongodb import datetime as dt ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 11, 17597, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 8205, 72, 11, 48, 83, 14055, 198, 198, 7890, 30016, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 4...
3.144737
228
from joblib import Parallel, delayed from tqdm import tqdm from .processing import map, filter, split, expand, combine, join from .manipulation import windowed, flatten
[ 6738, 1693, 8019, 1330, 42945, 11, 11038, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 764, 36948, 1330, 3975, 11, 8106, 11, 6626, 11, 4292, 11, 12082, 11, 4654, 198, 6738, 764, 805, 541, 1741, 1330, 4324, 276, 1...
3.5
52
P, R = input().split() if P == '0': print('C') elif R == '0': print('B') else: print('A')
[ 47, 11, 371, 796, 5128, 22446, 35312, 3419, 198, 198, 361, 350, 6624, 705, 15, 10354, 3601, 10786, 34, 11537, 198, 417, 361, 371, 6624, 705, 15, 10354, 3601, 10786, 33, 11537, 198, 17772, 25, 3601, 10786, 32, 11537 ]
2.307692
39
import pymongo import yaml import sched import time import json from castella import TweetCrawler if __name__ == "__main__": searcher = Castella() searcher.execute_search()
[ 11748, 279, 4948, 25162, 198, 11748, 331, 43695, 198, 11748, 6038, 198, 11748, 640, 198, 11748, 33918, 198, 6738, 3350, 12627, 1330, 18752, 34, 39464, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220...
3.137931
58
# # slice paddle model generator # import numpy as np from save_model import saveModel import paddle as pdpd import sys data_type = 'float32' if __name__ == "__main__": main()
[ 2, 198, 2, 16416, 39517, 2746, 17301, 198, 2, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 3613, 62, 19849, 1330, 3613, 17633, 198, 11748, 39517, 355, 279, 26059, 67, 198, 11748, 25064, 198, 198, 7890, 62, 4906, 796, 705, 22468, 262...
2.967213
61
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation # 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/LICE...
[ 2, 15069, 357, 34, 8, 33448, 399, 3974, 261, 21821, 290, 44735, 10501, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 19...
3.382576
264
# compatibility module for different python versions import sys if sys.version_info[:2] > (3, 0): PY2 = False PY3 = True Bytes = bytes Unicode = str basestring = str class_type_name = 'class' ClassType = type exception_module = 'builtins' new_class = type self_name = '__self_...
[ 2, 17764, 8265, 329, 1180, 21015, 6300, 198, 11748, 25064, 198, 198, 361, 25064, 13, 9641, 62, 10951, 58, 25, 17, 60, 1875, 357, 18, 11, 657, 2599, 628, 220, 220, 220, 350, 56, 17, 796, 10352, 198, 220, 220, 220, 350, 56, 18, 79...
2.429054
296
import re import unittest2 from google.appengine.ext import ndb from google.appengine.ext import testbed from consts.notification_type import NotificationType from helpers.event.event_test_creator import EventTestCreator from models.team import Team from models.notifications.match_score import MatchScoreNotification...
[ 11748, 302, 198, 11748, 555, 715, 395, 17, 198, 198, 6738, 23645, 13, 1324, 18392, 13, 2302, 1330, 299, 9945, 198, 6738, 23645, 13, 1324, 18392, 13, 2302, 1330, 1332, 3077, 198, 198, 6738, 1500, 82, 13, 1662, 2649, 62, 4906, 1330, 4...
3.833333
84
md_template_d144 = """verbosity=0 xcFunctional=PBE FDtype=4th [Mesh] nx=160 ny=80 nz=80 [Domain] ox=0. oy=0. oz=0. lx=42.4813 ly=21.2406 lz=21.2406 [Potentials] pseudopotential=pseudo.D_tm_pbe [Poisson] solver=@ max_steps_initial=@50 max_steps=@50 reset=@ bcx=periodic bcy=periodic bcz=periodic [Run] type=MD [MD] type=@...
[ 9132, 62, 28243, 62, 67, 18444, 796, 37227, 19011, 16579, 28, 15, 198, 25306, 22203, 282, 28, 47, 12473, 198, 26009, 4906, 28, 19, 400, 198, 58, 37031, 60, 198, 77, 87, 28, 14198, 198, 3281, 28, 1795, 198, 27305, 28, 1795, 198, 58...
1.917701
2,819
#! /usr/bin/env python import copy from copy import deepcopy import rospy import threading import quaternion import numpy as np from geometry_msgs.msg import Point from visualization_msgs.msg import * from franka_interface import ArmInterface from panda_robot import PandaArm import matplotlib.pyplot as plt from scipy.s...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 4866, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 686, 2777, 88, 198, 11748, 4704, 278, 198, 11748, 627, 9205, 295, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 22939, 6...
2.516687
3,296
# Generated by Django 2.2.9 on 2020-01-28 14:50 import django.utils.timezone from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 24, 319, 12131, 12, 486, 12, 2078, 1478, 25, 1120, 198, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.926829
41
""" Author: Mohammad Dehghani Ashkezari <mdehghan@uw.edu> Date: 2019-06-28 Function: Host a collection of shared multi-purpose helper functions. """ import os import sys from tqdm import tqdm from colorama import Fore, Back, Style, init import numpy as np import pandas as pd import webbrowser import I...
[ 37811, 201, 198, 13838, 25, 29674, 1024, 71, 456, 3216, 7844, 365, 89, 2743, 1279, 76, 2934, 71, 6064, 31, 84, 86, 13, 15532, 29, 201, 198, 201, 198, 10430, 25, 13130, 12, 3312, 12, 2078, 201, 198, 201, 198, 22203, 25, 14504, 257,...
2.146626
3,260
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: api/v3/api_proto/projects.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 40391, 14, 85, 18, 14, 15042, 62, 1676, 1462, 14, 42068, 13, 1676, 1462,...
2.464867
10,631
"""Testing Device operations.""" import json import unittest.mock as mock from click.testing import CliRunner import homeassistant_cli.cli as cli def test_device_list(default_devices) -> None: """Test Device List.""" with mock.patch( 'homeassistant_cli.remote.get_devices', return_value=default_devic...
[ 37811, 44154, 16232, 4560, 526, 15931, 198, 198, 11748, 33918, 198, 11748, 555, 715, 395, 13, 76, 735, 355, 15290, 198, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 11748, 1363, 562, 10167, 62, 44506, 13, 44506, 355, 537, 7...
2.099905
1,051
from PyQt5.QtWidgets import QAction, QTreeWidget, QTreeWidgetItem, QFileDialog from PyQt5.QtGui import QIcon from PyQt5.QtCore import Qt import animations.general_animation as j3d from widgets.yaz0 import compress, compress_slow, compress_fast from io import BytesIO
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 12502, 11, 1195, 27660, 38300, 11, 1195, 27660, 38300, 7449, 11, 1195, 8979, 44204, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 220, 1195, 19578, 198, 67...
2.966667
90
#Create the pre-defined song values and empty variables...Correct names not used so each starting letter would be unique numbers = (1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ) letters = ['a ','b ','c ','d ','e ','f ','g ','h ','i ','j ','k ','l ','m ','n ','o ','p ','q ','r '] roman = ['I ', 'II ...
[ 2, 16447, 262, 662, 12, 23211, 3496, 3815, 290, 6565, 9633, 986, 42779, 3891, 407, 973, 523, 1123, 3599, 3850, 561, 307, 3748, 198, 198, 77, 17024, 796, 357, 16, 837, 17, 837, 18, 837, 19, 837, 20, 837, 21, 837, 22, 837, 23, 837...
2.347885
1,466
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. import os from os.path import dirname, join, exists import unittest import pytest import con...
[ 2, 357, 66, 8, 2321, 12, 4967, 6389, 13814, 30437, 11, 3457, 13, 1220, 2638, 1378, 18487, 13814, 13, 952, 198, 2, 1439, 6923, 33876, 198, 2, 198, 2, 1779, 64, 318, 9387, 739, 262, 2846, 286, 262, 347, 10305, 513, 12, 565, 682, 5...
2.351279
1,486
# Bert has a Mouth, and It Must Speak: BERT as a Markov Random Field Language Model, # by Alex Wang, Kyunghyun Cho, NeuralGen 2019 # https://colab.research.google.com/drive/1MxKZGtQ9SSBjTK5ArsZ5LKhkztzg52RV # https://arxiv.org/abs/1902.04094 import tensorflow as tf import tensorflow_probability as tfp import numpy as ...
[ 2, 22108, 468, 257, 44764, 11, 290, 632, 12039, 40802, 25, 347, 17395, 355, 257, 2940, 709, 14534, 7663, 15417, 9104, 11, 198, 2, 416, 4422, 15233, 11, 11118, 403, 456, 88, 403, 10031, 11, 47986, 13746, 13130, 198, 2, 3740, 1378, 40...
2.532609
184
""" [E] Given a sorted array, create a new array containing squares of all the number of the input array in the sorted order. Input: [-2, -1, 0, 2, 3] Output: [0, 1, 4, 4, 9] """ # Time: O(N) Space: O(n)
[ 628, 198, 37811, 198, 198, 58, 36, 60, 11259, 257, 23243, 7177, 11, 2251, 257, 649, 7177, 7268, 24438, 286, 477, 262, 220, 198, 17618, 286, 262, 5128, 7177, 287, 262, 23243, 1502, 13, 198, 198, 20560, 25, 25915, 17, 11, 532, 16, 1...
2.566265
83
import os from azureml.pipeline.steps import PythonScriptStep from azureml.core.runconfig import RunConfiguration from azureml.core.conda_dependencies import CondaDependencies from azureml.pipeline.core import PipelineData from azureml.pipeline.core import PipelineParameter from azureml.pipeline.steps import EstimatorS...
[ 11748, 28686, 198, 6738, 35560, 495, 4029, 13, 79, 541, 4470, 13, 20214, 1330, 11361, 7391, 8600, 198, 6738, 35560, 495, 4029, 13, 7295, 13, 5143, 11250, 1330, 5660, 38149, 198, 6738, 35560, 495, 4029, 13, 7295, 13, 66, 13533, 62, 458...
2.60462
736
import torch import argparse import os import sys import cv2 import time cfg = Configuration()
[ 11748, 28034, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 640, 628, 628, 198, 37581, 796, 28373, 3419, 198 ]
3.535714
28
#!/usr/bin/python2.4 import httplib, urllib, sys # Define the parameters for the POST request and encode them in # a URL-safe format. params = urllib.urlencode([ #('js_code', sys.argv[1]), ('code_url', 'https://raw.githubusercontent.com/kennytilton/MatrixJS/master/js/matrixjs/js/Matrix/Cells.js'), ('code...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 19, 198, 198, 11748, 1841, 489, 571, 11, 2956, 297, 571, 11, 25064, 198, 198, 2, 2896, 500, 262, 10007, 329, 262, 24582, 2581, 290, 37773, 606, 287, 198, 2, 257, 10289, 12, 21230, 5794...
2.781609
348
# Copyright 2017 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, 2177, 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, ...
3.875
296
# Copyright 2020 The Bazel 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 applicable la...
[ 2, 15069, 12131, 383, 347, 41319, 46665, 13, 1439, 2489, 10395, 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, ...
2.636394
2,995
from couchdbkit import ResourceNotFound from tastypie import fields as tp_f from corehq.apps.api.resources import JsonResource from corehq.apps.api.resources.v0_1 import ( CustomResourceMeta, RequirePermissionAuthentication, ) from corehq.apps.api.util import get_object_or_not_exist from corehq.apps.fixtures.mo...
[ 6738, 18507, 9945, 15813, 1330, 20857, 3673, 21077, 198, 6738, 14854, 4464, 494, 1330, 7032, 355, 256, 79, 62, 69, 198, 6738, 4755, 71, 80, 13, 18211, 13, 15042, 13, 37540, 1330, 449, 1559, 26198, 198, 6738, 4755, 71, 80, 13, 18211, ...
3.12782
133
# -*- coding: utf-8 -*- """Define the cert_manager.domain.Domain unit tests.""" # Don't warn about things that happen as that is part of unit testing # pylint: disable=protected-access # pylint: disable=no-member import json from requests.exceptions import HTTPError from testtools import TestCase import responses f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 7469, 500, 262, 5051, 62, 37153, 13, 27830, 13, 43961, 4326, 5254, 526, 15931, 198, 2, 2094, 470, 9828, 546, 1243, 326, 1645, 355, 326, 318, 636, 286, 4326, 485...
3.453125
128
"""Text parts.""" SEPARATOR = '----------------------------------' CONT_GAME = 'enter ' GREETING = ' '' ''!\n' \ ' , ' \ ' !' NAME_QUESTION = ' ?' CHOOSE_LEVEL = ' , ' \ ' . \n' \ '1 - \n' \ '2 - \n' \ '3 - ' IN...
[ 37811, 8206, 3354, 526, 15931, 198, 5188, 27082, 25633, 796, 705, 3880, 438, 6, 198, 198, 37815, 62, 47109, 796, 705, 9255, 220, 220, 705, 198, 198, 28934, 2767, 2751, 796, 705, 220, 220, 220, 10148, 10148, 0, 59, 77, 6, 3467, 198, ...
1.38255
1,490
# Generated by Django 3.1.3 on 2021-01-07 00:42 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 33448, 12, 486, 12, 2998, 3571, 25, 3682, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 142...
3.04918
61
import os import importlib
[ 11748, 28686, 198, 11748, 1330, 8019, 628 ]
4
7
from flask import Blueprint, Flask, send_from_directory from werkzeug.security import check_password_hash, generate_password_hash from app import db from app.mod_auth.forms import LoginForm from app.mod_auth.models import User mod_ecomm = Blueprint('products', __name__, url_prefix='/products', ...
[ 6738, 42903, 1330, 39932, 11, 46947, 11, 3758, 62, 6738, 62, 34945, 201, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 2198, 62, 28712, 62, 17831, 11, 7716, 62, 28712, 62, 17831, 201, 198, 201, 198, 6738, 598, 1330, 20613, 201, ...
2.875
128
from .functions import monitor_watchlist_action, manager with manager.get_dagr(): monitor_watchlist_action()
[ 6738, 764, 12543, 2733, 1330, 5671, 62, 8340, 4868, 62, 2673, 11, 4706, 201, 198, 201, 198, 4480, 4706, 13, 1136, 62, 67, 363, 81, 33529, 201, 198, 220, 220, 220, 5671, 62, 8340, 4868, 62, 2673, 3419, 201, 198 ]
2.95
40
import pprint import logging from django.conf import settings from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from zenslackchat.message import handler from zenslackchat.models import SlackApp from zenslackchat.models import ZendeskApp
[ 11748, 279, 4798, 198, 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330,...
3.780488
82
# Copyright 2020 University Of Delhi. # # 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 wr...
[ 2, 15069, 12131, 2059, 3226, 12517, 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.395289
7,048
""" Here you find either new implemented modules or alternate implementations of already modules. This directory is intended to have a second implementation beside the main implementation to have a discussion which implementation to favor on the long run. """
[ 37811, 198, 4342, 345, 1064, 2035, 649, 9177, 13103, 393, 13527, 25504, 220, 198, 1659, 1541, 13103, 13, 770, 8619, 318, 5292, 284, 423, 257, 1218, 7822, 198, 12636, 485, 262, 1388, 7822, 284, 423, 257, 5114, 543, 7822, 284, 220, 198,...
5.038462
52
''' Created on Mar 6, 2014 @author: tharanga ''' import unittest from time import sleep import EventService as es from EventService import WebSocketServer as ws from EventService import EventManager as em import socket from base64 import b64encode import struct import MySQLdb import json import EventService import fl...
[ 7061, 6, 198, 41972, 319, 1526, 718, 11, 1946, 198, 198, 31, 9800, 25, 294, 283, 16484, 198, 7061, 6, 198, 11748, 555, 715, 395, 198, 6738, 640, 1330, 3993, 198, 11748, 8558, 16177, 355, 1658, 198, 6738, 8558, 16177, 1330, 5313, 391...
2.619355
310
import os import threading import time import unittest from OpenDrive.client_side import file_changes_json as c_json from OpenDrive.client_side import interface from OpenDrive.client_side import main from OpenDrive.client_side import paths as client_paths from OpenDrive.server_side import paths as server_paths from te...
[ 11748, 28686, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 555, 715, 395, 198, 198, 6738, 4946, 24825, 13, 16366, 62, 1589, 1330, 2393, 62, 36653, 62, 17752, 355, 269, 62, 17752, 198, 6738, 4946, 24825, 13, 16366, 62, 1589, 133...
3.302469
162
import os import numpy as np from skimage import io, data_dir from skimage._shared import testing from skimage._shared.testing import assert_array_equal one_by_one_jpeg = ( b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01' b'\x00\x01\x00\x00\xff\xdb\x00C\x00\x03\x02\x02\x02\x02' b'\x02\x03\x02\x02...
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 9060, 1330, 33245, 11, 1366, 62, 15908, 198, 198, 6738, 1341, 9060, 13557, 28710, 1330, 4856, 198, 6738, 1341, 9060, 13557, 28710, 13, 33407, 1330, 6818, 62, 18747, ...
1.455611
597