content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np length = 28 dog = np.load('stabilization_small.npy') num_plot = 0 if num_plot == 1: for j in range(10): img = dog[j,:].reshape((length, length)) # for printing numbers # img = np.random.randint(0,2,size=(length,...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 9060, 355, 29034, 9600, 198, 11748, 299, 32152, 355, 45941, 198, 198, 13664, 796, 2579, 198, 198, 9703, 796, 45941, 13, 2220, 10786, 301, 14991,...
2.337321
418
from itertools import chain from json import load import numpy as np if __name__ == "__main__": samples = load(open("samples.json")) rdfs = list(chain.from_iterable([s["rdf"] for s in samples])) hal = np.sum([s["hal"] for s in samples]) total = len(rdfs) exists = len([r for s, r, o, res in rdfs i...
[ 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 33918, 1330, 3440, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 8405, 796, 3440, 7, 9654, 7203, 82, 12629...
2.442424
330
from django.core import management from django.core.management.base import BaseCommand
[ 6738, 42625, 14208, 13, 7295, 1330, 4542, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 628 ]
4.190476
21
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-07-05 22:01 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion import re
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 319, 2177, 12, 2998, 12, 2713, 2534, 25, 486, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748,...
2.873418
79
import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo import torch.nn.functional as F import torchvision.transforms as transforms import torchvision.models as models import argparse import re import os from torchsummary import summary # local imports import model from preprocess import mean, std...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 26791, 13, 19849, 62, 89, 2238, 355, 2746, 62, 89, 2238, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 10178, 13, 7645, 23914, 35...
2.599362
1,253
# pylint:disable=missing-class-docstring,no-self-use import os import unittest import angr test_location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries', 'tests') if __name__ == "__main__": unittest.main()
[ 2, 279, 2645, 600, 25, 40223, 28, 45688, 12, 4871, 12, 15390, 8841, 11, 3919, 12, 944, 12, 1904, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 11748, 281, 2164, 628, 198, 9288, 62, 24886, 796, 28686, 13, 6978, 13, 22179, ...
2.535354
99
from __future__ import absolute_import import numpy as np import tensorflow as tf import tensorflow.keras.backend as K def _crps_tf(y_true, y_pred, factor=0.05): ''' core of (pseudo) CRPS loss y_true: two-dimensional arrays y_pred: two-dimensional arrays factor: importance of std term ...
[ 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 6122, 292, 13, 1891, 437, 355, 509, 198, 198, 4299, 4808, 6098, ...
2.217146
3,546
from .ball_query import BallQuery from .frustum import FrustumPointNetLoss from .loss import KLLoss from .pointnet import PointNetAModule, PointNetSAModule, PointNetFPModule from .pvconv import PVConv from .se import SE3d from .shared_mlp import SharedMLP from .voxelization import Voxelization
[ 6738, 764, 1894, 62, 22766, 1330, 6932, 20746, 198, 6738, 764, 8310, 436, 388, 1330, 1305, 436, 388, 12727, 7934, 43, 793, 198, 6738, 764, 22462, 1330, 509, 3069, 793, 198, 6738, 764, 4122, 3262, 1330, 6252, 7934, 2390, 375, 2261, 11,...
3.172043
93
import gzip import pickle import os if __name__ == '__main__': # Load sample with gzip.open("E:\\ECG_Data\\icentia11k\\00000_batched.pkl.gz", "rb") as file: data = pickle.load(file) print(data.shape) # Load label with gzip.open("E:\\ECG_Data\\icentia11k\\00000_batched_lbls.pkl.gz", "rb") a...
[ 11748, 308, 13344, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 8778, 6291, 198, 220, 220, 220, 351, 308, 13344, 13, 9654, 7203, 36, 25, 6852, ...
1.942478
452
#!/usr/bin/env python # -*- coding: utf-8 -*- import Tio import asyncio import unittest site = Tio.Tio()
[ 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, 309, 952, 198, 11748, 30351, 952, 198, 11748, 555, 715, 395, 198, 198, 15654, 796, 309, 952, 13, 51, 952,...
2.276596
47
data2=pd.read_csv("Raw/pndictionary.csv",error_bad_lines=False,header=None) data2=data2.drop([0,3,4,5],axis=1) print(data2.head()) data2=data2.drop_duplicates(subset=[1],keep='first') data2=data2.reset_index(drop=True) l=[] for i in range(len(data2)): s=data2[2][i] if s==' `value`' or s==" 'GN ara[times]'": ...
[ 7890, 17, 28, 30094, 13, 961, 62, 40664, 7203, 27369, 14, 79, 358, 14188, 13, 40664, 1600, 18224, 62, 14774, 62, 6615, 28, 25101, 11, 25677, 28, 14202, 8, 198, 7890, 17, 28, 7890, 17, 13, 14781, 26933, 15, 11, 18, 11, 19, 11, 20...
1.910486
391
#!/usr/bin/env python3 import argparse import xml.etree.ElementTree as ET from dumb_round import dumb_round VESTIGIAL_ATTRS = { 'Walker': ['fill', 'frame', 'r'], 'Sphere': ['r'], 'Hologram': ['r'], 'Solid': ['r'], 'WallSolid': ['angle', 'cx', 'cz', 'r'], 'FreeSolid': ['r'], 'Dome': [], ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 628, 198, 6738, 13526, 62, 744, 1330, 13526, 62, 744, 628, 198, 53, 6465, 3528, 12576, 62, ...
2.04528
1,303
import re import json import string import urllib.request
[ 11748, 302, 198, 11748, 33918, 198, 11748, 4731, 198, 11748, 2956, 297, 571, 13, 25927, 198 ]
3.625
16
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyNibabel(PythonPackage): """Access a multitude of neuroimaging data formats""" homep...
[ 2, 15069, 2211, 12, 1238, 2481, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
2.412969
293
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
[ 29113, 29113, 14468, 2, 198, 2, 220, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.094703
623
from pybrain.rl.learners.directsearch.__init__ import * from pybrain.rl.learners.valuebased.__init__ import * from pybrain.rl.learners.modelbased.__init__ import *
[ 6738, 12972, 27825, 13, 45895, 13, 35720, 364, 13, 12942, 12947, 13, 834, 15003, 834, 1330, 1635, 198, 6738, 12972, 27825, 13, 45895, 13, 35720, 364, 13, 8367, 3106, 13, 834, 15003, 834, 1330, 1635, 198, 6738, 12972, 27825, 13, 45895, ...
3.037037
54
from ..entities import entity_post_move, entity_rotated from ..services import map
[ 6738, 11485, 298, 871, 1330, 9312, 62, 7353, 62, 21084, 11, 9312, 62, 10599, 515, 201, 198, 6738, 11485, 30416, 1330, 3975, 201 ]
3.652174
23
#!/usr/bin/env python3 """ Writes a lexicon to disk with the relevant counts of each word. Use with e.g. "find . -type f -iname "*.txt" -exec ./write_token_counts.py {} +" """ __author__ = "Todd Shore <errantlinguist+github@gmail.com>" __copyright__ = "Copyright (C) 2018 Todd Shore" __license__ = "Apache License, Ve...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 20257, 274, 257, 31191, 4749, 284, 11898, 351, 262, 5981, 9853, 286, 1123, 1573, 13, 198, 198, 11041, 351, 304, 13, 70, 13, 366, 19796, 764, 532, 4906, 277, 532,...
2.843931
173
#!/usr/bin/env python # # Builds archives for SDK releases. # # Usage: # python tools/sdk.py <version> # import os import shutil import sys import tempfile if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 10934, 82, 22415, 329, 26144, 10050, 13, 198, 2, 198, 2, 29566, 25, 198, 2, 21015, 4899, 14, 21282, 74, 13, 9078, 1279, 9641, 29, 198, 2, 198, 198, 11748, 28686, 198, ...
2.69863
73
import sys try: from setuptools import setup except ImportError: sys.exit('ERROR: setuptools is required.\nTry using "pip install setuptools".') # Use README.rst for the long description with open('README.rst') as fh: long_description = fh.read() def get_package_version(verfile): '''Scan the script for the...
[ 198, 11748, 25064, 198, 198, 28311, 25, 198, 220, 422, 900, 37623, 10141, 1330, 9058, 198, 16341, 17267, 12331, 25, 198, 197, 17597, 13, 37023, 10786, 24908, 25, 900, 37623, 10141, 318, 2672, 13, 59, 77, 23433, 1262, 366, 79, 541, 272...
2.628447
689
# -*- coding: utf-8 -*- """ Created on Thu Jan 7 13:01:33 2016 this is a low-cost way to compute a decent solution to the traveling salesman problem using the christofides algorythm. It guarentees approximately 1.5 the global minimum @author: Landen Blackburn """ import scipy.io as scipy import numpy as np from mun...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 2365, 220, 767, 1511, 25, 486, 25, 2091, 1584, 198, 198, 5661, 318, 257, 1877, 12, 15805, 835, 284, 24061, 257, 7709, 4610, 284, 262, 11...
3.141156
588
# Your OrderedStream object will be instantiated and called as such: # obj = OrderedStream(n) # param_1 = obj.insert(id,value)
[ 198, 198, 2, 3406, 14230, 1068, 12124, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 198, 2, 26181, 796, 14230, 1068, 12124, 7, 77, 8, 198, 2, 5772, 62, 16, 796, 26181, 13, 28463, 7, 312, 11, 8367, 8, 198 ]
3.071429
42
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Omar Sandoval <osandov@osandov.com> # SPDX-License-Identifier: MIT import argparse import os import os.path import shutil import subprocess import sys CHUNK_SIZE = 1024 * 1024 * 1024 # 1 GB if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 30628, 55, 12, 8979, 15269, 8206, 25, 24980, 3837, 8325, 1279, 418, 392, 709, 31, 418, 392, 709, 13, 785, 29, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, ...
2.716981
106
import copy import math import os import random import time from functools import wraps import numpy as np import torch from gobigger.agents import BotAgent from pygame import Vector2 def match_clones(last_clones, cur_clones, avg_move_x, avg_move_y): ...
[ 11748, 4866, 201, 198, 11748, 10688, 201, 198, 11748, 28686, 201, 198, 11748, 4738, 201, 198, 11748, 640, 201, 198, 6738, 1257, 310, 10141, 1330, 27521, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 201, 198...
1.753059
9,480
from loguru import logger from pathlib import Path import sql_functions if __name__ == "__main__": LogPath = str(Path(__file__).resolve().parent) + "\\log\\file_{time}.log" logger.add(LogPath, level='DEBUG') sql_functions.main() logger.info("Completed Successfully")
[ 6738, 2604, 14717, 1330, 49706, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 44161, 62, 12543, 2733, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 5972, 15235, 796, 965, 7, 15235, 7, 834, 77...
2.89899
99
""" Copyright: 2016 Fraunhofer Institute for Telecommunications, Heinrich-Hertz-Institut (HHI) The copyright of this software source code is the property of HHI. This software may be used and/or copied only with the written permission of HHI and in accordance with the terms and conditions stipulated in the ...
[ 37811, 198, 220, 15069, 25, 198, 220, 1584, 39313, 403, 71, 30288, 5136, 329, 48667, 11, 26431, 7527, 12, 39, 861, 89, 12, 6310, 270, 315, 357, 16768, 40, 8, 198, 220, 383, 6634, 286, 428, 3788, 2723, 2438, 318, 262, 3119, 286, 36...
2.952747
910
# _*_ coding: utf-8 _*_ """ Created by lr on 2019/08/29. """ __author__ = 'lr'
[ 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 37811, 198, 220, 15622, 416, 300, 81, 319, 13130, 14, 2919, 14, 1959, 13, 198, 37811, 198, 834, 9800, 834, 796, 705, 14050, 6, 628, 628, 628, 628 ]
2.095238
42
# # (c) Peralta Informatics 2007 # $Id: DeployPostgreSqlModule.py 302 2008-01-21 09:36:01Z andrei $ # import clr import sys import os import shutil clr.AddReference("System.Data") clr.AddReference("System.Xml") import System.Data import System.Data.SqlClient import System.Diagnostics import System.Text import System...
[ 2, 198, 2, 357, 66, 8, 350, 1691, 8326, 554, 18982, 873, 4343, 198, 2, 720, 7390, 25, 34706, 6307, 16694, 50, 13976, 26796, 13, 9078, 32591, 3648, 12, 486, 12, 2481, 7769, 25, 2623, 25, 486, 57, 290, 260, 72, 720, 198, 2, 198, ...
3.169231
195
import io import json import os from . import base as base_module from .base import KeyManager from .exceptions import CGAPEnvKeyMissing, CGAPServerKeyMissing def get_keydict_for_env(env=None): """ Gets the appropriate auth info for talking to a given beanstalk environment. Args: env: the nam...
[ 11748, 33245, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 6738, 764, 1330, 2779, 355, 2779, 62, 21412, 198, 6738, 764, 8692, 1330, 7383, 13511, 198, 6738, 764, 1069, 11755, 1330, 29925, 2969, 4834, 85, 9218, 43730, 11, 29925, 2969, ...
2.539326
890
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from django.utils import timezone from datetime import timedelta
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 4818, 8079,...
3.644444
45
"""Definitions for common operations on images.""" from io import BytesIO import numpy as np from PIL import Image def extract_patch(im, patch_size): """Extract a center cropped patch of size 'patch_size' (2-element tuple). :param im: input image :type im: PIL image object :param patch_size: size of ...
[ 37811, 7469, 50101, 329, 2219, 4560, 319, 4263, 526, 15931, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 628, 198, 4299, 7925, 62, 17147, 7, 320, 11, 8529, 62, 7857, 2...
2.733415
1,628
import xarray as xr from . import density
[ 11748, 2124, 18747, 355, 2124, 81, 198, 198, 6738, 764, 1330, 12109, 628 ]
3.384615
13
# flask_web/app.py import os from flask import Flask app = Flask(__name__) @app.route("/") #@app.route('/') #def hello_world: # return 'Hey, we have Flask in a Docker container!' #if __name == '__main__': # app.run(debug=True, host='0.0.0.0')
[ 2, 42903, 62, 12384, 14, 1324, 13, 9078, 198, 11748, 28686, 198, 198, 6738, 42903, 1330, 46947, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 31, 1324, 13, 38629, 7203, 14, 4943, 198, 198, 2, 31, 1324, 13, 38629, 10786, 1...
2.419048
105
import datetime import time import requests from test_broker_base import TestBrokerBase
[ 11748, 4818, 8079, 198, 11748, 640, 198, 198, 11748, 7007, 198, 198, 6738, 1332, 62, 7957, 6122, 62, 8692, 1330, 6208, 15783, 6122, 14881, 628 ]
3.64
25
""" Registries view permission classes """ from rest_framework.permissions import BasePermission, IsAdminUser, SAFE_METHODS class IsAdminOrReadOnly(IsAdminUser): """ Allows read-only access to all users (including anonymous users) and write access to admin users only """ class IsGwellsAdmin(BasePermiss...
[ 37811, 198, 8081, 32995, 1570, 7170, 6097, 198, 37811, 198, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 7308, 5990, 3411, 11, 1148, 46787, 12982, 11, 37630, 36, 62, 49273, 50, 628, 198, 4871, 1148, 46787, 5574, 5569, 10049, 7, 37...
3.302326
129
# Generated by Django 3.1.5 on 2021-02-11 02:59 from django.db import migrations, models import django.db.models.deletion import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 2999, 12, 1157, 7816, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.833333
48
import copy import types import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F from models.networks.assisting_layers.GateDecoratorLayers import GatedBatchNorm from models.criterions.SNIP import SNIP from utils.constants import SNIP_BATCH_ITERATIONS from utils.data_utils i...
[ 11748, 4866, 198, 11748, 3858, 198, 11748, 28034, 198, 11748, 28034, 13, 2306, 519, 6335, 355, 1960, 519, 6335, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 4981, 13, 3262, ...
2.091209
2,423
from __future__ import print_function import Adafruit_LSM9DS0 import math from itertools import permutations import time from tabulate import tabulate # Create new LSM9DS0 instance imu = Adafruit_LSM9DS0.LSM9DS0() table = [] while True: (mag_x, mag_y, mag_z) = imu.readMag() (acc_x, acc_y, acc_z) = imu.readAccel()...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 1215, 1878, 4872, 62, 6561, 44, 24, 5258, 15, 198, 11748, 10688, 198, 6738, 340, 861, 10141, 1330, 9943, 32855, 198, 11748, 640, 198, 6738, 7400, 5039, 1330, 7400, 5039, ...
2.486022
465
#!/usr/bin/env python3 import argparse import urllib.request import sys import re import csv csv.register_dialect('tsv', delimiter='\t', quoting=csv.QUOTE_NONE) lookup_taxonomy = { 'A': 'Archaea', 'B': 'Bacteria', 'E': 'Eukaryota', 'V': 'Virus', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 269, 21370, 198, 40664, 13, 30238, 62, 38969, 478, 10786, 912, 85, 3...
2.190355
788
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './prediction.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 19571, 28764, 2867, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, 642, ...
2.837209
86
import re chars = 0 mem = 0 for i in open('day8.txt'): line = i.strip() chars += len(line) s = re.sub(r'(?:(\")|(\\))', repl, line, flags=re.I) mem += len(s) + 2 print mem - chars
[ 11748, 302, 198, 198, 354, 945, 796, 657, 198, 11883, 796, 657, 198, 198, 1640, 1312, 287, 1280, 10786, 820, 23, 13, 14116, 6, 2599, 198, 1627, 796, 1312, 13, 36311, 3419, 198, 34534, 15853, 18896, 7, 1370, 8, 198, 264, 796, 302, ...
2.268293
82
import numpy from PIL import Image import torch img = Image.open("../images/computer.jpg") img_np = numpy.array(img)/255.0 img_t = torch.from_numpy(img_np).float() img_t = torch.mean(img_t, dim=2).unsqueeze(0).unsqueeze(1) hog = HOGLayer() y = hog(img_t) y_np = y.detach().to("cpu").numpy()[0] print(img_t.sh...
[ 11748, 299, 32152, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748, 28034, 628, 198, 198, 9600, 796, 7412, 13, 9654, 7203, 40720, 17566, 14, 33215, 13, 9479, 4943, 198, 198, 9600, 62, 37659, 796, 299, 32152, 13, 18747, 7, 9600, 2067...
2.103448
203
import game.board as Board import game.success as Success import game.moves as Moves import cursesio as Ui import playerio as Ui_term from curses import wrapper import curses import sys
[ 11748, 983, 13, 3526, 355, 5926, 198, 11748, 983, 13, 13138, 355, 16282, 198, 11748, 983, 13, 76, 5241, 355, 38213, 198, 11748, 43878, 952, 355, 471, 72, 198, 11748, 2137, 952, 355, 471, 72, 62, 4354, 198, 6738, 43878, 1330, 29908, ...
3.78
50
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2005-2006 Axelor SARL. (http://www.axelor.com) import logging import math from datetime import timedelta from werkzeug import url_encode from odoo import api, fields, models from odoo.exceptions import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 10529, 2238, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 2, 15069, 357, 66, 8, 5075, 12, 13330, 42575, 273, 47341, 43,...
3.1
160
from django.apps import apps from django.test import TestCase from .apps import BlogConfig # apps # models # widgets # forms # viewmixins # views
[ 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 764, 18211, 1330, 14001, 16934, 628, 198, 220, 220, 220, 1303, 6725, 628, 220, 220, 220, 1303, 4981, 628, 220, 220, 220, ...
2.78125
64
#!/usr/bin/env python from __future__ import division from __future__ import print_function from builtins import zip import os.path from itertools import groupby from operator import itemgetter import ninemlcatalog import nest import numpy as np from nineml import units as un, Property from nineml.user import Initial i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 3170, 1040, 1330, 19974, 198, 11748, 28686, 13, 6978, 198, 6738, 340, 861, 10141, 1330...
3.049751
201
from astropy.io import fits as pyfits import pyregion import warnings import numpy
[ 6738, 6468, 28338, 13, 952, 1330, 11414, 355, 12972, 21013, 198, 198, 11748, 12972, 36996, 198, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.605263
38
''' Created on Feb 20, 2017 @author: sarvi @copyright: 2017 Cisco Inc. All rights reserved. ''' # pylint: disable=locally-disabled, too-many-lines from __future__ import print_function import base64 import collections import datetime import hashlib import logging.handlers import os import platform import pprint im...
[ 7061, 6, 198, 41972, 319, 3158, 1160, 11, 2177, 198, 198, 31, 9800, 25, 29008, 8903, 198, 198, 31, 22163, 4766, 25, 220, 2177, 28289, 3457, 13, 1439, 2489, 10395, 13, 198, 7061, 6, 198, 2, 279, 2645, 600, 25, 15560, 28, 17946, 453...
2.231636
14,471
#!/usr/bin/env python # python 2.x import sys from oauth2client.service_account import ServiceAccountCredentials print_access_token()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 21015, 362, 13, 87, 198, 198, 11748, 25064, 198, 6738, 267, 18439, 17, 16366, 13, 15271, 62, 23317, 1330, 4809, 30116, 34, 445, 14817, 198, 198, 4798, 62, 15526, 62, 30001, 3...
3.162791
43
from copy import copy import functools import os import sys # Interfaces # Derived classes # Text # Reader # Tokenizer # array of sentences -> array of sentences # ["a b c", "d e f"] -> [["a", "b", "c"], ["d", "e", "f"]] # Permutator # Sorter # [["clouds", "are", "White"] , ["are", "White", "Cloud...
[ 6738, 4866, 1330, 4866, 198, 198, 11748, 1257, 310, 10141, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 2, 4225, 32186, 198, 220, 220, 220, 220, 198, 198, 2, 9626, 1572, 6097, 198, 198, 2, 8255, 198, 198, 2, 25342, 198, 198, 2, ...
2.185065
616
from django.shortcuts import render, redirect from . forms import EmployeeForm from . models import Employee # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 764, 5107, 1330, 36824, 8479, 198, 6738, 764, 4981, 1330, 36824, 198, 198, 2, 13610, 534, 5009, 994, 13, 628, 198 ]
4.181818
33
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import math from django import template register = template.Library() # when this module is imported via {% load pagination_tags %}, it is # imported as django.templatetags.pagination_tags, which prevents a # relative import (..conf) to rapidsms from working here. i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 257, 72, 40379, 28, 19, 39747, 28, 19, 2123, 1509, 28, 19, 628, 198, 11748, 10688, 198, 6738, 42625, 14208, 1330, 11055, 198, 30238, 796, 11055, 13, 23377, 3419, 198, 1...
3.227778
180
import os import json from termcolor import colored from utils import getInfoAboutArchivesToScrape from PaperScraper.utils.command_line import printProgressBar from DatasetIndexing.lib.arxiv_scraper import ArXivScraper from DatasetIndexing.lib.sciencedirect_scraper import ScienceDirectScraper if __name__ == '__mai...
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 3381, 8043, 1330, 16396, 198, 198, 6738, 3384, 4487, 1330, 651, 12360, 8585, 19895, 1083, 2514, 3351, 13484, 198, 6738, 14962, 3351, 38545, 13, 26791, 13, 21812, 62, 1370, 1330, 3601, 32577, 103...
2.719368
506
import manage_data import task_api
[ 11748, 6687, 62, 7890, 198, 11748, 4876, 62, 15042, 198 ]
3.5
10
import argparse from asyncio import get_event_loop from asyncio import sleep as asleep from asyncio import TimeoutError from errno import ECONNRESET from functools import lru_cache from functools import partial from urllib.parse import urljoin from aioconsole.stream import aprint from aiohttp import ClientOSError from...
[ 11748, 1822, 29572, 198, 6738, 30351, 952, 1330, 651, 62, 15596, 62, 26268, 198, 6738, 30351, 952, 1330, 3993, 355, 16039, 198, 6738, 30351, 952, 1330, 3862, 448, 12331, 198, 6738, 11454, 3919, 1330, 412, 10943, 45, 19535, 2767, 198, 67...
2.943107
457
# Django command helper to apply django related fields patch programattically # Will cd into 1st argument and run patch import os import sys from subprocess import Popen, PIPE patch_file = os.path.join( os.path.abspath('.'), 'bin', 'django-related-fields.patch') process = Popen(['patch', '-p1'], stdin=PIPE, shell...
[ 2, 37770, 3141, 31904, 284, 4174, 42625, 14208, 3519, 7032, 8529, 1430, 1078, 1146, 198, 2, 2561, 22927, 656, 352, 301, 4578, 290, 1057, 8529, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, ...
2.932331
133
import FWCore.ParameterSet.Config as cms import FastSimulation.Tracking.TrackCandidateProducer_cfi electronCkfTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("electronMergedSeeds"), MinNumberOfCrossedLayers = 5, OverlapCleaning = True ...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 11748, 12549, 8890, 1741, 13, 2898, 5430, 13, 24802, 41572, 20540, 11547, 2189, 62, 66, 12463, 198, 9509, 1313, 34, 74, 69, 24802, 41572, 37051, 796, 12549, 8890,...
2.892857
112
from py2p import mesh import asyncio, argparse, time, sys loop = asyncio.get_event_loop() parser = argparse.ArgumentParser() parser.add_argument("-b", "--bootstrap", type=int, help="whether this node in boostrap node") parser.add_argument("-p", "--myPort", type=int, help="my port") args = parser.parse_args() myPort ...
[ 6738, 12972, 17, 79, 1330, 19609, 198, 11748, 30351, 952, 11, 1822, 29572, 11, 640, 11, 25064, 198, 198, 26268, 796, 30351, 952, 13, 1136, 62, 15596, 62, 26268, 3419, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 19...
2.652482
282
import numpy as np import torch.nn as nn # Reference: https://github.com/imalic3/python-word-error-rate
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 2, 20984, 25, 3740, 1378, 12567, 13, 785, 14, 4402, 291, 18, 14, 29412, 12, 4775...
2.326923
52
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable ###################################################################### # # Model automatically generated by modelGenerator # ###################################################################### # ----------------...
[ 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 198, 29113, 29113, 4242, 2235, 198, 2, 198, 2, 9104, 6338, 7560...
4.281553
206
from dataclasses import dataclass from typing import Any, Optional from squall.params import Body @dataclass @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4377, 11, 32233, 198, 198, 6738, 2809, 439, 13, 37266, 1330, 12290, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 198 ]
3.378378
37
# -*- coding: utf-8 -*- """A Data and Model Zoo for Single-Cell Genomics.""" from ._settings import settings import sfaira.consts import sfaira.data import sfaira.models import sfaira.train import sfaira.ui import sfaira.versions from ._version import get_versions __version__ = get_versions()['version'] del get_versi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 32, 6060, 290, 9104, 21980, 329, 14206, 12, 28780, 5215, 31994, 526, 15931, 198, 198, 6738, 47540, 33692, 1330, 6460, 198, 11748, 264, 22043, 64, 13, 1102, 6448, ...
2.517787
253
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-04-19 21:49 # @Author : Mayandev # @Site : https://github.com/Mayandev/ # @File : serializers.py # @Software: PyCharm from rest_framework import serializers from .models import Movie, Genre
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 12, 3023, 12, 1129, 2310, 25, 2920, 198, 2, 2488, 13838, 220, 1058, 1737, ...
2.514286
105
# -*- coding: utf-8 -*- from github.accounts.github_account import GithubAccount
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 33084, 13, 23317, 82, 13, 12567, 62, 23317, 1330, 38994, 30116, 628 ]
3.037037
27
from core.templatetags import register from django.utils.safestring import mark_safe import datetime @register.filter def addstr(arg1, arg2): """concatenate arg1 & arg2""" return str(arg1) + str(arg2) @register.filter def _not(arg1): """Boolean or""" return not arg1 @register.filter def _or(arg1, ...
[ 6738, 4755, 13, 11498, 489, 265, 316, 3775, 1330, 7881, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 11748, 4818, 8079, 628, 198, 31, 30238, 13, 24455, 198, 4299, 751, 2536, 7, 853, 16, 11, 1...
2.550562
356
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys import time from aiida_fleur.calculation.fleur import FleurCalculation as FleurCalc from aiida_fleur_ad.util.extract_corelevels import extract_corelevels from aiida.orm import load_node from aiida.orm...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 257, 72, 3755, 62, ...
2.536489
1,014
_.error_on_external_run # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:20) _.reuse_existing_virtualenvs # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:21) _.stop_on_first_error # unused attribute (/home/lschmelzeisen/Repositories/wallcrop/noxfile.py:22) test # unu...
[ 44807, 18224, 62, 261, 62, 22615, 62, 5143, 220, 1303, 21958, 11688, 50247, 11195, 14, 7278, 354, 17694, 2736, 13254, 14, 6207, 35061, 14, 11930, 31476, 14, 35420, 7753, 13, 9078, 25, 1238, 8, 198, 44807, 260, 1904, 62, 25687, 62, 328...
2.925676
296
# -*- coding: utf-8 -*- import os from shutil import rmtree from tempfile import mkdtemp import sh
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 6738, 20218, 7753, 1330, 33480, 67, 29510, 198, 198, 11748, 427, 628, 198 ]
2.684211
38
__version__ = '0.1.1' from .config import config
[ 834, 9641, 834, 796, 705, 15, 13, 16, 13, 16, 6, 198, 198, 6738, 764, 11250, 1330, 4566, 198 ]
2.631579
19
__doc__ = """Encode a depths matrix and a tnf matrix to latent representation. Creates a variational autoencoder in PyTorch and tries to represent the depths and tnf in the latent space under gaussian noise. Usage: >>> vae = VAE(nsamples=6) >>> dataloader, mask = make_dataloader(depths, tnf) >>> vae.trainmodel(datalo...
[ 834, 15390, 834, 796, 37227, 4834, 8189, 257, 21593, 17593, 290, 257, 256, 77, 69, 17593, 284, 41270, 10552, 13, 198, 198, 16719, 274, 257, 5553, 864, 1960, 6571, 66, 12342, 287, 9485, 15884, 354, 290, 8404, 284, 2380, 262, 21593, 198...
2.284931
4,924
--- evdev/genecodes.py.orig 2020-11-02 00:44:50 UTC +++ evdev/genecodes.py @@ -20,7 +20,7 @@ if sys.argv[1:]: #----------------------------------------------------------------------------- -macro_regex = r'#define +((?:KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN|FF|UI_FF|INPUT_PROP)_\w+)' +macro_regex = r'#de...
[ 6329, 819, 7959, 14, 5235, 721, 4147, 13, 9078, 13, 11612, 197, 42334, 12, 1157, 12, 2999, 3571, 25, 2598, 25, 1120, 18119, 198, 45340, 819, 7959, 14, 5235, 721, 4147, 13, 9078, 198, 12404, 532, 1238, 11, 22, 1343, 1238, 11, 22, 2...
2.157205
229
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This is a real time example how to implement DTLN tf light model with sounddevice. The script is based on the "wire.py" example of the sounddevice toolbox. If the command line shows "input underflow", restart the script. If there are still a lot of dropouts, increase...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1212, 318, 257, 1103, 640, 1672, 703, 284, 3494, 360, 14990, 45, 48700, 1657, 2746, 351, 220, 198, 23...
2.657332
1,357
import numpy as np print("---------Exercicios propostos 2---------") #Definindo a seed #np.random.seed(5) #Exercicio 1 print("------------------------Exercicio 1------------------------") arr1 = np.random.randn(10) print("Array 1:",arr1) arr2 = arr1 * 100 print("Array 2:",arr2) arr3 = arr2.astype(int) print("Array 3...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4798, 7203, 45537, 3109, 2798, 291, 4267, 2632, 455, 418, 362, 45537, 4943, 198, 198, 2, 7469, 259, 521, 78, 257, 9403, 198, 2, 37659, 13, 25120, 13, 28826, 7, 20, 8, 198, 198, 2, 3109, 279...
2.698198
444
#!/usr/bin/env python3 import glob import imp import os import sys if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 15095, 198, 11748, 848, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.609756
41
#!/usr/bin/env python2 """ SYNOPSIS Prepare the TCGA BRCA Clinical data into a format that is suitable for input into the Hotspots 'Mutation_Counts' pipeline. NOTES (1) Data source: - Supplementary Table 1 of the Cell 2015 Paper: http://www.nature.com/nature/journal/v490/n7418/ful...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 37811, 198, 23060, 45, 30737, 1797, 198, 220, 220, 220, 43426, 262, 17283, 9273, 347, 7397, 32, 21234, 1366, 656, 257, 5794, 326, 318, 11080, 329, 5128, 198, 220, 220, 220, ...
2.310215
7,714
# -*- coding: utf-8 -*- from datetime import datetime import scrapy from bs4 import BeautifulSoup class UkDatabaseSpider(scrapy.Spider): """Collect information about people.""" name = "uk_database_posts" """str: The name of the spider.""" allowed_domains = ["theukdatabase.com"] """list: Allowed ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 15881, 88, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 4871, 5065, 38105, 41294, 7, 1416, 2416, 88, ...
2.013536
3,029
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.955285
246
import numpy as np input_data = np.array([2,3]) weights = { 'node_0':np.array([1,1]), 'node_1':np.array([-1,1]), 'output':np.array([2,-1]) } node_0_value = (input_data * weights['node_0']).sum() node_1_value = (input_data * weights['node_1']).sum() hidden_layer_values = np.a...
[ 11748, 299, 32152, 355, 45941, 220, 198, 198, 15414, 62, 7890, 796, 45941, 13, 18747, 26933, 17, 11, 18, 12962, 198, 198, 43775, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 17440, 62, 15, 10354, 37659, 13, 1874...
2.207729
207
from baseDatabaseManager import BaseDatabaseManager
[ 6738, 2779, 38105, 13511, 1330, 7308, 38105, 13511 ]
6.375
8
from scrapy import cmdline cmdline.execute("scrapy crawl xtzx -o result.csv".split())
[ 6738, 15881, 88, 1330, 23991, 1370, 198, 28758, 1370, 13, 41049, 7203, 1416, 2416, 88, 27318, 220, 742, 42592, 532, 78, 1255, 13, 40664, 1911, 35312, 28955 ]
3.148148
27
from distutils.core import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name = 'treeviz', packages = ['treeviz'], version = '1.1', license='MIT', description = 'Print tree in bash manner', author = 'Chen Tsu Pei', author_email = 'a5560648@gmail.com', url = 'https://...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 40406, 7, 198, 220, 143...
2.663507
211
__author__ = 'MatrixRev' import json import codecs import glob import os import sys #path = u"C://Users//MatrixRev//Desktop//library_5//" path="C://Users//MatrixRev//Desktop//mainLib//" # input file outFile='C:/Users/MatrixRev/Desktop/books/output/mainsubjects.txt' #output file pathNew = u"C://Users//MatrixRev//Deskt...
[ 834, 9800, 834, 796, 705, 46912, 18009, 6, 198, 11748, 33918, 198, 11748, 40481, 82, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 2, 6978, 796, 334, 1, 34, 1378, 14490, 1003, 46912, 18009, 1003, 36881, 1003, 32016,...
1.719928
1,671
# python ./data/compress.py $TORCH_HOME/ILSVRC2012/ $TORCH_HOME/ILSVRC2012-TAR tar # python ./data/compress.py $TORCH_HOME/ILSVRC2012/ $TORCH_HOME/ILSVRC2012-ZIP zip import os, sys from pathlib import Path if __name__ == '__main__': assert len(sys.argv) == 4, 'invalid argv : {:}'.format(sys.argv) source, destin...
[ 2, 21015, 24457, 7890, 14, 5589, 601, 13, 9078, 720, 32961, 3398, 62, 39069, 14, 45484, 53, 7397, 6999, 14, 720, 32961, 3398, 62, 39069, 14, 45484, 53, 7397, 6999, 12, 51, 1503, 13422, 198, 2, 21015, 24457, 7890, 14, 5589, 601, 13, ...
2.506173
162
# -*- coding: utf-8 -*- # Copyright 2021 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Test plugin file for netaddr tests: ipv6_ipv4_mapped """ from __future__ import absolute_import, division, print_function from ansible_collections.ansible.utils.plugins.p...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 33448, 2297, 10983, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 198, 2, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2398, 14, ...
2.326877
1,239
import json import logging import os import subprocess import sys from pathlib import Path import pytest from deepdiff import DeepDiff TEST_ASSETS_ROOT = (Path(__file__).parent.parent / "assets").resolve() NEURO_EXTRAS_ROOT = Path(__file__).parent.parent.parent / "neuro_extras" LOGGER = logging.getLogger(__name__) ...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 6738, 2769, 26069, 1330, 10766, 28813, 628, 198, 51, 6465, 62, 10705, 32...
2.992593
135
from setuptools import setup setup( name='ktorrent', version='0.4.7', description='Fetches and parses data from Kickass Torrents.', long_description=open('README.rst').read(), license='MIT', author='Udit Vasu', author_email='admin@codenirvana.in', url='https://github.com/codenirvana/kTo...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 74, 13165, 1156, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 19, 13, 22, 3256, 198, 220, 220, 220, 6764, 11639, 37, 316, 2052, 290, 13544, ...
2.539526
506
from torch.utils.data.dataset import Dataset import os import json from PIL import Image from torchvision import transforms import logging import numpy as np import torch logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) SOS_token = 0 EOS_token = 1
[ 6738, 28034, 13, 26791, 13, 7890, 13, 19608, 292, 316, 1330, 16092, 292, 316, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 28034, 10178, 1330, 31408, 198, 11748, 18931, 198, 11748, 299, 32152, 355, ...
3.114943
87
# Copyright 2013 Canonical Ltd. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ 2, 15069, 2211, 19507, 605, 12052, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, ...
3.472464
345
import pytest from trafficgenerator.tgn_utils import ApiType @pytest.fixture(scope='class', autouse=True)
[ 198, 11748, 12972, 9288, 198, 198, 6738, 4979, 8612, 1352, 13, 83, 4593, 62, 26791, 1330, 5949, 72, 6030, 628, 198, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 11639, 4871, 3256, 1960, 1076, 28, 17821, 8, 628 ]
2.871795
39
import graphlab as gl import re import random from copy import copy import os import graphlab.aggregate as agg import array import numpy as np import sys # Run this script in the same directory as the train_path = "image-sframes/train-%d/" valid_path = "image-sframes/validation-%d/" X_data = gl.SFrame("image-sframe...
[ 11748, 4823, 23912, 355, 1278, 198, 11748, 302, 198, 11748, 4738, 198, 6738, 4866, 1330, 4866, 198, 11748, 28686, 198, 11748, 4823, 23912, 13, 9460, 49373, 355, 4194, 198, 11748, 7177, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064...
2.464066
974
from flask import Flask, request, abort, jsonify, Response, json from marketwatch import marketwatch as MW from error import Error app = Flask(__name__) app.config['JSON_SORT_KEYS'] = False @app.route('/stock') @app.route('/stock/financial') if(__name__ == "__main__"): app.run(debug=True)
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 15614, 11, 33918, 1958, 11, 18261, 11, 33918, 198, 6738, 1910, 8340, 1330, 1910, 8340, 355, 29961, 198, 6738, 4049, 1330, 13047, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 1324, 13, ...
2.911765
102
from setuptools import setup name = 'pyDiamondsBackground' version = '1.1' release = '1.1.0' setup( name=name, author='Marco Muellner', author_email='muellnermarco@gmail.com', version='1.1.2', packages=['pyDiamondsBackground','pyDiamondsBackground/models'], licencse = 'MIT', description='...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 3672, 796, 705, 9078, 47710, 82, 21756, 6, 198, 9641, 796, 705, 16, 13, 16, 6, 198, 20979, 796, 705, 16, 13, 16, 13, 15, 6, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 28, 3672, ...
2.526971
241
from main.dto.ContactDetailDto import ContactDetailDto from main.repository.impl.ContactDetailRepositoryImpl import ContactDetailRepositoryImpl from main.service.ContactDetailService import ContactDetailService
[ 6738, 1388, 13, 67, 1462, 13, 17829, 11242, 603, 35, 1462, 1330, 14039, 11242, 603, 35, 1462, 198, 6738, 1388, 13, 260, 1930, 37765, 13, 23928, 13, 17829, 11242, 603, 6207, 13264, 29710, 1330, 14039, 11242, 603, 6207, 13264, 29710, 198,...
3.785714
56
from .vault import Vault, EntityClassId, ClientProperties, ServerProperties, SearchOperation, PropertySearch, SearchRule, SysAclBeh, connect from .vault import generate_service_urls, VaultServices
[ 6738, 764, 85, 1721, 1330, 23450, 11, 20885, 9487, 7390, 11, 20985, 2964, 18200, 11, 9652, 2964, 18200, 11, 11140, 32180, 11, 14161, 18243, 11, 11140, 31929, 11, 311, 893, 32, 565, 25267, 11, 2018, 198, 6738, 764, 85, 1721, 1330, 7716...
3.92
50
import numpy as np import pandas as pd from mluem import LogisticRegression as LogReg if __name__ == "__main__": X, y = load_data() main(X, y)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 285, 2290, 368, 1330, 5972, 2569, 8081, 2234, 355, 5972, 8081, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 220, 220, 198, 220, 220,...
2.397059
68
from copy import deepcopy from typing import Any, Dict import optuna import yaml from optuna.integration import PyTorchLightningPruningCallback from pytorch_lightning import Trainer, seed_everything from cloud.dataset import CloudDataModule from cloud.model import Cloud if __name__ == "__main__": with open("co...
[ 6738, 4866, 1330, 2769, 30073, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 11748, 2172, 9613, 198, 11748, 331, 43695, 198, 6738, 2172, 9613, 13, 18908, 1358, 1330, 9485, 15884, 354, 15047, 768, 47, 5143, 278, 47258, 198, 6738,...
2.734177
316
import Adafruit_BBIO.GPIO as GPIO # Dictionary with the PIN number associated to each room house = { "KITCHEN": "P9_12", "BATHROOM": "P9_15", "LIVINGROOM": "P9_42" } def get_status(pin_number): """Verify the status of the GPIO pin with number equal to `pin_number`. Parameters ---------- pin_number : str Th...
[ 11748, 1215, 1878, 4872, 62, 33, 3483, 46, 13, 16960, 9399, 355, 50143, 198, 198, 2, 28261, 351, 262, 34279, 1271, 3917, 284, 1123, 2119, 198, 4803, 796, 1391, 198, 197, 1, 42, 31949, 1677, 1298, 366, 47, 24, 62, 1065, 1600, 198, ...
2.916933
939
# Copyright 2018 BLEMUNDSBURY AI LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
[ 2, 15069, 2864, 347, 2538, 44, 4944, 5258, 38926, 56, 9552, 40880, 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.826367
622
import pandas as pd
[ 11748, 19798, 292, 355, 279, 67, 628 ]
3
7
# spark-submit --jars googlegenomics-spark-examples-assembly-1.0.jar \ # --driver-class-path googlegenomics-spark-examples-assembly-1.0.jar \ # src/main/python/variants_pca.py --client-secrets client_secrets.json import json import numpy import operator import sys import pyspark from pyspark import serializers...
[ 2, 9009, 12, 46002, 1377, 73, 945, 467, 519, 1455, 268, 31994, 12, 2777, 668, 12, 1069, 12629, 12, 41873, 12, 16, 13, 15, 13, 9491, 3467, 198, 2, 220, 220, 220, 220, 1377, 26230, 12, 4871, 12, 6978, 467, 519, 1455, 268, 31994, 1...
2.436975
1,904