content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# [rights] Copyright 2020 brianddk at github https://github.com/brianddk # [license] Apache 2.0 License https://www.apache.org/licenses/LICENSE-2.0 # [repo] https://github.com/brianddk/bible-bip # [btc] BTC-b32: bc1qwc2203uym96u0nmq04pcgqfs9ldqz9l3mz8fpj # [tipjar] github.c...
[ 2, 685, 28046, 60, 220, 15069, 12131, 31013, 392, 34388, 379, 33084, 3740, 1378, 12567, 13, 785, 14, 65, 380, 392, 34388, 220, 198, 2, 685, 43085, 60, 24843, 362, 13, 15, 13789, 3740, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, ...
2.060484
992
from django.db import models from django.template.defaultfilters import slugify from imagekit.models import ProcessedImageField from imagekit.processors import ResizeToFill from taggit.managers import TaggableManager from profiles.admin import SurmandlUser class PostManager(models.Manager): """ Simple model ...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 31065, 1958, 198, 198, 6738, 2939, 15813, 13, 27530, 1330, 10854, 276, 5159, 15878, 198, 6738, 2939, 15813, 13, 14681, 669, 1330, ...
3.206731
624
# coding: utf-8 import InputOutput as io import Ontology as onto import Context as ctx import CustomAssistanceLevel as cal ######################################################################## class BaseDecisionKernel: """ Base class of decision kernel. """ #####################################...
[ 2, 19617, 25, 3384, 69, 12, 23, 628, 198, 11748, 23412, 26410, 355, 33245, 198, 11748, 9463, 1435, 355, 4291, 198, 11748, 30532, 355, 269, 17602, 198, 11748, 8562, 8021, 9311, 4971, 355, 2386, 628, 198, 29113, 29113, 7804, 198, 4871, ...
2.957086
1,002
# FastAI's XResnet modified to use Mish activation function, MXResNet # https://github.com/fastai/fastai/blob/master/fastai/vision/models/xresnet.py # modified by lessw2020 - github: https://github.com/lessw2020/mish import math import sys from collections import defaultdict from functools import partial from typing...
[ 2, 12549, 20185, 338, 1395, 4965, 3262, 9518, 284, 779, 39523, 14916, 2163, 11, 26135, 4965, 7934, 198, 2, 3740, 1378, 12567, 13, 785, 14, 7217, 1872, 14, 7217, 1872, 14, 2436, 672, 14, 9866, 14, 7217, 1872, 14, 10178, 14, 27530, 14...
2.065175
2,056
import requests import shutil import os from bs4 import BeautifulSoup RESOURCES_DIR = 'files' URL = 'https://www.italianpod101.com/italian-word-lists' FILE_PREFIX = 'Italian_Core' CARDS_FILE = 'cards.txt' cards = [] index = 1 for p in range(1, 6): page = requests.get('{}/?page={}'.format(URL, p)) soup = Beau...
[ 11748, 7007, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 19535, 2606, 7397, 1546, 62, 34720, 796, 705, 16624, 6, 198, 21886, 796, 705, 5450, 1378, 2503, 13, 1287, 666, 33320, 878...
2.313043
690
#ensure that print and division functions work correctly under python 2.X from __future__ import print_function, division #import numpy, scipy, math and astropy libraries import numpy as np import scipy as sp import math import astropy #import various astropy functionalities #is there a benefit/difference between th...
[ 2, 641, 495, 326, 3601, 290, 7297, 5499, 670, 9380, 739, 21015, 362, 13, 55, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 220, 198, 198, 2, 11748, 299, 32152, 11, 629, 541, 88, 11, 10688, 290, 6468, 28338, 12782, ...
3.158351
461
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ File-resident datatype tests. Tests "co...
[ 2, 770, 2393, 318, 636, 286, 289, 20, 9078, 11, 257, 11361, 7071, 284, 262, 5572, 37, 20, 5888, 13, 198, 2, 198, 2, 2638, 1378, 2503, 13, 71, 20, 9078, 13, 2398, 198, 2, 198, 2, 15069, 3648, 12, 6390, 6858, 1623, 21348, 290, 2...
2.549528
424
from typing import Callable import time import os import pytest import ChemputerAPI from chempiler import Chempiler from ...utils import generic_chempiler_test from xdl import XDL from xdl.steps.base_steps import AbstractAsyncStep from xdl.steps.special_steps import Async from chemputerxdl.steps import Wait HERE = o...
[ 6738, 19720, 1330, 4889, 540, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 12870, 10549, 17614, 198, 6738, 1125, 3149, 5329, 1330, 2580, 3149, 5329, 198, 198, 6738, 2644, 26791, 1330, 14276, 62, 2395, 3149, 532...
2.759494
474
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.modjk_worker as modjk_worker from tests.support.mock import MagicMock, patch @pytest.fixture def test_stop(): """ Test to stop the named worker from the lbn load balancers at the targeted minions. """ ...
[ 37811, 198, 220, 220, 220, 1058, 8189, 9800, 25, 9180, 5069, 509, 2743, 3972, 1279, 33708, 5069, 74, 31, 82, 2501, 25558, 13, 785, 29, 198, 37811, 198, 198, 11748, 12972, 9288, 198, 11748, 8268, 13, 27219, 13, 4666, 73, 74, 62, 2881...
2.641975
729
núm = [[], []] valor = 0 for cont in range(1, 8): valor = int(input(f'Digite o {cont}ª Valor: ')) if valor % 2 == 0: núm[0].append(valor) else: núm[1].append(valor) print('-='* 30) núm[0].sort() núm[1].sort() print(f'Os valores pares foram {núm[0]}') print(f'Os valores ímpares foram {núm[1]}...
[ 77, 21356, 76, 796, 16410, 4357, 685, 11907, 198, 2100, 273, 796, 657, 198, 1640, 542, 287, 2837, 7, 16, 11, 807, 2599, 198, 220, 220, 220, 1188, 273, 796, 493, 7, 15414, 7, 69, 6, 19511, 578, 267, 1391, 3642, 92, 126, 103, 3254...
1.859551
178
import torch import albumentations as A from albumentations.pytorch import ToTensorV2 from tqdm import tqdm import torch.nn as nn import torch.optim as optim from model import UNET from utils import ( load_checkpoint, save_checkpoint, get_loaders, check_accuracy, save_predictions_as_imgs...
[ 11748, 28034, 201, 198, 11748, 435, 65, 1713, 602, 355, 317, 201, 198, 6738, 435, 65, 1713, 602, 13, 9078, 13165, 354, 1330, 1675, 51, 22854, 53, 17, 201, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 201, 198, 11748, 28034, 13, ...
2.340361
332
from nltk import download import unittest download('stopwords') from nltk import word_tokenize from nltk.corpus import stopwords stop_words = stopwords.words('english') print(stop_words) sentence = "I am learning Python. It is one of the most popular programming languages" sentence_words = word_tokenize(sentence) pri...
[ 6738, 299, 2528, 74, 1330, 4321, 198, 11748, 555, 715, 395, 198, 198, 15002, 10786, 11338, 10879, 11537, 198, 6738, 299, 2528, 74, 1330, 1573, 62, 30001, 1096, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 198,...
2.945055
182
from __future__ import division from functools import partial import shutil import time import logging import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torch.utils.data from torch.utils.data.dataset import Dataset import torchvision.transforms ...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 11748, 4423, 346, 198, 11748, 640, 198, 11748, 18931, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20...
3.540179
224
# !/usr/bin/env python # -*- coding: utf-8 -*- """ test_django-user-verification ------------ Tests for verification `views`. """ import random # Third Party Stuff from django.core.urlresolvers import reverse from rest_framework.test import APITestCase, APIClient from nose.tools import eq_, ok_ # Local Stuff
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 220, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 9288, 62, 28241, 14208, 12, 7220, 12, 332, 2649, 198, 10541, 198, 198, 51, 3558, 329, 19637,...
2.981132
106
#!/usr/bin/python
[ 2, 48443, 14629, 14, 8800, 14, 29412 ]
2.428571
7
""" This is a package that contains attacks to AMQP protocol. Currently, it supports the following attacks 1) Denial of Service Attack 2) Fuzzing Attack """
[ 37811, 198, 220, 220, 220, 770, 318, 257, 5301, 326, 4909, 3434, 284, 3001, 48, 47, 8435, 13, 198, 220, 220, 220, 16888, 11, 340, 6971, 262, 1708, 3434, 628, 220, 220, 220, 220, 220, 220, 220, 352, 8, 5601, 498, 286, 4809, 8307, ...
3.016667
60
import collections from contextlib import AbstractContextManager, contextmanager from datetime import datetime from functools import partial, wraps import inspect import numbers import os from pathlib import Path import pipes import shlex import shutil import subprocess import sys import time import traceback from pot...
[ 11748, 17268, 198, 6738, 4732, 8019, 1330, 27741, 21947, 13511, 11, 4732, 37153, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 1257, 310, 10141, 1330, 13027, 11, 27521, 198, 11748, 10104, 198, 11748, 3146, 198, 11748, 28686, 198, 67...
2.106817
2,743
#!/usr/bin/python import time, os, errno, argparse, sys, random, string from selenium import webdriver from selenium.common.exceptions import NoSuchElementException, ElementNotVisibleException from selenium.webdriver.common.by import By from datetime import datetime from pyvirtualdisplay import Display if __name__ ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 640, 11, 28686, 11, 11454, 3919, 11, 1822, 29572, 11, 25064, 11, 4738, 11, 4731, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 11321, 13, 1069, ...
2.79
200
# Copyright (c) 2019 Platform9 Systems Inc. # # 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 ...
[ 2, 15069, 357, 66, 8, 13130, 19193, 24, 11998, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789...
3.862637
182
import urx import time rob = urx.Robot("10.20.0.194") fx = rob.get_tcp_force() rob.set_tcp((0, 0, 0.1, 0, 0, 0)) rob.set_payload(2, (0, 0, 0.1)) time.sleep(0.2) #leave some time to robot to process the setup commands # rob.movej((1, 2, 3, 4, 5, 6), a, v) # rob.movel((x, y, z, rx, ry, rz), a, v) # print("Current tool...
[ 198, 11748, 2956, 87, 198, 11748, 640, 198, 198, 22609, 796, 2956, 87, 13, 14350, 313, 7203, 940, 13, 1238, 13, 15, 13, 22913, 4943, 198, 21373, 796, 3857, 13, 1136, 62, 83, 13155, 62, 3174, 3419, 198, 22609, 13, 2617, 62, 83, 131...
2.238994
477
from typing import Any, cast, Union from gitlab.base import RESTManager, RESTObject from gitlab.mixins import DeleteMixin, ObjectDeleteMixin, RetrieveMixin, SetMixin __all__ = [ "GroupCustomAttribute", "GroupCustomAttributeManager", "ProjectCustomAttribute", "ProjectCustomAttributeManager", "UserC...
[ 6738, 19720, 1330, 4377, 11, 3350, 11, 4479, 198, 198, 6738, 17606, 23912, 13, 8692, 1330, 30617, 13511, 11, 30617, 10267, 198, 6738, 17606, 23912, 13, 19816, 1040, 1330, 23520, 35608, 259, 11, 9515, 38727, 35608, 259, 11, 4990, 30227, ...
3.267241
116
# Jacob Hardman # Intro To Programming # Professor Marcus Longwell # 2/20/19 # Python Version 3.7.2 # For this program I decided to use regular expressions in order to check for a valid email address. # I felt that this was far more effective and efficient than building up a string and parsing through it as we learned...
[ 2, 12806, 6912, 805, 198, 2, 37219, 1675, 30297, 198, 2, 8129, 17068, 5882, 4053, 198, 2, 362, 14, 1238, 14, 1129, 198, 2, 11361, 10628, 513, 13, 22, 13, 17, 198, 198, 2, 1114, 428, 1430, 314, 3066, 284, 779, 3218, 14700, 287, 1...
4.280778
463
# -*- coding: utf-8 -*- """ Created on Tue Jun 22 23:31:51 2021 Poker Squares - Aleatory Player @author: cleiton """ import numpy as np from scipy.stats import mode import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 8}) # Baralho # (value, suit) deck = np.empty(52,dtype=object) deck1 = [(v,s) ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 7653, 2534, 2242, 25, 3132, 25, 4349, 33448, 198, 47, 11020, 5056, 3565, 532, 9300, 2870, 7853, 198, 31, 9800, 25, 1190, 37752, 198, 37811...
2.157118
1,152
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-08-13 04:10 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, 1157, 13, 20, 319, 2864, 12, 2919, 12, 1485, 8702, 25, 940, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
# -*- coding: utf-8 -*- __all__ = ["splice_ast"] from ast import Expr, Name, If, Num, ImportFrom, Pass, copy_location try: from macropy.core.walkers import Walker except ImportError: Walker = None def splice_ast(body, template, tag): """In an AST transformer, splice module body into template. Impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 439, 834, 796, 14631, 22018, 501, 62, 459, 8973, 198, 198, 6738, 6468, 1330, 1475, 1050, 11, 6530, 11, 1002, 11, 31835, 11, 17267, 4863, 11, 6251, 11, 4866, ...
3.069002
942
############################################################################# # # VFRAME # MIT License # Copyright (c) 2020 Adam Harvey and VFRAME # https://vframe.io # ############################################################################# import click @click.command('') @click.option('-i', '--input', 'opt_...
[ 29113, 29113, 7804, 4242, 2, 220, 198, 2, 198, 2, 569, 10913, 10067, 198, 2, 17168, 13789, 198, 2, 15069, 357, 66, 8, 12131, 7244, 14943, 290, 569, 10913, 10067, 198, 2, 3740, 1378, 85, 14535, 13, 952, 220, 198, 2, 198, 29113, 291...
3.113429
767
from django.http import HttpRequest, Http404, HttpResponse, HttpResponseRedirect from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import get_object_or_404, render from django.contrib.auth.models import User from directory.forms import NavbarSearchForm from datetime import d...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 18453, 11, 367, 29281, 26429, 11, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 1060, 198, 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 31525, 20900, 11, 33523, 9876, 11, 7873...
3.545455
99
from .ultrasonic import UltrasonicSensor from .camera import CameraSensor
[ 6738, 764, 586, 81, 30189, 1330, 46487, 30189, 47864, 198, 6738, 764, 25695, 1330, 20432, 47864 ]
4.5625
16
import json from graphviz import Digraph with open(".temp_json.json", "r") as f: nodes = json.load(f) graph = Digraph(format="png") graph.node_attr.update({ 'fontname': 'Arial', 'color': '#000000', 'style': 'filled', 'fillcolor': '#eeeeee' }) first = True for nid in nodes: if nid == "9999": ...
[ 11748, 33918, 198, 6738, 4823, 85, 528, 1330, 7367, 1470, 198, 198, 4480, 1280, 7, 1911, 29510, 62, 17752, 13, 17752, 1600, 366, 81, 4943, 355, 277, 25, 198, 220, 220, 220, 13760, 796, 33918, 13, 2220, 7, 69, 8, 198, 198, 34960, 7...
2.040953
1,343
import os import warnings from .DataDictXXX import DataDictFilenameInfo from .DataFrame26 import DataFrame26
[ 198, 11748, 28686, 198, 11748, 14601, 198, 198, 6738, 764, 6601, 35, 713, 43145, 1330, 6060, 35, 713, 35063, 12360, 198, 6738, 764, 6601, 19778, 2075, 1330, 6060, 19778, 2075, 628, 198 ]
3.53125
32
# Copyright 2019 Google Inc. # # 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,...
[ 2, 15069, 13130, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, ...
3.579545
352
from sfa.util.faults import * from sfa.util.method import Method from sfa.util.parameter import Parameter, Mixed from sfa.methods.CreateSliver import CreateSliver class UpdateSliver(CreateSliver): """ Allocate resources to a slice. This operation is expected to start the allocated resources asynchornously...
[ 6738, 264, 13331, 13, 22602, 13, 69, 13185, 1330, 1635, 198, 6738, 264, 13331, 13, 22602, 13, 24396, 1330, 11789, 198, 6738, 264, 13331, 13, 22602, 13, 17143, 2357, 1330, 25139, 2357, 11, 35250, 198, 6738, 264, 13331, 13, 24396, 82, 1...
2.808333
360
from .extra import getUTC from .database import types from time import sleep, gmtime from bs4 import BeautifulSoup from threading import Thread from pyrogram import Client from typing import List, Union from feedparser import parse as getNews
[ 6738, 764, 26086, 1330, 651, 17429, 198, 6738, 764, 48806, 1330, 3858, 198, 6738, 640, 1330, 3993, 11, 308, 76, 2435, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 12972, 39529, 1330, 20...
4.1
60
"""Module to check different multi-line docstring flavors.""" from .expected import Expectation expectation = Expectation() expect = expectation.expect _D212 = 'D212: Multi-line docstring summary should start at the first line' _D213 = 'D213: Multi-line docstring summary should start at the second line' _D300 = 'D3...
[ 37811, 26796, 284, 2198, 1180, 5021, 12, 1370, 2205, 8841, 17361, 526, 15931, 198, 198, 6738, 764, 40319, 1330, 23600, 341, 198, 198, 1069, 806, 341, 796, 23600, 341, 3419, 198, 1069, 806, 796, 17507, 13, 1069, 806, 198, 198, 62, 35, ...
2.491505
824
''' Given a set of intervals, find out if any two intervals overlap. Example: Intervals: [[1,4], [2,5], [7,9]] Output: true Explanation: Intervals [1,4] and [2,5] overlap ''' if __name__ == "__main__": print(doesOverlap([Interval(1, 4), Interval(2, 5), Interval(7, 9)])) print(doesOverlap([Interval(1, 4), Int...
[ 7061, 6, 198, 15056, 257, 900, 286, 20016, 11, 1064, 503, 611, 597, 734, 20016, 21721, 13, 198, 198, 16281, 25, 198, 9492, 12786, 25, 16410, 16, 11, 19, 4357, 685, 17, 11, 20, 4357, 685, 22, 11, 24, 11907, 198, 26410, 25, 2081, ...
2.454545
143
# Given an integer , n and n space-separated integers as input, create # a tuple, t of those n integers. Then compute and print the result of hash(t) . # Note : hash() is one of the functions in the __builtins__ module, # so it need not be imported. if __name__ == '__main__': n = int ( input ( ) ) t =...
[ 2, 11259, 281, 18253, 837, 299, 290, 299, 2272, 12, 25512, 515, 37014, 355, 5128, 11, 2251, 201, 198, 2, 257, 46545, 11, 256, 286, 883, 299, 37014, 13, 3244, 24061, 290, 3601, 262, 1255, 286, 12234, 7, 83, 8, 764, 201, 198, 201, ...
2.801418
141
#!/usr/bin/env python # Copyright 2022 Tiernan8r # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 33160, 15917, 12647, 23, 81, 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, 2...
2.52692
1,393
from .alexa import AlexaResponse
[ 6738, 764, 1000, 27865, 1330, 34630, 31077, 198 ]
4.125
8
import requests with open('pp.txt') as pp: s = pp.read() passwords = s.split('\n') print(passwords[:10]) index = 0 status_code = 0 step = 0 while status_code != 200: password = get_next_password() r = requests.post('http://127.0.0.1:5000/auth', data={'login': 'admin', 'passwo...
[ 11748, 7007, 198, 198, 4480, 1280, 10786, 381, 13, 14116, 11537, 355, 9788, 25, 198, 220, 220, 220, 264, 796, 9788, 13, 961, 3419, 198, 220, 220, 220, 21442, 796, 264, 13, 35312, 10786, 59, 77, 11537, 198, 198, 4798, 7, 6603, 10879,...
2.316062
193
from scipy.misc import derivative import numpy as np from abc import ABC, abstractmethod
[ 6738, 629, 541, 88, 13, 44374, 1330, 27255, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396 ]
3.708333
24
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2018-11-27 10:09:13 # @Author : https://blog.csdn.net/qq_23926575/article/details/80599199 # @Link : http://darklunar.ml # @Version : $Id$ import cv2 import numpy as np import matplotlib.pyplot as plt np.set_printoptions(suppress=True) def glcm(arr, d_x,...
[ 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, 10430, 220, 220, 220, 1058, 2864, 12, 1157, 12, 1983, 838, 25, 2931, 25, 1485, 198, 2, 2488, 13838, 220, 1...
1.586735
1,568
#!/usr/bin/python # -*- coding: utf-8 -*- # __author__ : stray_camel # __date__: 2020/05/25 10:46:51
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11593, 9800, 834, 1058, 28583, 62, 66, 17983, 198, 2, 11593, 4475, 834, 25, 12131, 14, 2713, 14, 1495, 838, 25, 3510, 2...
2.104167
48
import pygame from pygame.locals import * from utils.index import * from components.screen.index import * from constantes.index import * from scene.intro import * from scene.game import * from scene.end import * pygame.init() window = Screen(WINDOW_WIDTH, WINDOW_HEIGHT) done = False clock = pygame.time.Clock() onScen...
[ 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 6738, 3384, 4487, 13, 9630, 1330, 1635, 198, 6738, 6805, 13, 9612, 13, 9630, 1330, 1635, 198, 6738, 6937, 274, 13, 9630, 1330, 1635, 198, 6738, 3715, 13, 600...
2.770349
344
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/12/4 13:18 # @Author : Fred Yang # @File : public.py # @Role : 公共工具 import os import sys import re import time import subprocess import paramiko import concurrent.futures def lock_json(script_name): """文件锁""" pid_file = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 2488, 7575, 220, 220, 220, 1058, 2864, 14, 1065, 14, 19, 1511, 25, 1507, 201, 198, 2, 2488, 13838, 220...
1.67807
1,140
#!/usr/bin/env python3 import sys import time from selenium import webdriver url = "https://sampo.website/app/background/" get_params = sys.argv[1] download_path = sys.argv[2] # Start firefox in headless mode options = webdriver.firefox.options.Options() options.add_argument("--headless") # Configure automatic down...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 198, 6371, 796, 366, 5450, 1378, 82, 696, 78, 13, 732, 12485, 14, 1324, 14, 25249, 30487, ...
3.123016
252
# -*- coding: utf-8 -*- """ Created on Fri Jan 8 15:36:14 2021 @author: Mateo """ import numpy as np import pandas as pd from HARK import _log import os ssa_tables_dir = os.path.dirname(os.path.abspath(__file__)) def get_ssa_life_tables(): """ Reads all the SSA life tables and combines them, adding column...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2365, 220, 807, 1315, 25, 2623, 25, 1415, 33448, 198, 198, 31, 9800, 25, 24787, 78, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, ...
2.429866
2,317
"""Tests of the alchemist package""" import os import pytest import yaml from pytest import raises from ..laboratory import Laboratory # run_full_experiment tests # update_shelves # can_react # do_a_reaction
[ 37811, 51, 3558, 286, 262, 435, 28899, 5301, 37811, 198, 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 11748, 331, 43695, 198, 6738, 12972, 9288, 1330, 12073, 198, 198, 6738, 11485, 75, 4820, 2870, 1330, 18643, 628, 198, 2, 1057, 62,...
2.975
80
#!/usr/bin/env python3 # # Copyright (c) 2016 Roberto Riggio # # 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 applicabl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 32076, 371, 6950, 952, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 7...
2.179632
1,414
from solid import * from solid.utils import * import fixings import util from util import corners, inch_to_mm, pipe if __name__ == '__main__': util.save('feather-mount', board.slot_screw_mount())
[ 6738, 4735, 1330, 1635, 198, 6738, 4735, 13, 26791, 1330, 1635, 198, 198, 11748, 4259, 654, 198, 11748, 7736, 198, 6738, 7736, 1330, 14371, 11, 11111, 62, 1462, 62, 3020, 11, 12656, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 124...
2.901408
71
# coding=utf-8 from modules.dict_table.models import * from modules.employee_management.employee_info.models import Employee IS_VERIFY = ( ('1', u'未确认'), ('2', u'确认'), ) class Increase(models.Model): """增员信息 """ emplyid = models.ForeignKey(Employee, verbose_name=u"员工编号") dept_verify = models.CharField(u"部门确认", ...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 13103, 13, 11600, 62, 11487, 13, 27530, 1330, 1635, 198, 6738, 13103, 13, 7033, 1453, 62, 27604, 13, 7033, 1453, 62, 10951, 13, 27530, 1330, 36824, 198, 198, 1797, 62, 5959, 5064, 56, 796, 357...
2.157895
361
from rwp.sspade import * from rwp.vis import * from rwp.environment import * from rwp.petool import PETOOLPropagationTask logging.basicConfig(level=logging.DEBUG) environment = Troposphere() environment.z_max = 300 environment.ground_material = WetGround() antenna = GaussAntenna(wavelength=0.1, height=30, beam_width=...
[ 6738, 374, 24142, 13, 824, 79, 671, 1330, 1635, 198, 6738, 374, 24142, 13, 4703, 1330, 1635, 198, 6738, 374, 24142, 13, 38986, 1330, 1635, 198, 6738, 374, 24142, 13, 6449, 970, 1330, 32043, 31559, 24331, 363, 341, 25714, 628, 198, 640...
2.237057
734
# Keypirinha launcher (keypirinha.com) import datetime import os import re import json import urllib import getopt import locale import zipfile import shutil import keypirinha as kp import keypirinha_util as kpu class tldr(kp.Plugin): """ tldr pages client A Keypirinha plugin for tldr pages. More i...
[ 2, 7383, 4063, 259, 3099, 24008, 357, 2539, 4063, 259, 3099, 13, 785, 8, 198, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 198, 11748, 651, 8738, 198, 11748, 36693, 198, 11...
1.951355
4,317
import random commands = input(">>>: ") while commands != "clr" + "test" + "calc": if commands == "guess": guess_command_interface()
[ 11748, 4738, 628, 198, 198, 9503, 1746, 796, 5128, 7203, 4211, 31175, 366, 8, 198, 4514, 9729, 14512, 366, 565, 81, 1, 1343, 366, 9288, 1, 1343, 366, 9948, 66, 1298, 198, 220, 220, 220, 611, 9729, 6624, 366, 5162, 408, 1298, 198, ...
2.596491
57
import multiprocessing from typing import Any ForkProcess: Any = multiprocessing.get_context('fork').Process
[ 11748, 18540, 305, 919, 278, 198, 6738, 19720, 1330, 4377, 198, 198, 37, 967, 18709, 25, 4377, 796, 18540, 305, 919, 278, 13, 1136, 62, 22866, 10786, 32523, 27691, 18709, 628 ]
3.580645
31
import pytest @pytest.fixture
[ 11748, 12972, 9288, 628, 198, 198, 31, 9078, 9288, 13, 69, 9602 ]
2.666667
12
""" A number is called balanced, if we take the middle of it and the sums of the left and right parts are equal. For example, the number 1238033 is balanced, because it's left part is 123 and right part is 033. We have : 1 + 2 + 3 = 0 + 3 + 3 = 6. A number with only one digit is always balanced! Implement a functio...
[ 37811, 198, 32, 1271, 318, 1444, 12974, 11, 611, 356, 1011, 262, 3504, 286, 340, 290, 262, 21784, 286, 262, 1364, 290, 826, 3354, 389, 4961, 13, 198, 198, 1890, 1672, 11, 262, 1271, 17031, 1795, 2091, 318, 12974, 11, 780, 340, 338, ...
3.28125
128
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ListSkuInventoriesResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 279, 4798, 198, 11748, 302, 198, 198, 11748, 2237, 628, 198, 6738, 289, 84, 707, 68, 291, 75, 2778, 21282, 74, 7295, 13, 21282, 74, 62, 26209, 1330, 311, 34388, 31077, 628, 198, 487...
1.965952
1,586
import pathlib import subprocess import time import os import sys import logging import threading from service import registry logging.basicConfig(level=10, format="%(asctime)s - [%(levelname)8s] - %(name)s - %(message)s") log = logging.getLogger("run_video_action") def start_all_services(cwd, service_modules): ...
[ 11748, 3108, 8019, 198, 11748, 850, 14681, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 198, 6738, 2139, 1330, 20478, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 940, 11,...
2.46211
673
# Generated by Django 3.1.13 on 2021-12-06 15:26 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 1485, 319, 33448, 12, 1065, 12, 3312, 1315, 25, 2075, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
import tensorflow as tf import numpy as np import scipy.misc import os import random from functools import partial import cv2 as cv from history_buffer import *
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 44374, 198, 11748, 28686, 198, 11748, 4738, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 11748, 269, 85, 17, 355, 269, 85, 198, ...
3.306122
49
import json from datetime import datetime, timedelta import re import csv from _common import create_mobile_library_file # https://gis2.leeds.gov.uk/arcgis/rest/services/Public/Amenities/FeatureServer/3/query?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry={"xmin":-2.0114,"ymin":53.6252,"xmax":...
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 302, 198, 11748, 269, 21370, 198, 6738, 4808, 11321, 1330, 2251, 62, 24896, 62, 32016, 62, 7753, 198, 198, 2, 3740, 1378, 70, 271, 17, 13, 293, 5379,...
2.473384
526
import argparse import logging logger = logging.getLogger(__name__) import os import shutil import torch from tqdm import tqdm from common import load_yaml from utils import criteria from utils import datasets from utils import misc from utils import optimizers from utils import schedulers import models if __name...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 28034, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 1...
3.07619
210
n1 = float(input('Digite sua primeira nota: ')) n2 = float(input('Digite Sua segunda nota: ')) print('Sua média é igual a \033[34m{:.1f}'.format((n1+n2)/2))
[ 77, 16, 796, 12178, 7, 15414, 10786, 19511, 578, 424, 64, 6994, 8704, 407, 64, 25, 705, 4008, 198, 77, 17, 796, 12178, 7, 15414, 10786, 19511, 578, 1778, 64, 384, 70, 46535, 407, 64, 25, 705, 4008, 198, 4798, 10786, 5606, 64, 285,...
2.121622
74
# -*- coding: utf-8 -*- import os import inject from flask import send_from_directory from app.dependencies import Config from app.utils.view.response import page_not_found
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 28686, 198, 198, 11748, 8677, 198, 6738, 42903, 1330, 3758, 62, 6738, 62, 34945, 198, 198, 6738, 598, 13, 45841, 3976, 1330, 17056, 198, 6738, 598, 13, 26791...
3.236364
55
import cv2 import numpy as np img1 = cv2.imread('hello.jpg', 1) cv2.imshow('Image1 ', img1) img2 = np.zeros([250, 500, 3], np.uint8) # Creating a black image img2 = cv2.rectangle(img2, (300, 0), (200, 150), (255, 255, 255), thickness=-1) # Creating a rectangle on the image with dimensions -(300,0) and (20,15...
[ 11748, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 9600, 16, 796, 269, 85, 17, 13, 320, 961, 10786, 31373, 13, 9479, 3256, 352, 8, 201, 198, 33967, 17, 13, 320, 12860, 10786, 5159, 16, 46083, 33705, 1...
2.536424
453
"""Test support functions in cyton module.""" import os import struct import pytest from openbci_interface import cyton, core # pylint: disable=protected-access # pylint: disable=bad-whitespace def test_interpret_16bit_as_int32(): """interpret16bitAsInt32 works same way as official java example http://doc...
[ 37811, 14402, 1104, 5499, 287, 3075, 1122, 8265, 526, 15931, 198, 11748, 28686, 198, 11748, 2878, 198, 198, 11748, 12972, 9288, 198, 6738, 1280, 65, 979, 62, 39994, 1330, 3075, 1122, 11, 4755, 198, 198, 2, 279, 2645, 600, 25, 15560, 2...
2.250905
829
""" This is the place for all the unit tests for the package demand_acep. We can refactor this if this becomes too large. """ # %% Imports import os import sys import numpy as np import pandas as pd import pdb import pytest import copy import importlib import unittest from itertools import groupby from operator impo...
[ 37811, 198, 1212, 318, 262, 1295, 329, 477, 262, 4326, 5254, 329, 262, 5301, 3512, 62, 330, 538, 13, 198, 1135, 460, 1006, 11218, 428, 611, 428, 4329, 1165, 1588, 13, 198, 198, 37811, 198, 2, 43313, 1846, 3742, 198, 198, 11748, 2868...
2.810757
502
import pytest from django.db import transaction, IntegrityError from .models import Profile,House,Owner @pytest.fixture def empty_wallet(): '''Returns a Wallet instance with a zero balance''' return Profile() @pytest.fixture def wallet(): '''Returns a Wallet instance with a balance of 20''' return Pr...
[ 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 11, 39348, 12331, 198, 6738, 764, 27530, 1330, 13118, 11, 18102, 11, 42419, 628, 198, 31, 9078, 9288, 13, 69, 9602, 198, 4299, 6565, 62, 44623, 33529, 198, 220, 220, 2...
2.833333
438
import rclpy from rclpy.node import Node from rclpy.qos import qos_profile_sensor_data import matplotlib.pyplot as plt from sensor_msgs.msg import LaserScan import cv2 from matplotlib.animation import FuncAnimation import numpy as np import matplotlib matplotlib.use('TkAgg') if __name__ == '__main__': mai...
[ 11748, 374, 565, 9078, 198, 6738, 374, 565, 9078, 13, 17440, 1330, 19081, 198, 6738, 374, 565, 9078, 13, 80, 418, 1330, 10662, 418, 62, 13317, 62, 82, 22854, 62, 7890, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 19...
2.658537
123
from ... import veros_method from .. import numerics, utilities @veros_method def isoneutral_friction(vs): """ vertical friction using TEM formalism for eddy driven velocity """ diss = np.zeros((vs.nx + 4, vs.ny + 4, vs.nz), dtype=vs.default_float_type) aloc = np.zeros((vs.nx + 4, vs.ny + 4, vs.nz...
[ 6738, 2644, 1330, 3326, 418, 62, 24396, 198, 6738, 11485, 1330, 5470, 873, 11, 20081, 628, 198, 31, 332, 418, 62, 24396, 198, 4299, 318, 505, 6815, 62, 69, 46214, 7, 14259, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 11723,...
1.745756
2,592
from .internals import MrClient as CMrClient from .internals import MrServer as CMrServer #from .client import Client as MrsvcClient from .client import create_client from .internals import MrProtocol __version__ = '0.2'
[ 6738, 764, 23124, 874, 1330, 1770, 11792, 355, 327, 5246, 11792, 198, 6738, 764, 23124, 874, 1330, 1770, 10697, 355, 327, 5246, 10697, 198, 2, 6738, 764, 16366, 1330, 20985, 355, 9074, 28435, 11792, 198, 6738, 764, 16366, 1330, 2251, 62...
3.539683
63
from periodtype import days,weeks,months
[ 6738, 2278, 4906, 1330, 1528, 11, 732, 2573, 11, 41537, 198 ]
3.727273
11
import MeCab mecab = MeCab.Tagger("-Ochasen") # MeCabオブジェクトを生成 malist = mecab.parse("庭には二羽鶏がいる。") # 形態素解析を行う print(malist)
[ 11748, 2185, 34, 397, 198, 76, 721, 397, 796, 2185, 34, 397, 13, 51, 7928, 7203, 12, 46, 354, 292, 268, 4943, 1303, 2185, 34, 397, 20513, 24001, 21091, 24806, 14099, 13298, 31758, 37955, 22755, 238, 198, 7617, 396, 796, 502, 66, 397...
1.393258
89
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ # ------------------------------------------------------------------------- # this has to be at the beginning f...
[ 37811, 198, 15269, 357, 66, 8, 25767, 669, 284, 262, 4946, 513, 35, 7117, 4935, 13, 198, 1890, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379, 262, 6808, 286, 428, 6082, 13, 198, 198, 4303, 36227, 12, 34156, 12, 3323...
3.45353
2,238
import json from Tests.scripts.configure_tests import get_test_list, get_modified_files, RANDOM_TESTS_NUM with open('Tests/scripts/infrastructure_tests/tests_data/mock_id_set.json', 'r') as mock_id_set_f: MOCK_ID_SET = json.load(mock_id_set_f) with open('Tests/scripts/infrastructure_tests/tests_data/mock_conf.jso...
[ 11748, 33918, 198, 198, 6738, 30307, 13, 46521, 13, 11250, 495, 62, 41989, 1330, 651, 62, 9288, 62, 4868, 11, 651, 62, 41771, 62, 16624, 11, 46920, 2662, 62, 51, 1546, 4694, 62, 41359, 198, 198, 4480, 1280, 10786, 51, 3558, 14, 4652...
2.301266
395
""" Unit test of the defined isotopes module. Package: RoadNarrows elemenpy python package. File: utBolognium.py Link: https://github.com/roadnarrows-robotics/ Copyright: (c) 2019. RoadNarrows LLC http://www.roadnarrows.com All Rights Reserved License: MIT """ import io from copy import copy import r...
[ 37811, 198, 26453, 1332, 286, 262, 5447, 31624, 13920, 8265, 13, 198, 198, 27813, 25, 198, 220, 5567, 45, 6018, 82, 9766, 3653, 9078, 21015, 5301, 13, 198, 198, 8979, 25, 198, 220, 3384, 33, 928, 77, 1505, 13, 9078, 198, 198, 11280,...
2.746811
1,019
# -*- coding: utf-8 -*- from pyoauth2.libs import base from pyoauth2.libs.base import Base
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 279, 8226, 18439, 17, 13, 8019, 82, 1330, 2779, 198, 6738, 279, 8226, 18439, 17, 13, 8019, 82, 13, 8692, 1330, 7308, 628 ]
2.410256
39
# UVA1124 - Celebrity jeopardy - Accepted # goo.gl/P4BPmi # @author: Marcelo Adriano Amancio # 'A wise man gets more use from his enemies than a fool from his friends..' -- Baltasar Gracian from sys import stdin if __name__ == '__main__': line = stdin.readline() while len(line): print(line,end='') line = stdi...
[ 2, 471, 11731, 14686, 19, 532, 46289, 38606, 532, 21699, 276, 198, 2, 467, 78, 13, 4743, 14, 47, 19, 20866, 11632, 198, 2, 2488, 9800, 25, 36547, 78, 21462, 78, 42614, 66, 952, 198, 2, 705, 32, 10787, 582, 3011, 517, 779, 422, 4...
2.798319
119
# # Australian Public Licence B (OZPLB) # # Version 1-0 # # Copyright (c) 2004 National ICT Australia # # All rights reserved. # # Developed by: Embedded Real-time and Operating Systems Group (ERTOS) # National ICT Australia # http://www.ertos.nicta.com.au # # Permission is granted by ...
[ 2, 198, 2, 6638, 5094, 10483, 594, 347, 357, 46, 57, 6489, 33, 8, 198, 2, 220, 198, 2, 10628, 352, 12, 15, 198, 2, 220, 198, 2, 15069, 357, 66, 8, 5472, 2351, 314, 4177, 4505, 198, 2, 220, 198, 2, 1439, 2489, 10395, 13, 220,...
3.257884
1,427
import torch import random import cv2 import numpy as np import os from pathlib import Path
[ 11748, 28034, 220, 198, 11748, 4738, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 628 ]
3.481481
27
# -*- coding: utf-8 -*- """ Created on Tue Apr 27 11:47:54 2021 @author: hatta """ #the clustering algs that didn't work '''DBSCAN''' from sklearn.cluster import DBSCAN #find the optimal epsilon value with nearest neighbors plot from sklearn.neighbors import NearestNeighbors #k(nearest neighbors) = minPts...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 30030, 2758, 2681, 1367, 25, 2857, 25, 4051, 33448, 201, 198, 201, 198, 31, 9800, 25, 289, 25014, 201, 198, 37811, 201, 198, 2, 1169,...
2.552833
653
from sklearn.feature_extraction import DictVectorizer measurements = [ {"City": "Beijing", "Temperature": 36}, {"City": "Shanghai", "Temperature": 38.0}, {"City": "Shenzhen", "Temperature": 35.8}, {"City": "Shenyang", "Temperature": 31.6} ] vec = DictVectorizer() a = vec.fit_transform(measurements).toa...
[ 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 1330, 360, 713, 38469, 7509, 198, 1326, 5015, 902, 796, 685, 198, 220, 220, 220, 19779, 14941, 1298, 366, 3856, 11030, 1600, 366, 42492, 1298, 4570, 5512, 198, 220, 220, 220, 19779, 14941, ...
2.698529
136
from abc import ABC from celery import Task, states from celery.exceptions import Ignore __all__ = [ 'BaseTask' ]
[ 6738, 450, 66, 1330, 9738, 198, 6738, 18725, 1924, 1330, 15941, 11, 2585, 198, 6738, 18725, 1924, 13, 1069, 11755, 1330, 41032, 628, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 14881, 25714, 6, 198, 60, 628 ]
3.025
40
SKILL_SAMPLE_TYPES = ( ("dc", "DC"), ("mod", "Modifier"), )
[ 18831, 8267, 62, 49302, 16437, 62, 9936, 47, 1546, 796, 357, 198, 220, 220, 220, 5855, 17896, 1600, 366, 9697, 12340, 198, 220, 220, 220, 5855, 4666, 1600, 366, 5841, 7483, 12340, 198, 8, 198 ]
1.942857
35
# Import `datasets` from `sklearn` from sklearn import datasets # Load in the `digits` data digits = datasets.load_digits() # Print the `digits` data print(digits) # Print out `digits` print(digits) # Get the keys of the `digits` data print(digits.keys) # Print out the data print(digits.target) # Print out the d...
[ 2, 17267, 4600, 19608, 292, 1039, 63, 422, 4600, 8135, 35720, 63, 198, 6738, 1341, 35720, 1330, 40522, 198, 198, 2, 8778, 287, 262, 4600, 12894, 896, 63, 1366, 198, 12894, 896, 796, 40522, 13, 2220, 62, 12894, 896, 3419, 198, 198, 2...
2.825758
132
import time, os from tkinter import * from gpafunctions import gradepoint # Defining the root widget (window) and giving it a title and a set of dimensions root = Tk() root.title("GPA Calculator") root.geometry("500x500") # Prepping three input fields and the values that correspond letter_grade = StringVar() letter_...
[ 11748, 640, 11, 28686, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 27809, 1878, 46797, 1330, 3915, 538, 1563, 628, 198, 2, 2896, 3191, 262, 6808, 26295, 357, 17497, 8, 290, 3501, 340, 257, 3670, 290, 257, 900, 286, 15225, 198, ...
3.092362
563
# coding: utf-8 """ OnRoute API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 1.1.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 1550, 43401, 7824, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042, 14, 2032, ...
2.200257
3,116
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from ..Model import Model
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 11485, 17633, 1330, 9104, 198 ]
3.5
32
# Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at # the Lawrence Livermore National Laboratory. # LLNL-CODE-743438 # All rights reserved. # This file is part of MGmol. For details, see https://github.com/llnl/mgmol. # Please also read this link https://github.com/llnl/mgmol/LICENSE # # Python...
[ 2, 15069, 357, 66, 8, 2177, 11, 13914, 45036, 3549, 2351, 4765, 11, 11419, 13, 21522, 771, 379, 198, 2, 262, 13914, 45036, 3549, 2351, 18643, 13, 198, 2, 27140, 32572, 12, 34, 16820, 12, 4524, 2682, 2548, 198, 2, 1439, 2489, 10395, ...
2.2912
625
import xlwings as xw import os, sys if __name__ == "__main__": app = xw.App(visible=False, add_book=True) mapBasic = {} mapMarket = {} mapDiff = {} parseBasicExcel(mapBasic) parseMarketExcel(mapMarket) iCount = 0 for key, value in mapBasic.items() : if (mapMarket.get(key) == N...
[ 11748, 2124, 75, 48819, 355, 2124, 86, 198, 11748, 28686, 11, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 598, 796, 2124, 86, 13, 4677, 7, 23504, 28, 25101, 11, 751, 62, 2070, ...
2.184713
314
""" Area Weighted Interpolation """ import numpy as np import geopandas as gpd from ._vectorized_raster_interpolation import _fast_append_profile_in_gdf import warnings from scipy.sparse import dok_matrix, diags, coo_matrix import pandas as pd from tobler.util.util import _check_crs, _nan_check, _inf_check, _check_p...
[ 37811, 198, 30547, 14331, 276, 4225, 16104, 341, 198, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 30324, 392, 292, 355, 27809, 67, 198, 6738, 47540, 31364, 1143, 62, 81, 1603, 62, 3849, 16104, 341, 1330, 4808, 7217,...
2.543673
6,583
from logging import getLogger from typing import Any from django.core.management.base import BaseCommand from django.core.management.base import CommandParser from myscheduler.services.telegram.bot import updater logging = getLogger(__name__)
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 9455, 46677, 198, 198, 6738...
3.57971
69
from dvc.output.gs import OutputGS from tests.unit.output.test_local import TestOutputLOCAL
[ 6738, 288, 28435, 13, 22915, 13, 14542, 1330, 25235, 14313, 198, 6738, 5254, 13, 20850, 13, 22915, 13, 9288, 62, 12001, 1330, 6208, 26410, 29701, 1847, 628 ]
3.444444
27
#!/bin/python3 import sys if __name__ == "__main__": n, m = input().strip().split(' ') n, m = [int(n), int(m)] arr = [] for arr_i in range(n): arr_t = [int(arr_temp) for arr_temp in input().strip().split(' ')] arr.append(arr_t) k = int(input().strip()) sorted_ar...
[ 2, 48443, 8800, 14, 29412, 18, 201, 198, 201, 198, 11748, 25064, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 299, 11, 285, 796, 5128, 22446, 36311, 22446, 35312, 10786, 705, ...
2.076555
209
# Generated by Django 2.2.6 on 2019-11-08 07:50 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 1157, 12, 2919, 8753, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
############################################ # Copyright (C) 2021 FireEye, Inc. # # Author: Chuong Dong # # revil_string_decrypt is an IDAPython script that uses flare-emu (which combines Unicorn and # IDA Pro) to automate string decryption for REvil ransomware samples. # # Dependencies: # https://github.com/fireeye/fl...
[ 29113, 7804, 4242, 198, 2, 15069, 357, 34, 8, 33448, 3764, 24876, 11, 3457, 13, 198, 2, 198, 2, 6434, 25, 25459, 506, 28831, 198, 2, 198, 2, 2710, 346, 62, 8841, 62, 12501, 6012, 318, 281, 4522, 2969, 7535, 4226, 326, 3544, 30239,...
3.397906
191
import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'tp_utils')) import platform if platform.system() == 'Darwin': import matplotlib matplotlib.use('Agg') import argparse import datetime import numpy as np import tensorflow as tf import provider import copy import models.tp8 as MODE...
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 34788, 62, 26791, 6, 4008, 198, 11748, 3859, 198, 361, 3859, ...
2.26487
7,902
###################################################################### # Copyright # John Holland <john@zoner.org> # All rights reserved. # # This software is licensed as described in the file LICENSE.txt, which # you should have received as part of this distribution. # ###############################################...
[ 29113, 29113, 4242, 2235, 198, 2, 15069, 198, 2, 220, 220, 1757, 16070, 1279, 30686, 31, 89, 14491, 13, 2398, 29, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 3788, 318, 11971, 355, 3417, 287, 262, 2393, 38559, 24290, 13, 1...
2.407829
1,405
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Copyright (c) 2013-present SMHI, Swedish Meteorological and Hydrological Institute # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). import os import json from django.http import HttpResponse, HttpResponseRedirect, StreamingHttpRes...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 15069, 357, 66, 8, 2211, 12, 25579, 9447, 25374, 11, 14023, 25582, 2770, 290, 15084, 3225, 307...
2.317955
7,001
from setuptools import find_packages,setup install_requires = open("requirements.txt").readlines() setup( license = "MIT License", long_description=open("README.md", encoding="utf-8").read(), install_requires = install_requires, author = "zhaomeng", author_email = "780027387@qq.com", name='sani...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 40406, 198, 17350, 62, 47911, 796, 1280, 7203, 8897, 18883, 13, 14116, 11074, 961, 6615, 3419, 198, 198, 40406, 7, 198, 220, 220, 220, 5964, 796, 366, 36393, 13789, 1600, 198, 220, 2...
2.720395
304