content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import requests import base64 import json import random from jose import jwk from datetime import datetime from django.conf import settings from sampleapp.models import Bearer, QuickBooksDiscoveryDocument # token can either be an accessToken or a refreshToken # The validation steps can be found at ours docs...
[ 11748, 7007, 198, 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 4738, 198, 198, 6738, 474, 577, 1330, 474, 43021, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 6291, 13...
3.836879
141
VVVtop = Lorentz(name = 'VVVtop', spins = [ 3, 3, 3 ], structure = 'FTriZTop(2*P(-1,1)*P(-1,2)) * (Epsilon(1,2,-1,-2)*P(-1,1)*P(-2,2)*P(3,3))') VVVbot = Lorentz(name = 'VVVbot', spins = [ 3, 3, 3 ], structure = 'FTriZBot(2*P(-1,1)*P(-1,2...
[ 198, 198, 53, 53, 53, 4852, 796, 15639, 429, 89, 7, 3672, 796, 705, 53, 53, 53, 4852, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37621, 796, 685, 513, 11, 513, 11,...
1.504032
248
import os import unittest from sportradar import NHL # Import API keys from environment variables api_key_name = "SPORTRADAR_API_KEY_NHL" api_key = os.environ.get(api_key_name, None) assert api_key is not None, "Must declare environment variable: {key_name}".format( key_name=api_key_name) api = NHL.NHL(api_key, fo...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 6332, 6335, 283, 1330, 9481, 198, 198, 2, 17267, 7824, 8251, 422, 2858, 9633, 198, 15042, 62, 2539, 62, 3672, 796, 366, 4303, 1581, 5446, 2885, 1503, 62, 17614, 62, 20373, 62, 45, ...
2.763359
131
#!/usr/bin/env python # Copyright 2017 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. """Tool to help developers rebase branches across the Blink rename.""" import argparse import json import os import subprocess import s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 2177, 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,...
2.82716
1,134
""" Chicken Poker echo bot. """ import logging logging.basicConfig(filename='echo_bot.log', level=logging.WARN, filemode='w', format='%(levelname)s %(message)s') log = logging.getLogger(__name__) log.info("Starting") # # Networking # import sys def deserialize_round(round_string): """ param: round_string is e...
[ 37811, 16405, 36157, 9809, 10214, 13, 37227, 198, 198, 11748, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 11639, 30328, 62, 13645, 13, 6404, 3256, 1241, 28, 6404, 2667, 13, 37771, 11, 2393, 14171, 11639, 86, 3256, 5794, 11639, 4...
2.713816
304
import flask from flask_restful import Resource from utils import decoraters from logic.test.checkalive_logic import CheckaliveLogic class CheckaliveApi(Resource): """CheckaliveApi /api/checkalive """ @decoraters.response_format def get(self): """ """ checkalive_logic = Ch...
[ 11748, 42903, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 198, 6738, 3384, 4487, 1330, 11705, 8605, 198, 6738, 9156, 13, 9288, 13, 9122, 282, 425, 62, 6404, 291, 1330, 6822, 282, 425, 11187, 291, 198, 198, 4871, 6822, 282, 425,...
2.294686
207
import random import math import numpy as np import matplotlib.pyplot as plt from matplotlib import animation tmax = 875 t = 0 x = [0] y = [0] t=0 t_total = 0 dist = 0 #coord = [[x[t],y[t]]] while t < tmax: coord = random.randint(0,1) if coord == 0: direction = random.randint(0,1) dire...
[ 11748, 4738, 198, 11748, 10688, 628, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 11034, 198, 198, 83, 9806, 796, 807, 2425, 198, 83, 796, 657, 1...
2.047297
592
import http from flask_jwt_extended import get_jwt_identity, jwt_required from flask_restful import Resource, reqparse from core import config from models import UserRole from utils.decorators import api_response_wrapper from utils.rate_limit import rate_limit parser = reqparse.RequestParser() parser.add_argument( ...
[ 11748, 2638, 198, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 651, 62, 73, 46569, 62, 738, 414, 11, 474, 46569, 62, 35827, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 43089, 29572, 198, 198, 6738, 4755, 1330, 4566, ...
3.097297
185
import requests url = 'https://api.github.com/repos/pandas-dev/pandas/issues' resp = requests.get(url) data = resp.json() print(data[0].avatar_url)
[ 198, 11748, 7007, 198, 6371, 796, 705, 5450, 1378, 15042, 13, 12567, 13, 785, 14, 260, 1930, 14, 79, 392, 292, 12, 7959, 14, 79, 392, 292, 14, 37165, 6, 198, 198, 4363, 796, 7007, 13, 1136, 7, 6371, 8, 198, 198, 7890, 796, 1217,...
2.451613
62
from .action import Action import libtcodpy as libtcod # def __init__(self, **kwargs): # pass
[ 6738, 764, 2673, 1330, 7561, 198, 198, 11748, 9195, 83, 19815, 9078, 355, 9195, 83, 19815, 628, 198, 220, 220, 220, 1303, 825, 11593, 15003, 834, 7, 944, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 1...
2.477273
44
import subprocess from django.shortcuts import render from cowsay_app.form import AddMessageForm from cowsay_app.models import Message # Create your views here.
[ 11748, 850, 14681, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 628, 198, 6738, 22575, 323, 62, 1324, 13, 687, 1330, 3060, 12837, 8479, 198, 6738, 22575, 323, 62, 1324, 13, 27530, 1330, 16000, 198, 198, 2, 13610, 534, 5...
3.630435
46
import argparse import os from deba.commands.decorators import subcommand from deba.config import Config @subcommand(exec=exec)
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 6738, 1915, 64, 13, 9503, 1746, 13, 12501, 273, 2024, 1330, 850, 21812, 198, 6738, 1915, 64, 13, 11250, 1330, 17056, 628, 198, 198, 31, 7266, 21812, 7, 18558, 28, 18558, 8, 198 ]
3.219512
41
from django.contrib import admin from .models import Translation, Language, Word, Language, Payment admin.site.register(Translation) admin.site.register(Language) admin.site.register(Word) admin.site.register(Payment)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 33322, 11, 15417, 11, 9678, 11, 15417, 11, 28784, 198, 198, 28482, 13, 15654, 13, 30238, 7, 48313, 8, 198, 28482, 13, 15654, 13, 30238, 7, 32065, 8, 198, 2...
3.633333
60
import os import glob import numpy as np import six import pickle as cPickle import tensorflow as tf from imageio import imread import scipy.io as sio
[ 11748, 28686, 220, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2237, 198, 11748, 2298, 293, 355, 269, 31686, 293, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 2939, 952, 1330, 545, 961, 198, 198, 117...
2.892857
56
message = """\n\nThere are 4 types of numbers in python-2 & 3 types of numbers in python-3 Now we will see python-2 numbers which are of 4 types, namely: int, long, float & complex. ints & longs are whole numbers and floats are rea...
[ 20500, 796, 37227, 59, 77, 59, 77, 1858, 389, 604, 3858, 286, 3146, 287, 220, 21015, 12, 17, 1222, 513, 3858, 286, 3146, 287, 21015, 12, 18, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 22...
2.500821
609
"""An opeScope Fix object""" import json from .utilities.converters import fromPointXY, toPointXY class FixModel: """An opeScope Fix object""" location = None name = None @staticmethod def export(layer): """Export the specified QgsMapLayer features to JSON""" lines = [] ...
[ 37811, 2025, 267, 431, 43642, 13268, 2134, 37811, 198, 11748, 33918, 198, 6738, 764, 315, 2410, 13, 1102, 332, 1010, 1330, 422, 12727, 34278, 11, 284, 12727, 34278, 198, 198, 4871, 13268, 17633, 25, 198, 220, 220, 220, 37227, 2025, 267,...
2.224806
387
# -*- coding: utf-8 -*- # # michael a.g. aïvázis <michael.aivazis@para-sim.com> # (c) 1998-2022 all rights reserved # custom properties from .properties import selectors # export the local wrappers over the flow protocols from .Producer import Producer as producer from .Specification import Specification as specifi...
[ 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, 1279, 76, 40302, 13, 64, 452, 1031, 271, 31, 1845, 64, 12, 14323, 13, 785, 29, 198, 2, 357...
3.617143
175
import sys import os import json import argparse import re from urlparse import urlparse, parse_qs from datetime import datetime from elasticsearch import Elasticsearch, ElasticsearchException from elasticsearch_dsl import Search from spotify_wrapper import SpotifyWrapper TRACK_REGEX = 'track.' SONG_ID_LENGTH = 22 #...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 6738, 19016, 29572, 1330, 19016, 29572, 11, 21136, 62, 48382, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 27468, 12947, 1330, ...
2.920863
834
# python: 3.6 # encoding: utf-8 import torch import torch.nn as nn # import torch.nn.functional as F import fastNLP.modules.encoder as encoder class CNNText(torch.nn.Module): """ Text classification model by character CNN, the implementation of paper 'Yoon Kim. 2014. Convolution Neural Networks for Sent...
[ 2, 21015, 25, 513, 13, 21, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 2, 1330, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 3049, 45, 19930, 13, 18170, ...
2.255274
474
from typing import Tuple class MiscData: """ This class should be used to contains miscellaneous data for the drone """
[ 6738, 19720, 1330, 309, 29291, 628, 198, 4871, 29882, 6601, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 1398, 815, 307, 973, 284, 4909, 2984, 25673, 1366, 329, 262, 12170, 198, 220, 220, 220, 37227, 198 ]
3.435897
39
""" PUORPOSE: to check that the brute-force machine with all its components is actually working - i.e. when the algorithms used for padding, key derivation and encryption are known CORRECTLY """ from raw import img from breaker import breaker, init import os import base64 import tempfile
[ 37811, 198, 197, 5105, 1581, 48933, 25, 198, 197, 1462, 2198, 326, 262, 33908, 12, 3174, 4572, 351, 477, 663, 6805, 318, 1682, 198, 197, 16090, 532, 1312, 13, 68, 13, 618, 262, 16113, 973, 329, 24511, 11, 1994, 16124, 341, 290, 198,...
3.734177
79
#!/usr/bin/env python # -*- coding: utf-8 -*- """Functions to draw various pygimli matrices with matplotlib.""" import numpy as np import matplotlib.pyplot as plt import pygimli as pg def drawSparseMatrix(ax, mat, **kwargs): """Draw a view of a matrix into the axes. Parameters ---------- ax : mpl a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 24629, 2733, 284, 3197, 2972, 12972, 70, 320, 4528, 2603, 45977, 351, 2603, 29487, 8019, 526, 15931, 198, 198, 1...
2.049499
1,798
from keras import layers, models from .__inception import inception2D bn_axis = -1
[ 6738, 41927, 292, 1330, 11685, 11, 4981, 198, 6738, 764, 834, 924, 1159, 1330, 30839, 17, 35, 198, 198, 9374, 62, 22704, 796, 532, 16, 628, 198 ]
3.185185
27
from .version import __version__ from . import audio from . import multi_array_alignment from . import transcription from . import word_error_rate_analysis
[ 6738, 764, 9641, 1330, 11593, 9641, 834, 198, 6738, 764, 1330, 6597, 198, 6738, 764, 1330, 5021, 62, 18747, 62, 282, 16747, 198, 6738, 764, 1330, 26955, 198, 6738, 764, 1330, 1573, 62, 18224, 62, 4873, 62, 20930 ]
4.078947
38
import subprocess import time import os
[ 11748, 850, 14681, 198, 11748, 640, 198, 11748, 28686, 198 ]
4
10
from random import choice from shapeworld import util from shapeworld.captions import Relation from shapeworld.captioners import WorldCaptioner # incorrect modes # 0: correct # 1: incorrect reference # 2: incorrect comparison # 3: incorrect relation # 4: inverse relation
[ 6738, 4738, 1330, 3572, 198, 6738, 427, 499, 38136, 1330, 7736, 198, 6738, 427, 499, 38136, 13, 27144, 507, 1330, 4718, 341, 198, 6738, 427, 499, 38136, 13, 6888, 1159, 364, 1330, 2159, 24334, 1159, 263, 628, 198, 220, 220, 220, 1303,...
3.348315
89
# -*- coding: utf-8 -*- from setup_teardown import clear, stop_db from nose.tools import * from pykt import KyotoTycoon, KTException, Cursor import time d = dict(A="B", C="D", E="F", G="H") d2 = { "あいうえお": "ABC", "かきくけこ": "てすと2", "さしすせそ": "てすと2", } @nottest @raises(IOError) @with_setup(setup = clear...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 9058, 62, 660, 446, 593, 1330, 1598, 11, 2245, 62, 9945, 198, 6738, 9686, 13, 31391, 1330, 1635, 198, 6738, 12972, 21841, 1330, 36298, 25492, 20912, 11, 42293, 169...
2.237261
628
# Lint as: python3 # Copyright 2019 Google LLC # # 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 law or ag...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 15069, 13130, 3012, 11419, 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,...
3.361446
249
# -*-coding:utf-8 -*- #__Author__:"JimmyLiang" #__Date__: 2020/4/7 from twilio.rest import Client import re
[ 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 834, 13838, 834, 11097, 40335, 43, 15483, 1, 198, 2, 834, 10430, 834, 25, 12131, 14, 19, 14, 22, 198, 198, 6738, 665, 346, 952, 13, 2118, 1330, 20985, 198, 11748,...
2.297872
47
#!/usr/bin/env python # -*- coding: utf-8 -*- from cpt.packager import ConanMultiPackager if __name__ == "__main__": builder = ConanMultiPackager( username="reo7sp", login_username="reo7sp", upload="https://api.bintray.com/conan/reo7sp/tgbot-cpp", channel="ci", stable_bran...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 269, 457, 13, 8002, 3536, 1330, 31634, 29800, 11869, 3536, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417...
2.318584
226
import sys from decimal import Decimal from fractions import Fraction from functools import partial from typing import (Optional, SupportsFloat) from hypothesis import strategies from martinez.hints import Scalar from tests.utils import (MAX_VALUE, MIN_VALUE, ...
[ 11748, 25064, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 49876, 1330, 376, 7861, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 357, 30719, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.330435
575
#!/usr/bin/env python # Author: Alex Tereschenko <alext.mkrs@gmail.com> # Copyright (c) 2016 Alex Tereschenko <alext.mkrs@gmail.com> # # SPDX-License-Identifier: MIT import mraa as m import unittest as u MRAA_TEST_PIN = 0 if __name__ == '__main__': u.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 6434, 25, 4422, 1665, 411, 45059, 1279, 1000, 742, 13, 28015, 3808, 31, 14816, 13, 785, 29, 198, 2, 15069, 357, 66, 8, 1584, 4422, 1665, 411, 45059, 1279, 1000, 742, 13, 28...
2.444444
108
import pandas as pd from tabulate import tabulate
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 7400, 5039, 1330, 7400, 5039, 628 ]
3.642857
14
# SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source...
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 15069, 357, 66, 8, 33448, 15127, 23929, 44680, 6234, 1222, 317, 5777, 4146, 40, 29462, 13, 1439, 2489, 10395, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, ...
3.408027
598
import sys import time import random from faker import Faker if __name__ == "__main__": main()
[ 11748, 25064, 198, 11748, 640, 198, 11748, 4738, 198, 198, 6738, 277, 3110, 1330, 376, 3110, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.970588
34
from typing import List if __name__ == "__main__": s = Solution() assert s.searchInsert([1, 3, 5, 6], 7) == 4 assert s.searchInsert([1, 3, 5, 6], 5) == 2 assert s.searchInsert([1, 3, 5, 6], 2) == 1 assert s.searchInsert([1, 3, 5, 6], 0) == 0 assert s.searchInsert([1, 2, 6, 8], 4) == 2 as...
[ 6738, 19720, 1330, 7343, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 264, 796, 28186, 3419, 198, 220, 220, 220, 6818, 264, 13, 12947, 44402, 26933, 16, 11, 513, 11, 642, 11, 718, 4357,...
2.209424
382
# Copyright 2020 The Tilt Brush Authors # # 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 ...
[ 2, 15069, 12131, 383, 309, 2326, 39846, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
2.41946
10,113
# Импорты import pip try: __import__('matplotlib') except ImportError: pip.main([ 'install', 'matplotlib' ]) try: __import__('pandas') except ImportError: pip.main([ 'install', 'pandas' ]) try: __import__('numpy') except ImportError: pip.main([ 'install', 'numpy' ]) try: __import__('sci...
[ 2, 12466, 246, 43108, 140, 123, 15166, 21169, 20375, 45035, 198, 198, 11748, 7347, 198, 198, 28311, 25, 198, 220, 220, 220, 11593, 11748, 834, 10786, 6759, 29487, 8019, 11537, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 7347, 13, ...
1.492403
5,331
from django.conf import settings from django.contrib.auth import authenticate, login from django.urls.base import reverse, reverse_lazy from django.views.generic import FormView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.views.generic impor...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 17594, 198, 6738, 42625, 14208, 13, 6371, 82, 13, 8692, 1330, 9575, 11, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, ...
3.292308
390
load( "//rules/common:private/utils.bzl", _collect = "collect", _collect_optionally = "collect_optionally", ) ScalaConfiguration = provider( doc = "Scala compile-time and runtime configuration", fields = { "version": "The Scala full version.", "compiler_classpath": "The compiler cla...
[ 2220, 7, 198, 220, 220, 220, 366, 1003, 38785, 14, 11321, 25, 19734, 14, 26791, 13, 65, 48274, 1600, 198, 220, 220, 220, 4808, 33327, 796, 366, 33327, 1600, 198, 220, 220, 220, 4808, 33327, 62, 18076, 453, 796, 366, 33327, 62, 18076...
2.386439
1,814
# 08 Lambda Functions # List of complex objects, like a list of tuples, example a list of orders with product name and price # in situations like this we need to define a function to sort the list, the above methos don't work items = [ ("Product1", 15), ("Product2", 50), ("Product3", 5) ] print(items) # ...
[ 2, 8487, 21114, 6814, 40480, 198, 198, 2, 7343, 286, 3716, 5563, 11, 588, 257, 1351, 286, 12777, 2374, 11, 1672, 257, 1351, 286, 6266, 351, 1720, 1438, 290, 2756, 198, 2, 287, 7445, 588, 428, 356, 761, 284, 8160, 257, 2163, 220, 2...
3.422594
239
# Reaches around 91.8% Micro-F1 after 5 epochs. import os.path as osp import torch from torch_geometric.datasets import AMiner from torch_geometric.nn import MetaPath2Vec path = osp.join(osp.dirname(osp.realpath(__file__)), '..', 'data', 'AMiner') dataset = AMiner(path) data = dataset[0] metapath = [ ('author',...
[ 2, 797, 3694, 1088, 10495, 13, 23, 4, 4527, 12, 37, 16, 706, 642, 36835, 82, 13, 198, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 198, 11748, 28034, 198, 6738, 28034, 62, 469, 16996, 13, 19608, 292, 1039, 1330, 3001, 7274, 1...
2.336364
440
''' Created by auto_sdk on 2019.07.04 ''' from top.api.base import RestApi
[ 7061, 6, 198, 41972, 416, 8295, 62, 21282, 74, 319, 13130, 13, 2998, 13, 3023, 198, 7061, 6, 198, 6738, 1353, 13, 15042, 13, 8692, 1330, 8324, 32, 14415, 198 ]
2.5
30
#! /usr/bin/python from myhdl import Signal, ConcatSignal, intbv, always, always_seq, always_comb, instances from fifo.async import AsyncFifo from fifo.dummy import DummyFifo, DummyReadFifo from fifo.interleaver import FifoInterleaver from wb import WbSlave # This one could actually be split into two parts, one part...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 6738, 616, 71, 25404, 1330, 26484, 11, 1482, 9246, 11712, 282, 11, 493, 65, 85, 11, 1464, 11, 1464, 62, 41068, 11, 1464, 62, 24011, 11, 10245, 198, 198, 6738, 5515, 78, 13, 292, 13361, ...
3.458599
157
# -*- coding: utf-8 -*- # !/usr/bin/env python import matplotlib.pyplot as plt from algorithms.sorting.merge_sort import merge_sort from algorithms.sorting.utils import randomize from algorithms.sorting.bubble_sort import bubble_sort from algorithms.sorting.selection_sort import selection_sort from algorithms.sorting...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 16113, 13, 82, 24707, 13, 647, 469, ...
2.705193
597
# Copyright 2019 IBM Corp. # # 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, sof...
[ 2, 15069, 13130, 19764, 11421, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743...
1.987214
18,301
""" MIT License Copyright (c) 2020 Myer 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, ...
[ 37811, 201, 198, 36393, 13789, 201, 198, 201, 198, 15269, 357, 66, 8, 12131, 2011, 263, 201, 198, 201, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 201, 198, 1659, 428, 3788, 290, 391...
3.580645
372
"""Utilities for computing the Average Precision (AP) and mean Average Precision (mAP). TODO improve naming of functions TODO finish implementation TODO document every function TODO publish in own package """ from operator import itemgetter import numpy as np from scipy.ndimage import find_objects # ===============...
[ 37811, 18274, 2410, 329, 14492, 262, 13475, 39281, 357, 2969, 8, 290, 1612, 13475, 39281, 357, 76, 2969, 737, 198, 198, 51, 3727, 46, 2987, 19264, 286, 5499, 198, 51, 3727, 46, 5461, 7822, 198, 51, 3727, 46, 3188, 790, 2163, 198, 51...
2.45498
3,765
from polyaxon.config_manager import config INTEGRATIONS_HIPCHAT_WEBHOOKS = config.get_dict('POLYAXON_INTEGRATIONS_HIPCHAT_WEBHOOKS', is_list=True, is_optional=True, is_local=T...
[ 6738, 7514, 897, 261, 13, 11250, 62, 37153, 1330, 4566, 198, 198, 12394, 7156, 49, 18421, 62, 39, 4061, 31542, 62, 8845, 33, 39, 15308, 50, 796, 4566, 13, 1136, 62, 11600, 10786, 45472, 56, 25922, 1340, 62, 12394, 7156, 49, 18421, 6...
1.50463
216
"""/zen:""" from chatbot import send
[ 37811, 14, 4801, 11097, 15931, 198, 6738, 8537, 13645, 1330, 3758, 198 ]
3.083333
12
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-10 02:36 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, 1157, 13, 1065, 319, 2864, 12, 3023, 12, 940, 7816, 25, 2623, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.753623
69
#! /usr/bin/env python2.7 import time import rospy from math import pi from std_srvs.srv import Empty from gazebo_ros_link_attacher.srv import Attach from gazebo_msgs.srv import SpawnModel, SpawnModelRequest from gazebo_msgs.msg import ModelStates from geometry_msgs.msg import Quaternion from tf.transformations impor...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 198, 11748, 640, 198, 11748, 686, 2777, 88, 198, 6738, 10688, 1330, 31028, 198, 6738, 14367, 62, 27891, 14259, 13, 27891, 85, 1330, 33523, 198, 6738, 308, 1031, 1765, 7...
2.48883
1,522
"""Tests for classification.""" from typing import Sequence from absl.testing import parameterized import tensorflow as tf import tensorflow_gnn as tfgnn from tensorflow_gnn.runner import orchestration from tensorflow_gnn.runner.tasks import classification as_tensor = tf.convert_to_tensor as_ragged = tf.ragged.const...
[ 37811, 51, 3558, 329, 17923, 526, 15931, 198, 6738, 19720, 1330, 45835, 198, 198, 6738, 2352, 75, 13, 33407, 1330, 11507, 1143, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 62, 4593, 77, 355, 48700, 4593, 77...
2.383212
274
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu> from eelbrain import datasets, load from eelbrain._utils import IS_OSX from eelbrain.testing import assert_dataobj_equal, file_path
[ 2, 6434, 25, 4302, 2806, 67, 27343, 1279, 43533, 666, 7957, 67, 27343, 31, 3281, 84, 13, 15532, 29, 198, 6738, 304, 417, 27825, 1330, 40522, 11, 3440, 198, 6738, 304, 417, 27825, 13557, 26791, 1330, 3180, 62, 2640, 55, 198, 6738, 30...
3.220339
59
# Generated by Django 3.1.6 on 2021-11-05 05:29 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 1157, 12, 2713, 8870, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import orjson from typing import Callable, List from functools import wraps def memlist(data: List): """ Remembers input/output of a function in python list. Arguments: data: a list to push received data into Example ```python from memo import memlist data = [] @memlist(da...
[ 11748, 393, 17752, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 198, 6738, 1257, 310, 10141, 1330, 27521, 628, 198, 4299, 1066, 4868, 7, 7890, 25, 7343, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 42898, 1213, 5128, 14, 22915...
2.441923
749
#!/usr/bin/env python import rospy import struct import sys #import pdb from copy import copy from geometry_msgs.msg import ( PoseStamped, Pose, Point, Quaternion, ) from std_msgs.msg import Header from baxter_core_msgs.msg import ( JointCommand ) import actionlib from control_msgs.msg import ( ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 11748, 2878, 198, 11748, 25064, 198, 2, 11748, 279, 9945, 198, 6738, 4866, 1330, 4866, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 357, 198, 220, 220,...
2.767327
202
# -- # File: cyphort_connector.py # Copyright (c) 2014-2021 Splunk 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 ...
[ 2, 1377, 198, 2, 9220, 25, 3075, 746, 419, 62, 8443, 273, 13, 9078, 198, 2, 15069, 357, 66, 8, 1946, 12, 1238, 2481, 13341, 2954, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, ...
3.053738
428
import matplotlib.pylab as plt import numpy as np import math as mm llen=1000; x=np.zeros(llen); y=np.zeros(llen); for i in range(0,llen): t=2*i*(mm.pi)/llen; x[i]=16*mm.pow(mm.sin(t),3); y[i]=13*mm.cos(t)-5*(mm.cos(t*2))-2*mm.cos(3*t)-mm.cos(4*t); plt.figu...
[ 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 220, 220, 220, 220, 220, 220, 220, 220, 220, 355, 458, 83, 198, 11748, 299, 32152, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.603053
262
# # Copyright (c) 2019-2021 steelpy # # Python stdlib imports #import math #import datetime from typing import Union, ClassVar # package imports from steelpy.codes.api.wsd_22ed import APIwsd22ed from steelpy.design.beam.process import BeamDesignParameters, CodeResults #from steelpy.f2uModel.load.operations.actions im...
[ 2, 220, 198, 2, 15069, 357, 66, 8, 13130, 12, 1238, 2481, 7771, 9078, 198, 2, 198, 2, 11361, 14367, 8019, 17944, 198, 2, 11748, 10688, 198, 2, 11748, 4818, 8079, 198, 6738, 19720, 1330, 4479, 11, 5016, 19852, 198, 198, 2, 5301, 17...
1.866256
3,088
import os import sys # Add the library top directory to first position in $PATH variable sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import splineDIC import numpy as np
[ 11748, 28686, 198, 11748, 25064, 198, 198, 2, 3060, 262, 5888, 1353, 8619, 284, 717, 2292, 287, 720, 34219, 7885, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 22179, 7, 418...
2.916667
72
""" This script provides a service to test BSDF implementations of different languages. It is written in Python, since BSDF's reference implementation is. To use, import this module and use ``main(test_dir, *exe)``. The test_dir will be the current directory when the command is executed. The exe is the command to run,...
[ 37811, 198, 1212, 4226, 3769, 257, 2139, 284, 1332, 24218, 8068, 25504, 286, 1180, 198, 75, 33213, 13, 632, 318, 3194, 287, 11361, 11, 1201, 24218, 8068, 338, 4941, 7822, 318, 13, 198, 198, 2514, 779, 11, 1330, 428, 8265, 290, 779, ...
2.195304
4,813
from aws_cdk import ( core, aws_codebuild as codebuild, aws_codecommit as codecommit, aws_codepipeline as codepipeline, aws_codepipeline_actions as codepipeline_actions, aws_events as events, aws_events_targets as targets, aws_iam as iam, aws_s3 as s3, ) class DeployPipelineConstru...
[ 6738, 3253, 82, 62, 10210, 74, 1330, 357, 198, 220, 220, 220, 4755, 11, 198, 220, 220, 220, 3253, 82, 62, 8189, 11249, 355, 2438, 11249, 11, 198, 220, 220, 220, 3253, 82, 62, 19815, 721, 2002, 270, 355, 40481, 2002, 270, 11, 198, ...
2.339394
165
__author__ = "Thomas Spycher, Philipp Spinnler" __copyright__ = "Copyright 2013, Zerodine GmbH (zerodine.com) " __credits__ = ["Thomas Spycher", "Philipp Spinnler"] __license__ = "Apache-2.0" __maintainer__ = "Thomas Spycher" __email__ = "me@tspycher.com" __status__ = "Development" import tornado.template from baseco...
[ 834, 9800, 834, 796, 366, 22405, 23688, 2044, 11, 9844, 1338, 3732, 1754, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 2211, 11, 37028, 375, 500, 402, 2022, 39, 357, 9107, 375, 500, 13, 785, 8, 366, 198, 834, 66, 20696, 834, 79...
2.173757
2,515
### Static Parameters ### # TemplateSpectrum = 'FLIR-ID-2_TemplateSpectrum_CmdLine.n42' ### End of the Static Parameters ### import os import xml.etree.ElementTree as ET from src.rase_functions import write_results def retrieve_FLIR_Results(filepath): """ :param filepath: :return: """ it = ET.p...
[ 21017, 36125, 40117, 44386, 198, 2, 37350, 49738, 6582, 796, 705, 3697, 4663, 12, 2389, 12, 17, 62, 30800, 49738, 6582, 62, 40109, 13949, 13, 77, 3682, 6, 198, 21017, 5268, 286, 262, 36125, 40117, 44386, 198, 198, 11748, 28686, 198, 1...
2.455752
452
import re from bs4 import BeautifulSoup
[ 11748, 302, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 628 ]
3.142857
14
#!/usr/bin/python3 import math import threading import numpy as np import rospy import tf2_ros from geometry_msgs.msg import TransformStamped from tello_formation.msg import GotoCommand from tello_ros.srv import TelloCommand class TelloController: """ This class is the one that controls the Tello. (It...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 628, 198, 11748, 10688, 198, 11748, 4704, 278, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 686, 2777, 88, 198, 11748, 48700, 17, 62, 4951, 198, 198, 6738, 22939, 62, 907, 14542, ...
2.240123
1,949
# -*- coding: utf-8 -*- # # django-codenerix # # Codenerix GNU # # Project URL : http://www.codenerix.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/LI...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 42625, 14208, 12, 19815, 877, 844, 198, 2, 198, 2, 18720, 877, 844, 22961, 198, 2, 198, 2, 4935, 10289, 1058, 2638, 1378, 2503, 13, 19815, 877, 844, 13, ...
3.175258
582
from django.db import models from experiment_session.models import ExperimentSession from django.core.validators import MinValueValidator
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 6306, 62, 29891, 13, 27530, 1330, 29544, 36044, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 1855, 11395, 47139, 1352, 628 ]
4.34375
32
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
3.291045
268
"""rabbit_force application entrypoint""" import logging from enum import IntEnum from collections import namedtuple import click from .config import load_config from .app import Application from ._metadata import TITLE, VERSION class Verbosity(IntEnum): """Logging detail level""" #: Application messages wi...
[ 37811, 81, 14229, 62, 3174, 3586, 5726, 4122, 37811, 198, 11748, 18931, 198, 6738, 33829, 1330, 2558, 4834, 388, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 3904, 198, 198, 6738, 764, 11250, 1330, 3440, 62, 11250, 198, 673...
2.659248
2,022
# -*- coding: utf-8 -*- """ Misc. calendar functions. """ import datetime from itertools import islice def chop(it, n): """Chop iterator into `n` size chuchks. """ while 1: s = list(islice(it, n)) if not s: break yield s def isoweek(year, week): """Iterate over th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 44, 2304, 13, 11845, 5499, 13, 198, 37811, 198, 11748, 4818, 8079, 198, 6738, 340, 861, 10141, 1330, 318, 75, 501, 628, 198, 4299, 30506, 7, 270, 11, 299, ...
2.15684
848
from building_blocks.admin.utils import render_element, json_field_pp
[ 6738, 2615, 62, 27372, 13, 28482, 13, 26791, 1330, 8543, 62, 30854, 11, 33918, 62, 3245, 62, 381, 628, 628, 198 ]
3.52381
21
from django.test import TestCase from graphql.language import ast from graphql_extensions import types
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 4823, 13976, 13, 16129, 1330, 6468, 198, 198, 6738, 4823, 13976, 62, 2302, 5736, 1330, 3858, 628 ]
3.785714
28
from formulae.utils import flatten_list class CallVarsExtractor: """Visitor that extracts variable names present in a model formula"""
[ 6738, 1296, 377, 3609, 13, 26791, 1330, 27172, 268, 62, 4868, 628, 198, 4871, 4889, 53, 945, 11627, 40450, 25, 198, 220, 220, 220, 37227, 15854, 2072, 326, 32139, 7885, 3891, 1944, 287, 257, 2746, 10451, 37811, 198 ]
3.710526
38
# Copyright (c) 2018 NEC, Corp. # # 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 agr...
[ 2, 15069, 357, 66, 8, 2864, 41804, 11, 11421, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 28...
3.342105
228
"""Constants for the Abode Security System component.""" import logging LOGGER = logging.getLogger(__package__) DOMAIN = "abode" ATTRIBUTION = "Data provided by goabode.com" DEFAULT_CACHEDB = "abodepy_cache.pickle" CONF_POLLING = "polling"
[ 37811, 34184, 1187, 329, 262, 2275, 1098, 4765, 4482, 7515, 526, 15931, 198, 11748, 18931, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 26495, 834, 8, 198, 198, 39170, 29833, 796, 366, 397, 1098, 1, 198, 1404, 54...
2.730337
89
from pydantic import BaseSettings settings = Settings()
[ 6738, 279, 5173, 5109, 1330, 7308, 26232, 628, 198, 198, 33692, 796, 16163, 3419, 198 ]
3.933333
15
from yacs.yacs_config import CfgNode as CN import os.path as osp # https://github.com/rbgirshick/yacs _C = CN() _C.DEST_EXT = "png" _C.SAVE_PATCH = False _C.SLIDE = CN() _C.SLIDE.BASE_DIR = '' _C.SLIDE.SCALE_FACTOR = 32 _C.SLIDE.DEST_DIR = '' _C.SLIDE.THUMBNAIL_SIZE = 300 _C.SLIDE.THUMBNAIL_EXT = "...
[ 6738, 331, 16436, 13, 88, 16436, 62, 11250, 1330, 327, 40616, 19667, 355, 31171, 201, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 201, 198, 2, 3740, 1378, 12567, 13, 785, 14, 26145, 70, 343, 1477, 624, 14, 88, 16436, 201, 198, 201,...
1.898923
1,207
#!/usr/bin/env python # -*- coding:UTF-8 -*- ''' @Description: @Author: Zpp @Date: 2019-09-02 16:04:11 @LastEditTime: 2019-09-12 11:27:19 @LastEditors: Zpp '''
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 48504, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 11828, 25, 220, 198, 31, 13838, 25, 1168, 381, 198, 31, 10430, 25, 13130, 12, 2931, 12, 2999, 1467, ...
2.090909
77
import argparse import os import re from argparse import ArgumentDefaultsHelpFormatter as Formatter import numpy as np from tqdm import tqdm from CHECLabPy.core.io import ReaderR1 from CHECLabPy.utils.waveform import get_average_wf_per_pixel if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 1822, 29572, 1330, 45751, 7469, 13185, 22087, 8479, 1436, 355, 5178, 1436, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, ...
3.010526
95
""" Tested behaviour: * Overlapping vcf records (same CHROM, same POS): the first is kept, the rest is ignored * Fasta records with no variation: they are output to the prg string in the order seen in the input fasta. * Adjacent records: site markers placed adjacent to each other, * Allele markers: in ...
[ 37811, 198, 51, 7287, 9172, 25, 198, 220, 220, 220, 1635, 3827, 75, 5912, 410, 12993, 4406, 357, 31642, 32567, 2662, 11, 976, 28069, 2599, 262, 717, 318, 4030, 11, 262, 1334, 318, 9514, 198, 220, 220, 220, 1635, 12549, 64, 4406, 351...
2.719834
721
import sys import datetime import requests import json import glob import re import numpy as np import os import csv DATAPATH='C:/NBA' url_base='http://data.nba.com/5s/json/cms/noseason/scoreboard/%s/games.json' get_season(2015,dateprocess("10/27/2015"),dateprocess("4/13/2016")) teamlist=["ATL","BKN...
[ 11748, 25064, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 7007, 201, 198, 11748, 33918, 201, 198, 11748, 15095, 201, 198, 11748, 302, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 11748, 269, 21370, 201, 1...
2.321149
383
# This example demonstrates how to use LCM with the Python select module import select import lcm from exlcm import example_t lc = lcm.LCM() lc.subscribe("EXAMPLE", my_handler) try: timeout = 1.5 # amount of time to wait, in seconds while True: rfds, wfds, efds = select.select([lc.fileno()], [], [],...
[ 2, 770, 1672, 15687, 703, 284, 779, 22228, 44, 351, 262, 11361, 2922, 8265, 198, 198, 11748, 2922, 198, 11748, 300, 11215, 198, 6738, 409, 75, 11215, 1330, 1672, 62, 83, 198, 198, 44601, 796, 300, 11215, 13, 5639, 44, 3419, 198, 446...
2.404145
193
# -*- coding: utf-8 -*- # @Time : 2019/9/6 15:46 # @Author : # @简介 : # @File : db_split.py import cx_Oracle from collections import defaultdict import os from copy import copy from time import clock from datetime import datetime, timedelta from meter_analysis import get_meter_data, get_offset from trace_m ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 24, 14, 21, 1315, 25, 3510, 198, 2, 2488, 13838, 220, 1058, 220, 198, 2, 2488, 163, 106, 222, 20015, 233, 220, 220, ...
2.647619
210
from exception import BotUserException from user_input import is_integer_number from team import is_owner from team import get_team_db_id from team import db_teams
[ 6738, 6631, 1330, 18579, 12982, 16922, 198, 6738, 2836, 62, 15414, 1330, 318, 62, 41433, 62, 17618, 198, 6738, 1074, 1330, 318, 62, 18403, 198, 6738, 1074, 1330, 651, 62, 15097, 62, 9945, 62, 312, 198, 6738, 1074, 1330, 20613, 62, 660...
3.688889
45
from rest_framework.permissions import BasePermission, SAFE_METHODS class IsPosterOrReadOnly(BasePermission): """ The request is authenticated as a poster(the one who posted the item), or is a read-only request. """
[ 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 7308, 5990, 3411, 11, 37630, 36, 62, 49273, 50, 628, 198, 4871, 1148, 47, 6197, 5574, 5569, 10049, 7, 14881, 5990, 3411, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 383, 2581, 318...
3.333333
69
import sys __all__ = ["liangbarsky", "cohensutherland", "clipline", "point_on_line"] def cohensutherland(left, top, right, bottom, x1, y1, x2, y2): """Clips a line to a rectangular area. This implements the Cohen-Sutherland line clipping algorithm. ``left``, ``top``, ``right`` and ``bottom`` define the ...
[ 11748, 25064, 198, 198, 834, 439, 834, 796, 14631, 4528, 648, 34046, 2584, 1600, 366, 1073, 5135, 45384, 1600, 366, 565, 24705, 500, 1600, 366, 4122, 62, 261, 62, 1370, 8973, 628, 198, 4299, 763, 5135, 45384, 7, 9464, 11, 1353, 11, ...
2.169765
2,851
# coding:utf-8 from .io import load_config, dump_config, register_dump_config, register_load_config from .io import ( allow_unsafe_yaml, require_safe_yaml, ConfigFormat, LEGAL_CONFIG_EXTENSIONS, ) from .python import ( is_json_serializable, UnsafePythonSourceConfig, PythonConfigNotSerializa...
[ 2, 19617, 25, 40477, 12, 23, 198, 198, 6738, 764, 952, 1330, 3440, 62, 11250, 11, 10285, 62, 11250, 11, 7881, 62, 39455, 62, 11250, 11, 7881, 62, 2220, 62, 11250, 198, 6738, 764, 952, 1330, 357, 198, 220, 220, 220, 1249, 62, 13271...
2.725926
135
import json with open('example.json') as f: data = json.loads(f.read()) print(data) print(type(data))
[ 11748, 33918, 198, 198, 4480, 1280, 10786, 20688, 13, 17752, 11537, 355, 277, 25, 198, 220, 220, 220, 1366, 796, 33918, 13, 46030, 7, 69, 13, 961, 28955, 198, 198, 4798, 7, 7890, 8, 198, 4798, 7, 4906, 7, 7890, 4008 ]
2.609756
41
#!/usr/bin/env python # Filename: eva_report_to_tables """ introduction: convert multiple evaluation reports to tables. authors: Huang Lingcao email:huanglingcao@gmail.com add time: 28 June, 2020 """ import os,sys import re from optparse import OptionParser import pandas as pd if __name__ == "__main__": usag...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 7066, 12453, 25, 819, 64, 62, 13116, 62, 1462, 62, 83, 2977, 220, 198, 37811, 198, 27427, 596, 25, 10385, 3294, 12660, 3136, 284, 8893, 13, 198, 198, 41617, 25, 31663, 25116, 66, ...
2.576687
326
from SublimeLinter.lint import ComposerLinter
[ 6738, 3834, 27299, 43, 3849, 13, 75, 600, 1330, 29936, 263, 43, 3849, 628 ]
3.357143
14
from unittest import TestCase from base_plugin import BasePlugin
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 2779, 62, 33803, 1330, 7308, 37233, 628 ]
3.941176
17
#!/usr/bin/python2 # Send a face to be recognized. This is a ros node. First run node tfwho. import rospy import numpy as np import logging from cv_bridge import CvBridge if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 198, 198, 2, 16290, 257, 1986, 284, 307, 8018, 13, 770, 318, 257, 686, 82, 10139, 13, 3274, 1057, 10139, 48700, 8727, 13, 198, 11748, 686, 2777, 88, 198, 11748, 299, 32152, 355, 45941, 198, ...
2.876712
73
# # PySNMP MIB module Fore-Errors-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Fore-Errors-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:03:25 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 4558, 12, 9139, 5965, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562,...
2.753247
847
import os import shutil
[ 11748, 28686, 198, 11748, 4423, 346 ]
3.833333
6
"""Python wrapper for GTA Orange's vehicle functions Subscribable built-in events: +===============+=========================+====================================+ | name | vehicle-local arguments | global arguments | +===============+=========================+===============================...
[ 37811, 37906, 29908, 329, 30807, 11942, 338, 4038, 5499, 198, 198, 7004, 40075, 540, 3170, 12, 259, 2995, 25, 198, 10, 25609, 18604, 10, 4770, 2559, 28, 10, 10052, 1421, 10, 198, 91, 220, 220, 220, 220, 1438, 220, 220, 220, 220, 220...
2.42358
3,749
from django.contrib.auth.forms import SetPasswordForm from django.contrib.auth.views import (PasswordChangeView, PasswordResetConfirmView, PasswordResetView) from django.urls import reverse_lazy from django.views.generic import CreateView fr...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 5345, 35215, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 33571, 1330, 357, 35215, 19400, 7680, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.411043
163
import requests from bs4 import BeautifulSoup def imdb_id(title): """IMDB identifier >>> imdb_id("Inception") 'tt1375666' >>> imdb_id("Interstellar") 'tt0816692' """ web_text = requests.get(f"https://www.imdb.com/find?q={title}").text soup = BeautifulSoup(web_text, "html.parser") c...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 4299, 545, 9945, 62, 312, 7, 7839, 2599, 198, 220, 220, 220, 37227, 3955, 11012, 27421, 198, 220, 220, 220, 13163, 545, 9945, 62, 312, 7203, 818, 4516, 4943, 198...
2.324324
777
# coding: utf-8 """ Versed conversion API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import i...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 18535, 276, 11315, 7824, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, 12, 15042, 14, ...
2.311468
2,363