content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import math import time import numpy as np import numba as nb import quaternion # adds to numpy # noqa # pylint: disable=unused-import import sys import scipy from astropy.coordinates import SkyCoord from scipy.interpolate import RectBivariateSpline from scipy.interpolate import NearestNDInterpolator # from scipy.s...
[ 11748, 10688, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 997, 7012, 355, 299, 65, 198, 11748, 627, 9205, 295, 220, 1303, 6673, 284, 299, 32152, 220, 1303, 645, 20402, 1303, 279, 2645, 600, 25, 15560, 28, 403...
2.00093
13,979
import torch import torch.nn as nn import torch.nn.functional as F from .kernels import ( get_spatial_gradient_kernel2d, get_spatial_gradient_kernel3d, normalize_kernel2d ) def spatial_gradient(input, mode='sobel', order=1, normalized=True): """ Computes the first order image derivative in bo...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 764, 74, 44930, 1330, 357, 198, 220, 220, 220, 651, 62, 2777, 34961, 62, 49607, 62, 33885, 17, 67, 11, 198,...
2.355222
1,264
# -*- encoding: utf-8 -*- import gzip import io import glob from concurrent import futures def find_robots(filename): ''' Find all of the hosts that access robots.txt in a single log file ''' robots = set() with gzip.open(filename) as f: for line in io.TextIOWrapper(f, encoding='ascii'): ...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 308, 13344, 198, 11748, 33245, 198, 11748, 15095, 198, 6738, 24580, 1330, 25650, 628, 198, 4299, 1064, 62, 22609, 1747, 7, 34345, 2599, 198, 220, 220, 220, 705, 7...
2.34555
382
# ****************************************************************** # |docname| - Provide `docker_tools.py` as the script `docker-tools` # ****************************************************************** from setuptools import setup setup( name="runestone-docker-tools", version="0.1", install_requires=[...
[ 2, 41906, 17174, 1174, 198, 2, 930, 15390, 3672, 91, 532, 44290, 4600, 45986, 62, 31391, 13, 9078, 63, 355, 262, 4226, 4600, 45986, 12, 31391, 63, 198, 2, 41906, 17174, 1174, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, ...
3.598291
117
from flask import Flask, render_template, request, jsonify,send_file, redirect,session, url_for from werkzeug import secure_filename import os import utilities, queries import logger from flask_cors import CORS, cross_origin from datetime import timedelta app = Flask(__name__) CORS(app) cors = CORS(app, resources={r"/*...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 33918, 1958, 11, 21280, 62, 7753, 11, 18941, 11, 29891, 11, 19016, 62, 1640, 198, 6738, 266, 9587, 2736, 1018, 1330, 5713, 62, 34345, 198, 11748, 28686, 198, 11748, 20081, 1...
2.878327
263
import os import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import matplotlib.pyplot as plt # local model import sys sys.path.append("../network") import Coral from lstm import LSTMHardSigmoid from AdaBN import AdaBN sys.path.append("../network/Aut...
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29...
2.43257
393
"""Emmental model.""" import itertools import logging import os from collections import defaultdict from collections.abc import Iterable from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import numpy as np import torch from numpy import ndarray from torch import Tensor, nn as nn from torch.nn i...
[ 37811, 10161, 37098, 2746, 526, 15931, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 17268, 13, 39305, 1330, 40806, 540, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11,...
2.369725
1,090
import asyncio, json from config import Config from soundpad_manager import SoundpadManager from version import BRIDGE_VERSION import websockets from sanic.log import logger # yes I know that it's very lazy to run a separate WS and HTTP server, when both could be run on the same port # I don't like sanics ...
[ 11748, 30351, 952, 11, 33918, 201, 198, 201, 198, 6738, 4566, 1330, 17056, 201, 198, 6738, 2128, 15636, 62, 37153, 1330, 9506, 15636, 13511, 201, 198, 6738, 2196, 1330, 11177, 2389, 8264, 62, 43717, 201, 198, 201, 198, 11748, 2639, 1160...
3.8
115
#!/usr/local/bin/python # -*- coding: utf-8 -*- """ - LICENCE The MIT License (MIT) Copyright (c) 2016 Eleftherios Anagnostopoulos for Ericsson AB (EU FP7 CityPulse Project) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 12, 38559, 18310, 198, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 1584, 1598...
2.247579
8,260
from __future__ import absolute_import from __future__ import print_function from __future__ import division import unittest import pytest from tensorforce import TensorForceError from tensorforce.core.networks import LayeredNetwork from tensorforce.models import DistributionModel from tensorforce.tests.minimal_test ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 555, 715, 395, 198, 11748, 12972, 9288, 198, 198, 6738, 11192, 273, 3174, 133...
3.845588
136
import random import messages_pb2 as msg
[ 11748, 4738, 198, 11748, 6218, 62, 40842, 17, 355, 31456, 628 ]
3.818182
11
# In --strict mode, mypy complains about imports unless they're done this way. # # It complains 'Module has no attribute ABC' or 'Module "mango" does not explicitly export # attribute "XYZ"; implicit reexport disabled'. We could dial that back by using the # --implicit-reexport parameter, but let's keep things strict. ...
[ 2, 554, 1377, 301, 2012, 4235, 11, 616, 9078, 41165, 546, 17944, 4556, 484, 821, 1760, 428, 835, 13, 198, 2, 198, 2, 632, 41165, 705, 26796, 468, 645, 11688, 9738, 6, 393, 705, 26796, 366, 76, 14208, 1, 857, 407, 11777, 10784, 198...
3.948549
4,412
import lettercounter as lc #Books form Gutenberg Project: https://www.gutenberg.org/ebooks/author/69 lc.showPlots(text_directory_pathname="./Books/", title="Sir Arthur Conan Doyle's favourite letters", legend_label_main="in Doyle's stories")
[ 11748, 3850, 24588, 355, 300, 66, 198, 198, 2, 30650, 1296, 20336, 4935, 25, 3740, 1378, 2503, 13, 70, 19028, 13, 2398, 14, 16497, 82, 14, 9800, 14, 3388, 198, 198, 44601, 13, 12860, 3646, 1747, 7, 5239, 62, 34945, 62, 6978, 3672, ...
3.011628
86
from .bbItem import bbItem from ...bbConfig import bbData
[ 6738, 764, 11848, 7449, 1330, 275, 65, 7449, 198, 6738, 2644, 11848, 16934, 1330, 275, 65, 6601, 628 ]
3.277778
18
from django.urls import path from what_can_i_cook.views import WCICFilterView, WCICResultView app_name = "wcic" urlpatterns = [ path("", WCICFilterView.as_view(), name="wcic-start"), path("results/", WCICResultView.as_view(), name="wcic-results"), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 644, 62, 5171, 62, 72, 62, 27916, 13, 33571, 1330, 28387, 2149, 22417, 7680, 11, 28387, 2149, 23004, 7680, 198, 198, 1324, 62, 3672, 796, 366, 86, 66, 291, 1, 628, 198, ...
2.60396
101
import ssg.utils
[ 11748, 37786, 70, 13, 26791, 628 ]
3
6
import tensorflow as tf import os import contractions import tensorflow as tf import pandas as pd import numpy as np import time import rich from rich.progress import track import spacy from config import params #Preprocessing Text
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 28686, 198, 11748, 2775, 507, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 640, 198, 11748, 5527, ...
3.671875
64
from setuptools import setup, find_packages from distutils.extension import Extension from distutils.command.sdist import sdist try: from Cython.Build import cythonize USE_CYTHON = True except ImportError: USE_CYTHON = False ext = 'pyx' if USE_CYTHON else 'c' extensions = [Extension( 'dsigma.precomput...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 1233, 26791, 13, 2302, 3004, 1330, 27995, 198, 6738, 1233, 26791, 13, 21812, 13, 82, 17080, 1330, 264, 17080, 198, 28311, 25, 198, 220, 220, 220, 422, 327, 7535, 13,...
2.523026
608
import cv2 import mediapipe as mp
[ 11748, 269, 85, 17, 198, 11748, 16957, 499, 3757, 355, 29034, 628 ]
2.916667
12
import sys import logging # loggers_dict = logging.Logger.manager.loggerDict # # logger = logging.getLogger() # logger.handlers = [] # # # Set level # logger.setLevel(logging.DEBUG) # # # FORMAT = "%(asctime)s - %(levelno)s - %(module)-15s - %(funcName)-15s - %(message)s" # # FORMAT = "%(asctime)s %(levelno)s: %(modul...
[ 11748, 25064, 198, 198, 11748, 18931, 198, 2, 2604, 5355, 62, 11600, 796, 18931, 13, 11187, 1362, 13, 37153, 13, 6404, 1362, 35, 713, 198, 2, 198, 2, 49706, 796, 18931, 13, 1136, 11187, 1362, 3419, 198, 2, 49706, 13, 4993, 8116, 796...
2.825387
1,678
# -*- coding: utf-8 -*- """ pyRofex.components.messages Defines APIs messages templates """ # Template for a Market Data Subscription message MARKET_DATA_SUBSCRIPTION = '{{"type":"smd","level":1, "entries":[{entries}],"products":[{symbols}]}}' # Template for an Order Subscription message ORDER_SUBSCRIPTION = ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 12972, 49, 1659, 1069, 13, 5589, 3906, 13, 37348, 1095, 628, 220, 220, 220, 2896, 1127, 23113, 6218, 24019, 198, 37811, 198, 198, 2, 37350, ...
2.965
200
#!/usr/bin/env python3.4 from flask import Flask import requests from fibonacci import fibonacci as fib app = Flask(__name__) if __name__ == "__main__": app.run(host='0.0.0.0', port=8082, debug=True)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 19, 198, 6738, 42903, 1330, 46947, 198, 11748, 7007, 198, 6738, 12900, 261, 44456, 1330, 12900, 261, 44456, 355, 12900, 628, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 628, ...
2.592593
81
# Future Imports for py2/3 backwards compat. from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import object from .xml_utils import get_attribute, get_content_of from future import standard_library standard_library.install_aliases()
[ 2, 10898, 1846, 3742, 329, 12972, 17, 14, 18, 16196, 8330, 13, 198, 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
3.058824
102
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# _*_ coding: utf-8 _*_ # @Time : 2021/3/29 08:57 # @Author : cherish_peng # @Email : 1058386071@qq.com # @File : cmd.py # @Software : PyCharm from enum import Enum
[ 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 2, 2488, 7575, 1058, 33448, 14, 18, 14, 1959, 220, 8487, 25, 3553, 220, 198, 2, 2488, 13838, 1058, 48303, 62, 79, 1516, 198, 2, 2488, 15333, 1058, 838, 3365, 2548, ...
2.225
80
from importlib.resources import path from jsonschema_typed import JSONSchema with path("sentry_data_schemas", "event.schema.json") as schema_path: EventData = JSONSchema["var:sentry_data_schemas:schema_path"]
[ 6738, 1330, 8019, 13, 37540, 1330, 3108, 198, 6738, 44804, 684, 2395, 2611, 62, 774, 9124, 1330, 19449, 27054, 2611, 198, 198, 4480, 3108, 7203, 82, 13000, 62, 7890, 62, 1416, 4411, 292, 1600, 366, 15596, 13, 15952, 2611, 13, 17752, 4...
2.853333
75
# elsewhere... import pandas as pd from keras.models import model_from_json import random import sys import numpy as np maxlen = 15 step = 3 df = pd.read_pickle('articles.pandas') text = str.join(' ', df.text.tolist()) chars = set(text) print('total chars:', len(chars)) char_indices = dict((c, i) for i, c in enumer...
[ 2, 8057, 986, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 41927, 292, 13, 27530, 1330, 2746, 62, 6738, 62, 17752, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 628, 198, 9806, 11925, 796, 1315, 198, 966...
2.478505
535
import unittest from simulation import container from simulation import person if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 18640, 1330, 9290, 198, 6738, 18640, 1330, 1048, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
3.394737
38
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import pontoon.base.models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 11748, 45443, 2049, 13, 8692, 13, 27...
2.977778
45
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 1946, 12, 25579, 19193, 9399, 1279, 32057, 31, 24254, 952, 13, 2398, 29, 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.823729
295
from . import send_message from . import receive_message
[ 6738, 764, 1330, 3758, 62, 20500, 198, 6738, 764, 1330, 3328, 62, 20500 ]
4.307692
13
from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.core.exceptions import PermissionDenied from django.http import HttpResponseForbidden, HttpResponseRedirect from django.utils.functional import wraps from django.utils.http import urlquote from django.db.models import Model...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 23848, 40, 23988, 62, 44603, 62, 20608, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 2448, 3411, 21306, 798, 198, 6738, 426...
3.044164
1,268
from django import forms from django.forms import ModelForm from images.models import Image
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 198, 6738, 4263, 13, 27530, 1330, 7412, 628 ]
4.227273
22
# Copyright 2012-2013 Eric Ptak - trouch.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ 2, 220, 220, 15069, 2321, 12, 6390, 7651, 34352, 461, 532, 4057, 354, 13, 785, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, ...
2.433735
664
# Copyright 2013 Nebula 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...
[ 2, 220, 220, 15069, 2211, 46915, 3457, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262,...
3.266917
266
#!/usr/bin/env python3 import sys from os.path import dirname, abspath, join import subprocess # Note this does not resolve symbolic links # https://stackoverflow.com/a/17806123 FIREFOX_BINARY = join(dirname(abspath(__file__)), 'firefox') argvs = list(sys.argv) argvs[0] = FIREFOX_BINARY # geckdriver will run `firef...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 2352, 6978, 11, 4654, 198, 11748, 850, 14681, 198, 198, 2, 5740, 428, 857, 407, 10568, 18975, 6117, 198, 2, ...
2.392405
474
import json import logging from collections import OrderedDict from decimal import ROUND_HALF_UP, Decimal from typing import Any, Dict, Union import pytz from django import forms from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.dispatch import receiver from django.fo...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 32465, 1330, 371, 15919, 62, 39, 1847, 37, 62, 8577, 11, 4280, 4402, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 4479, 198, 198, 11748, 1297...
2.80765
6,353
from pysys.basetest import BaseTest from apama.correlator import CorrelatorHelper import os
[ 6738, 279, 893, 893, 13, 12093, 316, 395, 1330, 7308, 14402, 198, 6738, 2471, 1689, 13, 10215, 2411, 1352, 1330, 2744, 2411, 1352, 47429, 198, 11748, 28686, 198 ]
3.285714
28
from __future__ import absolute_import, division, print_function, unicode_literals from unittest import TestCase from beast.env.ReadEnvFile import read_env_file from beast.util import Terminal Terminal.CAN_CHANGE_COLOR = False JSON = """ { "FOO": "foo", "BAR": "bar bar bar", "CPPFLAGS": "-std=c++11 -frtti -fno...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 13824, 13, 24330, 13, 5569, 4834, 85, 8979, 1330, 1100, 62, ...
2.419463
298
import json from django.test import TestCase from django.contrib.auth.models import User from .models import CustomUser from django.apps import apps from .apps import SigninConfig
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 764, 27530, 1330, 8562, 12982, 198, 6738, 42625, 14208, 13, 18211, 1330, 6725, ...
3.714286
49
__author__ = 'Elias Haroun'
[ 834, 9800, 834, 796, 705, 9527, 4448, 2113, 977, 6, 628 ]
2.636364
11
""" Main tokenizer. """ from itertools import * import sys, random import util import ply.lex as lex def init_tokens( tokenlist ): """ Returns elments of the list that are initializers """ return filter( cond, tokenlist) def label_tokens( tokenlist ): """ Returns elements where the first toke...
[ 37811, 198, 13383, 11241, 7509, 13, 198, 37811, 198, 6738, 340, 861, 10141, 1330, 1635, 198, 11748, 25064, 11, 4738, 198, 11748, 7736, 198, 11748, 35960, 13, 2588, 355, 31191, 198, 198, 4299, 2315, 62, 83, 482, 641, 7, 11241, 4868, 15...
2.302414
1,574
"""Unit tests for the InteractiveOption.""" from __future__ import absolute_import import unittest import click from click.testing import CliRunner from click.types import IntParamType from aiida.cmdline.params.options.interactive import InteractiveOption from aiida.cmdline.params.options import NON_INTERACTIVE
[ 37811, 26453, 5254, 329, 262, 21365, 19722, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 555, 715, 395, 198, 198, 11748, 3904, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 6738, 3904, 13, 19199...
3.77381
84
""" Changes existing registered_meta on a node to new schema layout required for the prereg-prize """ import json import sys import logging from modularodm import Q from framework.mongo import database as db from framework.mongo.utils import from_mongo from framework.transactions.context import TokuTransaction from ...
[ 37811, 198, 29238, 4683, 6823, 62, 28961, 319, 257, 10139, 284, 649, 32815, 12461, 198, 35827, 329, 262, 662, 2301, 12, 3448, 2736, 198, 37811, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 18931, 198, 198, 6738, 26507, 375, 76, 133...
3.042802
257
""" Copyright (C) 2012 Alan J Lockett Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
[ 37811, 198, 15269, 357, 34, 8, 2321, 12246, 449, 13656, 3087, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, 284...
4.133829
269
""" given a fully connected undirected graph(If no path exists between two cities, adding an arbitrarily long edge will complete the graph without affecting the optimal tour), find the path with the lowest cost in total for a salesman to travel from a given start vertex """ import time if __name__ == "__main__"...
[ 37811, 198, 35569, 257, 3938, 5884, 3318, 1060, 276, 4823, 7, 1532, 645, 3108, 7160, 1022, 734, 4736, 11, 4375, 281, 40647, 890, 5743, 481, 1844, 262, 4823, 1231, 13891, 262, 16586, 4205, 828, 198, 19796, 262, 3108, 351, 262, 9016, 15...
2.739669
242
peasant = hero.findNearest(hero.findFriends()) while True: hero.command(peasant, "buildXY", "decoy", peasant.pos.x + 2, peasant.pos.y) var nextPoint = {"x": hero.pos.x, "y": hero.pos.y + 28} moveBothTo(nextPoint) nextPoint = {"x": hero.pos.x + 28, "y": hero.pos.y} var enemy = hero.findNe...
[ 201, 198, 201, 198, 431, 8775, 796, 4293, 13, 19796, 8199, 12423, 7, 11718, 13, 19796, 36705, 28955, 201, 198, 201, 198, 4514, 6407, 25, 201, 198, 220, 220, 220, 4293, 13, 21812, 7, 431, 8775, 11, 366, 11249, 34278, 1600, 366, 12501...
2.204545
220
# The isBadVersion API is already defined for you. # @param version, an integer # @return a bool # def isBadVersion(version):
[ 2, 383, 318, 22069, 14815, 7824, 318, 1541, 5447, 329, 345, 13, 198, 2, 2488, 17143, 2196, 11, 281, 18253, 198, 2, 2488, 7783, 257, 20512, 198, 2, 825, 318, 22069, 14815, 7, 9641, 2599, 628 ]
3.527778
36
# Generated by Django 2.2.12 on 2020-05-01 03:34 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1065, 319, 12131, 12, 2713, 12, 486, 7643, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 1...
3.038462
52
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: gbk -*- # Date: 2019/2/22 # Created by # Description bindshell.exevscan.novirusthanks.org # python check_virus.py -f bindshell.exe # https://blog.csdn.net/l1028386804 import re import httplib import time import os import optparse from urlparse ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 532, 9, 12, 19617, 25, 308, 65, 74, 532, 9, 12, 198, 2, 7536, 25, 13130, 14, 17, 14, 1828, 198, 2, 15622, 41...
2.407643
157
import asyncio from typing import Union import datetime import time from discord.ext import commands import yaml from cogs import checks import database import utils # Loads the repeating interval dictionary with open("conversions.yml", "r") as conversion_file: conversion_dict = yaml.load(conversion_file, Loade...
[ 11748, 30351, 952, 198, 6738, 19720, 1330, 4479, 198, 11748, 4818, 8079, 198, 11748, 640, 198, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 331, 43695, 628, 198, 6738, 269, 18463, 1330, 8794, 198, 11748, 6831, 198, 11748, 3384, 4...
3.429907
107
import setuptools from toraman.version import __version__ with open('README.md', 'r') as input_file: long_description = input_file.read() setuptools.setup( name='toraman', version=__version__, author='aatay Onur engr', author_email='contact@csengor.com', description='A computer-assisted trans...
[ 11748, 900, 37623, 10141, 198, 198, 6738, 7332, 10546, 13, 9641, 1330, 11593, 9641, 834, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 9132, 3256, 705, 81, 11537, 355, 5128, 62, 7753, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 5128...
2.681818
352
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
# Copyright The PyTorch Lightning team. # # 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 i...
[ 2, 15069, 383, 9485, 15884, 354, 12469, 1074, 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, 1...
3.774194
217
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 2864, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.211498
21,934
""" CTC-like decoder utilitis. """ from itertools import groupby import numpy as np def ctc_best_path_decode(probs_seq, vocabulary): """ Best path decoding, also called argmax decoding or greedy decoding. Path consisting of the most probable tokens are further post-processed to remove consecutive...
[ 37811, 198, 220, 220, 220, 327, 4825, 12, 2339, 875, 12342, 3384, 6392, 271, 13, 198, 37811, 198, 198, 6738, 340, 861, 10141, 1330, 1448, 1525, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 269, 23047, 62, 13466, 62, 6978, 62, ...
2.778049
820
#!/usr/local/bin/python import json import socket import sys import asfgit.cfg as cfg import asfgit.git as git import asfgit.log as log import asfgit.util as util import subprocess, os, time
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 198, 11748, 33918, 198, 11748, 17802, 198, 11748, 25064, 198, 198, 11748, 355, 69, 18300, 13, 37581, 355, 30218, 70, 198, 11748, 355, 69, 18300, 13, 18300, 355, 17606, 198, 11748, ...
2.939394
66
from __future__ import absolute_import, division, print_function import contextlib import importlib import site import tempfile import shutil from rosimport import genrosmsg_py, genrossrv_py """ A module to setup custom importer for .msg and .srv files Upon import, it will first find the .msg file, then generate t...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 4732, 8019, 198, 11748, 1330, 8019, 198, 11748, 2524, 198, 11748, 20218, 7753, 198, 198, 11748, 4423, 346, 628, 198, 6738, 686, 82, 11748, ...
2.938538
602
import sys log = NotALogger() __all__ = ["log"]
[ 11748, 25064, 628, 628, 198, 6404, 796, 1892, 1847, 519, 1362, 3419, 198, 198, 834, 439, 834, 796, 14631, 6404, 8973, 198 ]
2.409091
22
"""dbt_airflow_factory module.""" from setuptools import find_packages, setup with open("README.md") as f: README = f.read() # Runtime Requirements. INSTALL_REQUIRES = ["pytimeparse==1.1.8"] # Dev Requirements EXTRA_REQUIRE = { "tests": [ "pytest>=6.2.2, <7.0.0", "pytest-cov>=2.8.0, <3.0.0",...
[ 37811, 9945, 83, 62, 958, 11125, 62, 69, 9548, 8265, 526, 15931, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 4943, 355, 277, 25, 198, 220, 220, 220, 20832, ...
2.136103
698
# -*- coding: utf-8; -*- """Define error strings raised by the application.""" MISSING_CONFIG_VALUE = """ '{0}' is not specified or invalid in the config file! """.strip()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 26, 532, 9, 12, 198, 37811, 7469, 500, 4049, 13042, 4376, 416, 262, 3586, 526, 15931, 198, 198, 44, 16744, 2751, 62, 10943, 16254, 62, 39488, 796, 37227, 198, 6, 90, 15, 92, 6, 318, ...
2.883333
60
import numpy as np import pytest from karabo_bridge import serialize, deserialize from .utils import compare_nested_dict
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 479, 283, 34748, 62, 9458, 1330, 11389, 1096, 11, 748, 48499, 1096, 198, 198, 6738, 764, 26791, 1330, 8996, 62, 77, 7287, 62, 11600, 628, 628, 628 ]
3.282051
39
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import inspect from datetime import datetime import freezegun import pytest from sqlalchemy import DateTi...
[ 2, 770, 2393, 318, 636, 286, 1423, 3713, 13, 198, 2, 15069, 357, 34, 8, 6244, 532, 33448, 327, 28778, 198, 2, 198, 2, 1423, 3713, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 13096, 340, 739, 262, 2846,...
3.518182
110
#!/usr/bin/env python3 # encoding: utf-8 import os # # DEBUG_ENABLE = False # SQLite SQLITE_FILE = "saved.db" # LOG_FILE = "log.txt" # ENABLE_LOGGER = True # (: 180) LOOP_CHECK_INTERVAL = 180 * 60 # PROXIES = "127.0.0.1:1080" # TIMEOUT = 20 # Socks5 IS_SOCKS = False # TG BOT ENABLE_SENDMESSAGE =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 198, 2, 220, 220, 220, 198, 2, 220, 220, 198, 30531, 62, 1677, 17534, 796, 10352, 198, 198, 2, 16363, 578, 220, 1...
1.967213
305
from sqlalchemy import or_ from websdk.db_context import DBContext from libs.base_handler import BaseHandler from libs.pagination import pagination_util from models.hipaa_data import HipaaData, model_to_dict hipaa_data_host_urls = [ (r"/v1/cmdb/hipaa_data/", HipaaDataHandler), ] if __name__ == '__main__': ...
[ 6738, 44161, 282, 26599, 1330, 393, 62, 198, 6738, 2639, 34388, 13, 9945, 62, 22866, 1330, 360, 2749, 261, 5239, 198, 6738, 9195, 82, 13, 8692, 62, 30281, 1330, 7308, 25060, 198, 6738, 9195, 82, 13, 79, 363, 1883, 1330, 42208, 1883, ...
2.7
120
#!/usr/bin/env python3 import rospy from std_msgs.msg import Int32 import time rospy.init_node('count') # count pub = rospy.Publisher('count_up', Int32, queue_size=1) # count_up rate = rospy.Rate(10) # 10Hz n = 0 time.sleep(2) while not rospy.is_shutd...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 686, 2777, 88, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 2558, 2624, 198, 11748, 640, 198, 198, 305, 2777, 88, 13, 15003, 62, 17440, 10786, 9127, 11537, 220, 220, ...
1.712025
316
# python version 1.0 DO NOT EDIT # # Generated by smidump version 0.4.8: # # smidump -f python ZYXEL-GS4012F-MIB FILENAME = "mibs/ZyXEL/zyxel-GS4012F.mib" MIB = { "moduleName" : "ZYXEL-GS4012F-MIB", "ZYXEL-GS4012F-MIB" : { "nodetype" : "module", "language" : "SMIv2", "organizat...
[ 2, 21015, 2196, 352, 13, 15, 197, 197, 197, 197, 197, 197, 18227, 5626, 48483, 198, 2, 198, 2, 2980, 515, 416, 895, 312, 931, 2196, 657, 13, 19, 13, 23, 25, 198, 2, 198, 2, 220, 220, 895, 312, 931, 532, 69, 21015, 1168, 56, ...
1.546736
266,412
import logging from threading import Timer from datetime import timedelta from rx.core import Scheduler, Disposable from rx.disposables import SingleAssignmentDisposable, CompositeDisposable from .schedulerbase import SchedulerBase log = logging.getLogger("Rx") timeout_scheduler = TimeoutScheduler()
[ 11748, 18931, 198, 6738, 4704, 278, 1330, 5045, 263, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 374, 87, 13, 7295, 1330, 27774, 18173, 11, 3167, 1930, 540, 198, 6738, 374, 87, 13, 6381, 1930, 2977, 1330, 14206, 8021, 1...
3.373626
91
import requests from bs4 import BeautifulSoup
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198 ]
3.833333
12
import os import string from collections import Counter from datetime import datetime from functools import partial from pathlib import Path from typing import Optional import numpy as np import pandas as pd from scipy.stats.stats import chisquare from tangled_up_in_unicode import block, block_abbr, categor...
[ 11748, 28686, 201, 198, 11748, 4731, 201, 198, 6738, 17268, 1330, 15034, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 6738, 1257, 310, 10141, 1330, 13027, 201, 198, 6738, 3108, 8019, 1330, 10644, 201, 198, 6738, 19720, 1330, ...
2.261107
2,926
# Author: Anurag Ranjan # Copyright (c) 2019, Anurag Ranjan # All rights reserved. # based on github.com/ClementPinard/SfMLearner-Pytorch from __future__ import division import torch from torch.autograd import Variable pixel_coords = None def cam2pixel(cam_coords, proj_c2p_rot, proj_c2p_tr, padding_mode): ""...
[ 2, 6434, 25, 1052, 333, 363, 23075, 13881, 198, 2, 15069, 357, 66, 8, 13130, 11, 1052, 333, 363, 23075, 13881, 198, 2, 1439, 2489, 10395, 13, 198, 2, 1912, 319, 33084, 13, 785, 14, 34, 1732, 28348, 446, 14, 50, 69, 5805, 451, 10...
2.110288
3,781
# Lint as: python2, python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
[ 2, 406, 600, 355, 25, 21015, 17, 11, 21015, 18, 198, 2, 15069, 12131, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 1...
3.794872
351
# This file shows how to implement a single hidden layer neural network for # performing binary classification on the GPU using cudamat. from __future__ import division import pdb import time import numpy as np import cudamat as cm from cudamat import learn as cl import util # initialize CUDA cm.cublas_init() # load...
[ 2, 770, 2393, 2523, 703, 284, 3494, 257, 2060, 7104, 7679, 17019, 3127, 329, 198, 2, 9489, 13934, 17923, 319, 262, 11362, 1262, 269, 463, 321, 265, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 279, 9945, 198, 11748, ...
2.186962
1,626
from __future__ import division import numpy as np from ..constants import molwt def regress(emissions, beta=np.array([2.8249e-4, 1.0695e-4, -9.3604e-4, 99.7831e-4])): """Calculates tropospheric ozone forcing from precursor emissions. Inputs: (nt x 40) emissions array Keywords: beta...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11485, 9979, 1187, 1330, 18605, 46569, 198, 198, 4299, 50252, 7, 368, 7717, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12159...
2.056528
2,742
import uuid from invenio_indexer.api import RecordIndexer from invenio_pidstore.models import PersistentIdentifier, PIDStatus from invenio_records_draft.api import RecordContext from invenio_records_draft.proxies import current_drafts from invenio_search import RecordsSearch, current_search, current_search_client from...
[ 11748, 334, 27112, 198, 198, 6738, 287, 574, 952, 62, 9630, 263, 13, 15042, 1330, 13266, 15732, 263, 198, 6738, 287, 574, 952, 62, 35317, 8095, 13, 27530, 1330, 9467, 7609, 33234, 7483, 11, 37022, 19580, 198, 6738, 287, 574, 952, 62, ...
3.669492
118
import os import subprocess from collections import namedtuple import gi gi.require_version("Gst", "1.0") gi.require_version("Tcam", "0.1") from gi.repository import Tcam, Gst, GLib, GObject DeviceInfo = namedtuple("DeviceInfo", "status name identifier connection_type") CameraProperty = namedtuple("CameraProperty", ...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 308, 72, 198, 198, 12397, 13, 46115, 62, 9641, 7203, 38, 301, 1600, 366, 16, 13, 15, 4943, 198, 12397, 13, 46115, 62, 9641, 7203, 51, 20991, ...
3.315789
133
from typing import Dict, Any from yaml import load CONFIG = get_config()
[ 6738, 19720, 1330, 360, 713, 11, 4377, 198, 6738, 331, 43695, 1330, 3440, 198, 198, 10943, 16254, 796, 651, 62, 11250, 3419, 198 ]
3.217391
23
# Author: Tillmann Falck <tf-raman@lucidus.de> # # License: BSD 3 clause # # SPDX-License-Identifier: BSD-3-Clause import collections from itertools import product import cvxpy as cp import numpy as np def sunsal_tv(A, Y, lambda_1, lambda_tv, sweep='prod', tv_type='iso', additional_constraint='none'): r""" S...
[ 2, 6434, 25, 17888, 9038, 9596, 694, 1279, 27110, 12, 859, 272, 31, 75, 1229, 312, 385, 13, 2934, 29, 198, 2, 198, 2, 13789, 25, 347, 10305, 513, 13444, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, ...
2.370703
2,007
import pytest
[ 11748, 12972, 9288, 628 ]
3.75
4
# -*- coding: utf-8 -*- import json from TM1py.Objects.TM1Object import TM1Object
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 198, 6738, 21232, 16, 9078, 13, 10267, 82, 13, 15972, 16, 10267, 1330, 21232, 16, 10267, 628 ]
2.428571
35
from sqlalchemy import exc from sqlalchemy.sql.expression import func from models import Watchlist, Portfolio, Activity from app import db import metric
[ 6738, 44161, 282, 26599, 1330, 2859, 198, 6738, 44161, 282, 26599, 13, 25410, 13, 38011, 1330, 25439, 198, 6738, 4981, 1330, 6305, 4868, 11, 4347, 13652, 11, 24641, 198, 6738, 598, 1330, 20613, 198, 11748, 18663, 628, 628, 628, 198 ]
3.975
40
bl_info = { "name": "ke_fit2grid", "author": "Kjell Emanuelsson", "category": "Modeling", "version": (1, 0, 2), "blender": (2, 80, 0), } import bpy import bmesh from .ke_utils import get_loops, correct_normal, average_vector from mathutils import Vector, Matrix # ---------------------------------...
[ 2436, 62, 10951, 796, 1391, 198, 220, 220, 220, 366, 3672, 1298, 366, 365, 62, 11147, 17, 25928, 1600, 198, 220, 220, 220, 366, 9800, 1298, 366, 42, 73, 695, 31920, 16528, 1600, 198, 220, 220, 220, 366, 22872, 1298, 366, 5841, 10809...
3.339623
212
import unittest from pyavl3 import AVLTree
[ 11748, 555, 715, 395, 198, 6738, 12972, 615, 75, 18, 1330, 14661, 43, 27660, 628 ]
2.933333
15
#!/usr/bin/env python3 mid = 0 with open('input5.txt') as f: for line in f.readlines(): line = line[:-1] row = binary(line[:7], 7, {'F': '0', 'B': '1'}) col = binary(line[7:], 3, {'R': '1', 'L': '0'}) sid = row * 8 + col mid = sid if sid > mid else mid print(mid)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 13602, 796, 657, 198, 198, 4480, 1280, 10786, 15414, 20, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 329, 1627, 287, 277, 13, 961, 6615, 33529, 198, 220, 220, 220, ...
1.962264
159
""" custom_stocks_py base module. This is the principal module of the custom_stocks_py project. here you put your main classes and objects. Be creative! do whatever you want! If you want to replace this with a Flask application run: $ make init and then choose `flask` as template. """ def base_function() ->...
[ 37811, 198, 23144, 62, 29522, 62, 9078, 2779, 8265, 13, 198, 198, 1212, 318, 262, 10033, 8265, 286, 262, 2183, 62, 29522, 62, 9078, 1628, 13, 198, 1456, 345, 1234, 534, 1388, 6097, 290, 5563, 13, 198, 198, 3856, 7325, 0, 466, 4232, ...
3.297521
121
#!/usr/bin/env python import SimpleHTTPServer import SocketServer import logging PORT = 8000 for i in range(4): Handler = GetHandler httpd = SocketServer.TCPServer(("", PORT + i), Handler) httpd.serve_forever()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 17427, 6535, 28820, 18497, 198, 11748, 47068, 10697, 198, 11748, 18931, 198, 198, 15490, 796, 38055, 198, 198, 1640, 1312, 287, 2837, 7, 19, 2599, 198, 220, 220, 220, 32412, ...
2.8125
80
"""Library for CIM sparql queries""" __version__ = "1.9.0"
[ 37811, 23377, 329, 327, 3955, 37331, 13976, 20743, 37811, 198, 834, 9641, 834, 796, 366, 16, 13, 24, 13, 15, 1, 198 ]
2.681818
22
#!/usr/bin/env python3 # Usage: # $0 -o log.txt products/ # # concatenates .log files (even those in subdirs or .zip) and combines into a single combined.log from xdfile.utils import find_files_with_time, open_output, get_args import boto3 # from boto.s3.connection import S3Connection import os main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 29566, 25, 198, 2, 220, 220, 720, 15, 532, 78, 2604, 13, 14116, 3186, 14, 198, 2, 198, 2, 220, 1673, 36686, 689, 764, 6404, 3696, 357, 10197, 883, 287, 850, 15908, 82...
2.87037
108
# Checks for broken links in the book chapters, printing the status of each link found to stdout. # The Python package 'requests' must be installed and available for this simple module to work. # Author: David Maxwell # Date: 2017-02-14 import re import requests def main(chapters_list_filename, hide_success=True): ""...
[ 2, 47719, 329, 5445, 6117, 287, 262, 1492, 15754, 11, 13570, 262, 3722, 286, 1123, 2792, 1043, 284, 14367, 448, 13, 198, 2, 383, 11361, 5301, 705, 8897, 3558, 6, 1276, 307, 6589, 290, 1695, 329, 428, 2829, 8265, 284, 670, 13, 198, ...
2.358056
782
# -*- coding = utf-8 -*- # @Time: 2020/9/4 18:52 # @Author: dimples_yj # @File: __init__.py.py # @Software: PyCharm
[ 2, 532, 9, 12, 19617, 796, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 25, 12131, 14, 24, 14, 19, 1248, 25, 4309, 198, 2, 2488, 13838, 25, 5391, 2374, 62, 88, 73, 198, 2, 2488, 8979, 25, 11593, 15003, 834, 13, 9078, 13...
2.035088
57
#!/usr/bin/env python3 """ Grid features extraction script. """ import argparse import os import torch import tqdm from fvcore.common.file_io import PathManager from detectron2.checkpoint import DetectionCheckpointer from detectron2.config import get_cfg from detectron2.engine import default_setup from detectron2.eva...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 41339, 3033, 22236, 4226, 13, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 256, 80, 36020, 198, 6738, 277, 85, 7295, 13, ...
2.782546
699
from flask import Flask, request import time import requests import json from blockchain import Blockchain from block import Block app = Flask(__name__) blockchain = Blockchain() peers = set() def consensus(): global blockchain longest_chain = None current_len = len(blockchain) for node in peers:...
[ 6738, 42903, 1330, 46947, 11, 2581, 198, 11748, 640, 198, 11748, 7007, 198, 11748, 33918, 198, 198, 6738, 11779, 1330, 29724, 198, 6738, 2512, 1330, 9726, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 9967, 7983, 796, 29...
2.806818
264
import numpy as np size = 1000 grid = build_grid() print "Original grid\n" print grid visit(grid) print "\n\nAfter search\n" print grid print "\n%d unvisited points in grid" % (size**2 - np.count_nonzero(grid))
[ 11748, 299, 32152, 355, 45941, 198, 7857, 796, 8576, 628, 198, 25928, 796, 1382, 62, 25928, 3419, 198, 4798, 366, 20556, 10706, 59, 77, 1, 198, 4798, 10706, 198, 198, 4703, 270, 7, 25928, 8, 198, 198, 4798, 37082, 77, 59, 77, 3260, ...
2.721519
79
from utills import * conn,cur=start('music') criarTabela("tracks","title text,plays integer") music=[('trunder',20), ('my way',15)] insertInto("tracks","title,plays",music) #cur.executemany("insert into tracks (title,plays) values (?,?)",music) buscaTabela("tracks","title") conn.commit() conn.close()
[ 6738, 3384, 2171, 1330, 1635, 198, 198, 37043, 11, 22019, 28, 9688, 10786, 28965, 11537, 198, 66, 380, 283, 51, 9608, 64, 7203, 46074, 2430, 7839, 2420, 11, 26024, 18253, 4943, 198, 28965, 41888, 10786, 83, 622, 681, 3256, 1238, 828, ...
2.752212
113
import pandas as pd import numpy as np import re from collections import Counter from flow_preprocess import FlowPreprocess
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 302, 198, 6738, 17268, 1330, 15034, 198, 6738, 5202, 62, 3866, 14681, 1330, 27782, 6719, 14681, 198 ]
4
31
import torch import numpy as np import pickle torch.manual_seed(17) torch.backends.cudnn.deterministic = True torch.backends.cudnn.benchmark = False np.random.seed(17) import argparse import torch.nn as nn import torch.nn.functional as F import matplotlib import os from rational.torch import Rational, RecurrentRationa...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 2298, 293, 198, 13165, 354, 13, 805, 723, 62, 28826, 7, 1558, 8, 198, 13165, 354, 13, 1891, 2412, 13, 66, 463, 20471, 13, 67, 2357, 49228, 796, 6407, 198, 13165, 354...
2.864198
243
#!/usr/bin/python3 from urllib.parse import urlparse import feedparser import requests import asyncio import discord import hashlib import os from const import CHANNEL_RSS, WAIT_UNTIL_NEW_CHECK, \ SQLITE_FOLDER_NAME, SQLITE_FILE_NAME from fts.database import Database from fts.cleandatabase import CleanDatabase
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 198, 11748, 3745, 48610, 198, 11748, 7007, 198, 11748, 30351, 952, 198, 11748, 36446, 198, 11748, 12234, 8019, 198, 11748, 286...
3.038095
105
# -*- coding: utf-8 -*- """This module defines a base class for communicating with showdown servers. """ import json import logging import requests import websockets # pyre-ignore from abc import ABC from abc import abstractmethod from asyncio import CancelledError from asyncio import ensure_future from asyncio impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 1212, 8265, 15738, 257, 2779, 1398, 329, 22889, 351, 33338, 9597, 13, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 7007, 198, 11748, 2639, 116...
4.059524
168
#!/usr/bin/env python from common import * import csv import argparse from unidecode import unidecode from nameparser import constants as npc from collections import defaultdict import cPickle as pickle import re stopwords_custom = set(['document', 'preparation', 'system', 'consortium', 'committee', 'international', '...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 2219, 1330, 1635, 198, 11748, 269, 21370, 198, 11748, 1822, 29572, 198, 6738, 555, 485, 8189, 1330, 555, 485, 8189, 198, 6738, 1438, 48610, 1330, 38491, 355, 299, 14751, 198, 6738,...
3.189024
328
# encoding: utf-8 # module PySide.QtCore # from C:\Python27\lib\site-packages\PySide\QtCore.pyd # by generator 1.147 # no doc # imports import Shiboken as __Shiboken
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 8265, 9485, 24819, 13, 48, 83, 14055, 198, 2, 422, 327, 7479, 37906, 1983, 59, 8019, 59, 15654, 12, 43789, 59, 20519, 24819, 59, 48, 83, 14055, 13, 79, 5173, 198, 2, 416, 17301, 352, 13, ...
2.615385
65