content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Tuple import torch import torch.distributed as distrib from ss_baselines.saven....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 1...
2.867647
476
from netapp.netapp_object import NetAppObject class Group2ViewInfo(NetAppObject): """ 2nd nested typedef at level 1 """ _field_5 = None @property def field_5(self): """ Generic/Dummy Field 5 Attributes: required-for-create, modifiable """ return self...
[ 6738, 2010, 1324, 13, 3262, 1324, 62, 15252, 1330, 3433, 4677, 10267, 198, 198, 4871, 4912, 17, 7680, 12360, 7, 7934, 4677, 10267, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 362, 358, 28376, 25683, 891, 379, 1241, 352, 198, ...
2.081836
501
if __name__ == '__main__': main()
[ 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 220, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
1.954545
22
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'bookwindow.ui' ## ## Created by: Qt User Interface Compiler version 5.14.0 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###############...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 14468, 198, 2235, 5178, 7560, 422, 3555, 12454, 2393, 705, 2070, 17497, 13, 9019, 6, 198, 2235, 198, 2235, 15622, 416, 25, 33734, 11787, 26491, 3082, ...
3.324074
216
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from machineService import MachineService from configService import ConfigService from downloadService import DownloadService from installService import InstallService from envService import EnvService from buildService import BuildService from runService import RunServi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 198, 198, 6738, 4572, 16177, 1330, 10850, 16177, 198, 6738, 4566, 16177, 1330, 17056, 16177, 198, 6738, 4321, 16177, ...
4.556604
106
import graphene from ..types import SynProject from core import Synapse class SynProjectQuery(graphene.ObjectType): """ Defines all the SynProject queries. """ syn_project = graphene.Field( SynProject, id=graphene.String(required=True) )
[ 11748, 42463, 198, 6738, 11485, 19199, 1330, 16065, 16775, 198, 6738, 4755, 1330, 16065, 7512, 628, 198, 4871, 16065, 16775, 20746, 7, 70, 2416, 29473, 13, 10267, 6030, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2896, 1127, 47...
2.76
100
from paramiko import SSHClient, AutoAddPolicy from paramiko.auth_handler import AuthenticationException from paramiko.ssh_exception import NoValidConnectionsError class Config(object): """Worker access data""" class Worker(object): """Worker Object to connect and execute commands from the 'chief' worker""" ...
[ 6738, 5772, 12125, 1330, 33825, 11792, 11, 11160, 4550, 36727, 198, 6738, 5772, 12125, 13, 18439, 62, 30281, 1330, 48191, 16922, 198, 6738, 5772, 12125, 13, 45824, 62, 1069, 4516, 1330, 1400, 47139, 13313, 507, 12331, 198, 198, 4871, 1705...
2.175284
793
from pyspark.sql import SparkSession import os
[ 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 11748, 28686, 628, 198 ]
3.5
14
import numpy as np import math from feature_mining.em_base import ExpectationMaximization class ExpectationMaximizationOriginal(ExpectationMaximization): """ Original EM Algorithm as developed by Santu. """ if __name__ == '__main__': em = ExpectationMaximizationOriginal() em.em()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 3895, 62, 45374, 13, 368, 62, 8692, 1330, 23600, 341, 11518, 320, 1634, 628, 198, 4871, 23600, 341, 11518, 320, 1634, 20556, 7, 3109, 806, 341, 11518, 320, 1634, 2599, 198, ...
3.090909
99
import os import pdb import time import errno import shapely.wkt import shapely.ops from shapely import speedups import shapely.prepared import subprocess import logging import tempfile import distutils.version import atexit import functools import math import numpy import gdal import gdalconst from osgeo import gdal ...
[ 11748, 28686, 198, 11748, 279, 9945, 198, 11748, 640, 198, 11748, 11454, 3919, 198, 11748, 5485, 306, 13, 86, 21841, 198, 11748, 5485, 306, 13, 2840, 198, 6738, 5485, 306, 1330, 2866, 4739, 198, 11748, 5485, 306, 13, 3866, 29190, 198, ...
2.35225
41,885
import random from ..serializers.course_serializers import CourseSerializer from ..serializers.partition_serializer import PartitionSerializer, PartitionTaskSerializer from ..models.user_course import UserCourse from ..models.course import Course from ..models.partition import Partition from ..models.partition_task im...
[ 11748, 4738, 198, 198, 6738, 11485, 46911, 11341, 13, 17319, 62, 46911, 11341, 1330, 20537, 32634, 7509, 198, 6738, 11485, 46911, 11341, 13, 3911, 653, 62, 46911, 7509, 1330, 2142, 653, 32634, 7509, 11, 2142, 653, 25714, 32634, 7509, 198,...
4.10989
91
# Generated by Django 2.0.4 on 2018-04-30 11:18 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 19, 319, 2864, 12, 3023, 12, 1270, 1367, 25, 1507, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
2.926829
41
#! python3 import datetime import json from csscompressor import compress # Run Python script if __name__ == '__main__': main()
[ 2, 0, 21015, 18, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 6738, 269, 824, 5589, 44292, 1330, 27413, 198, 198, 2, 5660, 11361, 4226, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, ...
3.093023
43
"""Demo to visualize data pipeline output.""" import matplotlib.pyplot as plt import tensorflow as tf from dataloaders.s3dis import create_s3dis_dataset if __name__ == "__main__": main(create_pointcloud_dump=False)
[ 37811, 11522, 78, 284, 38350, 1366, 11523, 5072, 526, 15931, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 4818, 282, 1170, 364, 13, 82, 18, 6381, 1330, 2251, 62, 8...
2.933333
75
""" The top-level library for Heron's Python DSL, which enables you to write Heron [topologies](https://twitter.github.io/heron/docs/concepts/topologies/) in a Python DSL. Heron topologies are acyclic graphs used to process streaming data. Topologies have two major components: [spouts](spout/spout.m.html#heron_py.spou...
[ 37811, 198, 464, 1353, 12, 5715, 5888, 329, 2332, 261, 338, 11361, 32643, 11, 543, 13536, 345, 284, 3551, 2332, 261, 198, 58, 4852, 5823, 16151, 5450, 1378, 6956, 13, 12567, 13, 952, 14, 372, 261, 14, 31628, 14, 43169, 82, 14, 4852,...
2.985915
213
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.preprocessing.image import load_img from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from t...
[ 6738, 11192, 273, 11125, 13, 6122, 292, 13, 3866, 36948, 13, 9060, 1330, 7412, 6601, 8645, 1352, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 3866, 36948, 13, 9060, 1330, 33705, 62, 1462, 62, 18747, 198, 6738, 11192, 273, 11125, 1...
2.673877
1,202
""" Unittest """ import unittest # pylint: disable=import-error from _utils.statics import inhabitants class TestModuleStaticsInhabitants(unittest.TestCase): """ Test Module for statics.inhabitants """ def test_total(self): """ Test for inhabitants.TOTAL """ self.assertEqual(type(inhabitants.TOTAL).__name_...
[ 37811, 791, 715, 395, 37227, 198, 11748, 555, 715, 395, 198, 2, 279, 2645, 600, 25, 15560, 28, 11748, 12, 18224, 198, 6738, 4808, 26791, 13, 14269, 873, 1330, 17622, 198, 198, 4871, 6208, 26796, 17126, 873, 818, 5976, 270, 1187, 7, ...
2.821229
179
#!/usr/bin/python """ Register brains, landmarks, and labels to a template. (c) 2011, @rno klein """ import os from os.path import exists from subprocess import call from numpy import float, isnan # Run intensity-based registration # 1. Register brains to template # 2. Transform brains to each other via template # 3...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 38804, 14290, 11, 41532, 11, 290, 14722, 284, 257, 11055, 13, 198, 198, 7, 66, 8, 2813, 11, 2488, 81, 3919, 479, 33663, 198, 37811, 198, 198, 11748, 28686, 198, 6738, 28686, 13,...
1.819986
11,638
#inputString = input() inputString = "3,-4, 2, -1,-3, 2, 1" inputList = [int(val) for val in inputString.split(",")] print(solve(inputList))
[ 201, 198, 201, 198, 2, 15414, 10100, 796, 5128, 3419, 201, 198, 15414, 10100, 796, 366, 18, 12095, 19, 11, 362, 11, 532, 16, 12095, 18, 11, 362, 11, 352, 1, 201, 198, 15414, 8053, 796, 685, 600, 7, 2100, 8, 329, 1188, 287, 5128,...
2.409836
61
# ============================================================================ # FILE: session.py # AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com> # License: MIT license # ============================================================================ import typing
[ 2, 38093, 2559, 18604, 198, 2, 45811, 25, 6246, 13, 9078, 198, 2, 44746, 25, 911, 280, 2188, 30107, 1530, 5350, 1279, 2484, 280, 2188, 13, 44, 19231, 379, 308, 4529, 13, 785, 29, 198, 2, 13789, 25, 17168, 5964, 198, 2, 38093, 2559...
5.44
50
# NOTE: this code is currently copypasta'd from pytorch official examples repo at # https://github.com/pytorch/examples/blob/master/vae/main.py # In the future, this could probably be added as a submodule import pdb import torch import torch.nn as nn import torch.nn.functional as F # Reconstruction + KL divergence l...
[ 2, 24550, 25, 428, 2438, 318, 3058, 2243, 4464, 40197, 1549, 422, 12972, 13165, 354, 1743, 6096, 29924, 379, 198, 2, 3740, 1378, 12567, 13, 785, 14, 9078, 13165, 354, 14, 1069, 12629, 14, 2436, 672, 14, 9866, 14, 33353, 14, 12417, 1...
3.646465
99
import unittest from ncclient.devices.iosxr import *
[ 11748, 555, 715, 395, 198, 6738, 299, 535, 75, 1153, 13, 42034, 13, 4267, 87, 81, 1330, 1635, 628 ]
2.842105
19
# -*- coding: utf-8 -*- from django.apps import AppConfig class OnfidoAppConfig(AppConfig): """AppConfig for Django-Onfido.""" name = 'onfido' verbose_name = "Onfido" configs = [] def ready(self): """Validate config and connect signals.""" super(OnfidoAppConfig, self).ready()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628, 198, 4871, 1550, 69, 17305, 4677, 16934, 7, 4677, 16934, 2599, 628, 220, 220, 220, 37227, 4677, 16934, 329, 37770, ...
2.465116
129
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Tiago de Freitas Pereira <tiago.pereira@idiap.ch> """ PolaThermal database: database implementation """ from bob.bio.base.database import CSVDataset from bob.bio.base.database import CSVToSampleLoaderBiometrics from bob.bio.face.database.sample_loaders import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 900, 2393, 12685, 7656, 28, 40477, 12, 23, 1058, 198, 2, 16953, 3839, 390, 4848, 21416, 17229, 8704, 1279, 20259, 3839, 13, 431, 260, 8704, 31, 19830, 499, 13, 354, 29,...
3.192806
1,390
import unittest import numpy as np import numpy.testing as npt from scoring.component_parameters import ComponentParameters from scoring.function import CustomSum from utils.enums.component_specific_parameters_enum import ComponentSpecificParametersEnum from utils.enums.scoring_function_component_enum import ScoringF...
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 33407, 355, 299, 457, 198, 198, 6738, 9689, 13, 42895, 62, 17143, 7307, 1330, 35100, 48944, 198, 6738, 9689, 13, 8818, 1330, 8562, 13065, 198, ...
3.980952
105
# -*- coding: utf-8 -*- """ Created on Sat Mar 5 02:12:12 2022 @author: Kraken Project: MHP Hackathon """ import os import pandas as pd import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 16}) WORKING_DIR = "model_14" WORKING_DIR2 = "model_12" # "model_8": dqn with fixed weights # "model_4": dqn MVG_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 1526, 220, 642, 7816, 25, 1065, 25, 1065, 33160, 198, 31, 9800, 25, 43392, 198, 198, 16775, 25, 337, 14082, 18281, 12938, 198, 37811, 198, ...
2.820628
2,007
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # 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, 33448, 383, 12905, 2667, 32388, 3457, 13, 1074, 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.401876
9,060
import os, sys import pytest import lxml from copy import deepcopy from shapely.geometry import LineString from tests.fixtures import network_object_from_test_data, full_fat_default_config_path, assert_semantically_equal from tests import xml_diff from genet.outputs_handler import matsim_xml_writer from genet.core impo...
[ 11748, 28686, 11, 25064, 198, 11748, 12972, 9288, 198, 11748, 300, 19875, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 6910, 10100, 198, 6738, 5254, 13, 69, 25506, 1330, 3127, 62, 15252, 62, 6738, 62, ...
2.649351
385
import sys import getpass import json from prettytable import PrettyTable import pandas import logging import os.path import time # 定义变量 RESULT = {} # USERINFO = ("admin", "123456") USERINFO = ("a", "a") FIELDS = ['name', 'age', 'tel', 'email'] # RESULT.append(FIELDS) FORMAT = """ ==================================...
[ 11748, 25064, 198, 11748, 651, 6603, 198, 11748, 33918, 198, 6738, 2495, 11487, 1330, 20090, 10962, 198, 11748, 19798, 292, 198, 11748, 18931, 198, 11748, 28686, 13, 6978, 198, 11748, 640, 628, 198, 2, 10263, 106, 248, 20046, 231, 20998, ...
1.680815
589
# -*- coding: utf-8 -*- """ Implement a Orchestration Framework. """ try: from typing import List, Tuple, Dict, Type except: pass import attr from collections import OrderedDict from pathlib_mate import PathCls as Path from .mate import AWSObject, Template from .canned import Canned def resolve_pipeline(p...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 3546, 26908, 257, 30369, 12401, 25161, 13, 198, 37811, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 19720, 1330, 7343, 11, 309, 29291, 11, 360, 713, ...
1.711916
2,291
import numpy as np from kalmanFilter import KalmanFilter from scipy.optimize import linear_sum_assignment from collections import deque class Tracks(object): """docstring for Tracks""" class Tracker(object): """docstring for Tracker"""
[ 11748, 299, 32152, 355, 45941, 220, 201, 198, 6738, 479, 282, 805, 22417, 1330, 12612, 805, 22417, 201, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 14174, 62, 16345, 62, 562, 16747, 201, 198, 6738, 17268, 1330, 390, 4188, 201, 198...
2.632075
106
import pathlib import numpy as np from ballir_dicom_manager.file_readers.read_image_volume import ReadImageVolume from ballir_dicom_manager.file_loaders.nifti_loader import NiftiLoader from ballir_dicom_manager.file_viewers.array_viewer import ArrayViewer
[ 11748, 3108, 8019, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2613, 343, 62, 67, 291, 296, 62, 37153, 13, 7753, 62, 961, 364, 13, 961, 62, 9060, 62, 29048, 1330, 4149, 5159, 31715, 198, 6738, 2613, 343, 62, 67, 291, ...
2.977011
87
import datetime from sys import argv import tensorflow as tf import os import glob from skimage import io import matplotlib.pyplot as plt from multiprocessing import Process from PIL import Image, ImageDraw from pathlib import Path from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox import qdarkstyle imp...
[ 198, 11748, 4818, 8079, 198, 6738, 25064, 1330, 1822, 85, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 28686, 198, 11748, 15095, 198, 6738, 1341, 9060, 1330, 33245, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, ...
2.898734
158
import requests def upload_file(file): """ Upload a file to pixeldrain upload_file(file) """ response = requests.post( "https://pixeldrain.com/api/file", data={"anonymous": True}, files={"file": open(file, "rb")} ) return response.json() def file(file_id): ...
[ 11748, 7007, 628, 198, 4299, 9516, 62, 7753, 7, 7753, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 36803, 257, 2393, 284, 279, 844, 68, 335, 3201, 198, 220, 220, 220, 220, 198, 220, 220, 220, 9516, 62, 7753, 7, 7753, 8, ...
2.707418
728
#!/usr/bin/python # -*- coding:utf-8 -*- import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import Lasso, Ridge, ElasticNet from sklearn.model_selection import GridSearchCV if __name__ == "__main__": # pandas读入 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 27...
2.062215
659
import logging from twisted.web import server, guard, resource from twisted.cred import portal from lbrynet import conf from .auth import PasswordChecker, HttpPasswordRealm from ..auth.keyring import Keyring log = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 19074, 13, 12384, 1330, 4382, 11, 4860, 11, 8271, 198, 6738, 19074, 13, 66, 445, 1330, 17898, 198, 198, 6738, 18360, 563, 3262, 1330, 1013, 198, 6738, 764, 18439, 1330, 30275, 9787, 263, 11, 367, 29281, 3...
3.542857
70
from functools import partial from typing import Union, Dict, Optional from http_async_client.enums import SupportedProtocols, Methods import httpx import re from dataclasses import dataclass from httpx._types import RequestContent, URLTypes, RequestData, RequestFiles, QueryParamTypes, HeaderTypes, CookieTypes from nan...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 4479, 11, 360, 713, 11, 32233, 198, 6738, 2638, 62, 292, 13361, 62, 16366, 13, 268, 5700, 1330, 36848, 19703, 4668, 82, 11, 25458, 198, 11748, 2638, 87, 198, 11748, 302, 198...
2.793734
1,149
import sys sys.path.append("../") from appJar import gui app=gui() app.addScrolledTextArea("t1") app.setTextAreaChangeFunction("t1", press) app.addButtons(["CLEAR", "SET"], press) app.addButtons(["LOG", "CHECK"], log) app.addCheckBox("CALL") app.addCheckBox("END") app.addEntry("text") app.go()
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 6738, 598, 47511, 1330, 11774, 628, 198, 1324, 28, 48317, 3419, 198, 198, 1324, 13, 2860, 3351, 8375, 8206, 30547, 7203, 83, 16, 4943, 198, 1324, 13, 2617, 8206, 3...
2.6
115
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33448, 383, 3012, 4992, 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, 2393, 2845, 287, ...
2.703244
4,593
# -*- coding: utf-8 -*- import enum import random from typing import Union class Card: """ represents a single playing card """ class Deck: """ playing card deck class """ class Icons: """ icon container for Card/Deck """ card_back = '🂠' joke...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 33829, 198, 11748, 4738, 198, 6738, 19720, 1330, 4479, 628, 198, 4871, 5172, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6870, 257, 2060, 2712, 2657, ...
1.400835
479
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Top-level namespace for freesurfer.""" from .base import Info, FSCommand, no_freesurfer from .preprocess import (ParseDICOMDir, UnpackSDICOMDir, MRIConvert, Resample, ReconAll, ...
[ 2, 795, 16436, 25, 532, 9, 12, 4235, 25, 21015, 26, 12972, 12, 521, 298, 12, 28968, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12, 198, 2, 25357, 25, 900, 10117, 28, 29412, 39747, 28, 19, 40379, 28, 19, 15...
2.144893
842
def validTime(time): """ Boolean indicating if time is in valid 24hr format """ tokens = time.split(':') hours = int(tokens[0]) minutes = int(tokens[1]) return not (hours > 23 or minutes > 59)
[ 4299, 4938, 7575, 7, 2435, 2599, 198, 197, 37811, 198, 197, 46120, 13087, 12739, 611, 640, 318, 287, 4938, 1987, 11840, 5794, 198, 197, 37811, 198, 220, 220, 220, 16326, 796, 640, 13, 35312, 7, 10354, 11537, 198, 220, 220, 220, 2250, ...
2.6375
80
# -*- coding: utf-8 -*- """ Created on Tue Apr 20 13:32:20 2021 #--- Copy csv results to single folder based on dashboard_db.csv #--- Murilo Vianna (murilodsv@gmail.com) #--- May, 2021. #--- Dev-log in: https://github.com/Murilodsv/py-jules @author: muril """ # DEBUG import os; os.chdir('C:/M...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 2758, 1160, 1511, 25, 2624, 25, 1238, 33448, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 6329, 17393, 269, 21370, 2482, 284, 2060, ...
2.268657
737
from django.core.management.base import BaseCommand, CommandError from django.utils.timezone import get_current_timezone from orders.models import Order from datetime import datetime import csv import pytz
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 651, 62, 14421, 62, 2435, 11340, 198, 6738, 6266, 13, 27530, 1330, 8284, 198, 6738, 4818, ...
3.867925
53
import os display_name = f"csv files in {os.path.expanduser('~')}"
[ 11748, 28686, 198, 198, 13812, 62, 3672, 796, 277, 1, 40664, 3696, 287, 1391, 418, 13, 6978, 13, 11201, 392, 7220, 10786, 93, 11537, 36786, 198 ]
2.615385
26
from ansible import errors # # Additional Jinja2 filter to wrap list elements with quote # def wrap_list_elements(arg): """ Wrap each list element with quote, to use before join filter :param arg: the brute list to manage :type arg: list :return: quoted elements :rtype: l...
[ 6738, 9093, 856, 1330, 8563, 198, 198, 2, 198, 2, 15891, 17297, 6592, 17, 8106, 284, 14441, 1351, 4847, 351, 9577, 198, 2, 628, 198, 4299, 14441, 62, 4868, 62, 68, 3639, 7, 853, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220,...
2.682482
274
import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread("Computer-Vision-with-Python/DATA/dog_backpack.png") plt.imshow(img) img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.imshow(img_rgb) new_img = img_rgb.copy() new_img = cv2.flip(new_img, 0) plt.imshow(new_img) pt1 = (200, 380) pt2 = (...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 9600, 796, 269, 85, 17, 13, 320, 961, 7203, 34556, 12, 44206, 12, 4480, 12, 37906, 14, 26947, 14, 9703, ...
2.033816
207
from django.conf.urls import url from points import apis urlpatterns = [ url(r'^$', apis.PointsTableApi.as_view(), name="api_points_table") ]
[ 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 2173, 1330, 2471, 271, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 2471, 271, 13, 40710, 10962, 32, 14415, 1...
2.542373
59
import pygame from tile_movingbox import MovingBox
[ 11748, 12972, 6057, 201, 198, 6738, 17763, 62, 31462, 3524, 1330, 26768, 14253, 201, 198, 201 ]
3.375
16
from django.conf.urls import url from django.contrib.auth.views import login, logout from django.views.generic import TemplateView from osmaxx.excerptexport.views import ( delete_excerpt, export_list, export_detail, manage_own_excerpts, order_new_excerpt, order_existing_excerpt, ) excerpt_exp...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 33571, 1330, 17594, 11, 2604, 448, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 198, 6738, 267, ...
2.442
500
# -*- coding: utf-8 -*- """ Unit tests for the running.config module """ from __future__ import print_function, division, unicode_literals import os import running.config as config def test_load_config_ini(): """ Load a test configuration file in .ini format, and check if the DEFAULT section propagate...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 11801, 5254, 329, 262, 2491, 13, 11250, 8265, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 11, 28000, 1098, 62, 17201, 874,...
1.935976
984
from django.shortcuts import get_object_or_404, render from feincms3 import plugins from feincms3.regions import Regions from feincms3.renderer import TemplatePluginRenderer from .models import HTML, Article, Download renderer = TemplatePluginRenderer() renderer.register_string_renderer(HTML, plugins.html.render_html...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 11, 8543, 198, 6738, 730, 1939, 907, 18, 1330, 20652, 198, 6738, 730, 1939, 907, 18, 13, 2301, 507, 1330, 47089, 198, 6738, 730, 1939, 907, 18, 13, 1092...
3.45614
114
from django.test import TestCase from .resources import StudentResource from .models import Student # TODO modify code to do REAL testing
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 764, 37540, 1330, 13613, 26198, 198, 6738, 764, 27530, 1330, 13613, 198, 198, 2, 16926, 46, 13096, 2438, 284, 466, 32744, 4856 ]
4.3125
32
''' Adapted from DeeperCut by Eldar Insafutdinov https://github.com/eldar/pose-tensorflow ''' from enum import Enum import numpy as np # Augmentation functions def CropImage(joints,im,Xlabel,Ylabel,cfg): ''' Randomly cropping image around xlabel,ylabel taking into account size of image. Introduced in DLC 2 ''' ...
[ 7061, 6, 198, 48003, 276, 422, 1024, 5723, 26254, 416, 19208, 283, 7088, 1878, 315, 25194, 709, 198, 5450, 1378, 12567, 13, 785, 14, 68, 335, 283, 14, 3455, 12, 83, 22854, 11125, 198, 198, 7061, 6, 198, 6738, 33829, 1330, 2039, 388,...
2.253275
458
from typing import Tuple from hypothesis import given from shewchuk import (kind, vectors_dot_product) from tests.utils import (exact_kind, to_sign) from . import strategies @given(strategies.floats_sextuplets) @given(strategies.floats_quadruplets) @given(strategie...
[ 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 14078, 1330, 1813, 198, 198, 6738, 673, 86, 46019, 1330, 357, 11031, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.331288
163
from setuptools import setup setup(name='petpy', version='0.1', description='Petrophysics utilities', url='https://example.com/', author = 'Fan', author_email='yuanzhong.fan@shell.com', license = 'Apache 2', pakages=['petpy'], install_requires=['numpy'], ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 6449, 9078, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 6764, 11639, 25803, 10051, 23154, ...
2
243
""" Lightweight implementation of exponential backoff, used for operations that require polling. This is simple enough that it isn't worth bringing in a new dependency for it. """ from time import sleep from datetime import datetime from math import ceil from random import randrange class ExpBackoff: """ ``S...
[ 37811, 198, 15047, 6551, 7822, 286, 39682, 736, 2364, 11, 198, 1484, 329, 4560, 326, 2421, 13985, 13, 770, 318, 2829, 1576, 198, 5562, 340, 2125, 470, 2861, 6079, 287, 257, 649, 20203, 329, 340, 13, 198, 37811, 198, 198, 6738, 640, ...
2.771775
907
import io from dataclasses import dataclass import cv2 # type: ignore import numpy as np # type: ignore from PIL import Image # type: ignore @dataclass
[ 11748, 33245, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 11748, 269, 85, 17, 220, 1303, 2099, 25, 8856, 198, 11748, 299, 32152, 355, 45941, 220, 1303, 2099, 25, 8856, 198, 6738, 350, 4146, 1330, 7412, 220, 1303, 20...
3.076923
52
from django.db import models from django.urls import reverse from django.contrib.auth.models import User class Reader(User): """ A reader is any school member that can have access to the library for reading purpose """ # Reader's school school = models.ForeignKey('schools.School', on_delete=models.CASCADE) ...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 628, 198, 4871, 25342, 7, 12982, 2599, 198, 197, 37811, ...
3.106632
769
from base64 import b64encode as _b64encode from typing import Tuple from hashlib import sha256 from secrets import token_urlsafe from urllib.parse import urlencode from .decor import parse_token, parse_refreshed_token from .token import Token from ..scope import Scope from ..._sender import Sender, Client, send_and_p...
[ 6738, 2779, 2414, 1330, 275, 2414, 268, 8189, 355, 4808, 65, 2414, 268, 8189, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 12234, 8019, 1330, 427, 64, 11645, 198, 6738, 13141, 1330, 11241, 62, 6371, 21230, 198, 198, 6738, 2956, 297, ...
2.308012
3,370
#!/usr/bin/env python """ This ROS node takes the field survey file and publishes a field polygon as a geometry_msgs/PolygonStamped for use in other nodes and for visualization in rviz. """ import roslib; roslib.load_manifest('automow_maps') import rospy from geometry_msgs.msg import PolygonStamped, Point32, Polygo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 1212, 48263, 10139, 2753, 262, 2214, 5526, 2393, 290, 34134, 257, 198, 3245, 7514, 14520, 355, 257, 22939, 62, 907, 14542, 14, 34220, 14520, 1273, 13322, 329, 779, 287, ...
3.066265
166
"""Evaluation metrics. Scientific Machine Learning Benchmark: A benchmark of regression models in chem- and materials informatics. (c) Matthias Rupp 2019, Citrine Informatics. Related terms: objective functions, loss functions, cost functions, reward functions, utility functions, fitness functions, score functions,...
[ 37811, 36, 2100, 2288, 20731, 13, 198, 198, 23010, 811, 10850, 18252, 25187, 4102, 25, 220, 198, 32, 18335, 286, 20683, 4981, 287, 4607, 12, 290, 5696, 4175, 23372, 13, 198, 7, 66, 8, 45524, 4448, 371, 7211, 13130, 11, 15792, 7640, ...
2.7687
9,572
import torch from torch import nn class DistractionConv(nn.Module): """Inspired by SKNet"""
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 628, 628, 628, 628, 628, 628, 628, 198, 198, 4871, 4307, 7861, 3103, 85, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 37227, 41502, 1202, 416, 14277, 7934, 37811, 628 ]
2.871795
39
""" Test script that uses ASE to run an EMT calculation Script partly from the ASE intro tutorials https://wiki.fysik.dtu.dk/ase/tutorials/surface.html """ # --------------------- STEP 1: Prepare the atoms/structure object ------------ #from ase.build import fcc111 #h = 1.85 #d = 1.10 #atoms = fcc111('Cu', size=(4, ...
[ 37811, 198, 14402, 4226, 326, 3544, 317, 5188, 284, 1057, 281, 412, 13752, 17952, 198, 198, 7391, 11476, 422, 262, 317, 5188, 18951, 27992, 198, 5450, 1378, 15466, 13, 69, 893, 1134, 13, 67, 28047, 13, 34388, 14, 589, 14, 83, 44917, ...
3.334719
481
# Generated by Django 3.0.7 on 2020-07-08 11:39 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 2998, 12, 2919, 1367, 25, 2670, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
''' Module of Windows API for plyer.cpu. ''' from ctypes import ( c_ulonglong, c_ulong, byref, Structure, POINTER, Union, windll, create_string_buffer, sizeof, cast, c_void_p, c_uint32 ) from ctypes.wintypes import ( BYTE, DWORD, WORD ) from plyer.facades import CPU KERNEL = windll.kernel32 ERROR_IN...
[ 7061, 6, 198, 26796, 286, 3964, 7824, 329, 35960, 263, 13, 36166, 13, 198, 7061, 6, 198, 198, 6738, 269, 19199, 1330, 357, 198, 220, 220, 220, 269, 62, 377, 506, 6511, 11, 269, 62, 377, 506, 11, 416, 5420, 11, 198, 220, 220, 220...
2.298407
1,193
import numpy as np import matplotlib.pyplot as plt from distributions import gaussian mu_list = [0, -5, 3] sigma_list = [1, 2, 4] x = np.linspace(-15, 15, 500) for i in range(len(mu_list)): mu = mu_list[i] sigma = sigma_list[i] plt.plot(x, gaussian(x, mu, sigma), label=r'$\mu = %d$'%mu + r' $\sigma = ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 24570, 1330, 31986, 31562, 198, 198, 30300, 62, 4868, 796, 685, 15, 11, 532, 20, 11, 513, 60, 198, 82, 13495, 62, 4868, 796...
2.142857
343
import datasets import matplotlib.pyplot as plt
[ 11748, 40522, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198 ]
3.333333
15
# Copyright 2021 TileDB Inc. # Licensed under the MIT License. import numpy as np import pytest import tiledb from tiledb.cf import Group, NetCDF4ConverterEngine netCDF4 = pytest.importorskip("netCDF4") class TestSimplyCopyChunks: """Test converting a simple NetCDF in chunks. NetCDF File: dimensions: ...
[ 2, 15069, 33448, 47870, 11012, 3457, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 11748, 256, 3902, 65, 198, 6738, 256, 3902, 65, 13, 12993, 1330, 4912, 11, 3433...
2.163906
2,898
""" @package mi.dataset.driver.ctdpf_ckl.wfp.test.test_driver @file marine-integrations/mi/dataset/driver/ctdpf_ckl/wfp/driver.py @author cgoodrich @brief Test cases for ctdpf_ckl_wfp driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/dsa/test_driver $ bin/dsa/test_driver -i [-t...
[ 37811, 198, 31, 26495, 21504, 13, 19608, 292, 316, 13, 26230, 13, 310, 26059, 69, 62, 694, 75, 13, 86, 46428, 13, 9288, 13, 9288, 62, 26230, 198, 31, 7753, 16050, 12, 18908, 9143, 14, 11632, 14, 19608, 292, 316, 14, 26230, 14, 310...
2.545927
1,154
from interpretability.explanation_methods.explainers.rise import RISE from interpretability.explanation_methods.explainers.lime import Lime from interpretability.explanation_methods.explainers.occlusion import Occlusion from interpretability.explanation_methods.explainers.captum import GradCam, GB, IxG, Grad, DeepLIFT,...
[ 6738, 6179, 1799, 13, 1069, 11578, 341, 62, 24396, 82, 13, 20676, 50221, 13, 17163, 1330, 371, 24352, 198, 6738, 6179, 1799, 13, 1069, 11578, 341, 62, 24396, 82, 13, 20676, 50221, 13, 27299, 1330, 43503, 198, 6738, 6179, 1799, 13, 106...
2.691667
240
import operator, logging, math, psutil from enum import Enum from repartition_experiments.file_formats.hdf5 import HDF5_manager logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) def get_volumes(R, B): """ Returns a dictionary mapping each buffe...
[ 11748, 10088, 11, 18931, 11, 10688, 11, 26692, 22602, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 1128, 433, 653, 62, 23100, 6800, 13, 7753, 62, 687, 1381, 13, 71, 7568, 20, 1330, 5572, 37, 20, 62, 37153, 198, 198, 6404, 2667...
2.345403
4,971
""" 一、1167. 连接棒材的最低费用.py 遇到这种需要排序,然后取最小的两个或者最大的两个数进行操作得到一个结果,这个结果又要与剩下的元素进行同样操作的时候,可以采用堆的数据结构简化 二、1564. 把箱子放进仓库里 I.py 1.当有双指针时,其中一个指针必须遍历完所有元素,则可将while替换为for循环 2.这个跟分发饼干有些类似,关键在于将高低不同的warehouse转换为非递增的序列 例如 3 5 4 2 3, 后一块墙能通过多大的板子受到前一块板子的限制,也就是能通过当前墙面的最大板子为min(前一块墙高度,当前墙高度) 所以可以通过从左到右遍历,两个相邻的墙对比,如果后一块墙要高于前一快,则将后一块改成跟前一...
[ 37811, 198, 31660, 23513, 1157, 3134, 13, 5525, 123, 252, 162, 236, 98, 162, 96, 240, 30266, 238, 21410, 17312, 222, 19526, 236, 164, 112, 117, 18796, 101, 13, 9078, 198, 34402, 229, 26344, 108, 32573, 247, 163, 100, 235, 165, 250, ...
0.704077
2,085
from .root import RootCmd # noqa
[ 6738, 764, 15763, 1330, 20410, 40109, 220, 1303, 645, 20402, 198 ]
3.090909
11
import random import matplotlib.pyplot as plt import pandas as pd from math import fabs import numpy as np sex_differences = [] pair_differences = [] for i in range(2, 100): for j in range(i): men = j women = i - j homo_pair = 0 hetero_pair = 0 for m in range(men): ...
[ 11748, 4738, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 10688, 1330, 7843, 82, 198, 11748, 299, 32152, 355, 45941, 198, 198, 8044, 62, 26069, 4972, 796, 17635, 198, 2...
2.289402
736
""" Module to provide for "-m project_summarizer" access to the module, as if it was run from the console. """ import project_summarizer def main(): """ Main entry point. Exposed in this manner so that the setup entry_points configuration has something to execute. """ project_summarizer.ProjectSu...
[ 37811, 198, 26796, 284, 2148, 329, 27444, 76, 1628, 62, 16345, 3876, 7509, 1, 1895, 284, 262, 8265, 11, 198, 292, 611, 340, 373, 1057, 422, 262, 8624, 13, 198, 37811, 198, 11748, 1628, 62, 16345, 3876, 7509, 628, 198, 4299, 1388, 33...
3.15
120
""" HexagDLy utilities for illustrative examples. """ import numpy as np import numpy.linalg as LA from scipy.interpolate import griddata import torch import torch.utils.data import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import torch.nn.functional as F import torch.optim.lr_sc...
[ 37811, 220, 198, 39, 1069, 363, 19260, 88, 20081, 329, 6406, 13260, 6096, 13, 198, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 75, 1292, 70, 355, 9131, 198, 6738, 629, 541, 88, 13, 3849, 16104, 3...
2.385792
915
# sum of elements in given range arr=list(map(int,input().split())) m=int(input("query size: ")) query=[] for i in range(m): l,r=map(int,input().split()) query.append([l,r]) query.sort(key=lambda x:x[1]) curL,curR,curS=0,0,0 for i in range(len(query)): l,r=query[i] while curL<l: #move to right ...
[ 2, 2160, 286, 4847, 287, 1813, 2837, 198, 198, 3258, 28, 4868, 7, 8899, 7, 600, 11, 15414, 22446, 35312, 3419, 4008, 198, 76, 28, 600, 7, 15414, 7203, 22766, 2546, 25, 366, 4008, 198, 22766, 28, 21737, 198, 1640, 1312, 287, 2837, ...
1.813889
360
import re import os from .cli import CLI from .runner import Runner from .__cxx__ import CxxRunner if __name__ == '__main__': main()
[ 11748, 302, 198, 11748, 28686, 198, 198, 6738, 764, 44506, 1330, 43749, 198, 6738, 764, 16737, 1330, 21529, 198, 6738, 764, 834, 66, 5324, 834, 1330, 327, 5324, 49493, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, ...
2.88
50
""" Subscription: Subscriptions are repeat billing agreements with specific buyers. BitPay sends bill emails to buyers identified in active subscriptions according to the specified schedule. """ from .bill_data import BillData from ...utils.key_utils import change_camel_case_to_snake_case class Subscription: """ ...
[ 37811, 198, 7004, 33584, 25, 3834, 12048, 507, 389, 9585, 26297, 11704, 351, 2176, 14456, 13, 198, 13128, 19197, 12800, 2855, 7237, 284, 14456, 5174, 287, 4075, 35675, 1864, 198, 1462, 262, 7368, 7269, 13, 198, 37811, 198, 6738, 764, 35...
2.177898
1,484
import os.path as _path import cantera from ._ember import * from . import _ember from .input import * from .output import * from . import utils __version__ = '1.4.0' # Add Ember's data file directory to Cantera's search path. Because the Python # module is statically linked to Cantera, this needs to be done separat...
[ 11748, 28686, 13, 6978, 355, 4808, 6978, 198, 198, 11748, 460, 49600, 198, 6738, 47540, 1491, 1330, 1635, 198, 6738, 764, 1330, 4808, 1491, 198, 6738, 764, 15414, 1330, 1635, 198, 6738, 764, 22915, 1330, 1635, 198, 6738, 764, 1330, 3384...
3.319018
163
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Ver...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964...
3.847909
263
from setuptools import setup import recs _classifiers = [ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 11748, 664, 82, 198, 198, 62, 4871, 13350, 796, 685, 198, 220, 220, 220, 705, 41206, 12678, 7904, 604, 532, 17993, 3256, 198, 220, 220, 220, 705, 15167, 2229, 15417, 7904, 11361, 7904, 513, 13...
2.658147
313
import unittest from base import BaseTestCase
[ 11748, 555, 715, 395, 198, 198, 6738, 2779, 1330, 7308, 14402, 20448, 628 ]
3.692308
13
from django.contrib.sitemaps import Sitemap from django.shortcuts import reverse from .models import Product
[ 6738, 42625, 14208, 13, 3642, 822, 13, 82, 9186, 1686, 1330, 311, 9186, 499, 201, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 9575, 201, 198, 6738, 764, 27530, 1330, 8721, 201, 198, 220, 220, 220, 220 ]
3.135135
37
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-06-18 14:00 # @Author : 张江 # @Site : # @File : CustomMiddleModule.py # @Software: PyCharm #添加自己的中间件 from django.utils.deprecation import MiddlewareMixin # 可以在中间件中添加用户认证和登录设置等信息
[ 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, 3312, 12, 1507, 1478, 25, 405, 198, 2, 2488, 13838, 220, 1058, 10263, ...
1.502994
167
from io import BytesIO from os import SEEK_END, SEEK_SET import re import gs_chunked_io as gscio from .basefile import BaseAnVILFile from .basefolder import BaseAnVILFolder
[ 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 28686, 1330, 31107, 42, 62, 10619, 11, 31107, 42, 62, 28480, 198, 198, 11748, 302, 198, 198, 11748, 308, 82, 62, 354, 2954, 276, 62, 952, 355, 308, 1416, 952, 198, 198, 6738, 764, 8692...
2.8
65
import requests import json filepath = '../data/maps/edusharing-subject-mapping.tsv' input = open(filepath).readlines() for row in input: if "https" in row: uri = row.split('\t')[1].rstrip() label = requests.get(uri, headers={"accept":"application/json"}).json()['prefLabel']['de'].encode('utf-8')...
[ 11748, 7007, 198, 11748, 33918, 198, 198, 7753, 6978, 796, 705, 40720, 7890, 14, 31803, 14, 276, 1530, 1723, 12, 32796, 12, 76, 5912, 13, 912, 85, 6, 198, 198, 15414, 796, 1280, 7, 7753, 6978, 737, 961, 6615, 3419, 198, 198, 1640, ...
2.360215
186
# http://www.codewars.com/kata/53daa9e5af55c184db00025f/
[ 2, 2638, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 4310, 6814, 64, 24, 68, 20, 1878, 2816, 66, 22883, 9945, 830, 1495, 69, 14, 198 ]
1.9
30
from NanoTCAD_ViDES import * from numpy import genfromtxt fi = genfromtxt("./datiout_idvds/idvds.out", delimiter = ' ') plot(fi[:,0],fi[:,1]) show()
[ 6738, 33504, 4825, 2885, 62, 38432, 30910, 1330, 1635, 198, 6738, 299, 32152, 1330, 2429, 6738, 14116, 198, 198, 12463, 796, 2429, 6738, 14116, 7, 1911, 14, 67, 7246, 448, 62, 312, 85, 9310, 14, 312, 85, 9310, 13, 448, 1600, 46728, ...
2.365079
63
# Copyright Contributors to the Pyro-Cov project. # SPDX-License-Identifier: Apache-2.0 import pyro.poutine as poutine import pytest import torch from pyro.infer.autoguide import AutoDelta from pyrocov.substitution import GeneralizedTimeReversible, JukesCantor69 @pytest.mark.parametrize("Model", [JukesCantor69, Gen...
[ 2, 15069, 25767, 669, 284, 262, 44954, 12, 34, 709, 1628, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 12972, 305, 13, 79, 28399, 355, 279, 28399, 198, 11748, 12972, 9288, 198, 117...
3.053097
113
#!/usr/bin/env python import operator import optparse import os import re import subprocess import sys import datetime #def lrange(num1, num2 = None, step = 1, format = format_murmur): # offset = 0 if format == format_md5 else 2**63 # max = 2**127-1 if format == format_md5 else 2**63-1 # wrap = 2**128 if form...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 10088, 198, 11748, 2172, 29572, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 4818, 8079, 198, 198, 2, 4299, 300, 9521, 7, 22510, 16, ...
2.375899
556
from django.contrib.gis import admin from .models import Room admin.site.register(Room, RoomAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 1330, 13169, 198, 6738, 764, 27530, 1330, 10096, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 41178, 11, 10096, 46787, 8, 198 ]
3.1875
32
import pygame from colors import * class Surface: """ Handles functions that interact with the screen including: drawing to the screen creating the screen """ def __init__( self, rows=17, columns=17, blocksize=20, caption="Snake Game", color=WHITE ): """ :param: ...
[ 11748, 12972, 6057, 198, 6738, 7577, 1330, 1635, 198, 198, 4871, 20321, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7157, 829, 5499, 326, 9427, 351, 262, 3159, 1390, 25, 198, 220, 220, 220, 8263, 284, 262, 3159, 198, 220, 220...
2.387306
772
stringVar1 = "190905042" stringVar2 = "5042" stringVar3 = "Kunal" stringVar4 = "Wadhwa" stringVar5 = "abc" stringVar = ["Kunal", "Tanya", "Olivia", "5042", "123"] WeightOfArrayOfStrings(stringVar) MaximumAndMinimum_Value_Of_Strings(stringVar) stringVar = ["AAA", "BBB", "CCC", "DDD"] WeightOfArrayOfStrings(stringVa...
[ 8841, 19852, 16, 796, 366, 1129, 2931, 28669, 3682, 1, 198, 8841, 19852, 17, 796, 366, 1120, 3682, 1, 198, 8841, 19852, 18, 796, 366, 42, 18835, 1, 198, 8841, 19852, 19, 796, 366, 54, 24411, 10247, 1, 198, 8841, 19852, 20, 796, 36...
2.207724
958
""" Various wrapper functions/classes which use :mod:`socket` or are strongly tied to functions in this file which use :mod:`socket`. Part of :mod:`privex.helpers.net` - network related helper code. **Copyright**:: +===================================================+ | © 2019 Privex I...
[ 37811, 198, 40009, 29908, 5499, 14, 37724, 543, 779, 1058, 4666, 25, 63, 44971, 63, 393, 389, 7634, 8165, 284, 5499, 287, 428, 2393, 198, 4758, 779, 1058, 4666, 25, 63, 44971, 44646, 2142, 286, 1058, 4666, 25, 63, 3448, 303, 87, 13,...
2.299109
11,220
def fibonacci(N): """Return all fibonacci numbers up to N. """ result = [0] next_n = 1 while next_n <= N: result.append(next_n) next_n = sum(result[-2:]) return result print(fibonacci(0)) # [0] print(fibonacci(1)) # [0, 1, 1] print(fibonacci(50)) # [0, 1, 1, 2, 3, 5, 8, 13, 21, ...
[ 4299, 12900, 261, 44456, 7, 45, 2599, 198, 220, 220, 220, 37227, 13615, 477, 12900, 261, 44456, 3146, 510, 284, 399, 13, 37227, 198, 220, 220, 220, 1255, 796, 685, 15, 60, 198, 220, 220, 220, 1306, 62, 77, 796, 352, 198, 220, 220,...
1.98773
163
import os import sys import yaml import launch import launch_ros.actions from launch.conditions import IfCondition from launch.substitutions import LaunchConfiguration from launch.substitutions import PythonExpression from ament_index_python.packages import get_package_share_directory if __name__ == '__main__': ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 198, 11748, 4219, 198, 11748, 4219, 62, 4951, 13, 4658, 198, 6738, 4219, 13, 17561, 1756, 1330, 1002, 48362, 198, 6738, 4219, 13, 7266, 301, 270, 3508, 1330, 21225, 38149, 19...
3.734043
94
import numpy as np class Statistic: """ Contains statistic functions helper """ def __init__(self, numbers = [1,2], confidence=0.95): """ numbers = array of numbers confidence = confidence interval, default is 95% """ self.numbers = numbers self.confidenc...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4871, 5133, 2569, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 49850, 24696, 5499, 31904, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 3146, 796, 6...
2.320717
502
# -*- coding: utf-8 -*- # ISC License # Copyright (C) 2015 Jan Lebert from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple import requests from requests_oauthlib import OAuth1 from redis import StrictRedis import json from datetime import datetime, timedelta...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 3180, 34, 13789, 198, 2, 15069, 357, 34, 8, 1853, 2365, 1004, 4835, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, ...
3.465649
131