content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np import copy from core_tools.utility.plotting.plot_settings import plot_layout, graph_settings_1D, _1D_raw_plot_data from core_tools.utility.plotting.plot_general import _data_plotter # TODO add log scale support !!! if __name__ == '__main__...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4866, 198, 198, 6738, 4755, 62, 31391, 13, 315, 879, 13, 29487, 889, 13, 29487, 62,...
2.112642
1,234
# last edit date: 2016/11/2 # author: Forec # LICENSE # Copyright (c) 2015-2017, Forec <forec@bupt.edu.cn> # Permission to use, copy, modify, and/or distribute this code for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. ...
[ 2, 938, 4370, 3128, 25, 1584, 14, 1157, 14, 17, 198, 2, 1772, 25, 4558, 66, 198, 2, 38559, 24290, 198, 2, 15069, 357, 66, 8, 1853, 12, 5539, 11, 4558, 66, 1279, 754, 66, 31, 11110, 457, 13, 15532, 13, 31522, 29, 198, 198, 2, ...
3.263158
323
from gdb.models import *
[ 6738, 308, 9945, 13, 27530, 1330, 1635, 198 ]
3.125
8
from .base import ArticleView, ArticlePreviewView, ArticleListView, SearchView, LandingView, \ CategoryView, TagView, SubscribeForUpdates, UnsubscribeFromUpdates from .ajax import GetArticleSlugAjax, TagsAutocompleteAjax from .errors import page_not_found, server_error
[ 6738, 764, 8692, 1330, 10172, 7680, 11, 10172, 48835, 7680, 11, 10172, 8053, 7680, 11, 11140, 7680, 11, 29689, 7680, 11, 3467, 198, 220, 220, 220, 21743, 7680, 11, 17467, 7680, 11, 19808, 1890, 4933, 19581, 11, 791, 7266, 12522, 4863, ...
3.468354
79
# by MrSteyk & Dogecore # TODO: extraction instructions & testing import json import os.path from typing import List import bpy loaded_materials = {} MATERIAL_LOAD_PATH = "" # put your path here # normal has special logic MATERIAL_INPUT_LINKING = { "color": "Base Color", "rough": "Roughness", "spec": ...
[ 2, 416, 1770, 7447, 48361, 1222, 2141, 469, 7295, 198, 2, 16926, 46, 25, 22236, 7729, 1222, 4856, 198, 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 275, 9078, 628, 198, 14578, 62, 33665, 82...
2.770992
131
from django.db import models TASK_STATUS = ( ("c", "created"), ("p", "progress"), ("s", "success"), ("f", "failed") )
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 51, 1921, 42, 62, 35744, 2937, 796, 357, 198, 220, 220, 220, 5855, 66, 1600, 366, 25598, 12340, 220, 198, 220, 220, 220, 5855, 79, 1600, 366, 33723, 12340, 220, 198, 220, 220, 220,...
2.225806
62
# Copyright (c) 2018 European Organization for Nuclear Research. # 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/LIC...
[ 2, 15069, 357, 66, 8, 2864, 3427, 12275, 329, 19229, 4992, 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, ...
2.786467
1,138
import glob import numpy as np
[ 11748, 15095, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198 ]
3
11
import csv vat_filenames = set() train_csv_filename = 'train_annotations.csv' val_csv_filename = 'val_annotations.csv' for csv_filename in [train_csv_filename, val_csv_filename]: for line in csv.reader(open(csv_filename)): vat_filename = line[0].split('/')[-1] vat_filenames.add(vat_filename) pr...
[ 11748, 269, 21370, 198, 198, 85, 265, 62, 10379, 268, 1047, 796, 900, 3419, 198, 27432, 62, 40664, 62, 34345, 796, 705, 27432, 62, 34574, 602, 13, 40664, 6, 198, 2100, 62, 40664, 62, 34345, 796, 705, 2100, 62, 34574, 602, 13, 40664,...
2.327044
159
""" This file is part of LiberaForms. # SPDX-FileCopyrightText: 2020 LiberaForms.org # SPDX-License-Identifier: AGPL-3.0-or-later """ import os, json from flask import g, request, render_template, redirect from flask import session, flash, Blueprint from flask import send_file, after_this_request from flask_babel imp...
[ 37811, 198, 1212, 2393, 318, 636, 286, 5261, 64, 8479, 82, 13, 198, 198, 2, 30628, 55, 12, 8979, 15269, 8206, 25, 12131, 5261, 64, 8479, 82, 13, 2398, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 13077, 6489, 12, 18, 13, 1...
3.227564
312
import os, copy import cv2 from functools import partial import numpy as np import torch import torchvision from torch.utils.data import Dataset from zephyr.data_util import to_np, vectorize, img2uint8 from zephyr.utils import torch_norm_fast from zephyr.utils.mask_edge import getRendEdgeScore from zephyr...
[ 11748, 28686, 11, 4866, 201, 198, 11748, 269, 85, 17, 201, 198, 6738, 1257, 310, 10141, 1330, 13027, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 10178, 201, 198, 6738, 28034, 13, ...
2.614232
267
from Roteiro7.Roteiro7__funcoes import GrafoComPesos # .:: Arquivo de Testes do Algoritmo de Dijkstra ::. # # --------------------------------------------------------------------------- # grafo_aula = GrafoComPesos( ['E', 'A', 'B', 'C', 'D'], { 'E-A': 1, 'E-C': 10, 'A-B': 2, 'B...
[ 6738, 371, 1258, 7058, 22, 13, 49, 1258, 7058, 22, 834, 12543, 1073, 274, 1330, 7037, 6513, 5377, 47, 274, 418, 628, 198, 2, 764, 3712, 943, 421, 23593, 390, 6208, 274, 466, 978, 7053, 270, 5908, 390, 360, 45961, 12044, 7904, 13, ...
1.829213
445
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright Tom Hren # Licensed under the terms of the MIT License # ---------------------------------------------------------------------------- """ Python QtScreenCaster Spyder API. """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 10541, 198, 2, 15069, 220, 4186, 367, 918, 198, 198, 2, 49962, 739, 262, 2846, 286, 262, 17168, 13789, 198, 2, 16529, 10541, 198, 37811, 198, 37906, 33734, 2...
5.444444
54
import os, os.path import subprocess from distutils.core import setup from py2exe.build_exe import py2exe PROGRAM_NAME = 'icom_app' PROGRAM_DESC = 'simple icom app' NSIS_SCRIPT_TEMPLATE = r""" !define py2exeOutputDirectory '{output_dir}\' !define exe '{program_name}.exe' ; Uses solid LZMA compression. Ca...
[ 11748, 28686, 11, 28686, 13, 6978, 201, 198, 11748, 850, 14681, 201, 198, 201, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 201, 198, 6738, 12972, 17, 13499, 13, 11249, 62, 13499, 1330, 12972, 17, 13499, 201, 198, 4805, 7730, 24115, ...
2.183953
1,022
import torch from farm.data_handler.samples import Sample from farm.modeling.prediction_head import RegressionHead
[ 11748, 28034, 198, 6738, 5318, 13, 7890, 62, 30281, 13, 82, 12629, 1330, 27565, 198, 6738, 5318, 13, 4666, 10809, 13, 28764, 2867, 62, 2256, 1330, 3310, 2234, 13847, 628, 198 ]
3.774194
31
import pytest from rest_framework import status from rest_framework.test import APIClient def returns_status_code_http_200_ok(response): assert response.status_code == status.HTTP_200_OK def returns_status_code_http_401_unauthorized(response): assert response.status_code == status.HTTP_401_UNAUTHOR...
[ 11748, 12972, 9288, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2149, 75, 1153, 628, 628, 628, 628, 628, 198, 198, 4299, 5860, 62, 13376, 62, 8189, 62, 4023, 62, 2167, 62, 482, 7, 26209,...
3.032258
248
from collections import defaultdict import discord from redbot.core import Config, checks, commands from redbot.core.bot import Red from redbot.core.utils.chat_formatting import box, humanize_list, inline from abc import ABC # ABC Mixins from dashboard.abc.abc import MixinMeta from dashboard.abc.mixin impor...
[ 6738, 17268, 1330, 4277, 11600, 201, 198, 201, 198, 11748, 36446, 201, 198, 6738, 2266, 13645, 13, 7295, 1330, 17056, 11, 8794, 11, 9729, 201, 198, 6738, 2266, 13645, 13, 7295, 13, 13645, 1330, 2297, 201, 198, 6738, 2266, 13645, 13, 7...
3.265152
264
""" https://leetcode.com/problems/find-peak-element/submissions/ """ from typing import List
[ 37811, 198, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 19796, 12, 36729, 12, 30854, 14, 7266, 8481, 14, 198, 37811, 198, 6738, 19720, 1330, 7343, 628 ]
3.133333
30
from torchvision.datasets import ImageFolder from torchvision import transforms import random import os import torch from torch.utils.data.dataloader import DataLoader from utils import constants, get_default_device from image_folder_with_path import ImageFolderWithPaths def to_device(data, device): """Move tensor...
[ 6738, 28034, 10178, 13, 19608, 292, 1039, 1330, 7412, 41092, 198, 6738, 28034, 10178, 1330, 31408, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 67, 10254, 1170, 263, 1330, 6060, 17401,...
3.110041
727
# import matplotlib # matplotlib.use('Qt5Agg') # Prevents `Invalid DISPLAY variable` errors import pytest import tempfile from calliope import Model from calliope.utils import AttrDict from calliope import analysis from . import common from .common import assert_almost_equal, solver, solver_io import matplotlib.p...
[ 2, 1330, 2603, 29487, 8019, 198, 2, 2603, 29487, 8019, 13, 1904, 10786, 48, 83, 20, 46384, 11537, 220, 1303, 43280, 658, 4600, 44651, 13954, 31519, 7885, 63, 8563, 198, 198, 11748, 12972, 9288, 198, 11748, 20218, 7753, 198, 198, 6738, ...
3.248
125
import os from mol.util import read_xyz dirname = os.path.dirname(os.path.abspath(__file__)) filename = os.path.join(dirname, 'look_and_say.dat') with open(filename, 'r') as handle: look_and_say = handle.read()
[ 11748, 28686, 198, 6738, 18605, 13, 22602, 1330, 1100, 62, 5431, 89, 198, 198, 15908, 3672, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 34345, 796, 28686, 13, 6978, 13, ...
2.578313
83
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
1.791908
3,114
""" This is algos.euler.transformer module. This module is responsible for transforming raw candle data into training samples usable to the Euler algorithm. """ import datetime import decimal from algos.euler.models import training_samples as ts from core.models import instruments from datasource.models import...
[ 37811, 770, 318, 435, 70, 418, 13, 68, 18173, 13, 7645, 16354, 8265, 13, 198, 220, 220, 220, 770, 8265, 318, 4497, 329, 25449, 8246, 26839, 1366, 656, 3047, 198, 220, 220, 220, 8405, 24284, 284, 262, 412, 18173, 11862, 13, 198, 3781...
2.529483
1,662
from diagrams import Node
[ 6738, 37067, 1330, 19081, 628 ]
5.4
5
__doc__ = \ """ ======================================================================================= Main-driver :obj:`LogStream` variables (:mod:`mango.application.main_driver.logstream`) ======================================================================================= .. currentmodule:: mango.application.ma...
[ 834, 15390, 834, 796, 3467, 198, 37811, 198, 23926, 4770, 1421, 18604, 198, 13383, 12, 26230, 1058, 26801, 25, 63, 11187, 12124, 63, 9633, 357, 25, 4666, 25, 63, 76, 14208, 13, 31438, 13, 12417, 62, 26230, 13, 6404, 5532, 63, 8, 198...
2.882637
622
# -*- coding: utf-8-unix -*- import platform ###################################################################### # Platform specific headers ###################################################################### if platform.system() == 'Linux': src = """ typedef bool BOOL; """ #############################...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 12, 403, 844, 532, 9, 12, 198, 198, 11748, 3859, 198, 198, 29113, 29113, 4242, 2235, 198, 2, 19193, 2176, 24697, 198, 29113, 29113, 4242, 2235, 198, 198, 361, 3859, 13, 10057, 3419, 6624...
2.083961
4,645
from overrides import overrides from ..masked_layer import MaskedLayer
[ 6738, 23170, 1460, 1330, 23170, 1460, 198, 198, 6738, 11485, 27932, 276, 62, 29289, 1330, 18007, 276, 49925, 628 ]
3.842105
19
""" energy.py function that computes the inter particle energy It uses truncated 12-6 Lennard Jones potential All the variables are in reduced units. """ def distance(atom1, atom2): """ Computes the square of inter particle distance Minimum image convention is applied for distance calculatio...
[ 37811, 198, 22554, 13, 9078, 198, 198, 8818, 326, 552, 1769, 262, 987, 18758, 2568, 198, 1026, 3544, 40122, 515, 1105, 12, 21, 28423, 446, 5437, 2785, 198, 3237, 262, 9633, 389, 287, 5322, 4991, 13, 198, 198, 37811, 198, 198, 4299, ...
2.098884
627
import numpy as np import math from scipy.optimize import curve_fit
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 628, 628 ]
3.227273
22
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ############################################################# # File: network_models_LSTU.py # Created Date: Tuesday February 25th 2020 # Author: Chen Xuanhong # Email: chenxuanhongzju@outlook.com # Last Modified: Tuesday, 25th February 2020 9:57:06 pm # Modified By: Chen ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 29113, 14468, 7804, 4242, 2, 198, 2, 9220, 25, 3127, 62, 27530, 62, 43, 2257, 52, 13, 9078, 198, 2, 15622, 7536, 2...
3.121302
338
from unittest import TestCase from expects import expect, equal, raise_error from slender import List
[ 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 13423, 1330, 1607, 11, 4961, 11, 5298, 62, 18224, 220, 198, 198, 6738, 36808, 1330, 7343, 628, 628 ]
3.857143
28
#!/usr/bin/env python3 # Copyright (c) 2020 The Bitcoin Cash Node developers # Author matricz # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test that inv messages are sent according to an exponential distribution with scale -...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 12131, 383, 6185, 16210, 19081, 6505, 198, 2, 6434, 2603, 1173, 89, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766, 262, 19249, 198, 2, 2393, 27...
3.610256
195
import backend as F import numpy as np import scipy as sp import dgl from dgl import utils import unittest from numpy.testing import assert_array_equal np.random.seed(42) if __name__ == '__main__': test_create_full() test_1neighbor_sampler_all() test_10neighbor_sampler_all() test_1neighbor_sampler(...
[ 11748, 30203, 355, 376, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 355, 599, 198, 11748, 288, 4743, 198, 6738, 288, 4743, 1330, 3384, 4487, 198, 11748, 555, 715, 395, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62...
2.475936
187
# Copyright Amazon.com, Inc. or its affiliates. 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 # # Unl...
[ 2, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 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, 11074, 198, 2, 220, 220, 220, 9...
3.279221
308
#! /usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, ...
2.876686
519
import sys f = open("/home/vader/Desktop/test.py", "r") #read all file python_script = f.read() print(python_script)
[ 11748, 25064, 198, 69, 796, 1280, 7203, 14, 11195, 14, 85, 5067, 14, 36881, 14, 9288, 13, 9078, 1600, 366, 81, 4943, 198, 1303, 961, 477, 2393, 198, 29412, 62, 12048, 796, 220, 277, 13, 961, 3419, 220, 220, 220, 220, 220, 198, 479...
2.470588
51
import smtplib import argparse from os.path import basename from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import COMMASPACE, formatdate import configparser import json parser = argparse.ArgumentParser() parser.add...
[ 11748, 895, 83, 489, 571, 198, 11748, 1822, 29572, 198, 6738, 28686, 13, 6978, 1330, 1615, 12453, 198, 6738, 3053, 13, 76, 524, 13, 31438, 1330, 337, 12789, 23416, 198, 6738, 3053, 13, 76, 524, 13, 16680, 541, 433, 1330, 337, 3955, ...
3.154321
324
import logging TRACE_LVL = int( (logging.DEBUG + logging.INFO) / 2 )
[ 11748, 18931, 198, 198, 5446, 11598, 62, 30976, 43, 796, 493, 7, 357, 6404, 2667, 13, 30531, 1343, 18931, 13, 10778, 8, 1220, 362, 1267, 198 ]
2.692308
26
from dagster import repository from simple_lakehouse.pipelines import simple_lakehouse_pipeline
[ 6738, 48924, 1706, 1330, 16099, 198, 6738, 2829, 62, 27180, 4803, 13, 79, 541, 20655, 1330, 2829, 62, 27180, 4803, 62, 79, 541, 4470, 628 ]
3.88
25
#Copyright ReportLab Europe Ltd. 2000-2017 #see license.txt for license details __version__='3.3.0' __doc__='' #REPORTLAB_TEST_SCRIPT import sys, copy, os from reportlab.platypus import * _NEW_PARA=os.environ.get('NEW_PARA','0')[0] in ('y','Y','1') _REDCAP=int(os.environ.get('REDCAP','0')) _CALLBACK=os.environ.get('CA...
[ 2, 15269, 6358, 17822, 2031, 12052, 13, 4751, 12, 5539, 198, 2, 3826, 5964, 13, 14116, 329, 5964, 3307, 198, 834, 9641, 834, 11639, 18, 13, 18, 13, 15, 6, 198, 834, 15390, 834, 28, 7061, 198, 198, 2, 2200, 15490, 48780, 62, 51, ...
2.5
594
""" econ/fred_view.py tests """ import unittest from unittest import mock from io import StringIO import pandas as pd # pylint: disable=unused-import from gamestonk_terminal.econ.fred_view import get_fred_data # noqa: F401 fred_data_mock = """ ,GDP 2019-01-01,21115.309 2019-04-01,21329.877 2019-07-01,21540.325 2019-...
[ 37811, 304, 1102, 14, 39193, 62, 1177, 13, 9078, 5254, 37227, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 15290, 198, 6738, 33245, 1330, 10903, 9399, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 279, 2645, 600, ...
2.322404
183
# Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details. """Managing greenlets in a group. The :class:`Group` class in this module abstracts a group of running greenlets. When a greenlet dies, it's automatically removed from the group. The :class:`Pool` which a subclass of :class:`Group` provides a way to li...
[ 2, 15069, 357, 66, 8, 3717, 12, 10333, 33089, 24207, 32720, 13, 4091, 38559, 24290, 329, 3307, 13, 198, 37811, 5124, 3039, 4077, 5289, 287, 257, 1448, 13, 198, 198, 464, 1058, 4871, 25, 63, 13247, 63, 1398, 287, 428, 8265, 12531, 82...
3.355634
284
import time import logging from typing import Dict, Any, Tuple import pickle import numpy as np import xgboost as xgb from .common import load_lw_dataset, encode_query, decode_label from ..postgres import Postgres from ..estimator import Estimator from ..utils import evaluate, run_test from ...dataset.dataset import ...
[ 11748, 640, 198, 11748, 18931, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 309, 29291, 198, 11748, 2298, 293, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2124, 70, 39521, 355, 2124, 22296, 198, 198, 6738, 764, 11321, 1330, ...
2.644757
639
import os import configparser from warnings import warn def write_info_to_file(file_handle, separator, *args, **kw_args): """ Write arguments or keyword arguments to a file. Values will be separated by a given separator. """ output_lines = [] if len(args) > 0: output_lines.append(separat...
[ 198, 11748, 28686, 198, 11748, 4566, 48610, 198, 6738, 14601, 1330, 9828, 198, 198, 4299, 3551, 62, 10951, 62, 1462, 62, 7753, 7, 7753, 62, 28144, 11, 2880, 1352, 11, 1635, 22046, 11, 12429, 46265, 62, 22046, 2599, 198, 220, 220, 220,...
2.535
200
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2017 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) import numpy as np import pytest from pymor.core.pickle import dumps, loads from pymor.functions....
[ 2, 770, 2393, 318, 636, 286, 262, 12972, 44, 1581, 1628, 357, 4023, 1378, 2503, 13, 9078, 4491, 13, 2398, 737, 198, 2, 15069, 2211, 12, 5539, 12972, 44, 1581, 6505, 290, 20420, 13, 1439, 2489, 10395, 13, 198, 2, 13789, 25, 347, 10...
3.322097
267
''' step 1 get the userID and their locations put them all into a database ''' from bs4 import BeautifulSoup import urllib import sqlite3 from selenium import webdriver import time import re from urllib import request import random import pickle import os import pytesseract url_dog = "http...
[ 201, 198, 7061, 6, 201, 198, 9662, 352, 201, 198, 1136, 262, 2836, 2389, 290, 511, 7064, 201, 198, 1996, 606, 477, 656, 257, 6831, 201, 198, 7061, 6, 201, 198, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 201, 198, 11748, ...
2.407407
324
from .structure import Structure
[ 6738, 764, 301, 5620, 1330, 32522, 198 ]
4.714286
7
import unittest import numpy as np from tbase.common.cmd_util import set_global_seeds from tbase.network.polices import RandomPolicy if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 256, 8692, 13, 11321, 13, 28758, 62, 22602, 1330, 900, 62, 20541, 62, 325, 5379, 198, 6738, 256, 8692, 13, 27349, 13, 16104, 1063, 1330, 14534, 36727, 628,...
2.846154
65
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 15069, 2321, 4946, 25896, 5693, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, ...
2.898575
1,755
from .group import Group from .node import (Node, parse_xml_properties, ATTR_ID) from time import sleep from xml.dom import minidom
[ 198, 6738, 764, 8094, 1330, 4912, 198, 6738, 764, 17440, 1330, 357, 19667, 11, 21136, 62, 19875, 62, 48310, 11, 5161, 5446, 62, 2389, 8, 198, 6738, 640, 1330, 3993, 198, 6738, 35555, 13, 3438, 1330, 949, 312, 296, 628 ]
3.35
40
# SPDX-FileCopyrightText: 2021 easyCore contributors <core@easyscience.software> # SPDX-License-Identifier: BSD-3-Clause # 2021 Contributors to the easyCore project <https://github.com/easyScience/easyCore> __author__ = 'github.com/wardsimon' __version__ = '0.1.0' import logging
[ 2, 220, 30628, 55, 12, 8979, 15269, 8206, 25, 33448, 2562, 14055, 20420, 220, 1279, 7295, 31, 30412, 893, 4234, 13, 43776, 29, 198, 2, 220, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 2, 220,...
2.969072
97
"""Module for IQ option billing resource.""" from iqoptionapi.http.resource import Resource
[ 37811, 26796, 329, 18248, 3038, 26297, 8271, 526, 15931, 198, 198, 6738, 1312, 80, 18076, 15042, 13, 4023, 13, 31092, 1330, 20857, 628 ]
4.086957
23
# -*- coding: utf-8 -*- def ordered_set(iter): """Creates an ordered set @param iter: list or tuple @return: list with unique values """ final = [] for i in iter: if i not in final: final.append(i) return final def class_slots(ob): """Get object attributes from...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 4299, 6149, 62, 2617, 7, 2676, 2599, 198, 220, 220, 220, 37227, 16719, 274, 281, 6149, 900, 628, 220, 220, 220, 2488, 17143, 11629, 25, 1351, 393, 46545, 198, 220...
2.490196
714
import asyncio from collections import defaultdict from datetime import timedelta import pytest from yui.api import SlackAPI from yui.bot import Bot from yui.box import Box from yui.types.slack.response import APIResponse from yui.utils import json from .util import FakeImportLib
[ 11748, 30351, 952, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 331, 9019, 13, 15042, 1330, 36256, 17614, 198, 6738, 331, 9019, 13, 13645, 1330, 18579, 198, ...
3.487805
82
#!/usr/bin/env python import numpy as np import rospy import geometry_msgs.msg import tf2_ros from tf.transformations import quaternion_slerp if __name__ == '__main__': rospy.init_node('marker_filter') alpha = rospy.get_param('~alpha', 0.9) parent_frame_id = rospy.get_param('~parent_frame_id', 'kinect2...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 686, 2777, 88, 198, 11748, 22939, 62, 907, 14542, 13, 19662, 198, 11748, 48700, 17, 62, 4951, 198, 6738, 48700, 13, 35636, 602, 1330, 62...
2.275947
1,214
import os import subprocess from pathlib import Path from torch.hub import load_state_dict_from_url import numpy as np model_urls = { # ResNet 'resnet18': 'https://download.pytorch.org/models/resnet18-f37072fd.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-b627a593.pth', 'resnet50':...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 28034, 13, 40140, 1330, 3440, 62, 5219, 62, 11600, 62, 6738, 62, 6371, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 19849, 62, 6371, 82, 7...
2.172197
1,115
import requests from bs4 import BeautifulSoup links = getLinks("http://www.reddit.com/") print(links)
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 28751, 796, 651, 31815, 7203, 4023, 1378, 2503, 13, 10748, 13, 785, 14, 4943, 198, 4798, 7, 28751, 8 ]
3.1875
32
"""Tests for SEIR model in this repo * Compares conserved quantities * Compares model against SEIR wo social policies in limit to SIR """ from pandas import Series from pandas.testing import assert_frame_equal, assert_series_equal from bayes_chime.normal.models import SEIRModel, SIRModel from pytest import fixture fro...
[ 37811, 51, 3558, 329, 7946, 4663, 2746, 287, 428, 29924, 198, 9, 3082, 3565, 4055, 276, 17794, 198, 9, 3082, 3565, 2746, 1028, 7946, 4663, 24486, 1919, 4788, 287, 4179, 284, 311, 4663, 198, 37811, 198, 6738, 19798, 292, 1330, 7171, 19...
2.500642
779
import numpy as np from scipy.interpolate import interp1d from pyTools import * ################################################################################ #~~~~~~~~~Log ops ################################################################################ ##########################################################...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, 1330, 987, 79, 16, 67, 198, 6738, 12972, 33637, 1330, 1635, 198, 198, 29113, 29113, 14468, 198, 2, 15116, 93, 11187, 39628, 198, 29113, 29113, 14468, 198, 1...
9.268519
108
from setuptools import setup setup( name="ambient_api", version="1.5.6", packages=["ambient_api"], url="https://github.com/avryhof/ambient_api", license="MIT", author="Amos Vryhof", author_email="amos@vryhofresearch.com", description="A Python class for accessing the Ambient Weather API...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 4131, 1153, 62, 15042, 1600, 198, 220, 220, 220, 2196, 2625, 16, 13, 20, 13, 21, 1600, 198, 220, 220, 220, 10392, 28, 14692, 4131, 1153, 62, ...
2.631111
225
#!/usr/bin/env python import subprocess import os
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 850, 14681, 198, 11748, 28686, 628, 198 ]
2.944444
18
from collections import deque
[ 6738, 17268, 1330, 390, 4188, 628 ]
5.166667
6
from flask import Blueprint, render_template from gateways.models import getWeatherData web = Blueprint("web", __name__, template_folder='templates') #@web.route("/profile", methods=['GET']) #def profile(): # items = getWeatherData.get_last_item() # return render_template("profile.html", # ...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 198, 6738, 8946, 1322, 13, 27530, 1330, 651, 41865, 6601, 628, 198, 12384, 796, 39932, 7203, 12384, 1600, 11593, 3672, 834, 11, 11055, 62, 43551, 11639, 11498, 17041, 11537, 198, 198, 2, 31...
2.40678
236
from __future__ import absolute_import from changes.buildsteps.default import DefaultBuildStep
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 2458, 13, 11249, 20214, 13, 12286, 1330, 15161, 15580, 8600, 628 ]
4.409091
22
#!/usr/bin/env python3 """Star Wars API HTTP response parsing""" # requests is used to send HTTP requests (get it?) import requests URL= "https://swapi.dev/api/people/1" def main(): """sending GET request, checking response""" # SWAPI response is stored in "resp" object resp= requests.get(URL) # wh...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 8248, 6176, 7824, 14626, 2882, 32096, 37811, 198, 198, 2, 7007, 318, 973, 284, 3758, 14626, 7007, 357, 1136, 340, 10091, 198, 11748, 7007, 198, 198, 21886, 28, 366, 5450, 13...
2.988764
178
import json schema = { "Spartina": { "ColStart": "2000-04-01", "ColEnd": "2000-05-31", "random": 7, "mud_colonization": [0.0, 0.0], "fl_dr": 0.005, "Maximum age": 20, "Number LifeStages": 2, "initial root length": 0.05, "initial shoot length":...
[ 11748, 33918, 198, 198, 15952, 2611, 796, 1391, 198, 220, 220, 220, 366, 50, 3911, 1437, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 5216, 10434, 1298, 366, 11024, 12, 3023, 12, 486, 1600, 198, 220, 220, 220, 220, 220, ...
2.07014
1,996
format_py = rule( implementation = _format_py_impl, executable = True, attrs = { "srcs": attr.label_list( allow_files = [".py"], mandatory = True, ), "_fmt": attr.label( cfg = "host", default = "//format:format_py", executa...
[ 198, 18982, 62, 9078, 796, 3896, 7, 198, 220, 220, 220, 7822, 796, 4808, 18982, 62, 9078, 62, 23928, 11, 198, 220, 220, 220, 28883, 796, 6407, 11, 198, 220, 220, 220, 708, 3808, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, ...
1.831373
255
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.models import AbstractUser, UserManager from django.db import models from django.utils import timezone # Create your models here. # Create our new user class
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 11, 11787, 13511, 198, 6738, ...
3.378378
74
""" If you find this code useful, please cite our paper: Mahmoud Afifi, Marcus A. Brubaker, and Michael S. Brown. "HistoGAN: Controlling Colors of GAN-Generated and Real Images via Color Histograms." In CVPR, 2021. @inproceedings{afifi2021histogan, title={Histo{GAN}: Controlling Colors of {GAN}-Generated and R...
[ 37811, 198, 1002, 345, 1064, 428, 2438, 4465, 11, 3387, 21729, 674, 3348, 25, 628, 38554, 2483, 22238, 11, 17068, 317, 13, 1709, 549, 3110, 11, 290, 3899, 311, 13, 4373, 13, 366, 13749, 78, 45028, 25, 198, 2345, 18886, 29792, 286, 4...
2.512165
822
# -*- coding: utf-8 -*- # Generated by Django 1.9.10 on 2016-10-05 18:52 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 940, 319, 1584, 12, 940, 12, 2713, 1248, 25, 4309, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.736842
57
# 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,...
2.654815
675
#!/usr/bin/env python3 import json import argparse import re import datetime import paramiko import requests # cmd ['ssh', 'smart', # 'mkdir -p /home/levabd/smart-home-temp-humidity-monitor; # cat - > /home/levabd/smart-home-temp-humidity-monitor/lr.json'] from miio import chuangmi_plug from btlewrap import availabl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 11748, 4818, 8079, 198, 11748, 5772, 12125, 198, 11748, 7007, 198, 198, 2, 23991, 37250, 45824, 3256, 705, 27004, 32...
2.171552
5,083
import pickle from sklearn.neural_network import MLPClassifier train = pickle.load(open('train_pca_reservoir_output_200samples.pickle','rb')) test = pickle.load(open('test_pca_reservoir_output_50samples.pickle','rb')) train_num = 200 test_num = 50 mlp = MLPClassifier(hidden_layer_sizes=(2000,), max_iter=100, alpha=1...
[ 11748, 2298, 293, 198, 6738, 1341, 35720, 13, 710, 1523, 62, 27349, 1330, 10373, 47, 9487, 7483, 198, 198, 27432, 796, 2298, 293, 13, 2220, 7, 9654, 10786, 27432, 62, 79, 6888, 62, 411, 712, 10840, 62, 22915, 62, 2167, 82, 12629, 13...
2.236934
287
import numpy as np import pandas as pd from skimage import io import skimage.measure as measure import os from lpg_pca_impl import denoise
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 9060, 1330, 33245, 198, 11748, 1341, 9060, 13, 1326, 5015, 355, 3953, 198, 11748, 28686, 198, 6738, 300, 6024, 62, 79, 6888, 62, 23928, 1330, 2853, ...
3.148936
47
import redis from rq import Queue, Connection from flask import Flask, render_template, Blueprint, jsonify, request import tasks import rq_dashboard from wingnut import Wingnut app = Flask( __name__, template_folder="./templates", static_folder="./static", ) app.config.from_object(rq_dashb...
[ 11748, 2266, 271, 198, 6738, 374, 80, 1330, 4670, 518, 11, 26923, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 39932, 11, 33918, 1958, 11, 2581, 198, 11748, 8861, 198, 11748, 374, 80, 62, 42460, 3526, 198, 6738, 8539, 14930...
2.580645
186
from pytaboola.client import TaboolaClient
[ 6738, 12972, 10658, 13, 16366, 1330, 16904, 10513, 11792 ]
4.666667
9
# -------------- # Importing header files import numpy as np import warnings warnings.filterwarnings('ignore') new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] #New record #Reading file data = np.genfromtxt(path, delimiter=",", skip_header=1) data.shape cenus=np.concatenate((new_record,data),axis=0) cenus....
[ 2, 220, 26171, 198, 2, 17267, 278, 13639, 3696, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 14601, 201, 198, 201, 198, 40539, 654, 13, 24455, 40539, 654, 10786, 46430, 11537, 201, 198, 3605, 62, 22105, 28, 30109, 1120, 1...
2.058394
685
#! /usr/bin/env python # # Presents the results of an Autobahn TestSuite run in TAP format. # # Copyright 2015 Jacob Champion # # 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://ww...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 47102, 262, 2482, 286, 281, 41735, 15386, 6208, 5606, 578, 1057, 287, 309, 2969, 5794, 13, 198, 2, 198, 2, 15069, 1853, 12806, 15869, 198, 2, 198, 2, 49962, 739, 262, ...
2.502898
1,553
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.891892
37
import openpyxl wb = openpyxl.load_workbook('example.xlsx') sheet = wb.get_sheet_by_name('Sheet1') rows = sheet.get_highest_row() cols = sheet.get_highest_column() for i in range(1, rows + 1): for j in range(1, cols + 1): print('%s: %s' % (sheet.cell(row=i, column=j).coordinate, sheet.cell(row=i, column=j)....
[ 11748, 1280, 9078, 87, 75, 201, 198, 201, 198, 39346, 796, 1280, 9078, 87, 75, 13, 2220, 62, 1818, 2070, 10786, 20688, 13, 87, 7278, 87, 11537, 201, 198, 21760, 796, 266, 65, 13, 1136, 62, 21760, 62, 1525, 62, 3672, 10786, 3347, 3...
2.509677
155
# Generated by Django 3.1.13 on 2021-10-04 11:44 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 1485, 319, 33448, 12, 940, 12, 3023, 1367, 25, 2598, 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.840909
44
#import external libraries used in code import requests, json import pycountry print('Currency Exchange') currencies = [] if __name__ == "__main__": findCurrency() help() currencyAmount, fromCurrency, toCurrency = userData() rate = realTimeRate(fromCurrency, toCurrency) complet...
[ 2, 11748, 7097, 12782, 973, 287, 2438, 201, 198, 11748, 7007, 11, 33918, 201, 198, 11748, 12972, 19315, 201, 198, 201, 198, 4798, 10786, 34, 13382, 12516, 11537, 201, 198, 201, 198, 22019, 14038, 796, 17635, 201, 198, 220, 220, 220, 2...
2.775362
138
r, c, m = map(int, input().split()) n = int(input()) op = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(n)] board = [[0 for _ in range(c)] for _ in range(r)] for ra, rb, ca, cb in op: for j in range(ra, rb + 1): for k in range(ca, cb + 1): board[j][k] += 1 cnt = 0 for i in ra...
[ 81, 11, 269, 11, 285, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 77, 796, 493, 7, 15414, 28955, 198, 404, 796, 685, 4868, 7, 8899, 7, 50033, 2124, 25, 493, 7, 87, 8, 532, 352, 11, 5128, 22446, 35312, 3419, 4008, 329,...
1.778607
402
# Copyright (C) 2018 Alexandre Morlet, Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of yambopy # from __future__ import print_function from builtins import range from yambopy import * from qepy import * import json import matplotlib.pyplot as plt import numpy as np import sys import arg...
[ 2, 15069, 357, 34, 8, 2864, 21000, 260, 3461, 1616, 11, 6752, 33865, 17229, 8704, 40253, 4763, 29575, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 331, 4131, 11081, 198, 2, 198, 6738, 11593, 37443, 834, ...
2.44994
2,507
from module import XMPPModule import halutils import pyfatafl # Commented to avoid loading before its ready
[ 6738, 8265, 1330, 1395, 7378, 47, 26796, 198, 11748, 10284, 26791, 198, 11748, 12972, 69, 1045, 2704, 198, 197, 197, 628, 198, 2, 955, 12061, 284, 3368, 11046, 878, 663, 3492, 198 ]
3.53125
32
from typing import cast, Optional from datetime import datetime, tzinfo, timedelta from zonedbpy import zone_infos from zone_processor.zone_specifier import ZoneSpecifier from zone_processor.inline_zone_info import ZoneInfo __version__ = '1.1'
[ 6738, 19720, 1330, 3350, 11, 32233, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 256, 89, 10951, 11, 28805, 12514, 198, 6738, 1976, 12004, 65, 9078, 1330, 6516, 62, 10745, 418, 198, 6738, 6516, 62, 41341, 13, 11340, 62, 16684, 7483, 1...
3.430556
72
from part1 import ( gamma_board, gamma_busy_fields, gamma_delete, gamma_free_fields, gamma_golden_move, gamma_golden_possible, gamma_move, gamma_new, ) """ scenario: test_random_actions uuid: 554539540 """ """ random actions, total chaos """ board = gamma_new(6, 8, 3, 17) assert board i...
[ 6738, 636, 16, 1330, 357, 198, 220, 220, 220, 34236, 62, 3526, 11, 198, 220, 220, 220, 34236, 62, 10885, 88, 62, 25747, 11, 198, 220, 220, 220, 34236, 62, 33678, 11, 198, 220, 220, 220, 34236, 62, 5787, 62, 25747, 11, 198, 220, ...
2.343707
3,631
# coding=utf-8 # Copyright 2019 The HuggingFace Inc. team. # Copyright (c) 2019 The HuggingFace Inc. 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.a...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 13130, 383, 12905, 2667, 32388, 3457, 13, 1074, 13, 198, 2, 15069, 357, 66, 8, 13130, 383, 12905, 2667, 32388, 3457, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 2484...
2.348189
3,949
from django.contrib.gis.gdal import DataSource from django.contrib.gis.utils import LayerMapping from django.core.management.base import BaseCommand from envergo.geodata.models import Zone
[ 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 21287, 282, 1330, 6060, 7416, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 26791, 1330, 34398, 44, 5912, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7...
3.237288
59
from test.vim_test_case import VimTestCase as _VimTest from test.constant import * # Anonymous Expansion {{{# # End: Anonymous Expansion #}}}
[ 6738, 1332, 13, 31124, 62, 9288, 62, 7442, 1330, 36645, 14402, 20448, 355, 4808, 53, 320, 14402, 198, 6738, 1332, 13, 9979, 415, 1330, 1635, 198, 198, 2, 19200, 25042, 220, 22935, 90, 2, 628, 628, 628, 628, 628, 198, 2, 5268, 25, ...
3.163265
49
import discord from jshbot import utilities, data, configurations, plugins, logger from jshbot.exceptions import BotException, ConfiguredBotException from jshbot.commands import ( Command, SubCommand, Shortcut, ArgTypes, Attachment, Arg, Opt, MessageTypes, Response) __version__ = '0.1.0' CBException = ConfiguredB...
[ 11748, 36446, 198, 198, 6738, 474, 1477, 13645, 1330, 20081, 11, 1366, 11, 25412, 11, 20652, 11, 49706, 198, 6738, 474, 1477, 13645, 13, 1069, 11755, 1330, 18579, 16922, 11, 17056, 1522, 20630, 16922, 198, 6738, 474, 1477, 13645, 13, 95...
3.413462
104
from tkinter import * from PIL import Image, ImageTk #python image library #imagetk supports jpg image a1 = Tk() a1.geometry("455x244") #for png image #photo = PhotoImage(file="filename.png") #a2 = Label(image = photo) #a2.pack() image = Image.open("PJXlVd.jpg") photo = ImageTk.PhotoImage(image) ...
[ 6738, 256, 74, 3849, 1330, 1635, 201, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 51, 74, 201, 198, 2, 29412, 2939, 5888, 201, 198, 2, 48466, 316, 74, 6971, 474, 6024, 2939, 201, 198, 201, 198, 64, 16, 796, 309, 74, 3419, 201, 1...
2.280488
164
import os import torch from PIL import Image from read_csv import csv_to_label_and_bbx import numpy as np from torch.utils.data import Subset, random_split, ConcatDataset def split_index(K=5, len=100): idx = list(range(len)) final_list = [] for i in range(K): final_list.append(idx[(i*len)//K:...
[ 11748, 28686, 198, 11748, 28034, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 1100, 62, 40664, 1330, 269, 21370, 62, 1462, 62, 18242, 62, 392, 62, 11848, 87, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 13, 26791, 13, 7890, 1...
2.067686
916
# coding: utf-8 import functools if __name__ == '__main__': from timeit import Timer measure = [{'exec': 'fibonacci(100)', 'import': 'fibonacci', 'func': fibonacci}, {'exec': 'nsum(200)', 'import': 'nsum', 'func': nsum}] for m in measure: t =...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 1257, 310, 10141, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 422, 640, 270, 1330, 5045, 263, 198, 220, 220, 220, 3953, 796, 685, 90...
1.901316
304
from .transforms import *
[ 198, 6738, 764, 7645, 23914, 1330, 1635, 198 ]
3.375
8
# !\usr\bin\python import numpy as np from mpl_toolkits import mplot3d import matplotlib.pyplot as plt import scipy.optimize from matplotlib import animation from scipy.integrate import ode import pdb # Material parameters rho = 7800. E = 2.e11 nu = 0.3 mu = 0.5*E/(1.+nu) kappa = E/(3.*(1.-2.*nu)) lamb = kappa-2.*mu/3...
[ 2, 5145, 59, 14629, 59, 8800, 59, 29412, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 285, 489, 62, 25981, 74, 896, 1330, 285, 29487, 18, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 629, 541, 88, ...
1.756866
4,442
# _*_ coding: utf-8 _*_ #@Time : 2020/7/29 09:49 #@Author : cherish_peng #@Email : 1058386071@qq.com #@File : connectionstate.py #@Software : PyCharm from enum import Enum
[ 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 2, 31, 7575, 220, 220, 220, 220, 220, 1058, 12131, 14, 22, 14, 1959, 220, 7769, 25, 2920, 198, 2, 31, 13838, 220, 220, 220, 1058, 48303, 62, 79, 1516, 198, 2, 31...
2.087912
91
# -*- coding: utf-8 -*- import time from datetime import datetime import warnings from textwrap import dedent, fill import numpy as np import pandas as pd from numpy.linalg import norm, inv from scipy.linalg import solve as spsolve, LinAlgError from scipy.integrate import trapz from scipy import stats from lifelines....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 14601, 198, 6738, 2420, 37150, 1330, 4648, 298, 11, 6070, 198, 11748, 299, 32152, 355, 45941, 198, 11748, ...
2.170056
18,688
""" Test configuration loading @author aevans """ import os from nlp_server.config import load_config def test_load_config(): """ Test loading a configuration """ current_dir = os.path.curdir test_path = os.path.sep.join([current_dir, 'data', 'test_config.json']) cfg = load_config.load_conf...
[ 37811, 198, 14402, 8398, 11046, 198, 198, 31, 9800, 257, 1990, 504, 198, 37811, 198, 198, 11748, 28686, 198, 198, 6738, 299, 34431, 62, 15388, 13, 11250, 1330, 3440, 62, 11250, 628, 198, 4299, 1332, 62, 2220, 62, 11250, 33529, 198, 22...
2.655405
148
import os, json, inspect import mimetypes from html2text import html2text from RestrictedPython import compile_restricted, safe_globals import RestrictedPython.Guards import frappe import frappe.utils import frappe.utils.data from frappe.website.utils import (get_shade, get_toc, get_next_link) from frappe.modules impo...
[ 198, 11748, 28686, 11, 33918, 11, 10104, 198, 11748, 17007, 2963, 12272, 198, 6738, 27711, 17, 5239, 1330, 27711, 17, 5239, 198, 6738, 8324, 20941, 37906, 1330, 17632, 62, 49343, 11, 3338, 62, 4743, 672, 874, 198, 11748, 8324, 20941, 37...
3.411765
119