content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************************** # Copyright ยฉ 2017 jianglin # File Name: runserver.py # Author: jianglin # Email: xiyang0807@gmail.com # Created: 2017-02-02 09:18:53 (CST) # Last Update:ๆ˜ŸๆœŸๅ›› 2017-2-16 22:19:49 (CST) # By:...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 41906, 17174, 4557, 1174, 198, 2, 15069, 10673, 2177, 474, 15483, 2815, 198, 2, 9220, 6530, 25, 1057, 15388, 13, 9...
2.816817
333
# Str08.py # a1 a2 a3 a4;print(a1, a2, a3, a4) --> Java, C, SQL, Python a1, a2, a3, a4 = 'Java,C,SQL,Python'.split(',') print(a1, a2, a3, a4) b = ['H', 'e', 'l', 'l', 'o'] b = ''.join(b) print(b) a = '' for i in range(0,len(b)): a += b[i] print(a) print('์•ˆ๋…•ํ•˜์„ธ์š”', sep=' ', end='\n') print('์•ˆ๋…•ํ•˜์„ธ์š”', end='') ...
[ 2, 4285, 2919, 13, 9078, 628, 198, 2, 257, 16, 257, 17, 220, 257, 18, 220, 220, 257, 19, 26, 4798, 7, 64, 16, 11, 257, 17, 11, 257, 18, 11, 257, 19, 8, 14610, 7349, 11, 327, 11, 16363, 11, 11361, 198, 64, 16, 11, 257, 17, ...
1.298507
402
import unittest if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.392857
28
import msgpackrpc from core.expando import ExpandoServer ADDR = SERVER = THREAD = None (ADDR, SERVER, THREAD) = ExpandoServer().serve() client = msgpackrpc.Client(ADDR, unpack_encoding='utf-8') client.call('add_expansion', u'esc', u'a vim user I see') action = client.call('expand', u'esc') print(action)
[ 11748, 31456, 8002, 81, 14751, 198, 6738, 4755, 13, 11201, 25440, 1330, 5518, 25440, 10697, 628, 198, 2885, 7707, 796, 18871, 5959, 796, 2320, 15675, 796, 6045, 198, 7, 2885, 7707, 11, 18871, 5959, 11, 2320, 15675, 8, 796, 5518, 25440, ...
2.734513
113
""" the urls of rmon.views """ from flask import Blueprint from rmon.views.index import IndexView from rmon.views.server import ServerList,ServerDetail api = Blueprint('api',__name__) api.add_url_rule('/',view_func=IndexView.as_view('index')) api.add_url_rule('/servers/',view_func=ServerList.as_view('server_list')) ap...
[ 37811, 262, 2956, 7278, 286, 374, 2144, 13, 33571, 37227, 198, 6738, 42903, 1330, 39932, 198, 6738, 374, 2144, 13, 33571, 13, 9630, 1330, 12901, 7680, 198, 6738, 374, 2144, 13, 33571, 13, 15388, 1330, 9652, 8053, 11, 10697, 11242, 603, ...
2.795918
147
# -*- coding: utf-8 -*- # encoding: utf-8 import smtplib from email.mime.text import MIMEText from email.utils import formataddr if __name__ == "__main__": mh = MailHelper('shaoz-he@outlook.com', '1992wen1031') mh.sendmail('wzhwno1@163.com,863501159@qq.com, ', 'Pythonๅ‘้€้‚ฎไปถ', '่ฟ™ๅชๆ˜ฏไธ€ไธชๆต‹่ฏ•้‚ฎไปถ,่ฏทไธ่ฆๅ›žๅค!')
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 895, 83, 489, 571, 198, 6738, 3053, 13, 76, 524, 13, 5239, 1330, 337, 3955, 2767, 2302, 198, 6738, 3053, 13, 26791, ...
1.900621
161
from setuptools import setup, find_packages from torch.utils.cpp_extension import BuildExtension, CUDAExtension CUDA_FLAGS = [] ext_modules=[ CUDAExtension('soft_renderer.cuda.load_textures', [ 'soft_renderer/cuda/load_textures_cuda.cpp', 'soft_renderer/cuda/load_textures_cuda_kernel.cu', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 6738, 28034, 13, 26791, 13, 20322, 62, 2302, 3004, 1330, 10934, 11627, 3004, 11, 29369, 5631, 11627, 3004, 198, 198, 43633, 5631, 62, 38948, 50, 796, 17635, 198, 198, ...
1.909284
2,359
import pandas as pd import numpy as np from random import randrange from datetime import timedelta from datetime import datetime import random import string from faker import Faker countries = ["ะšะฐะทะฐั…ัั‚ะฐะฝ", "ะ ะพััะธั", "ะ˜ั‚ะฐะปะธั", "ะ“ะตั€ะผะฐะฝะธั", "ะšะธั‚ะฐะน", "ะกะจะ"] regions = ["ะะปะผะฐั‚ั‹", "ะัƒั€-ะกัƒะปั‚ะฐะฝ", "ะจั‹ะผะบะตะฝั‚"] choices = ["ะดะฐ", "...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4738, 1330, 43720, 9521, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 4738, 198, 11748, 4731, 198, 6738, ...
1.696751
554
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy import spatial import picasso.io as io ### High density data dir_name = '/fs/pool/pool-schwille-paint/Data/p17.lbFCS2/20-12-09_N1_T23_ibidi_cseries/21-01-19_FS_id180' file_name = 'ibidi_id180_Pm2-05nM_p40uW_1_MMStack_Pos0.ome...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 1330, 21739, 198, 198, 11748, 8301, 28372, 13, 952, 355, 33...
2.238202
445
# Copyright (c) 2012-2019 Eli Janssen # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file. # this example shows how filtering can be done on the url generation side. # this example through https urls (no proxying required), and only allows http # requests over port 80....
[ 2, 15069, 357, 66, 8, 2321, 12, 23344, 25204, 449, 504, 6248, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 281, 17168, 12, 7635, 198, 2, 5964, 326, 460, 307, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 2, 428, 1672, ...
2.366048
377
#program to create a new string with no duplicate consecutive letters from a given string. print(no_consecutive_letters("PPYYYTTHON")) print(no_consecutive_letters("PPyyythonnn")) print(no_consecutive_letters("Java")) print(no_consecutive_letters("PPPHHHPPP"))
[ 2, 23065, 284, 2251, 257, 649, 4731, 351, 645, 23418, 12785, 7475, 422, 257, 1813, 4731, 13, 198, 198, 4798, 7, 3919, 62, 1102, 4552, 425, 62, 15653, 7203, 10246, 26314, 56, 51, 4221, 1340, 48774, 198, 4798, 7, 3919, 62, 1102, 4552,...
3.156627
83
import sys import pathlib import numpy as np from collections import namedtuple from scipy import interpolate import math path_package = pathlib.Path(__file__).parent.absolute() sys.path.insert(1,str(path_package.parent)) import API as compression #%%โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•...
[ 11748, 25064, 198, 11748, 3108, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 629, 541, 88, 1330, 39555, 378, 198, 11748, 10688, 198, 198, 6978, 62, 26495, 796, 3108, 8019, 13, 15235, 7, ...
2.856419
592
from office365.teams.shifts.change_tracked_entity import ChangeTrackedEntity class Shift(ChangeTrackedEntity): """ Represents a unit of scheduled work in a shifts. """ pass
[ 6738, 2607, 24760, 13, 660, 4105, 13, 1477, 19265, 13, 3803, 62, 2213, 6021, 62, 26858, 1330, 9794, 2898, 6021, 32398, 628, 198, 4871, 15576, 7, 19400, 2898, 6021, 32398, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1432, 6629...
3.080645
62
""" time: a space: a """
[ 37811, 198, 2435, 25, 257, 198, 13200, 25, 257, 198, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220 ]
1.541667
24
"""This module contains the wrapper class to interacte with fzf. The fzf class should be used for all occasion when fzf needs to be launched. fzfaws comes with 4 fzf binary files and will be used if user doesn't specify to use system fzf in config file. """ import os import subprocess import sys from typing import Any...
[ 37811, 1212, 8265, 4909, 262, 29908, 1398, 284, 9427, 68, 351, 277, 89, 69, 13, 198, 198, 464, 277, 89, 69, 1398, 815, 307, 973, 329, 477, 6695, 618, 277, 89, 69, 2476, 198, 1462, 307, 5611, 13, 277, 89, 69, 8356, 2058, 351, 604...
2.145319
6,730
from gears_cli import run, install_requirements, export_requirements, import_requirements from click.testing import CliRunner from RLTest import Defaults import os Defaults.decode_responses = True SSL_ARGS = ['--ssl', 'True', '--ssl-keyfile', './tests/tls/redis.key', '--ssl-certfile', './tests/tls/redis.crt', '--ssl-...
[ 6738, 28713, 62, 44506, 1330, 1057, 11, 2721, 62, 8897, 18883, 11, 10784, 62, 8897, 18883, 11, 1330, 62, 8897, 18883, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 6738, 45715, 14402, 1330, 2896, 13185, 198, 11748, 28686, 198,...
2.781022
137
# Generated by Django 3.0.8 on 2020-07-20 22:02 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 23, 319, 12131, 12, 2998, 12, 1238, 2534, 25, 2999, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import math lim = 100 sum = math.trunc(lim * (lim + 1) / 2) carressum = sum * sum sumcarres = math.trunc(lim * (lim + 1) * (2 * lim + 1) / 6) print("%d" % (carressum - sumcarres), end='')
[ 11748, 10688, 628, 198, 2475, 796, 1802, 198, 16345, 796, 10688, 13, 2213, 19524, 7, 2475, 1635, 357, 2475, 1343, 352, 8, 1220, 362, 8, 198, 7718, 601, 388, 796, 2160, 1635, 2160, 198, 16345, 7718, 411, 796, 10688, 13, 2213, 19524, ...
2.329268
82
try: import asyncio except ImportError: try: import trollius as asyncio except ImportError: asyncio = None try: from threading import RLock as Lock except ImportError: from rx.internal.concurrency import NoLock as Lock try: from asyncio import Future except ImportError: try...
[ 28311, 25, 198, 220, 220, 220, 1330, 30351, 952, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1330, 13278, 3754, 355, 30351, 952, 198, 220, 220, 220, 2845, 17267, 12331, 25, 198...
2.958333
240
# -*- coding: utf-8 -*- # File: model_desc.py from collections import namedtuple import tensorflow as tf from ..utils.argtools import memoized_method from ..tfutils.common import get_op_tensor_name from ..tfutils.tower import get_current_tower_context from ..compat import backport_tensor_spec, tfv1 TensorSpec = bac...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 9220, 25, 2746, 62, 20147, 13, 9078, 628, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 11485, 26791, 13, 853, ...
2.524637
2,476
import numpy as np import pandas as pd def check_df_col(df, column, name=None): """ Checks for the presence of a column (or columns) in a tidy DataFrame with an informative error message. Passes silently, otherwise raises error. """ if column is not None: if type(column) != list: ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 2198, 62, 7568, 62, 4033, 7, 7568, 11, 5721, 11, 1438, 28, 14202, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 47719, 329, 262, 4931, 286, ...
2.891775
924
import sys import ebf import numpy as np import scipy.interpolate import pdb import asfgrid from astropy.io import ascii from classify_direct import * dnumodel = asfgrid.Seism() bcmodel = h5py.File('bcgrid.h5', 'r') dustmodel = mwdust.Combined15() x=obsdata() x.addspec([5065.,-99.0,-0.1],[120.,0.0,0.2]) x.addsei...
[ 11748, 25064, 198, 11748, 304, 19881, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 3849, 16104, 378, 198, 11748, 279, 9945, 198, 11748, 355, 69, 25928, 198, 6738, 6468, 28338, 13, 952, 1330, 355, 979, 72, 198, 673...
1.926136
352
""" A mixin to convert kwargs to attributes. """ class KwargsToDict(object): """This mixin converts kwargs passed to the constructor to attributes. """ def __init__(self, **kwargs): """When a class is created, automatically convert its kwargs to attributes. :param dict kwargs: The k...
[ 37811, 198, 32, 5022, 259, 284, 10385, 479, 86, 22046, 284, 12608, 13, 198, 37811, 198, 198, 4871, 31767, 22046, 2514, 35, 713, 7, 15252, 2599, 198, 220, 220, 220, 37227, 1212, 5022, 259, 26161, 479, 86, 22046, 3804, 284, 262, 23772, ...
2.652941
170
#!/usr/bin/env python3 import os import logging import time from shared import common_utils
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 640, 198, 198, 6738, 4888, 1330, 2219, 62, 26791, 628, 628, 628, 628, 198 ]
3.1875
32
"""438. Find All Anagrams in a String"""
[ 37811, 43704, 13, 9938, 1439, 1052, 6713, 82, 287, 257, 10903, 37811, 198 ]
3.153846
13
from tkinter import * from tkinter import ttk from threading import Thread import time import path_finder import os, subprocess from tkinter.filedialog import askdirectory import dependency_manager import config from PIL import Image, ImageTk import webbrowser import utilities import functools import version_c...
[ 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 640, 198, 198, 11748, 3108, 62, 22805, 198, 198, 11748, 28686, 11, 850, 14681, 198, 198, 6738, 256, 74, ...
2.604889
4,991
import unittest from flask import request from webargs import flaskparser from tests import factories from tests.common import ApiBaseTest from webservices import args from webservices import rest from webservices import sorting from webservices.common import models
[ 11748, 555, 715, 395, 198, 198, 6738, 42903, 1330, 2581, 198, 6738, 3992, 22046, 1330, 42903, 48610, 198, 198, 6738, 5254, 1330, 17590, 198, 6738, 5254, 13, 11321, 1330, 5949, 72, 14881, 14402, 198, 198, 6738, 2639, 712, 1063, 1330, 264...
4.121212
66
import pickle import math import numpy as np import pandas as pd from tqdm import tqdm df = pickle.load(open('./data/data_6model_offline712_online704_ensemble.pkl','rb')) train_df = pd.read_csv('./data/train.csv') IDS = train_df.id.unique() dic_off_map = df[['id','offset_mapping']].set_index('id')['offset_mapping']....
[ 11748, 2298, 293, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 7568, 796, 2298, 293, 13, 2220, 7, 9654, 7, 4458, 14, 7890, 14...
2.13993
2,587
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 21017, 198, 2, 15069, 357, 66, 828, 383, 317, 4178, 5631, 1074, 13, 1439, 2489, 10395, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.614301
3,692
from datetime import datetime import unittest from emma.model import SERIALIZED_DATETIME_ALT_FORMAT from emma import exceptions as ex from emma.model.account import Account from emma.model.automation import Workflow from tests.model import MockAdapter class WorkflowTest(unittest.TestCase): """ Tests for the...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 555, 715, 395, 198, 198, 6738, 795, 2611, 13, 19849, 1330, 18871, 12576, 14887, 1961, 62, 35, 1404, 2767, 12789, 62, 31429, 62, 21389, 1404, 198, 6738, 795, 2611, 1330, 13269, 355, 409, ...
2.172494
429
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker from configparser import ConfigParser config = ConfigParser() config.read('config.ini') mysql_username = config.get('DATABASE', 'MYSQL_USER') mysql_pwd = config.get('DATABASE', 'MYSQL_PWD') mysql_ho...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 629, 19458, 62, 29891, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 198, 112...
2.474164
329
import numpy as np import os pattern = ['Frequent_Pattern_init.txt', 'Frequent_Pattern_sd.txt'] path_list = ['../../data/Geolife Trajectories 1.3/Trajectories7000/', '../../data/Geolife Trajectories ' '1.3/sd/sd_final_MDL1100_ep0.1/', ...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 201, 198, 33279, 796, 37250, 37, 46018, 62, 47546, 62, 15003, 13, 14116, 3256, 705, 37, 46018, 62, 47546, 62, 21282, 13, 14116, 20520, 201, 198, 6978, 62, 4868, 796, 372...
1.559005
4,703
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from day_012_gold_mining_back_of_envelope import share_price_calc @pytest.fixture
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1110, 62, 30206, 62, 24267, 62, 45374, 62, 1891, 62, 1659, 62, 268, 1091, 68...
2.365079
63
#!/usr/bin/python __author__ = 'smetta' # Import the module import sys import os import socket import json import httplib import sys import base64 import ssl import sys import xml.etree.ElementTree as ET import xml.dom.minidom as minidom DOCUMENTATION = ''' --- module: vra_configure.py Short_description: Module for co...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 834, 9800, 834, 796, 705, 5796, 15253, 6, 198, 2, 17267, 262, 8265, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 33918, 198, 11748, 1841, 489, 571, 198, 11748, 25064, ...
2.343195
1,014
from django.contrib.auth.base_user import AbstractBaseUser from django.db import models from django.contrib.auth.base_user import BaseUserManager from django.contrib.auth.models import PermissionsMixin
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 8692, 62, 7220, 1330, 27741, 14881, 12982, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 8692, 62, 7220, 1330, 7308, 12982, 13511,...
3.474576
59
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
[ 2, 15069, 1946, 3203, 11, 3457, 13, 198, 198, 2, 921, 389, 29376, 7520, 257, 1729, 12, 41195, 11, 8688, 11, 29359, 12, 5787, 5964, 284, 198, 2, 779, 11, 4866, 11, 13096, 11, 290, 14983, 428, 3788, 287, 2723, 2438, 393, 13934, 198,...
3.97
400
# Copyright (C) 2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 357, 34, 8, 33448, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
3.484716
229
import collections import json import re import urllib from bs4 import BeautifulSoup import HTMLParser def get_properties (message): """ Processes a given chat message to identify particular properties: mentions, emoticons and links. See the README.md file for more detailed documentation. Args: ...
[ 11748, 17268, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 2956, 297, 571, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 11532, 46677, 198, 198, 4299, 651, 62, 48310, 357, 20500, 2599, 198, 220, 220, 220, 37227, 198, ...
2.43221
1,335
#!usr/bin/env python __author__ = "Xiaoguang Zhang" __email__ = "xzhang@westwoodrobotics.io" __copyright__ = "Copyright 2020 Westwood Robotics" __date__ = "Jan 8, 2021" __version__ = "0.1.2" __status__ = "Production" # Ping and search for available BEARs from pybear import Manager # Define port and baud rate bear_por...
[ 2, 0, 14629, 14, 8800, 14, 24330, 21015, 198, 834, 9800, 834, 796, 366, 55, 544, 519, 84, 648, 19439, 1, 198, 834, 12888, 834, 796, 366, 87, 23548, 648, 31, 7038, 3822, 305, 13645, 873, 13, 952, 1, 198, 834, 22163, 4766, 834, 79...
2.464789
355
from django.test import TestCase import seaborn import pandas from matplotlib import pyplot as plt from belleflopt import benefit, models, load
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 11748, 384, 397, 1211, 198, 11748, 19798, 292, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 6738, 894, 293, 2704, 8738, 1330, 4414, 11, 4981, 11, ...
3.418605
43
import torch import torchaudio import torch.utils.data import torch.nn.functional as F from librosa.core import load, resample from librosa.util import normalize from pathlib import Path import numpy as np import random from modules.helper_functions import files_to_list from dataset.audio_augs import AudioAugs class ...
[ 11748, 28034, 198, 11748, 28034, 24051, 198, 11748, 28034, 13, 26791, 13, 7890, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 9195, 4951, 64, 13, 7295, 1330, 3440, 11, 581, 1403, 198, 6738, 9195, 4951, 64, 13, 22602, 1...
2.545723
339
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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, 6634, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 12224, 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.736364
220
import lightbulb from hikari.permissions import Permissions from lightbulb import checks, context from sqlalchemy import select from remi.db.engine import async_config_session from remi.db.schema.config import StaffRole @lightbulb.Check @lightbulb.Check
[ 11748, 1657, 15065, 65, 198, 6738, 289, 1134, 2743, 13, 525, 8481, 1330, 2448, 8481, 198, 6738, 1657, 15065, 65, 1330, 8794, 11, 4732, 198, 6738, 44161, 282, 26599, 1330, 2922, 198, 198, 6738, 816, 72, 13, 9945, 13, 18392, 1330, 30351...
3.363636
77
# -*- coding: utf-8 -*- from mahjong.constants import EAST, SOUTH, WEST, NORTH from mahjong.hand_calculating.yaku import Yaku from mahjong.utils import is_pon, is_pair class Shousuushii(Yaku): """ The hand contains three sets of winds and a pair of the remaining wind """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42768, 32428, 13, 9979, 1187, 1330, 412, 11262, 11, 30065, 4221, 11, 370, 6465, 11, 25273, 4221, 198, 6738, 42768, 32428, 13, 4993, 62, 9948, 3129, 803, 13, 88, ...
2.75
104
from collections import deque from typing import List from functools import reduce if __name__ == '__main__': input = get_input() print(part_one(input)) print(part_one_alt(input)) print(part_two(input)) print(part_two_alt(input)) print(part_two_ext(input))
[ 6738, 17268, 1330, 390, 4188, 198, 6738, 19720, 1330, 7343, 198, 6738, 1257, 310, 10141, 1330, 4646, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 5128, 796, 651, 62, 15414, 341...
2.651376
109
"""Support for Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier.""" import asyncio from enum import Enum from functools import partial import logging from miio import ( # pylint: disable=import-error AirFresh, AirHumidifier, AirPurifier, Device, DeviceException, ) from miio.airfresh import ( #...
[ 37811, 15514, 329, 46726, 13756, 3701, 9330, 7483, 290, 46726, 13756, 3701, 11054, 312, 7483, 526, 15931, 198, 11748, 30351, 952, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 11748, 18931, 198, 198, 67...
2.146058
16,870
import os from pyfiglet import Figlet from flask import Flask, send_file, jsonify from subprocess import call from sys import platform as _platform if _platform == 'win32' or _platform == 'win64': call('cls', shell=True) elif _platform == 'linux' or _platform == 'linux2': call('clear', shell=True) f = Figlet(...
[ 11748, 28686, 198, 6738, 12972, 5647, 1616, 1330, 12138, 1616, 198, 6738, 42903, 1330, 46947, 11, 3758, 62, 7753, 11, 33918, 1958, 198, 6738, 850, 14681, 1330, 869, 198, 6738, 25064, 1330, 3859, 355, 4808, 24254, 198, 198, 361, 4808, 24...
2.650376
266
#!/usr/bin/env python3 import csv import enum import os import pprint import re import sqlite3 import sys from functools import partialmethod if __name__ == '__main__': sys.exit(app())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 11748, 269, 21370, 201, 198, 11748, 33829, 201, 198, 11748, 28686, 201, 198, 11748, 279, 4798, 201, 198, 11748, 302, 201, 198, 11748, 44161, 578, 18, 201, 198, 11748...
2.373626
91
# Generated by Django 3.0.5 on 2020-04-11 00:33 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 3023, 12, 1157, 3571, 25, 2091, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from collections import OrderedDict from django.contrib.auth.models import User from django.http import JsonResponse from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 1334, 62, 30604, 62, 36439, 73, 46569, 13, ...
3.730769
52
from render_engine.img_manager import img_manager
[ 6738, 8543, 62, 18392, 13, 9600, 62, 37153, 1330, 33705, 62, 37153, 198 ]
3.846154
13
import requests import threading import sys """Usage: python aniwatch_proxy_checker.py proxy_file max_timeout""" if __name__ == "__main__": good_proxies = [] threads = [] with open(sys.argv[1], "r", encoding="utf-8") as f: lol = [x.replace("\n", "") for x in f.readlines()] lol = list(dict.fr...
[ 11748, 7007, 198, 11748, 4704, 278, 198, 11748, 25064, 198, 198, 37811, 28350, 25, 21015, 281, 72, 8340, 62, 36436, 62, 9122, 263, 13, 9078, 15741, 62, 7753, 3509, 62, 48678, 37811, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834...
2.378125
320
# 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 the Li...
[ 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.716258
652
import numpy as np import healpy as hp import pyfits from time import time import matplotlib.pyplot as plt from multiprocessing import Pool from multiprocessing.dummy import Pool as ThreadPool import numpy.random import os, errno import subprocess import astropy.wcs import astropy.io.fits as pyfits from astropy.coord...
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12035, 9078, 355, 27673, 198, 11748, 12972, 21013, 198, 6738, 640, 1330, 640, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 19...
2.983607
3,233
# -*- coding: utf-8 -*- """Factories to help in tests.""" from factory import PostGenerationMethodCall, Sequence from factory.alchemy import SQLAlchemyModelFactory from my_flask_app.database import db from my_flask_app.user.models import User from my_flask_app.quiz.models import Quiz import json class BaseFactory(S...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 29054, 1749, 284, 1037, 287, 5254, 526, 15931, 198, 6738, 8860, 1330, 2947, 8645, 341, 17410, 14134, 11, 45835, 198, 6738, 8860, 13, 282, 26599, 1330, 16363, 2348, ...
2.060302
796
#!/usr/bin/env python from .Core import Core
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 764, 14055, 1330, 7231, 628 ]
2.9375
16
# Port of the tssrp6a library used for authentification # Kudos to Schmitty#5079 for doing a rough translation from Javascript to Python # of the important functions import hashlib import secrets from typing import Tuple N = 21766174458617435773191008891802753781907668374255538511144643224689886235383840957210909013...
[ 2, 4347, 286, 262, 256, 824, 81, 79, 21, 64, 5888, 973, 329, 8323, 2649, 198, 2, 509, 42418, 284, 3059, 76, 9760, 2, 1120, 3720, 329, 1804, 257, 5210, 11059, 422, 24711, 284, 11361, 198, 2, 286, 262, 1593, 5499, 198, 198, 11748, ...
2.617268
776
""" mymemory translator API """ from typing import List, Optional, Union import requests from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS from deep_translator.exceptions import ( RequestError, TooManyRequests, TranslationNotFound, ) from deep_translator.valid...
[ 37811, 198, 1820, 31673, 33417, 7824, 198, 37811, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 4479, 198, 198, 11748, 7007, 198, 198, 6738, 2769, 62, 7645, 41880, 13, 8692, 1330, 7308, 8291, 41880, 198, 6738, 2769, 62, 7645, 41880, 13, ...
2.245651
1,437
from typing import Tuple import torch from torch import nn as nn, Tensor from torch.nn.functional import softmax from .. import utils class Encoder(nn.Module): """Encoder module. The encoder represents its inputs using fixed, pre-trained GloVe embeddings, which are passed through a bidirectional GRU. ...
[ 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 355, 299, 77, 11, 309, 22854, 198, 6738, 28034, 13, 20471, 13, 45124, 1330, 2705, 9806, 198, 198, 6738, 11485, 1330, 3384, 4487, 628, 198, 4871, 1...
2.387118
3,043
""" constant """ class Addrs: """ Server address """ WS_ADDR = 'wss://www.streamr.com/api/v1/ws' REST_ADDR = 'https://www.streamr.com/api/v1' class RestfullConstant: """ Restful constants """ GET_SESSION_ADDR = Addrs.REST_ADDR + '/login/apikey' GET_SESSION_PARAS = {"Content-...
[ 37811, 198, 9979, 415, 198, 37811, 628, 198, 4871, 3060, 3808, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9652, 2209, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 25290, 62, 2885, 7707, 796, 705, 86, 824, 1378, 2503, 13, ...
2.272355
1,465
import numpy as np import matplotlib.pyplot as plt Ri = np.linspace(0, 0.25, 26) f_long = 1 / (1 + 10 * Ri) f_sharp = (1 - 5 * Ri)**2 f_sharp[11:] = (1 / (20 * Ri[11:]))**2 print(Ri[11]) plt.plot(Ri, f_long, '-g', label='Land') plt.plot(Ri, f_sharp, '-b', label='Sea') plt.xlabel('Ri') plt.ylabel(r'$f(\mathrm{Ri})$...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 49, 72, 796, 45941, 13, 21602, 10223, 7, 15, 11, 657, 13, 1495, 11, 2608, 8, 198, 198, 69, 62, 6511, 796, 352, 1220, 357, 16, ...
1.924731
186
from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.views.generic import TemplateView, CreateView, UpdateView, ListView, DeleteView from .forms import ProjectForm, TicketForm from .models import Project, Ticke...
[ 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 2...
3.357977
257
from typing import Dict string = input() print('YES' if is_valid(string) else 'NO')
[ 6738, 19720, 1330, 360, 713, 628, 628, 198, 8841, 796, 5128, 3419, 198, 4798, 10786, 43335, 6, 611, 318, 62, 12102, 7, 8841, 8, 2073, 705, 15285, 11537, 198 ]
3.034483
29
# Copyright 2014 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 os import unittest from telemetry import test from telemetry.core.platform import factory from telemetry.core.platform import mac_platform_backend
[ 2, 15069, 1946, 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, 11748...
3.890244
82
from purity_fb import PurityFb, VersionResponse, rest # Get Pure API version fb = PurityFb("10.70.100.10") # assume the array IP is 10.255.9.28 fb.disable_verify_ssl() try: # no need to login to get API versions res = fb.api_version.list_versions() assert isinstance(res, VersionResponse) print (res.ve...
[ 6738, 25590, 62, 21855, 1330, 350, 1684, 37, 65, 11, 10628, 31077, 11, 1334, 198, 198, 2, 3497, 17129, 7824, 2196, 198, 198, 21855, 796, 350, 1684, 37, 65, 7203, 940, 13, 2154, 13, 3064, 13, 940, 4943, 1303, 7048, 262, 7177, 6101, ...
2.624277
173
# -*- coding: utf-8 -*- import getopt import sys from torcms.model.post_model import MPost from torcms.script.script_init_tabels import create_table from torcms_maplet.model.map_tab import MabGson, MabPost2Gson, MabLayout def run_update_lon(): ''' :return: ''' map_recs = MPost.query_all(limit_num=5...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 651, 8738, 198, 11748, 25064, 198, 198, 6738, 7332, 46406, 13, 19849, 13, 7353, 62, 19849, 1330, 4904, 455, 198, 6738, 7332, 46406, 13, 12048, 13, 12048, 62, 1500...
1.944812
453
from django.contrib.auth import get_user_model from django.contrib.auth.password_validation import validate_password from rest_framework import serializers from api.models import UserModel, TuitModel class TuitSerializer(serializers.ModelSerializer): ''' Tuit serializer. ''' class UserSerializer(seriali...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 28712, 62, 12102, 341, 1330, 26571, 62, 28712, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6...
2.993103
145
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """Utilities for File Input/Output.""" import copy import datetime import json import os import numpy from sympy import Bas...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 2177, 11, 19764, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 1043, 287, 198, 2, 262, 38559, 24290...
2.400154
2,594
import datetime import time import discord import pytz from discord.ext import commands from Modules import CONSTANT from Modules.CONSTANT import SHOWROOM_ALERT_ROLES from Modules.Checks import check_if_bot_spam JP_TZ: pytz.UTC = pytz.timezone('Asia/Tokyo') UNIVERSAL_TZ: pytz.UTC = pytz.timezone('UTC') PACIFIC_TZ: p...
[ 11748, 4818, 8079, 198, 11748, 640, 198, 198, 11748, 36446, 198, 11748, 12972, 22877, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6738, 3401, 5028, 1330, 7102, 2257, 8643, 198, 6738, 3401, 5028, 13, 10943, 2257, 8643, 1330, 37041, ...
2.470383
287
import requests from flask import Blueprint, Flask, redirect, render_template, request, url_for from itertools import tee from markupsafe import Markup, escape hist = Blueprint('history', __name__, template_folder='templates', static_folder='static') app = Flask(__name__) API_URL = 'https://api.openstreetmap.org/api/0...
[ 11748, 7007, 198, 6738, 42903, 1330, 39932, 11, 46947, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 11, 19016, 62, 1640, 198, 6738, 340, 861, 10141, 1330, 30479, 198, 6738, 1317, 4739, 8635, 1330, 2940, 929, 11, 6654, 198, 198, 10034, 79...
2.8159
239
""" Run load tests: locust -f load_test/locustfile.py --host http://127.0.0.1:3000 """ from locust import HttpUser, task import pandas as pd import random feature_columns = { "fixed acidity": "fixed_acidity", "volatile acidity": "volatile_acidity", "citric acid": "citric_acid", "residual sugar": "res...
[ 37811, 198, 10987, 3440, 5254, 25, 198, 198, 17946, 436, 532, 69, 3440, 62, 9288, 14, 17946, 436, 7753, 13, 9078, 1377, 4774, 2638, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 23924, 198, 37811, 198, 198, 6738, 1179, 436, 1330, 367, ...
2.355932
354
# Import spezieller Python-Funktionalitรคten, damit Abstrakte Methoden # definiert werden kรถnnen from abc import ABCMeta, abstractmethod # Konstanten, mit denen wir die Wetterlage beschreiben SONNE = 0, BEWOELKT = 1 REGEN = 2 # Abstrakte Klasse zur Reprรคsentation einer Stadt. # Von dieser Klasse kann keine Instanz (= ...
[ 2, 17267, 693, 49746, 6051, 11361, 12, 37, 2954, 83, 1538, 270, 11033, 1452, 11, 1801, 270, 2275, 12044, 74, 660, 11789, 268, 198, 2, 2730, 72, 861, 266, 263, 6559, 479, 9101, 20471, 268, 198, 6738, 450, 66, 1330, 9738, 48526, 11, ...
2.449791
478
__author__ = 'jdeu'
[ 834, 9800, 834, 796, 705, 73, 2934, 84, 6, 198 ]
2
10
"""Signals for content syncing""" from django.db.models.signals import post_save from django.dispatch import receiver from content_sync import api from websites.models import WebsiteContent @receiver( post_save, sender=WebsiteContent, dispatch_uid="sync_state_website_content_upsert", ) def upsert_content...
[ 37811, 11712, 874, 329, 2695, 6171, 2259, 37811, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 198, 6738, 2695, 62, 27261, 1330, 40391, 19...
3.080745
161
# -*- coding: utf-8 -*- """Module providing an image scaling factory.""" import os import json import six from plone import api from plone.scale.interfaces import IScaledImageQuality from zope.component import getMultiAdapter, queryUtility from zope.globalrequest import getRequest from ade25.base.utils import get_fil...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 26796, 4955, 281, 2939, 20796, 8860, 526, 15931, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 2237, 198, 198, 6738, 458, 505, 1330, 40391, 198, 6738, 458, 505,...
2.172502
1,171
__author__ = 'yinjun' # initialize your data structure here. # @param x, an integer # @return nothing # @return nothing # @return an integer # @return an boolean
[ 834, 9800, 834, 796, 705, 88, 259, 29741, 6, 198, 220, 220, 220, 1303, 41216, 534, 1366, 4645, 994, 13, 628, 220, 220, 220, 1303, 2488, 17143, 2124, 11, 281, 18253, 198, 220, 220, 220, 1303, 2488, 7783, 2147, 198, 220, 220, 220, 2...
2.278351
97
import discord from discord.ext import commands from discord.ext import vbu from subprocess import check_output import goslate class Translator(vbu.Cog): """Translate text using google translate.""" @vbu.group(pass_context=True, invoke_without_command=True, aliases=["tr"]) async def translate(self, ctx...
[ 11748, 36446, 198, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 2302, 1330, 410, 11110, 198, 6738, 850, 14681, 1330, 2198, 62, 22915, 198, 198, 11748, 308, 418, 17660, 628, 198, 4871, 3602, 41880, 7, 85, 11110, 13, 34...
2.067729
753
import os DATA_DIR = os.path.dirname(os.path.abspath(__file__)) CARDS_DATABASE_FILE = os.path.join(DATA_DIR, 'database_cards.csv') NOBLES_DATABASE_FILE = os.path.join(DATA_DIR, 'database_nobles.csv')
[ 11748, 28686, 198, 198, 26947, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 20034, 5258, 62, 35, 1404, 6242, 11159, 62, 25664, 796, 28686, 13, 6978, 13, 22179,...
2.352941
85
from django.http import HttpResponse from rest_framework import status from rest_framework.renderers import JSONRenderer from collectionjson.renderers import CollectionJsonRenderer class RenderedResponse(HttpResponse): """ An HttpResponse that renders its content into Collection+JSON or JSON. """
[ 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 10920, 19288, 1330, 19449, 49, 437, 11882, 198, 198, 6738, 4947, 17752, 13, 10920, 19288, 1330, 12251, 4...
3.674419
86
import os import argparse import requests apiHost = "https://api.github.com" token = os.getenv("GITHUB_TOKEN") if token == None: print("ERROR: Specify GITHUB_TOKEN environment variable") exit(1) authHeader = { "Authorization": f"token {token}"} parser = argparse.ArgumentParser() parser.add_argument('--owner...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 7007, 198, 198, 15042, 17932, 796, 366, 5450, 1378, 15042, 13, 12567, 13, 785, 1, 198, 30001, 796, 28686, 13, 1136, 24330, 7203, 38, 10554, 10526, 62, 10468, 43959, 4943, 198, 198, 361,...
2.902913
206
from unittest import TestCase, mock import layers import numpy as np import pytest
[ 6738, 555, 715, 395, 1330, 6208, 20448, 11, 15290, 198, 198, 11748, 11685, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 628 ]
3.44
25
"""Views for the D3M configuration module""" import os import json import mimetypes from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import FileResponse from django.http import JsonResponse, HttpResponse, Http404 from tworaven_apps.configurations.models_d3m impor...
[ 37811, 7680, 82, 329, 262, 360, 18, 44, 8398, 8265, 37811, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 17007, 2963, 12272, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 6359, 41871, 1330, 269, 27891, 69, 62, 42679,...
2.28703
2,714
# -*- coding: utf-8 -*- # # michael a.g. aรฏvรกzis # orthologue # (c) 1998-2018 all rights reserved # from math import pi as ฯ€ from .SI import radian degree = ฯ€/180 * radian arcminute = degree / 60 arcsecond = arcminute / 60 deg = degree rad = radian # end of file
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 285, 40302, 257, 13, 70, 13, 257, 26884, 85, 6557, 89, 271, 198, 2, 29617, 39795, 198, 2, 357, 66, 8, 7795, 12, 7908, 477, 2489, 10395, 198, 2, 628, 1...
2.561905
105
test_cases = int(input()) for test in range(1,test_cases+1): if test%2==1: green, purple = input().split() green = int(green) purple = int(purple) participants = int(input()) cost = 0 for participant in range(0,participants): m, n = map(int,inp...
[ 9288, 62, 33964, 796, 493, 7, 15414, 28955, 201, 198, 1640, 1332, 287, 2837, 7, 16, 11, 9288, 62, 33964, 10, 16, 2599, 201, 198, 220, 220, 220, 611, 1332, 4, 17, 855, 16, 25, 220, 220, 220, 201, 198, 220, 220, 220, 220, 220, 2...
1.798774
979
import numpy as np _loss_functions = {} @_register_name("relu") @_register_name("relu_margin") @_register_name("margin") @_register_name("margin_sq")
[ 11748, 299, 32152, 355, 45941, 198, 198, 62, 22462, 62, 12543, 2733, 796, 23884, 628, 198, 31, 62, 30238, 62, 3672, 7203, 260, 2290, 4943, 198, 198, 31, 62, 30238, 62, 3672, 7203, 260, 2290, 62, 36153, 4943, 198, 198, 31, 62, 30238,...
2.57377
61
import tomviz.operators import time
[ 11748, 16667, 85, 528, 13, 3575, 2024, 198, 11748, 640, 628 ]
3.363636
11
from __future__ import absolute_import from __future__ import unicode_literals import doctest from collections import namedtuple from testil import eq from corehq.util import itertools from corehq.util.itertools import zip_with_gaps def test_zip_with_gaps_key_funcs(): """ Specifying a keyfunc should use i...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 10412, 395, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 1332, 346, 1330, 37430, 198, 198, 673...
2.262076
973
#!/usr/bin/env python # Usage: python ingestion.py input_dir output_dir ingestion_program_dir submission_program_dir # data result ingestion code of participants # AS A PARTICIPANT, DO NOT MODIFY THIS CODE. # # This is the "ingestion program" written by the organ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 2, 29566, 25, 21015, 38382, 13, 9078, 5128, 62, 15908, 5072, 62, 15908, 38382, 62, 23065, 62, 15908, 14498, 62, 23065, 62, 15908, 201, 198, 2, 220, 220, 220, 220, 220,...
2.70199
5,577
import datetime from dateutil.parser import parse as date_parser from mongoengine import Document, StringField, ListField from django.conf import settings from crits.core.crits_mongoengine import CritsBaseAttributes, CritsSourceDocument from crits.core.crits_mongoengine import CritsActionsDocument from crits.core.fie...
[ 11748, 4818, 8079, 198, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 355, 3128, 62, 48610, 198, 6738, 285, 25162, 18392, 1330, 16854, 11, 10903, 15878, 11, 7343, 15878, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, ...
2.059583
3,021
#-*- coding: utf-8 -*- """ StaSh input history """ import json from stash.lib.libslog import slog _pyfile_ = __file__.split("/")[-1] slog(f'pyfile: {_pyfile_}') from stash.system.shcommon import ShEventNotFound class ShHistory(object): """ This class is responsible for input history. :param stash: the S...
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 44919, 2484, 5128, 2106, 198, 37811, 198, 11748, 33918, 198, 198, 6738, 38305, 13, 8019, 13, 8019, 82, 6404, 1330, 25801, 198, 62, 9078, 7753, 62, 796, 11593, 7753...
2.067726
2,894
from .gae import GAE, VGAE
[ 6738, 764, 25002, 1330, 402, 14242, 11, 569, 9273, 36, 201, 198 ]
2.333333
12
import re from random import randrange from model.contact import Contact
[ 11748, 302, 198, 6738, 4738, 1330, 43720, 9521, 198, 6738, 2746, 13, 32057, 1330, 14039, 628, 628, 198 ]
4.277778
18
import numpy import heapq import scipy.sparse from apgl.graph.AbstractSingleGraph import AbstractSingleGraph class DictGraph(AbstractSingleGraph): """ A graph with nodes stored in a dictionary. In particular the graph data structure is a dict of dicts. Edges and vertices can be labeled with anything. ...
[ 198, 11748, 299, 32152, 198, 11748, 24575, 80, 198, 11748, 629, 541, 88, 13, 82, 29572, 220, 198, 6738, 2471, 4743, 13, 34960, 13, 23839, 28008, 37065, 1330, 27741, 28008, 37065, 628, 198, 4871, 360, 713, 37065, 7, 23839, 28008, 37065, ...
2.166823
9,597
#!/usr/bin/env python3 # # Copyright 2014 Simone Campagna # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 1946, 47592, 5425, 48669, 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...
3.596774
186
from math import * from decimal import * getcontext().prec = 30 log_infinity = 9999 global_log2_eps = 0 ## The root hermite factor delta of BKZ-b ## log_2 of best plausible Quantum Cost of SVP in dimension b ## log_2 of best plausible Quantum Cost of SVP in dimension b ## log_2 of best known Quantum Cost of SVP...
[ 6738, 10688, 1330, 1635, 198, 6738, 32465, 1330, 1635, 198, 1136, 22866, 22446, 3866, 66, 796, 1542, 198, 198, 6404, 62, 10745, 6269, 796, 860, 17032, 198, 198, 20541, 62, 6404, 17, 62, 25386, 796, 657, 198, 198, 2235, 383, 6808, 607,...
2.615385
520
#!/usr/bin/env python3 import nibabel as nib import nilearn #from nilearn import masking #from nilearn.plotting import plot_stat_map, plot_anat, plot_img, plot_epi #from nilearn.image import concat_imgs, mean_img #from nilearn.input_data import NiftiMasker import numpy as np import os from typing import Union import p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 33272, 9608, 355, 33272, 198, 11748, 299, 576, 1501, 198, 2, 6738, 299, 576, 1501, 1330, 9335, 278, 198, 2, 6738, 299, 576, 1501, 13, 29487, 889, 1330, 7110, 62, 1426...
2.170111
1,258
import pickle from numpy.lib.function_base import append import pandas as pd import argparse from torch.utils import data from torch.utils.data import dataset from src.tensorflow.model import TfModel from config.tensorflow.text_config import Config from src.pytorch.label_encoding import get_encoding from src.tensorf...
[ 11748, 2298, 293, 198, 6738, 299, 32152, 13, 8019, 13, 8818, 62, 8692, 1330, 24443, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1822, 29572, 198, 198, 6738, 28034, 13, 26791, 1330, 1366, 198, 6738, 28034, 13, 26791, 13, 7890, 13...
2.540161
498
from rest_framework.exceptions import ValidationError from rest_framework.fields import UUIDField from open.core.betterself.models.food import Food from open.core.betterself.models.food_logs import FoodLog from open.core.betterself.serializers.mixins import ( BaseCreateUpdateSerializer, BaseModelReadSerializer...
[ 6738, 1334, 62, 30604, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 1334, 62, 30604, 13, 25747, 1330, 471, 27586, 15878, 198, 198, 6738, 1280, 13, 7295, 13, 27903, 944, 13, 27530, 13, 19425, 1330, 7318, 198, 6738, 1280, 13, 7...
3.384106
151
""" packet.py """ import abc import binascii import calendar import copy import hashlib import os import re from datetime import datetime import six from cryptography.hazmat.primitives import constant_time from cryptography.hazmat.primitives.asymmetric import padding from .fields import DSAPriv, DSAPub, DSASignatur...
[ 37811, 19638, 13, 9078, 198, 37811, 198, 11748, 450, 66, 198, 11748, 9874, 292, 979, 72, 198, 11748, 11845, 198, 11748, 4866, 198, 11748, 12234, 8019, 198, 11748, 28686, 198, 11748, 302, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198...
3.291784
8,191
from datasets import ptb from rnnlm_gen import RNNLMGen corpus, word_to_id, id_to_word = ptb.load_data('train') vocab_size = len(word_to_id) corpus_size = len(corpus) model = RNNLMGen() # model.load_params('./chapter06/RNNLM.pkl') # set start and skip word start_word = 'you' start_id = word_to_id[start_word] skip_wo...
[ 6738, 40522, 1330, 42975, 65, 198, 6738, 374, 20471, 75, 76, 62, 5235, 1330, 371, 6144, 31288, 13746, 198, 198, 10215, 79, 385, 11, 1573, 62, 1462, 62, 312, 11, 4686, 62, 1462, 62, 4775, 796, 42975, 65, 13, 2220, 62, 7890, 10786, ...
2.345992
237