content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import io import os import shutil import unittest from datetime import datetime from unittest.mock import patch import boto3 import numpy as np import pandas as pd from matplotlib import pyplot from moto import mock_s3 from gokart.file_processor import _ChunkedLargeFileReader from gokart.redis_lock import RedisParams...
[ 11748, 33245, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 555, 715, 395, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 275, 2069, 18, 198, 11748, 299, 32152, 355...
3.035211
142
obj = Geek("R2J", 20) print("Name: ", obj.geekName) obj.displayAge()
[ 198, 26801, 796, 33639, 7203, 49, 17, 41, 1600, 1160, 8, 198, 198, 4798, 7203, 5376, 25, 220, 33172, 26181, 13, 469, 988, 5376, 8, 198, 198, 26801, 13, 13812, 23396, 3419 ]
2.25
32
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. py:currentmodule:: xrayphasemap.phase .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> Phase with condition(s) to create a phase map. """ ############################################################################### # Copyright 2016 Hendrix D...
[ 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, 198, 492, 12972, 25, 14421, 21412, 3712, 2124, 2433, 5902, 368, 499, 13, 40715, 198, 220, 220, 220, 198, ...
3.839858
281
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.75
8
from logging import getLogger from raptiformica.settings import conf from raptiformica.settings.load import get_config from raptiformica.settings.meshnet import ensure_route_to_new_neighbour, update_cjdns_config from raptiformica.settings.types import get_first_server_type from raptiformica.shell.config import run_res...
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 6738, 38404, 6933, 3970, 13, 33692, 1330, 1013, 198, 6738, 38404, 6933, 3970, 13, 33692, 13, 2220, 1330, 651, 62, 11250, 198, 6738, 38404, 6933, 3970, 13, 33692, 13, 76, 5069, 3262, 1330, ...
2.945974
1,925
# Copyright 2021 zhuzilin # # 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, # distribute, ...
[ 2, 15069, 33448, 1976, 71, 10277, 346, 259, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2, 257, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 198, 2, 366, 25423, 12...
3.715596
327
# encoding: utf-8 # # Copyright 2009-2017 Greg Neagle. # # 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 l...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 3717, 12, 5539, 8547, 3169, 19345, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 24036, 198, 2, 345, 743, 407, 779, 428, ...
2.346817
2,843
''' MIT License Copyright (c) 2021 Caio Alexandre 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...
[ 7061, 6, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 33448, 6488, 952, 21000, 260, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, ...
2.425384
2,151
num=1 num2=12314 num1=123 dev=14515
[ 22510, 28, 16, 198, 22510, 17, 28, 10163, 1415, 198, 22510, 16, 28, 10163, 198, 7959, 28, 18781, 1314, 198 ]
1.8
20
from io import StringIO from pathlib import Path import streamlit as st import time from detect import detect import os import sys import argparse from PIL import Image from image_process import imageGray import pandas as pd import matplotlib.pyplot as plt import numpy as np # def result_read(txt_path,image): # wi...
[ 6738, 33245, 1330, 10903, 9399, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 4269, 18250, 355, 336, 198, 11748, 640, 198, 6738, 4886, 1330, 4886, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 6738, 350, 4146, 1330...
1.798656
3,571
''' A MiddlewareProvider Service Provider ''' from masonite.provider import ServiceProvider from config import middleware class MiddlewareProvider(ServiceProvider): ''' Adds Middleware To The Service Container ''' wsgi = False def register(self): ''' Register Middleware Into The Service Container...
[ 7061, 6, 317, 6046, 1574, 29495, 4809, 32549, 705, 7061, 198, 6738, 285, 888, 578, 13, 15234, 1304, 1330, 4809, 29495, 198, 6738, 4566, 1330, 3504, 1574, 198, 198, 4871, 6046, 1574, 29495, 7, 16177, 29495, 2599, 198, 220, 220, 220, 70...
3.302521
119
from collections import OrderedDict import torch.nn as nn import torch.nn.functional as F
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 628 ]
3.481481
27
from Ling import * from Abbreviation import * from Util import *
[ 6738, 25116, 1330, 1635, 198, 6738, 2275, 4679, 47625, 1330, 1635, 198, 6738, 7273, 346, 1330, 220, 1635, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 628, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, ...
1.738462
65
# # 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 # ...
[ 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, ...
2.39644
1,854
#!/usr/bin/python import sys import socket import argparse parser = argparse.ArgumentParser( prog='find_my_name', prefix_chars='-' ) parser.add_argument('-I','--ipaddress', type=str, help="The IP Address to reverse resolve") parser.add_argument('-v','--verbose', action="store_true", help="Print additional out...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 25064, 198, 11748, 17802, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 220, 220, 220, 1172, 11639, 19796, 62, 1820, 62, 3672, 3256, 198, ...
2.735714
280
number = '1.6.7.b1'
[ 17618, 796, 705, 16, 13, 21, 13, 22, 13, 65, 16, 6 ]
1.583333
12
import csv from StringIO import StringIO from dateutil.parser import parse from collections import OrderedDict
[ 11748, 269, 21370, 198, 6738, 10903, 9399, 1330, 10903, 9399, 198, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 628 ]
4.035714
28
#!/usr/bin/python # -*- coding: latin-1 -*- import py3270 print "Teste extensão pw3270" print py3270.Revision() term = py3270.Terminal("") print "Using pw3270 version " + term.Version() + " revision " + term.Revision() term.Connect("192.168.240.1:51004",10); print term.IsConnected() print term.IsReady() print t...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3042, 259, 12, 16, 532, 9, 12, 198, 198, 11748, 12972, 18, 20233, 198, 198, 4798, 366, 14402, 68, 1070, 641, 28749, 279, 86, 18, 20233, 1, 198, 198, 4798, 1297...
3.292994
157
import ml_collections
[ 11748, 25962, 62, 4033, 26448, 628, 628, 198 ]
3.25
8
#!/usr/bin/env python from .stateless_packet import * from .stateful_packet import * from .cperr_packet import * from .tmsta_packet import * from .tmsvr_packet import * from .tmsct_packet import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 764, 5219, 1203, 62, 8002, 316, 1330, 1635, 198, 6738, 764, 5219, 913, 62, 8002, 316, 1330, 1635, 198, 6738, 764, 66, 525, 81, 62, 8002, 316, 1330, 1635, 198, 6738, 764, ...
2.712329
73
from __future__ import annotations import datetime import itertools from typing import List, Tuple, Optional, Iterator, Union from .util import range_incl Date = Union[str, datetime.date]
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 4818, 8079, 198, 11748, 340, 861, 10141, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 32233, 11, 40806, 1352, 11, 4479, 198, 198, 6738, 764, 22602, 1330, 2837, 62, 259, 565, ...
3.464286
56
""" 7kyu | Fizz Buzz https://www.codewars.com/kata/5300901726d12b80e8000498/python Theor. Grundlagen für FizzBuzz If..Else https://www.w3schools.com/python/python_conditions.asp Loops: https://www.w3schools.com/python/python_for_loops.asp Lists: https://www.w3schools.com/python/python_lists.asp """ print(fizz...
[ 37811, 198, 22, 2584, 84, 930, 376, 6457, 15753, 198, 5450, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 4310, 28694, 29326, 2075, 67, 1065, 65, 1795, 68, 33942, 36260, 14, 29412, 198, 198, 464, 273, 13, 25665, 358, ...
2.324503
151
import os import subprocess import sys from shutil import copy from cluster import wait_for_job from .base import PipelineBase
[ 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 4423, 346, 1330, 4866, 198, 198, 6738, 13946, 1330, 4043, 62, 1640, 62, 21858, 198, 198, 6738, 764, 8692, 1330, 37709, 14881, 628 ]
3.823529
34
#!/usr/bin/env python ############################################################################ # # MODULE: i.fr.import # AUTHOR(S): Ismail Baris # PURPOSE: Import pyroSAR dataset in a directory based on their metadata. # # COPYRIGHT: (C) Ismail Baris and Nils von Norsinski # # This progra...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 29113, 7804, 4242, 198, 2, 198, 2, 33893, 25, 220, 220, 220, 220, 220, 1312, 13, 8310, 13, 11748, 198, 2, 44746, 7, 50, 2599, 220, 220, 1148, 4529, 2409, 271, 198, 2, ...
2.691774
4,036
import numpy as np import scipy import sklearn.cluster import librosa, librosa.display, sys # Generate mfccs from a time series if len(sys.argv) == 1: raise Exception('Specify at least 1 argument') filename = sys.argv[1] print(filename) y, sr = librosa.load(filename) tempo, beats = librosa.beat.beat_track(y=y, ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 198, 11748, 1341, 35720, 13, 565, 5819, 198, 198, 11748, 9195, 4951, 64, 11, 9195, 4951, 64, 13, 13812, 11, 25064, 198, 198, 2, 2980, 378, 285, 69, 535, 82, 422, 257, 640, 2...
1.992569
3,095
# Converts DDDMM.MMMM coordinates to decimal degrees lat = 5106.8623046875 lon = 32.83409881591797 lat = convert(lat) lon = convert(lon) print("Coordinates: (%f,%f)\n" % (lat, lon))
[ 2, 1482, 24040, 360, 16458, 12038, 13, 12038, 12038, 22715, 284, 32465, 7370, 198, 198, 15460, 796, 642, 15801, 13, 4521, 19214, 38472, 2425, 198, 14995, 796, 3933, 13, 5999, 29416, 3459, 19707, 1558, 5607, 198, 198, 15460, 796, 10385, ...
2.520548
73
from ..pipeline import * from ..utils.factory import ModelFactory, PipelineFactory import typer from enum import Enum import typing import yaml from pathlib import Path config_app = typer.Typer(help="Generate the config files") for key, pipeline in PipelineFactory.registry.items(): config_app.command(key, help=pip...
[ 6738, 11485, 79, 541, 4470, 1330, 1635, 198, 6738, 11485, 26791, 13, 69, 9548, 1330, 9104, 22810, 11, 37709, 22810, 198, 11748, 1259, 525, 198, 6738, 33829, 1330, 2039, 388, 198, 11748, 19720, 198, 11748, 331, 43695, 198, 6738, 3108, 80...
3.184615
130
# Moduli - 0x1 - Questo modulo gestisce i socket di sistema # http://docs.python.it/html/lib/module-socket.html import socket # Moduli - 0x2 - Questo modulo gestisce prametri e funzioni specifiche per il sistema # http://docs.python.it/html/lib/module-sys.htm import sys # Moduli - 0x3 - Questo modulo effettua conversio...
[ 2, 3401, 32176, 532, 657, 87, 16, 532, 6785, 78, 953, 43348, 10521, 271, 344, 1312, 17802, 2566, 264, 396, 19687, 198, 2, 2638, 1378, 31628, 13, 29412, 13, 270, 14, 6494, 14, 8019, 14, 21412, 12, 44971, 13, 6494, 198, 11748, 17802, ...
2.837104
442
from formaloo import constants, client, helper from formaloo.tags import Tag
[ 6738, 8766, 2238, 1330, 38491, 11, 5456, 11, 31904, 198, 6738, 8766, 2238, 13, 31499, 1330, 17467, 628 ]
4.333333
18
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from os.path import join as pjoin from torchvision import transforms from torch.utils.tensorboard import SummaryWriter from dataset import DataSet import optuna LR = 0.0006740374815727881 writer = SummaryWrite...
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 28034, 13, 40085, 355, 6436, 201, 198, 6738, 28686, 13, 6978, 1330, 4654, 355, 279, 22179, 201, 19...
2.285968
563
import pytest from ..context import dnsimple from ..request_helper import RequestHelper, request from dnsimple.models import Domain from dnsimple.collections import RecordCollection @pytest.fixture
[ 11748, 12972, 9288, 198, 198, 6738, 11485, 22866, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 288, 5907, 320, 1154, 198, 6738, 11485, 25927, 62, 2978, 525, 220, 1330, 19390, 47429, 11, 2581, 198, 198, 6738, 288, 5907, 320, 1154, 13,...
2.87013
77
#!/usr/bin/env python3 import random import tkinter as tk # 随机生成一个口算题及其正确结果的函数 if __name__ == "__main__": root = tk.Tk() app = MyApp(master=root) app.master.title("口算程序") app.mainloop()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 4738, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 198, 2, 16268, 248, 237, 17312, 118, 37955, 22755, 238, 31660, 10310, 103, 20998, 96, 163, 106, 245, 165, 95, 246,...
1.568
125
from typing import ( Tuple, Type, TYPE_CHECKING, List, ) from hvm.vm.base import BaseVM from hp2p.peer import BasePeerContext from helios.db.base import AsyncBaseDB from helios.db.chain import AsyncChainDB from helios.db.chain_head import AsyncChainHeadDB from helios.db.consensus import AsyncConsensu...
[ 6738, 19720, 1330, 357, 198, 220, 220, 220, 309, 29291, 11, 198, 220, 220, 220, 5994, 11, 198, 220, 220, 220, 41876, 62, 50084, 2751, 11, 198, 220, 220, 220, 7343, 11, 198, 8, 198, 198, 6738, 289, 14761, 13, 14761, 13, 8692, 1330,...
2.834437
151
import streamlit as st import numpy as np import pandas as pd """ # My first app Here's our first attempt at using data to create a table: """ df = pd.DataFrame({ 'first column': [1,2,3,4], 'second column': [10,20,30,40] }) df if st.checkbox('Show Dataframe'): chart_data = pd.DataFrame( np.rando...
[ 11748, 4269, 18250, 355, 336, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 37811, 198, 2, 2011, 717, 598, 198, 4342, 338, 674, 717, 2230, 379, 1262, 1366, 284, 2251, 257, 3084, 25, 198, 37811, ...
2.277193
285
# Copyright 2019 The FastEstimator 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 appl...
[ 2, 15069, 13130, 383, 12549, 22362, 320, 1352, 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, ...
2.616831
1,117
# import orjson from django.conf import settings from django.contrib import messages # from django.contrib.gis.forms import PointField from django.db.models.deletion import ProtectedError from django.shortcuts import render # from django.template.response import TemplateResponse # from django.utils.decorators import m...
[ 2, 1330, 393, 17752, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 2, 422, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 23914, 1330, 6252, 15878, 198, 6738, 42625, 14208...
3.368821
263
import json import logging from io import StringIO import autoflake import black import isort from utils.os_utils import create_results_dir from utils.strings_util import camel_case_to_snake_case, snake_case_to_camel_case from utils.titles import ExportAll, Imports from utils.tools import get_methods_imports from .mo...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 11748, 1960, 1659, 27180, 198, 11748, 2042, 198, 11748, 318, 419, 198, 6738, 3384, 4487, 13, 418, 62, 26791, 1330, 2251, 62, 43420, 62, 15908, 198, 6738, 33...
3.198347
121
from diachronic.conf import GlobalConf from enum import Enum global_conf = GlobalConf()
[ 6738, 2566, 620, 4565, 13, 10414, 1330, 8060, 18546, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 20541, 62, 10414, 796, 8060, 18546, 3419, 628 ]
3.6
25
from .calendar import Calendar
[ 6738, 764, 9948, 9239, 1330, 26506, 198, 220, 220, 220, 220 ]
3.181818
11
#!/usr/bin/env python2 # This file is part of the OpenMV project. # # Copyright (c) 2013-2019 Ibrahim Abdelkader <iabdalkader@openmv.io> # Copyright (c) 2013-2019 Kwabena W. Agyeman <kwagyeman@openmv.io> # # This work is licensed under the MIT license, see the file LICENSE for details. # # This script creates test and ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 770, 2393, 318, 636, 286, 262, 4946, 44, 53, 1628, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 12, 23344, 30917, 38758, 74, 5067, 1279, 72, 397, 67, 971, 5067, 31, 9654, ...
2.201079
1,298
# -*- coding: utf-8 -*- __authors__ = ( 'Mark Hartney', 'Chris Stevens', ) __maintainer__ = 'Chris Stevens' __email__ = 'connect@quandl.com' __url__ = 'http://www.quandl.com/' __license__ = 'MIT' __version__ = '1.5' from .Quandl import ( get, push, search, WrongFormat, MultisetLimit, P...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 41617, 834, 796, 357, 198, 220, 220, 220, 705, 9704, 11345, 1681, 3256, 198, 220, 220, 220, 705, 15645, 20019, 3256, 198, 8, 198, 834, 76, 2913, 10613, 834, ...
2.240385
208
# -*- coding: utf-8 -*- from django.db import models from v1.models.Board import Boards
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 410, 16, 13, 27530, 13, 29828, 1330, 48606, 628 ]
2.676471
34
# %% import os import pandas as pd import numpy as np from sklearn.preprocessing import OneHotEncoder from sklearn.decomposition import PCA base_dir = os.getcwd() # %% train_op_df = pd.read_csv(base_dir + '/dataset/dataset2/trainset/train_op.csv') train_trans_df = pd.read_csv(base_dir + '/dataset/dataset2/trainset/tra...
[ 2, 43313, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1881, 21352, 27195, 12342, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 3...
2.349884
3,021
"""Class about Transaction""" import random from datetime import datetime from models.common import create_hash from models.identity import Identities class Output: """Class Output.""" # pylint: disable=too-few-public-methods def __init__(self, owner, satoshis): """Init.""" self.owner = o...
[ 37811, 9487, 546, 45389, 37811, 198, 11748, 4738, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 4981, 13, 11321, 1330, 2251, 62, 17831, 198, 6738, 4981, 13, 738, 414, 1330, 11440, 871, 628, 198, 4871, 25235, 25, 198, 220, 2...
2.198758
2,254
import bitmex import time import pandas as pd from keys import ID, SECRET, SLACK_TOKEN from slackclient import SlackClient sc = SlackClient(SLACK_TOKEN) client = bitmex.bitmex(test=False, api_key=ID, api_secret=SECRET) dfpair = [] # def eth_cond(data): # if data['volume'][-2] > 4*data['volume'][-3]: # ...
[ 11748, 1643, 76, 1069, 198, 11748, 640, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 8251, 1330, 4522, 11, 10729, 26087, 11, 12419, 8120, 62, 10468, 43959, 198, 6738, 30740, 16366, 1330, 36256, 11792, 198, 198, 1416, 796, 36256, 117...
1.958705
896
import urllib.request import re import time f = open('ip.txt', 'a') for i in range(100): url_ip = 'http://webapi.http.zhimacangku.com/getip?num=20&type=1&pro=&city=0&yys=0&port=1&pack=35845&ts=0&ys=0&cs=0&lb=4&sb=0&pb=4&mr=2&regions=' response = urllib.request.urlopen(url_ip) ip=response.read() ip=ip.de...
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 302, 198, 11748, 640, 198, 69, 796, 1280, 10786, 541, 13, 14116, 3256, 705, 64, 11537, 198, 1640, 1312, 287, 2837, 7, 3064, 2599, 198, 220, 220, 220, 19016, 62, 541, 796, 705, 4023, 1378...
1.934426
244
# # Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS, # BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, RIXEN@TUM.DE. # # Distributed under 3-Clause BSD license. See LICENSE file for more information. # """ Methods to generate reduction bases """ ...
[ 2, 198, 2, 15069, 357, 66, 8, 2864, 44999, 45, 20151, 49677, 9050, 3963, 337, 4944, 20739, 11, 5550, 30709, 10979, 3963, 337, 25994, 1565, 20151, 36924, 8881, 1137, 2751, 11, 5870, 42149, 3963, 3486, 49094, 337, 25994, 1565, 19505, 11, ...
2.303715
12,841
# pylint: disable=duplicate-code #The GOST cryptographic functions. # #Author: Evgeny Drobotun (c) 2020 #License: MIT """ General features of the ghostcrypto package. The module that implements auxiliary functions for the operation of the gostcrypto module. """ # pylint: enable=duplicate-code def check_value(value...
[ 2, 279, 2645, 600, 25, 15560, 28, 646, 489, 5344, 12, 8189, 198, 198, 2, 464, 10351, 2257, 40705, 5499, 13, 198, 2, 198, 2, 13838, 25, 4319, 5235, 88, 21045, 13645, 403, 357, 66, 8, 12131, 198, 2, 34156, 25, 17168, 198, 198, 378...
2.442591
1,559
import I2C_LCD_driver import time mylcd = I2C_LCD_driver.lcd() spell = "test"
[ 11748, 314, 17, 34, 62, 5639, 35, 62, 26230, 198, 11748, 640, 198, 198, 1820, 75, 10210, 796, 314, 17, 34, 62, 5639, 35, 62, 26230, 13, 75, 10210, 3419, 198, 198, 46143, 796, 366, 9288, 1, 198 ]
2.105263
38
import string s = 'The quick brown fox jumped over the lazy dog.' print(s) print(string.capwords(s)) OUTPUT: The quick brown fox jumped over the lazy dog. The Quick Brown Fox Jumped Over The Lazy Dog.
[ 11748, 4731, 198, 82, 796, 705, 464, 2068, 7586, 21831, 11687, 625, 262, 16931, 3290, 2637, 198, 4798, 7, 82, 8, 198, 4798, 7, 8841, 13, 11128, 10879, 7, 82, 4008, 198, 198, 2606, 7250, 3843, 25, 198, 464, 2068, 7586, 21831, 11687, ...
3.258065
62
from .data import WARP DEFAULT_FORMAT = 'text-orig-full' DEFAULT_FORMAT_TYPE = '{}-default' SEP = '-' TYPE_FMT_SEP = '#'
[ 6738, 764, 7890, 1330, 11837, 47, 198, 198, 7206, 38865, 62, 21389, 1404, 796, 705, 5239, 12, 11612, 12, 12853, 6, 198, 7206, 38865, 62, 21389, 1404, 62, 25216, 796, 705, 90, 92, 12, 12286, 6, 198, 5188, 47, 796, 705, 19355, 198, ...
2.236364
55
from lib.filename import parse_filename import unittest
[ 6738, 9195, 13, 34345, 1330, 21136, 62, 34345, 198, 198, 11748, 555, 715, 395, 628 ]
3.866667
15
""" Note: When using this api many of the commands come with an option to skip the initilization of the comms e.g. ... def read_word(self, address, initialize_comms=True): setting initialize_comms=False will skip the comms initialization step and save ~0.2 seconds. However one intialization needs to be done to get thin...
[ 37811, 198, 6425, 25, 1649, 1262, 428, 40391, 867, 286, 262, 9729, 1282, 351, 281, 3038, 284, 14267, 262, 2315, 346, 1634, 286, 262, 725, 82, 304, 13, 70, 13, 2644, 198, 4299, 1100, 62, 4775, 7, 944, 11, 2209, 11, 41216, 62, 785, ...
3.004684
427
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2015-2016 Nervana 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 #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 16529, 10541, 198, 2, 15069, 1853, 12, 5304, 399, 712, 2271, 11998, 3457, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, ...
2.712883
1,630
from itertools import repeat from ruskit import cli from ..cluster import Cluster, ClusterNode from ..distribute import (MaxFlowSolver, print_cluster, gen_distribution, RearrangeSlaveManager) from ..failover import FastAddMachineManager from ..utils import echo, timeout_argument @cli.command @cli.argument("-p...
[ 6738, 340, 861, 10141, 1330, 9585, 198, 198, 6738, 374, 385, 15813, 1330, 537, 72, 198, 6738, 11485, 565, 5819, 1330, 38279, 11, 38279, 19667, 198, 6738, 11485, 17080, 4163, 1330, 357, 11518, 37535, 50, 14375, 11, 3601, 62, 565, 5819, ...
2.838942
416
import sys if __name__ == "__main__": main()
[ 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.45
20
import math from typing import Tuple, Optional class Angle: """ Angle, [0, 2pi) """ @classmethod @classmethod @property @rad.setter @property @deg.setter @property
[ 11748, 10688, 198, 6738, 19720, 1330, 309, 29291, 11, 32233, 628, 628, 198, 4871, 42375, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 42375, 11, 685, 15, 11, 362, 14415, 8, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2488, ...
2.41573
89
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-03-31 21:27 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 19, 319, 2177, 12, 3070, 12, 3132, 2310, 25, 1983, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.73913
69
import bayesian_irl import mdp_worlds import utils import mdp import numpy as np import scipy import random import generate_efficient_frontier import matplotlib.pyplot as plt if __name__=="__main__": seed = 1234 np.random.seed(seed) scipy.random.seed(seed) random.seed(seed) num_states = 4 ...
[ 11748, 15489, 35610, 62, 1901, 198, 11748, 285, 26059, 62, 6894, 82, 198, 11748, 3384, 4487, 198, 11748, 285, 26059, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 198, 11748, 4738, 198, 11748, 7716, 62, 16814, 62, 8534, ...
2.217793
1,731
# -*- coding: utf-8 -*- import numpy as np import urllib import cv2 import time import os import random import pexif import string #保存图片 # URL到图片
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2956, 297, 571, 198, 11748, 269, 85, 17, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 613, 87, 361, 198, ...
2.189189
74
import sys #return, func, goto, break, print, input, float, string, const, if/else keywords = {} defs = {} used = [] block = "Chameleon" keywords["farewell"] = None keywords["task"] = None keywords["stop"] = None keywords["jumpto"] = None keywords["say"] = None keywords["listen"] = None keywords["if"] = None keywords...
[ 11748, 25064, 198, 198, 2, 7783, 11, 25439, 11, 43197, 11, 2270, 11, 3601, 11, 5128, 11, 12178, 11, 4731, 11, 1500, 11, 611, 14, 17772, 198, 2539, 10879, 796, 23884, 198, 4299, 82, 796, 23884, 198, 1484, 796, 17635, 198, 9967, 796, ...
1.850935
1,979
current_game = None game_state = ""
[ 14421, 62, 6057, 796, 6045, 198, 6057, 62, 5219, 796, 13538, 198 ]
3
12
'''Finetune YOLOv3 with random shapes''' # Built-Ins: import os import sys import json import time import logging import argparse import warnings import subprocess # Install/Update GluonCV: subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'Cython']) subprocess.call([sys.executable, '-m', 'pip', '...
[ 7061, 6, 18467, 316, 1726, 575, 3535, 46, 85, 18, 351, 4738, 15268, 7061, 6, 198, 198, 2, 28477, 12, 20376, 25, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 1822, 29572, 198,...
2.199554
2,240
import sys import os import time import json import fnmatch from progress.bar import Bar # Python Anti-Malware Toolkit root = "/" #'/' for linux 'C:\' for windows patterns = ['*.py', '*.sh'] matching_files = [] dangerous_files = [] bad_content = b'rm -rf' #Files that contain this text will be blacklisted banner =...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 24714, 15699, 198, 6738, 4371, 13, 5657, 1330, 2409, 198, 198, 2, 11361, 12297, 12, 15029, 1574, 16984, 15813, 198, 198, 15763, 796, 12813, 1, 220, 1303, 2...
2.451737
259
"""Describe group states.""" from openpeerpower.components.group import GroupIntegrationRegistry from openpeerpower.const import STATE_OFF, STATE_ON from openpeerpower.core import OpenPeerPower, callback @callback def async_describe_on_off_states( opp: OpenPeerPower, registry: GroupIntegrationRegistry ) -> None...
[ 37811, 24564, 4892, 1448, 2585, 526, 15931, 628, 198, 6738, 1280, 33350, 6477, 13, 5589, 3906, 13, 8094, 1330, 4912, 34500, 1358, 8081, 4592, 198, 6738, 1280, 33350, 6477, 13, 9979, 1330, 35454, 62, 27977, 11, 35454, 62, 1340, 198, 6738...
3.244094
127
from django.shortcuts import render from django.shortcuts import get_object_or_404 from django.http import Http404 from .models import Movie # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 201, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 201, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 201, 198, 6738, 764, 27530, 133...
3.142857
56
""" Switch on, switch off 1. Erstelle Variablen für die Hintergrundfarbe und die Farbe des Kreises 2. Schaffst du es folgende Bedingung herzustellen? 'True': Kreis schwarz, Hintergrund weiss 'False': Kreis weiss, Hintergrund schwarz 3. Kannst du eine Variable erstellen, die als Schalter ...
[ 37811, 198, 38978, 319, 11, 5078, 572, 198, 198, 16, 13, 5256, 301, 13485, 15965, 397, 11925, 277, 25151, 4656, 367, 3849, 48929, 358, 16370, 1350, 3318, 4656, 6755, 1350, 748, 25732, 2696, 198, 220, 220, 220, 220, 198, 17, 13, 3059, ...
2.457875
273
#!/usr/bin/env python # Created by Disa Mhembere on 2017-03-09. # Email: disa@jhu.edu # Copyright (c) 2017. All rights reserved. from flask import Flask, request, render_template import json, os STORE_DIR = "submit/" app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) if __name__ == "__main__": app...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15622, 416, 3167, 64, 337, 258, 2022, 567, 319, 2177, 12, 3070, 12, 2931, 13, 198, 2, 9570, 25, 595, 64, 31, 73, 13415, 13, 15532, 198, 2, 15069, 357, 66, 8, 2177, 13, ...
2.616
125
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # 文件目的: 演示scikit-learn中朴素贝叶斯算法 # 创建日期:2018/2/1 # ------------------------------------------------------------------------- from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.m...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 45537, 198, 2, 10545, 244, 229, 20015, 114, 33566, 106, 21410, 171, 120, 248, 10545, 120, 242, 163, 97, 118, 36216, 15813, 12, 35720, 40792, 17312, 112, 163, ...
1.884817
1,146
import csv from vendas.core.models import Category with open('fixtures/csv/categorias.csv', 'r') as f: saved_categories_counter = 0 for row in csv.DictReader(f): category = Category(id=row['id'], category=row['name']) try: category.save() sa...
[ 11748, 269, 21370, 198, 198, 6738, 10817, 292, 13, 7295, 13, 27530, 1330, 21743, 628, 198, 4480, 1280, 10786, 69, 25506, 14, 40664, 14, 66, 47467, 4448, 13, 40664, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 7448, 62, 66...
2.053922
204
from __future__ import annotations from typing import Optional from django.db import models from django.utils.translation import gettext_lazy as _ from django.contrib.auth.models import ( AbstractUser, UserManager as AbstractUserManager, ) from post.models import Post from bookmark.models import Bookmark from...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 42625, 14208, ...
3.747368
95
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf.urls import * from django.conf import settings from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from SmartFuel.views import * urlpatterns = patterns('', ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 1635, 198, 6738, 42625, 14208, 13, 10414, 1330, ...
2.719457
221
"""This module present functions that extract data from Quantum Chemistry (QC) Calculations, and related functions. The QC codes with extractors avaliable are: - FHI-aims - VESTA (not yet) """ import pandas as pd import numpy as np from quandarium.aux import to_nparray from quandarium.mols import avradius def relat...
[ 37811, 1212, 8265, 1944, 5499, 326, 7925, 1366, 422, 29082, 27867, 357, 48, 34, 8, 198, 9771, 3129, 602, 11, 290, 3519, 5499, 13, 383, 36070, 12416, 351, 7925, 669, 37441, 3379, 198, 533, 25, 198, 12, 376, 25374, 12, 1385, 82, 198, ...
2.24974
3,844
from .CelsiusNetworkHTTPError import CelsiusNetworkHTTPError from .AbstractionFailure import AbstractionFailure
[ 6738, 764, 34, 32495, 26245, 40717, 12331, 1330, 34186, 26245, 40717, 12331, 198, 6738, 764, 4826, 301, 7861, 50015, 1330, 2275, 301, 7861, 50015, 198 ]
4.48
25
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( js_to_json, extract_attributes, try_get, int_or_none, )
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 302, 198, 198, 6738, 764, 11321, 1330, 14151, 11627, 40450, 198, 6738, 11485, 26791, 1330, 357, 198, 220, 220, 220, 4480...
2.558442
77
""" Singleton Decorator to define singleton class """ class SingletonClass(object): """ A decorator class to define any class as singleton """ def __init__(self, class_name): """ Init method :param class_name: class name """ self.class_name = class_name self.instance = None def __call__(self, *arg...
[ 37811, 198, 29974, 10565, 4280, 273, 1352, 284, 8160, 2060, 1122, 1398, 198, 37811, 628, 198, 4871, 5573, 10565, 9487, 7, 15252, 2599, 198, 197, 37811, 198, 197, 197, 32, 11705, 1352, 1398, 284, 8160, 597, 1398, 355, 2060, 1122, 198, ...
2.833333
204
# -*- coding: utf-8 -*- from . import ner from . import config from . import clr_schedule from . import data_loader from . import lamb_optimizer from . import metrics from . import parse_sequence from . import utils from . import ner_models from . import NCRF from . import attention from . import embedders from . impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 1330, 17156, 198, 6738, 764, 1330, 4566, 198, 6738, 764, 1330, 537, 81, 62, 15952, 5950, 198, 6738, 764, 1330, 1366, 62, 29356, 198, 6738, 764, 1330, 1...
3.311321
106
from flask import Flask from flask import request from flask import render_template from flask import jsonify import os import json import requests app = Flask(__name__) @app.route("/api/run", methods=['GET','POST']) @app.route("/api/run/<user>/<repo>", methods=['GET','POST']) @app.route("/api/save/<user>/<repo>", ...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 1330, 33918, 1958, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 7007, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, ...
2.40678
236
#!/usr/bin/env python # -*- coding: utf-8 -*- # vispy: gallery 60 """ Dynamic planar graph layout. """ import numpy as np from vispy import gloo, app from vispy.gloo import set_viewport, set_state, clear vert = """ #version 120 // Uniforms // ------------------------------------ uniform mat4 u_model; uniform mat4 u...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1490, 9078, 25, 15604, 3126, 198, 198, 37811, 198, 44090, 1410, 283, 4823, 12461, 13, 198, 37811, 198, 198, 11748, ...
2.247485
1,491
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################# r""" starkplot setup.py ############################################################################# Copyright (c) 2018 - Nathaniel Starkman All rights reserved. Redistribution and use in...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 7804, 4242, 2, 198, 81, 37811, 198, 220, 220, 220, 19278, 29487, 9058, 13, 9078, 198, 198, 29113, ...
3.456977
860
import cv2 import numpy as np class black_board: """black board filter --- This class will apply black board filter to an image by applying reducing a certain threshold colour values to zero of the image. """
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4871, 2042, 62, 3526, 25, 198, 197, 37811, 13424, 3096, 8106, 11420, 198, 197, 197, 1212, 1398, 481, 4174, 2042, 3096, 8106, 284, 281, 2939, 220, 198, 197, 197, 1525, ...
3.492063
63
# # Copyright (c) 2008-2015 Citrix 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 l...
[ 2, 198, 2, 15069, 357, 66, 8, 3648, 12, 4626, 15792, 8609, 11998, 11, 3457, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 2, 220, 220, 345, 743, 407, 779, ...
2.322499
1,969
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Ajoute le texte de la licence au début des fichiers C/C++ # Le texte est ajouté juste après la première ligne qui # doit contenir la chaîne 'encode_header' import os import io import argparse import codecs # Chaîne à détecter en début de fichier encode_header = "// -*...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 22028, 13192, 443, 48659, 660, 390, 8591, 17098, 35851, 39073, 4360, 748, 277, 488, 3183, 327, 14, 34, 48...
2.946203
316
import matplotlib.pyplot as plt import matplotlib.patches as pat from matplotlib.patches import ConnectionPatch from ..utils import areinstance import numpy as np
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 8071, 2052, 355, 1458, 198, 6738, 2603, 29487, 8019, 13, 8071, 2052, 1330, 26923, 33952, 198, 6738, 11485, 26791, 1330, 389, 39098, 198, 198, 11...
3.520833
48
"""Sample size calculation module """ from __future__ import annotations import math from typing import Optional, Union import numpy as np import pandas as pd from scipy.stats import norm as normal from scipy.stats import t as student from samplics.utils.formats import convert_numbers_to_dicts, dict_to_datafram...
[ 37811, 36674, 2546, 17952, 8265, 220, 198, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 10688, 198, 198, 6738, 19720, 1330, 32233, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, ...
2.274188
2,987
""" Account The Account represents the game "account" and each login has only one Account object. An Account is what chats on default channels but has no other in-game-world existence. Rather the Account puppets Objects (such as Characters) in order to actually participate in the game world. Guest Guest accounts ar...
[ 37811, 198, 30116, 198, 198, 464, 10781, 6870, 262, 983, 366, 23317, 1, 290, 1123, 17594, 468, 691, 530, 198, 30116, 2134, 13, 1052, 10781, 318, 644, 40815, 319, 4277, 9619, 475, 468, 645, 198, 847, 287, 12, 6057, 12, 6894, 6224, 13...
2.751187
8,633
from django.shortcuts import render, get_object_or_404 from .models import Choice, Question from django.http import HttpResponse, Http404, HttpResponseRedirect from django.template import loader from django.urls import reverse from django.db.models import F from django.views import generic from django.utils impo...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 201, 198, 6738, 764, 27530, 1330, 18502, 11, 18233, 201, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 26429, 11, ...
2.941606
411
from limits.lib import ( parse_data, parse_reset, parse_response, send_request, set_message ) from requests.exceptions import HTTPError from constants import ( ENDPOINT, DATA, JSON, TIME, CORE_MESSAGE, SEARCH_MESSAGE, GRAPHQL_MESSAGE ) from pytest import ( mark...
[ 6738, 7095, 13, 8019, 1330, 357, 198, 220, 220, 220, 21136, 62, 7890, 11, 198, 220, 220, 220, 21136, 62, 42503, 11, 198, 220, 220, 220, 21136, 62, 26209, 11, 198, 220, 220, 220, 3758, 62, 25927, 11, 198, 220, 220, 220, 900, 62, ...
2.273973
219
from setuptools import setup with open('README.rst', 'r') as f: long_description = f.read() setup( name='django-pkgconf', version='0.4.0', description='Yet another application settings helper.', long_description=long_description, url='https://github.com/byashimov/django-pkgconf', author='M...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 81, 301, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 13, 961, 3419, 198, 198, 40406, 7, 198, 220, 220, 220, ...
2.611111
450
#!/usr/bin/env python # coding: utf-8 ##### PREPROCESSING AND SAMPLING ##### print('Starting preprocessing and sampling...') # import libraries from datetime import datetime,date start_time = datetime.now() print('Start time: ', start_time) import sys params = sys.argv import numpy as np import pandas as pd import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 4242, 2, 22814, 4805, 4503, 7597, 2751, 5357, 28844, 6489, 2751, 46424, 198, 198, 4798, 10786, 22851, 662, 36948, 290, 19232, 986, 11537, 198,...
2.766597
1,431
from abc import ABC from typing import Union, List, Callable from future.utils import iteritems import tensorflow as tf from torch.utils.data import DataLoader, TensorDataset from mozhi.protocol.dataprotocol import NERDatasetInfo, NERPreprocessorInfo from mozhi.utils.pickle_me import PickleMe from mozhi.utils.pretty_p...
[ 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 4479, 11, 7343, 11, 4889, 540, 198, 6738, 2003, 13, 26791, 1330, 11629, 23814, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 11, ...
2.922581
155
import argparse import mmcv import numpy as np import onnx import onnxruntime as rt import torch from mmcv.onnx import register_extra_symbolics from mmcv.runner import load_checkpoint from mmedit.datasets.pipelines import Compose from mmedit.models import build_model def pytorch2onnx(model, input, ...
[ 11748, 1822, 29572, 198, 198, 11748, 8085, 33967, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 319, 77, 87, 198, 11748, 319, 77, 87, 43282, 355, 374, 83, 198, 11748, 28034, 198, 6738, 8085, 33967, 13, 261, 77, 87, 1330, 7881, 62, ...
2.253093
1,940
# Copyright 2015 David Stanek <dstanek@dstanek.com> # # 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 o...
[ 2, 15069, 1853, 3271, 7299, 988, 1279, 67, 14192, 988, 31, 67, 14192, 988, 13, 785, 29, 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, ...
3.692771
166
import scrapy from datetime import date, datetime, timedelta import re import locale locale.setlocale(locale.LC_ALL, '') # TODO: black magic - dont do this! import sys sys.path.insert(0, 'C:\\hdm\\bachelorarbeit') from db_schema import Website, Article, Link, Author from helper import *
[ 11748, 15881, 88, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 11, 28805, 12514, 198, 11748, 302, 198, 11748, 36693, 198, 17946, 1000, 13, 2617, 17946, 1000, 7, 17946, 1000, 13, 5639, 62, 7036, 11, 10148, 8, 198, 198, 2, 16926, ...
3.042105
95
import pytest from xenon import ( Path, PathAlreadyExistsException, PosixFilePermission)
[ 11748, 12972, 9288, 198, 6738, 27132, 261, 1330, 357, 198, 220, 220, 220, 10644, 11, 10644, 37447, 3109, 1023, 16922, 11, 198, 220, 220, 220, 18574, 844, 8979, 5990, 3411, 8, 628, 628, 198 ]
2.970588
34
#!/usr/bin/python import sys option = sys.argv[1] if option == '-e': rot = sys.argv[2] message = sys.argv[3] for letter in message.lower(): if ord(letter) == 32: sys.stdout.write(chr(32)) else: shiftedLetter = chr(ord(letter) + int(rot)) if ord(shiftedLetter) >= 123: sys.stdout...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 201, 198, 11748, 25064, 201, 198, 201, 198, 18076, 796, 25064, 13, 853, 85, 58, 16, 60, 201, 198, 201, 198, 201, 198, 361, 3038, 6624, 705, 12, 68, 10354, 201, 198, 197, 10599, 796, ...
2.119332
419
from .scanyuan import stacked_violin_t
[ 6738, 764, 1416, 1092, 7258, 1330, 24167, 62, 17069, 259, 62, 83, 198 ]
3
13
from . import marlin_codec
[ 6738, 764, 1330, 1667, 2815, 62, 19815, 721, 198 ]
3
9
# coding=utf-8 # Copyright Huawei Noah's Ark Lab. # Copyright 2017 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/l...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 43208, 18394, 338, 9128, 3498, 13, 198, 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 3...
2.422396
3,447
from distutils.core import setup setup_kwargs = { 'name': 'pycellbase', 'version': '0.3.2', 'description': 'Python client for CellBase', 'long_description': ('This Python package enables to query and obtain' ' biological information from the exhaustive' ...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 628, 198, 40406, 62, 46265, 22046, 796, 1391, 198, 220, 220, 220, 705, 3672, 10354, 705, 9078, 3846, 8692, 3256, 198, 220, 220, 220, 705, 9641, 10354, 705, 15, 13, 18, 13, 17, 3256, 198, 220,...
2.462541
307