content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from fastapi import FastAPI, Request, Response from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates from utils import get_page_data, process_initial import uvicorn app = FastAPI() templates = Jinja2Templates(directory="templates") app.mou...
[ 6738, 3049, 15042, 1330, 12549, 17614, 11, 19390, 11, 18261, 198, 6738, 3049, 15042, 13, 16733, 274, 1330, 11532, 31077, 198, 6738, 3049, 15042, 13, 12708, 16624, 1330, 36125, 25876, 198, 6738, 3049, 15042, 13, 11498, 489, 803, 1330, 1729...
3.189542
153
# # Python script using OME API to create a new static group # # _author_ = Raajeev Kalyanaraman <Raajeev.Kalyanaraman@Dell.com> # _version_ = 0.1 # # Copyright (c) 2020 Dell EMC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lic...
[ 2, 198, 2, 11361, 4226, 1262, 440, 11682, 7824, 284, 2251, 257, 649, 9037, 1448, 198, 2, 198, 2, 4808, 9800, 62, 796, 7567, 1228, 1453, 85, 509, 3400, 272, 283, 10546, 1279, 21762, 1228, 1453, 85, 13, 42, 3400, 272, 283, 10546, 31...
2.309463
1,955
from typing import Callable, Optional, Tuple, Union import numpy as np from torch.utils.data import DataLoader, Sampler from torch.utils.data.dataset import Subset, ConcatDataset import torch.utils.data.distributed as data_dist from dataflow.datasets import get_train_dataset, get_val_dataset, TransformedDataset, get...
[ 6738, 19720, 1330, 4889, 540, 11, 32233, 11, 309, 29291, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 11, 3409, 20053, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 196...
3.053097
113
from datetime import datetime, timedelta from typing import Any, Dict, Optional import graphene import jwt from django.conf import settings from django.core.handlers.wsgi import WSGIRequest from ..account.models import User from ..app.models import App from .permissions import ( get_permission_names, get_perm...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 32233, 198, 198, 11748, 42463, 198, 11748, 474, 46569, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 72...
2.570406
838
import os, json, logging, jsonpath_rw_ext, jsonpath_rw from jsonpath_rw import jsonpath, parse from . import events from ast import literal_eval from flask import make_response logger = logging.getLogger(__name__) CONFIG_PATH = '/tests/settings/config.json'
[ 11748, 28686, 11, 33918, 11, 18931, 11, 33918, 6978, 62, 31653, 62, 2302, 11, 33918, 6978, 62, 31653, 198, 6738, 33918, 6978, 62, 31653, 1330, 33918, 6978, 11, 21136, 198, 6738, 764, 1330, 2995, 198, 6738, 6468, 1330, 18875, 62, 18206, ...
3.291139
79
# Generated by Django 2.2.4 on 2019-11-14 16:48 import django.contrib.postgres.fields.jsonb from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 1157, 12, 1415, 1467, 25, 2780, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 13, 17752, 65, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, ...
2.822222
45
from json import JSONEncoder from time import time
[ 6738, 33918, 1330, 19449, 27195, 12342, 198, 6738, 640, 1330, 640, 198 ]
4.25
12
"""Compute pi.""" from decimal import Decimal, getcontext import argparse import itertools if __name__ == '__main__': parser = argparse.ArgumentParser(description='Calculates pi.') parser.add_argument('--precision', type=int, default=100, help='The desired precision of pi (default: 1...
[ 37811, 7293, 1133, 31028, 526, 15931, 198, 6738, 32465, 1330, 4280, 4402, 11, 651, 22866, 198, 11748, 1822, 29572, 198, 11748, 340, 861, 10141, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220,...
2.715152
165
#!/usr/bin/python3 import time from brownie import ( DataTypes, TransparentUpgradeableProxy, ProxyAdmin, config, network, Contract, ) from scripts.helpful_scripts import get_account, encode_function_data
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 640, 198, 6738, 7586, 494, 1330, 357, 198, 220, 220, 220, 6060, 31431, 11, 198, 220, 220, 220, 3602, 8000, 44948, 540, 44148, 11, 198, 220, 220, 220, 38027, 46787, 11, 198, 220, ...
2.8625
80
import torch.nn as nn
[ 11748, 28034, 13, 20471, 355, 299, 77, 198 ]
2.75
8
# written by Jaekwang Cha # version 0.1 # ================== IMPORT CUSTOM LEARNING LIBRARIES ===================== # from customs.train import train, test from customs.dataset import load_dataset from customs.model import load_model # ================== TRAINING SETTINGS ================== # import argparse...
[ 2, 3194, 416, 13790, 988, 47562, 20703, 201, 198, 2, 2196, 657, 13, 16, 201, 198, 201, 198, 2, 36658, 28, 30023, 9863, 327, 7759, 2662, 12509, 1503, 15871, 45651, 49, 1503, 11015, 36658, 1421, 1303, 201, 198, 6738, 17112, 13, 27432, ...
2.358076
1,455
#!/usr/bin/env python3 import logging import sys import subprocess from pathlib import Path from datetime import datetime from Pegasus.api import * logging.basicConfig(level=logging.DEBUG) # --- Work Dir Setup ----------------------------------------------------------- RUN_ID = "024-sc4-gridftp-http-" + datetime.no...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 48188, 13, 15042, 1330, 163...
2.320812
1,970
import torch from ceem.opt_criteria import * from ceem.systems import LorenzAttractor from ceem.dynamics import * from ceem.smoother import * from ceem import utils if __name__ == '__main__': test_smoother()
[ 11748, 28034, 198, 198, 6738, 2906, 368, 13, 8738, 62, 22213, 5142, 1330, 1635, 198, 6738, 2906, 368, 13, 10057, 82, 1330, 15639, 27305, 8086, 40450, 198, 6738, 2906, 368, 13, 67, 4989, 873, 1330, 1635, 198, 6738, 2906, 368, 13, 5796,...
2.905405
74
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 12131, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330, 257, 486...
3.981197
585
# Create your views here. from .models import Mfund import plotly.graph_objects as go from plotly.offline import plot from plotly.tools import make_subplots from django.db.models import Q from django.conf import settings from django.shortcuts import redirect from django.contrib.auth.decorators import login_require...
[ 2, 13610, 534, 5009, 994, 13, 198, 198, 6738, 764, 27530, 1330, 337, 10990, 198, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 6738, 7110, 306, 13, 2364, 1370, 1330, 7110, 198, 6738, 7110, 306, 13, 31391, 1330, 787, 62...
3.173759
282
#coding: utf-8 from gevent import monkey monkey.patch_all() from gevent.pool import Pool import gevent import requests import urllib import os import time import re import ssl if __name__ == '__main__': downloader = Downloader(5) downloader.run('https://www.xiaodianying.com/filets/2069/dp.m3u8', './video',Tru...
[ 2, 66, 7656, 25, 3384, 69, 12, 23, 198, 198, 6738, 4903, 1151, 1330, 21657, 198, 49572, 13, 17147, 62, 439, 3419, 198, 6738, 4903, 1151, 13, 7742, 1330, 19850, 198, 11748, 4903, 1151, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 19...
2.714286
119
# Generated by Django 3.2.9 on 2021-12-06 10:02 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1065, 12, 3312, 838, 25, 2999, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 import os import contextlib from PyQt5 import QtCore, QtWidgets from dsrlib.settings import Settings def getSaveFilename(parent, domain, extension): with Settings().grouped('Paths') as settings: path = QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.DocumentsLocatio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 4732, 8019, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 54, 312, 11407, 198, 198, 6738, 288, 27891, 8019, 13, 33692, 1330, 16163...
2.036449
1,070
#!/usr/bin/env python3 # # Copyright 2017-2020 GridGain Systems. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 2177, 12, 42334, 24846, 38, 391, 11998, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, ...
3.615764
406
import logging import os import re import uuid from pathlib import Path from ludwig.constants import CHECKSUM, META, TEST, TRAINING, VALIDATION from ludwig.data.cache.util import calculate_checksum from ludwig.utils import data_utils from ludwig.utils.fs_utils import delete, path_exists logger = logging.getLogger(__n...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 334, 27112, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 300, 463, 28033, 13, 9979, 1187, 1330, 5870, 25171, 50, 5883, 11, 337, 20892, 11, 43001, 11, 29125, 1268, 2751...
2.908497
153
import pprint from FactorioCalcBase.data.binary import sorted_recipe_list, production_machine_category_list_dict from FactorioCalcBase.recipe import Recipe from FactorioCalcBase.calculator_base import CalculatorBase from FactorioCalcBase.dependency_dict_common_function import dict_add_number import time
[ 11748, 279, 4798, 198, 6738, 27929, 952, 9771, 66, 14881, 13, 7890, 13, 39491, 1330, 23243, 62, 29102, 431, 62, 4868, 11, 3227, 62, 30243, 62, 22872, 62, 4868, 62, 11600, 198, 6738, 27929, 952, 9771, 66, 14881, 13, 29102, 431, 1330, ...
3.551724
87
# Copyright (c) 2006- Facebook # Distributed under the Thrift Software License # # See accompanying file LICENSE or visit the Thrift site at: # http://developers.facebook.com/thrift/
[ 2, 15069, 357, 66, 8, 4793, 12, 3203, 198, 2, 4307, 6169, 739, 262, 16283, 2135, 10442, 13789, 198, 2, 198, 2, 4091, 19249, 2393, 38559, 24290, 393, 3187, 262, 16283, 2135, 2524, 379, 25, 198, 2, 2638, 1378, 16244, 364, 13, 19024, ...
3.66
50
# # Copyright 2018 Picovoice 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 writ...
[ 2, 198, 2, 15069, 2864, 15085, 709, 2942, 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,...
3.743083
253
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 20 22:18:58 2020 @author: https://stackoverflow.com/questions/293431/python-object-deleting-itself @editor: thirschbuechler this is probably overkill to alternatively exit a with-context, rather than by exception, but hey, maybe it will be needed, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 2365, 1160, 2534, 25, 1507, 25, 3365, 12131, 198, 198, 31, 9800, 25, 3740, 1378, 25...
2.868195
349
#!/usr/bin/env python # -*- coding: utf-8 -*- """A module containing an algorithm for hand gesture recognition""" import numpy as np import cv2 from typing import Tuple __author__ = "Michael Beyeler" __license__ = "GNU GPL 3.0 or later" def recognize(img_gray): """Recognizes hand gesture in a single-channel dep...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 32, 8265, 7268, 281, 11862, 329, 1021, 18342, 9465, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11...
2.491686
2,646
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' // Copyright (c) 2015 Intel Corporation // // 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, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 1003, 15069, 357, 66, 8, 1853, 8180, 10501, 198, 1003, 198, 1003, 49962, 739, 262, 24843, 13789, 11, 10...
3.565217
207
import sys import os from . import filesys MAIN_USAGE_MESSAGE = """ usage: xlab command ... Options: positional arguments: command project """
[ 11748, 25064, 198, 11748, 28686, 198, 198, 6738, 764, 1330, 3696, 893, 198, 198, 5673, 1268, 62, 2937, 11879, 62, 44, 1546, 4090, 8264, 796, 37227, 198, 26060, 25, 2124, 23912, 3141, 2644, 198, 198, 29046, 25, 198, 198, 1930, 1859, 71...
2.833333
54
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845...
3.756303
238
from api import app from unittest import TestCase
[ 6738, 40391, 1330, 598, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 628 ]
3.923077
13
# install BeautifulSoup4 before running # # prints out historical data in csv format: # # [date, open, high, low, close, volume] # import re, csv, sys, urllib2 from bs4 import BeautifulSoup # If start date and end date is the same only one value will be returned and # if not the multiple values which can be used to ma...
[ 2, 2721, 23762, 50, 10486, 19, 878, 2491, 198, 2, 198, 2, 20842, 503, 6754, 1366, 287, 269, 21370, 5794, 25, 198, 2, 198, 2, 685, 4475, 11, 1280, 11, 1029, 11, 1877, 11, 1969, 11, 6115, 60, 198, 2, 198, 11748, 302, 11, 269, 21...
3.029586
169
import sys import io from collections import defaultdict import struct from time import sleep import queue import threading import serial from serial import SerialException RUN_LABELS = ('Time left', 'Temp 1', 'Temp 2', 'Off Goal', 'Temp Change', 'Duty cycle (/30)', 'Heating', 'Cycle', 'Total time', 'Goal temp') MSG...
[ 11748, 25064, 198, 11748, 33245, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 2878, 198, 6738, 640, 1330, 3993, 198, 11748, 16834, 198, 11748, 4704, 278, 198, 198, 11748, 11389, 198, 6738, 11389, 1330, 23283, 16922, 198, 198, 49, 4944...
2.756637
226
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test that a node receiving many (potentially out of order) blocks exits initial block download (IBD; this occur...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 2864, 383, 6185, 6505, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766, 262, 19249, 198, 2, 2393, 27975, 45761, 393, 2638, 1378, 2503, 13, 44813, ...
2.516043
374
from django.db import models from djangostagram.users import models as user_model # Create your models here. # This class is used in other models as an inheritance. # An often-used pattern
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 648, 455, 6713, 13, 18417, 1330, 4981, 355, 2836, 62, 19849, 198, 198, 2, 13610, 534, 4981, 994, 13, 198, 198, 2, 770, 1398, 318, 973, 287, 584, 4981, 355, 281, 24155, 13, ...
3.660377
53
from guillotina.contrib.workflows.interfaces import IWorkflowChangedEvent from guillotina.events import ObjectEvent from zope.interface import implementer
[ 6738, 915, 359, 313, 1437, 13, 3642, 822, 13, 1818, 44041, 13, 3849, 32186, 1330, 314, 12468, 11125, 31813, 9237, 198, 6738, 915, 359, 313, 1437, 13, 31534, 1330, 9515, 9237, 198, 6738, 1976, 3008, 13, 39994, 1330, 3494, 263, 628 ]
3.804878
41
""" Suppress COVID EHR vaccine concepts. Original Issues: DC-1692 """ # Python imports import logging # Project imports from cdr_cleaner.cleaning_rules.deid.concept_suppression import AbstractBqLookupTableConceptSuppression from constants.cdr_cleaner import clean_cdr as cdr_consts from common import JINJA_ENV, CDM_T...
[ 37811, 198, 15979, 601, 7375, 11008, 412, 17184, 12319, 10838, 13, 198, 198, 20556, 22852, 25, 6257, 12, 1433, 5892, 198, 37811, 198, 198, 2, 11361, 17944, 198, 11748, 18931, 198, 198, 2, 4935, 17944, 198, 6738, 269, 7109, 62, 27773, ...
2.341705
1,314
import pydbhub from typing import Any, Dict, List, Tuple from json.decoder import JSONDecodeError import requests import io def send_request_json(query_url: str, data: Dict[str, Any]) -> Tuple[List[Any], str]: """ send_request_json sends a request to DBHub.io, formatting the returned result as JSON Param...
[ 11748, 279, 5173, 34369, 549, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 309, 29291, 198, 6738, 33918, 13, 12501, 12342, 1330, 19449, 10707, 1098, 12331, 198, 11748, 7007, 198, 11748, 33245, 628, 198, 4299, 3758, 62, 2592...
2.412983
1,448
import pytest from calcscore import round_score # you'll be picking what teams make it to the next round # - so picking 32, then 16, then 8, 4, 2, 1...i.e. round 1-6 winners # teams will have a name & a seed # seed doesn't change, so maybe make that not passed around w/ results
[ 11748, 12972, 9288, 198, 6738, 42302, 26675, 1330, 2835, 62, 26675, 198, 198, 2, 345, 1183, 307, 10868, 644, 3466, 787, 340, 284, 262, 1306, 2835, 198, 2, 220, 220, 532, 523, 10868, 3933, 11, 788, 1467, 11, 788, 807, 11, 604, 11, ...
3.357143
84
import unittest from operator import attrgetter import obonet from pyobo import SynonymTypeDef, get from pyobo.struct import Reference from pyobo.struct.struct import ( iterate_graph_synonym_typedefs, iterate_graph_typedefs, iterate_node_parents, iterate_node_properties, iterate_node_relationships, iterate_no...
[ 11748, 555, 715, 395, 198, 6738, 10088, 1330, 708, 81, 1136, 353, 198, 198, 11748, 909, 36823, 198, 198, 6738, 12972, 20391, 1330, 16065, 5177, 6030, 7469, 11, 651, 198, 6738, 12972, 20391, 13, 7249, 1330, 20984, 198, 6738, 12972, 20391...
2.934783
138
# -*- coding: utf-8 -*- # + ## Utilidades comunes entre places y OSM. # + import csv import ast import codecs from math import cos, asin, sqrt # + # - import pandas as pd def distance(lat1, lon1, lat2, lon2): """ El resultado de la medicin de distancia esta en kilometros. """ p = 0.017453292519...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1343, 198, 2235, 7273, 346, 312, 2367, 401, 4015, 920, 260, 4113, 331, 7294, 44, 13, 198, 198, 2, 1343, 198, 11748, 269, 21370, 198, 11748, 6468, 198, 11748, 40481,...
2.367893
299
#This script Imports Game Data from ESPN, and Odds from the ODDS-API, and then imports them into a MySQL table, example in workbench here https://puu.sh/HOKCj/ce199eec8e.png import mysql.connector import requests import json import datetime import time #Connection to the MYSQL Server. mydb = mysql.connector....
[ 2, 1212, 4226, 1846, 3742, 3776, 6060, 422, 10409, 11, 290, 20664, 82, 422, 262, 31245, 5258, 12, 17614, 11, 290, 788, 17944, 606, 656, 257, 33476, 3084, 11, 1672, 287, 670, 26968, 994, 3740, 1378, 79, 12303, 13, 1477, 14, 39, 11380...
2.405726
1,432
"""Tests for neurodocker.main""" # Author: Jakub Kaczmarzyk <jakubk@mit.edu> from __future__ import absolute_import, unicode_literals import sys import pytest from neurodocker.neurodocker import create_parser, parse_args, main
[ 37811, 51, 3558, 329, 7669, 45986, 13, 12417, 37811, 198, 2, 6434, 25, 25845, 549, 509, 330, 89, 3876, 46355, 1279, 73, 461, 549, 74, 31, 2781, 13, 15532, 29, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098...
3.064935
77
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The Project U-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC ''' FDCE Primitive: D Flip-Flop with Clock...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 220, 383, 4935, 471, 12, 19591, 46665, 13, 198, 2, 198, 2, 5765, 286, 42...
2.075342
1,314
from typing import Callable import numpy as np from hmc.integrators.states.leapfrog_state import LeapfrogState from hmc.integrators.fields import riemannian from hmc.linalg import solve_psd
[ 6738, 19720, 1330, 4889, 540, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 289, 23209, 13, 18908, 18942, 13, 27219, 13, 293, 499, 49956, 62, 5219, 1330, 33927, 49956, 9012, 198, 6738, 289, 23209, 13, 18908, 18942, 13, 25747,...
3.216667
60
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 220, 220, 8614, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1427, 220, 4808, 11593, ...
2.78882
966
from django.utils.translation import ugettext_lazy as _ USER_TYPE_STAFF = 'STAFF' USER_TYPE_ADMIN = 'ADMIN' USER_TYPE_BARBER = 'BARBER' USER_TYPE_CHOICES = ( (USER_TYPE_STAFF, _('Dev')), (USER_TYPE_ADMIN, _('Admin')), (USER_TYPE_BARBER, _('Barber')), )
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 628, 198, 29904, 62, 25216, 62, 2257, 32, 5777, 796, 705, 2257, 32, 5777, 6, 198, 29904, 62, 25216, 62, 2885, 23678, 796, 705, 2885, 23678, 6...
2.180328
122
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from common.chrome_proxy_shared_page_state import ChromeProxySharedPageState from telemetry.page import page as page_module from telemetry import story
[ 2, 15069, 1584, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 6738,...
3.91358
81
""" in this example we want to create a user credentials database with: user_id & password logger showing connection logs, DB version, errors during fetching & executing """ import sqlite3 from lessons.sqlite_example.log import create as create_logger if "__main__" == __name__: import os log_file = os.pat...
[ 37811, 198, 259, 428, 1672, 356, 765, 284, 2251, 257, 2836, 18031, 6831, 351, 25, 198, 7220, 62, 312, 1222, 9206, 198, 6404, 1362, 4478, 4637, 17259, 11, 20137, 2196, 11, 8563, 1141, 21207, 278, 1222, 23710, 198, 37811, 198, 198, 1174...
2.731201
1,157
from django.urls import re_path from projectx.consumers import UserWebSocketConsumer from .consumers import UserWebSocketConsumer websocket_urlpatterns = [ re_path(r"^ws/$", UserWebSocketConsumer.as_asgi()), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 302, 62, 6978, 198, 198, 6738, 1628, 87, 13, 5936, 31260, 1330, 11787, 13908, 39105, 49106, 198, 198, 6738, 764, 5936, 31260, 1330, 11787, 13908, 39105, 49106, 198, 198, 732, 1443, 5459, 62, 6371,...
2.972603
73
from django.utils.translation import ugettext_lazy as _ from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from .conf import settings if settings.ALDRYN_SEARCH_REGISTER_APPHOOK: apphook_pool.register(AldrynSearchApphook)
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 269, 907, 13, 1324, 62, 8692, 1330, 16477, 4090, 381, 198, 6738, 269, 907, 13, 1324, 25480, 62, 7742, 1330, 598, 25480, 62, 7...
2.842697
89
import pandas as pd from openpyxl import Workbook from openpyxl.chart import BarChart, Reference wb = Workbook() ws = wb.active df = pd.read_csv('population.csv') ws.append(df.columns.tolist()) for row in df.values: ws.append(list(row)) row_length = 1 + len(df.values) values = Reference(ws, min_col=...
[ 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 1280, 9078, 87, 75, 1330, 5521, 2070, 201, 198, 6738, 1280, 9078, 87, 75, 13, 40926, 1330, 2409, 45488, 11, 20984, 201, 198, 201, 198, 39346, 796, 5521, 2070, 3419, 201, 198, 18504, 7...
2.393443
305
from changes.api.serializer import Serializer, register from changes.models.log import LogSource
[ 6738, 2458, 13, 15042, 13, 46911, 7509, 1330, 23283, 7509, 11, 7881, 198, 6738, 2458, 13, 27530, 13, 6404, 1330, 5972, 7416, 628 ]
4.26087
23
# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ 2, 15069, 357, 66, 8, 33448, 12, 1238, 1828, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407...
3.186701
391
from setuptools import setup import io import os import re version_re = re.compile(r'^__version__ = "([^"]*)"$') # Find the version number. with open('rst2ctags.py', 'r') as f: for line in f: line = line.rstrip() m = version_re.match(line) if m: version = m.group(1) ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 302, 628, 198, 9641, 62, 260, 796, 302, 13, 5589, 576, 7, 81, 6, 61, 834, 9641, 834, 796, 366, 26933, 61, 8973, 9, 16725, 3, 11537, 628, 1...
2.360902
665
#!/usr/bin/env python # Copyright (C) 2018 rerobots, 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 34, 8, 2864, 302, 22609, 1747, 11, 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, ...
3.330729
384
"""Realty Info""" import os import requests from dotenv import load_dotenv from fastapi import APIRouter, Depends import sqlalchemy from pydantic import BaseModel, SecretStr from app import config from app.walk_score import * load_dotenv() router = APIRouter() headers = {'x-rapidapi-key': os.getenv('api_key'), ...
[ 37811, 15633, 774, 14151, 37811, 198, 198, 11748, 28686, 198, 11748, 7007, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 2129, 2412, 198, 11748, 44161, 282, 26599, 198, 67...
2.751825
137
from __future__ import print_function import time import weeutil.weeutil import weewx.manager import weewx.xtypes archive_sqlite = {'database_name': '/home/weewx/archive/weepwr.sdb', 'driver': 'weedb.sqlite'} archive_mysql = {'database_name': 'weewx', 'user': 'weewx', 'password': 'weewx', 'driver': 'weedb.mysql'} sq...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 640, 198, 198, 11748, 43671, 22602, 13, 732, 68, 22602, 198, 11748, 356, 413, 87, 13, 37153, 198, 11748, 356, 413, 87, 13, 742, 9497, 198, 198, 17474, 62, 25410, 578, 796, 1...
2.44506
1,083
#!/usr/bin/env pytest-3 from fastapi.testclient import TestClient from fast_lemon_api import app client = TestClient(app) neworder = { "isin": "blablablabla", "limit_price": 0.2, "side": "buy", "quantity": 1, "valid_until": 1996943663, "status": "open" } order_id = None
[ 2, 48443, 14629, 14, 8800, 14, 24330, 12972, 9288, 12, 18, 198, 198, 6738, 3049, 15042, 13, 9288, 16366, 1330, 6208, 11792, 198, 198, 6738, 3049, 62, 293, 2144, 62, 15042, 1330, 598, 198, 198, 16366, 796, 6208, 11792, 7, 1324, 8, 62...
2.313433
134
#!/bin/python2 import collections import re import subprocess import sys PUC = "../pamu2fcfg/pamu2fcfg" resident = ["", "-r"] presence = ["", "-P"] pin = ["", "-N"] verification = ["", "-V"] Credential = collections.namedtuple("Credential", "keyhandle pubkey attributes oldformat") sshformat = 0 # Single crede...
[ 2, 48443, 8800, 14, 29412, 17, 198, 198, 11748, 17268, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 5105, 34, 796, 366, 40720, 79, 321, 84, 17, 69, 37581, 14, 79, 321, 84, 17, 69, 37581, 1, 198, 198, 8154,...
1.936721
2,007
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 1584, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.757764
322
import os import subprocess import json import urllib.request from mule.util import os_util from mule.util import file_util from mule.util import time_util from mule.util import s3_util from mule.util import semver_util import platform def install_node(data_dir, bin_dir, channel, node_package_version='latest'): ""...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 285, 2261, 13, 22602, 1330, 28686, 62, 22602, 198, 6738, 285, 2261, 13, 22602, 1330, 2393, 62, 22602, 198, 6738, 285, 2261, 13, ...
2.397196
856
""" The ``ui.ScrollPanel`` class implements a panel that scrolls its contents. If you want the scroll bars to be always visible, call ``setAlwaysShowScrollBars(True)``. You can also change the current scrolling position programmatically by calling ``setScrollPosition(vPos)`` and ``setScrollHorizontalPosition(hPos)`` ...
[ 37811, 198, 464, 7559, 9019, 13, 29261, 26639, 15506, 1398, 23986, 257, 6103, 326, 32138, 663, 10154, 13, 198, 198, 1532, 345, 765, 262, 10743, 9210, 284, 307, 1464, 7424, 11, 869, 198, 15506, 2617, 30374, 15307, 29261, 33, 945, 7, 17...
4.067416
267
#!/usr/bin/env python3 # May you recognize your weaknesses and share your strengths. # May you share freely, never taking more than you give. # May you find love and love everyone you find. import re import time import whois phone_spellable = re.compile(r'^[filoqrsuwxy]+$') candidate_words = [] with open('/usr/sha...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 1737, 345, 7564, 534, 20256, 290, 2648, 534, 18929, 13, 198, 2, 1737, 345, 2648, 12748, 11, 1239, 2263, 517, 621, 345, 1577, 13, 198, 2, 1737, 345, 1064, 1842, 290, 184...
2.427673
318
''' * @file ElevatorTestCaseList.py * @author Armin Zare Zadeh * @date 30 July 2020 * @version 0.1 * @brief Implements a class to hold all the test cases during the program life cycle. ''' #!/usr/bin/env python3 import sys import ctypes import ElevatorConfig as cfg import ElevatorMsgProtocol as msgProto
[ 7061, 6, 198, 1635, 2488, 7753, 220, 220, 37881, 1352, 14402, 20448, 8053, 13, 9078, 198, 1635, 2488, 9800, 943, 1084, 1168, 533, 1168, 671, 71, 198, 1635, 2488, 4475, 220, 220, 1542, 2901, 12131, 198, 1635, 2488, 9641, 657, 13, 16, ...
2.953704
108
from django.utils.translation import ugettext from django.views.decorators.http import require_POST from django.http import JsonResponse from django.shortcuts import render from django.core.exceptions import ValidationError from django.views.decorators.csrf import csrf_exempt from cart.lib import get_cart from cart.f...
[ 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 4023, 1330, 2421, 62, 32782, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 42625...
3.462264
106
#------ game constants -----# #players WHITE = 0 BLACK = 1 BOTH = 2 #color for onTurnLabel PLAYER_COLOR = ["white", "black"] #figures PAWN = 1 KNIGHT = 2 BISHOP = 3 ROOK = 4 QUEEN = 5 KING = 6 FIGURE_NAME = [ "", "pawn", "knight", "bishop", "rook", "queen", "king" ] #used in move 32bit for prom...
[ 201, 198, 2, 23031, 983, 38491, 37404, 2, 201, 198, 2, 32399, 201, 198, 12418, 12709, 796, 657, 201, 198, 9148, 8120, 796, 352, 201, 198, 33, 26946, 796, 362, 201, 198, 201, 198, 2, 8043, 329, 319, 17278, 33986, 201, 198, 31519, 1...
1.878597
1,112
import gym import gym_pokemon import random if __name__ == "__main__": env = gym.make("Pokemon-v0") total_reward = 0.0 total_steps = 0 obs = env.reset() while True: action = random.randint(-1,8) obs, reward, done, _ = env.step(action) total_reward += reward total_steps += 1 print("Currently %d steps, t...
[ 11748, 11550, 198, 11748, 11550, 62, 79, 12717, 198, 11748, 4738, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 24330, 796, 11550, 13, 15883, 7203, 48034, 12, 85, 15, 4943, 198, 197, 23350, 62, 260, 904,...
2.529032
155
num1 = int(input('Digite o 1 nmero: ')) num2 = int(input('Digite o 2 nmero: ')) if num1 > num2: print('O {} maior que {}'.format(num1, num2)) elif num1 < num2: print('O {} maior que4 {}'.format(num2, num1)) else: print('Os nmeros so iguais')
[ 22510, 16, 796, 493, 7, 15414, 10786, 19511, 578, 267, 352, 299, 647, 78, 25, 705, 4008, 198, 22510, 17, 796, 493, 7, 15414, 10786, 19511, 578, 267, 362, 299, 647, 78, 25, 705, 4008, 198, 361, 997, 16, 1875, 997, 17, 25, 198, 22...
2.206897
116
#!/usr/bin/env python import os from setuptools import setup, find_packages def read(fname): """Open files relative to package.""" return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='ipyfilechooser', version='0.3.1', author='Thomas Bouve (@crahan)', author_email='...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 4299, 1100, 7, 69, 3672, 2599, 198, 220, 220, 220, 37227, 11505, 3696, 3585, 284, 5301, 526, 1593...
2.52356
382
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import appengine_config import datetime import json import logging import os.path import pickle import sys import urllib sys.path.append( os.path.j...
[ 2, 15069, 357, 66, 8, 2813, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 1...
3.069272
563
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest from hypothesis import given import numpy as np from caffe2.proto import caffe2_pb2 from caffe2.python import core, workspace import caffe2.python.hypot...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 555, 715, 39...
3.374194
155
# Copyright (c) 2017 StackHPC Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
[ 2, 15069, 357, 66, 8, 2177, 23881, 39, 5662, 12052, 13, 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,...
3.715026
193
############################################################################### # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. ############################################################################### imp...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 29113, 29...
3.27686
242
""" HTTP MultiServer/MultiClient for the ByteBlower Python API. All examples are guaranteed to work with Python 2.7 and above Copyright 2018, Excentis N.V. """ # Needed for python2 / python3 print function compatibility from __future__ import print_function # import the ByteBlower module import byteblowerll.byteblowe...
[ 37811, 198, 40717, 15237, 10697, 14, 29800, 11792, 329, 262, 30589, 3629, 789, 11361, 7824, 13, 198, 3237, 6096, 389, 11462, 284, 670, 351, 11361, 362, 13, 22, 290, 2029, 198, 198, 15269, 2864, 11, 1475, 1087, 271, 399, 13, 53, 13, ...
2.466667
1,470
#!/usr/bin/env python # Converts a PoD XML file to a GeoJSON file. # # With the --javascript parameter, the generated file is a javascript # file defining a variable 'basePodSpec'. # # Get the PoD XML file from http://dev.24-timmars.nu/PoD/xmlapi_app.php. import xml.etree.ElementTree as etree import argparse import r...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1482, 24040, 257, 7695, 35, 23735, 2393, 284, 257, 32960, 40386, 2393, 13, 198, 2, 198, 2, 2080, 262, 1377, 37495, 11507, 11, 262, 7560, 2393, 318, 257, 44575, 198, 2, 2393, ...
3.053763
186
import os import json import importlib from pluginbase import PluginBase import rastervision as rv from rastervision.protos.plugin_pb2 import PluginConfig as PluginConfigMsg from rastervision.utils.files import download_if_needed def load_conf_list(s): """Loads a list of items from the config. Lists shoul...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 1330, 8019, 198, 198, 6738, 13877, 8692, 1330, 42636, 14881, 198, 198, 11748, 374, 1603, 10178, 355, 374, 85, 198, 6738, 374, 1603, 10178, 13, 11235, 418, 13, 33803, 62, 40842, 17, 1330, 4263...
3.113074
283
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import app from absl import flags import os import os.path as osp import numpy as np import torch import torchvision import torch.nn as nn from torch.autograd import Variable import functools from . ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 2352, 75, 1330, 598, 198, 6738, 2352, 75, 1330, 9701, 198, 11748, 28686, 198, ...
3.57
100
#!/usr/bin/env python # Copyright (c) 2018, DIANA-HEP # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 66, 8, 2864, 11, 14766, 31574, 12, 39, 8905, 198, 2, 1439, 2489, 10395, 13, 198, 2, 220, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 3...
2.437925
2,352
""" Implements a non interactive controller to controt non-interactive visualizers. (i.e. those that are used for converting TPP souce code into another format) """ from tpp.FileParser import FileParser from tpp.controller.TPPController import TPPController
[ 37811, 198, 3546, 1154, 902, 257, 1729, 14333, 10444, 284, 1246, 83, 1729, 12, 3849, 5275, 5874, 11341, 13, 198, 198, 7, 72, 13, 68, 13, 883, 326, 389, 973, 329, 23202, 24322, 24049, 344, 2438, 656, 1194, 5794, 8, 198, 37811, 198, ...
4
65
from bs4 import BeautifulSoup from datetime import date from lxml import html import requests import re import json if __name__ == '__main__': cs = CovidScraper() results = cs.scrape_data() print(results)
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 300, 19875, 1330, 27711, 198, 198, 11748, 7007, 198, 11748, 302, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
2.92
75
#!/usr/bin/python2.7 import os from PIL import Image DATEI_WEB_GROSSE = 700 if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 22, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 35, 6158, 40, 62, 8845, 33, 62, 10761, 2640, 5188, 796, 13037, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, ...
2.285714
49
import discord from discord.ext import commands
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 628, 198 ]
4.545455
11
import pytest from privacy_evaluator.attacks.sample_attack import Sample_Attack """ This test only test if no error is thrown when calling the function, can be removed in the future """
[ 11748, 12972, 9288, 198, 198, 6738, 6782, 62, 18206, 84, 1352, 13, 38458, 13, 39873, 62, 20358, 1330, 27565, 62, 27732, 198, 198, 37811, 198, 1212, 1332, 691, 1332, 611, 645, 4049, 318, 8754, 618, 4585, 262, 2163, 11, 460, 307, 4615, ...
3.916667
48
# 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 # distributed under th...
[ 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, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
2.710112
890
import matplotlib.pyplot as graph subject = ["Probability", "Calculas", "Discrete Mathematics", "Adv Engineering Mathematics", "Linear Algebra", "Cryptography"] weightage = [250,900,850,1200,290,345] seperator = [0.05,0,0,0,0.05,0.05] graph.title("Mathematics Topic Weightage") graph.pie(weightage,labels=subject,au...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 4823, 198, 198, 32796, 796, 14631, 2964, 65, 1799, 1600, 366, 9771, 3129, 292, 1600, 366, 15642, 8374, 39448, 1600, 366, 22856, 14044, 39448, 1600, 220, 198, 1, 14993, 451, 978, 29230, 160...
2.705882
136
from __future__ import annotations import numpy as np import pandas as pd from sklearn import datasets from IMLearn.metrics import mean_square_error from IMLearn.utils import split_train_test from IMLearn.model_selection import cross_validate from IMLearn.learners.regressors import PolynomialFitting, LinearRegression, ...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 1330, 40522, 198, 6738, 314, 5805, 451, 77, 13, 4164, 10466, 1330, 1612, 62, 23415, 62, 18224, 198, ...
2.347529
2,630
import re import copy def parse_media(media, content_version, project_chapters): """ Converts a media object into formats usable in the catalog :param media: the media object :type media: dict :param content_version: the current version of the source content :type content_version: string :p...
[ 11748, 302, 198, 11748, 4866, 198, 198, 4299, 21136, 62, 11431, 7, 11431, 11, 2695, 62, 9641, 11, 1628, 62, 354, 12126, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1482, 24040, 257, 2056, 2134, 656, 17519, 24284, 287, 262, ...
2.21408
3,821
# -*- coding:utf-8 -*- # create_time: 2019/8/5 16:02 # __author__ = 'brad' from . import utils from .tasks.base import WaitingTask, BaseTask
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2251, 62, 2435, 25, 13130, 14, 23, 14, 20, 1467, 25, 2999, 198, 2, 11593, 9800, 834, 796, 705, 1671, 324, 6, 198, 6738, 764, 1330, 3384, 4487, 198, 6738, 764, 83, ...
2.535714
56
from django.db.models.fields.files import (FieldFile, ImageField, ImageFileDescriptor) from django.utils.translation import ugettext as _ from .backends import get_backend_class from .files import VideoFile
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25747, 13, 16624, 1330, 357, 15878, 8979, 11, 7412, 15878, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.442308
104
from flaky import flaky from slm_lab.experiment.control import Trial from slm_lab.experiment.monitor import InfoSpace from slm_lab.lib import util from slm_lab.spec import spec_util import os import pandas as pd import pytest import sys # helper method to run all tests in test_spec
[ 6738, 781, 15492, 1330, 781, 15492, 198, 6738, 1017, 76, 62, 23912, 13, 23100, 3681, 13, 13716, 1330, 21960, 198, 6738, 1017, 76, 62, 23912, 13, 23100, 3681, 13, 41143, 1330, 14151, 14106, 198, 6738, 1017, 76, 62, 23912, 13, 8019, 133...
3.2
95
from model.group import Group
[ 6738, 2746, 13, 8094, 1330, 4912, 628, 628, 628, 198 ]
3.6
10
import io import time import datetime from readme_metrics.Metrics import Metrics from readme_metrics.MetricsApiConfig import MetricsApiConfig from readme_metrics.ResponseInfoWrapper import ResponseInfoWrapper from werkzeug import Request
[ 11748, 33245, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 198, 6738, 1100, 1326, 62, 4164, 10466, 13, 9171, 10466, 1330, 3395, 10466, 198, 6738, 1100, 1326, 62, 4164, 10466, 13, 9171, 10466, 32, 14415, 16934, 1330, 3395, 10466, 32, 14...
3.529412
68
import numpy as np import gym from sklearn.neighbors import NearestNeighbors import matplotlib.pyplot as plt import argparse parser = argparse.ArgumentParser(description='KBRL with KNN') parser.add_argument('--episodes', nargs='?', type=int, default=500) parser.add_argument('--max_timesteps', nargs='?', type=int, defa...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11550, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 3169, 12423, 46445, 32289, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 1822, 29572, 198, 198, 48610, 796, ...
2.796721
610
import elasticsearch from elasticsearch import Elasticsearch from elasticsearch import helpers import time, json, datetime, os
[ 11748, 27468, 12947, 198, 6738, 27468, 12947, 1330, 48567, 12947, 198, 6738, 27468, 12947, 1330, 49385, 198, 198, 11748, 640, 11, 33918, 11, 4818, 8079, 11, 28686, 198 ]
4.571429
28
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 from util import clean_phone_number, clean_outgoing_sms_text from django.test import TestCase
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 257, 72, 40379, 28, 19, 39747, 28, 19, 2123, 1509, 28, 19, 21004, 28, 40477, 12, 23, 198, 198, 6738, 7736, 1330, 3424, 62, 4862, 62, 17618, 11, 3424, 62, 448, 5146, ...
2.59375
64
__author__ = "Joseph Gomes" __copyright__ = "Copyright 2017, Stanford University" __license__ = "MIT" import sys from deepchem.models import KerasModel from deepchem.models.layers import AtomicConvolution from deepchem.models.losses import L2Loss from tensorflow.keras.layers import Input, Layer import numpy as np im...
[ 834, 9800, 834, 796, 366, 29458, 402, 2586, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 2177, 11, 13863, 2059, 1, 198, 834, 43085, 834, 796, 366, 36393, 1, 198, 198, 11748, 25064, 198, 198, 6738, 2769, 15245, 13, 27530, 1330, 17...
2.620155
516
""" Copyright (c) 2020 COTOBA DESIGN, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
[ 37811, 198, 15269, 357, 66, 8, 12131, 327, 26631, 4339, 22196, 16284, 11, 3457, 13, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 3788, 290, 3917, 198, 22897, 341, 3696, ...
3.944785
326
import abc from ...orb_attribute import OrbAttribute # Interface for active skills that create specific orb types (whether board change, orb change, orb spawn, etc)
[ 11748, 450, 66, 198, 6738, 2644, 27688, 62, 42348, 1330, 15839, 33682, 628, 198, 2, 26491, 329, 4075, 4678, 326, 2251, 2176, 15769, 3858, 357, 25356, 3096, 1487, 11, 15769, 1487, 11, 15769, 10922, 11, 3503, 8 ]
4.486486
37
""" Core business logic for `mystery`. This code will run when the package is being built and installed. """ import json import pathlib import random import tempfile import urllib.request import typing import setuptools from setuptools.command.sdist import sdist # Load the configuration file. CONFIG_PATH = pathlib.P...
[ 37811, 198, 14055, 1597, 9156, 329, 4600, 1820, 41991, 44646, 198, 1212, 2438, 481, 1057, 618, 262, 5301, 318, 852, 3170, 290, 6589, 13, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 3108, 8019, 198, 11748, 4738, 198, 11748, 20218, 77...
2.741528
1,977
#!/usr/bin/env python # -*- coding: utf-8 -*- # ======================================= # File Name: ADMM_primal.py # Purpose : implementation for ADMM method # for solving primal problem # ======================================= from utils import get_params import numpy as np import sys def ADMM_primal(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 46111, 50155, 198, 2, 9220, 6530, 25, 5984, 12038, 62, 1050, 4402, 13, 9078, 198, 2, 32039, 220, 1058, 7822, 329, ...
1.940559
858
#!/usr/bin/python import os import sys import pprint import argparse parser = argparse.ArgumentParser(description='Clean up the data for a given parameter') parser.add_argument('--infile', help="Path to the VCF file", default='test.vcf') parser.add_argument('--outfile', help="Path to the new VCF file", default='test....
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 279, 4798, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 32657, 510, 262, 1366, 329, 257...
2.417749
462