content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from . import engine VectorTile = engine.VectorTile Layer = engine.Layer PointFeature = engine.PointFeature LineStringFeature = engine.LineStringFeature PolygonFeature = engine.PolygonFeature SplineFeature = engine.SplineFeature FeatureAttributes = engine.FeatureAttributes Float = engine.Float FloatList = engine.Float...
[ 6738, 764, 1330, 3113, 198, 198, 38469, 35103, 796, 3113, 13, 38469, 35103, 198, 49925, 796, 3113, 13, 49925, 198, 12727, 38816, 796, 3113, 13, 12727, 38816, 198, 13949, 10100, 38816, 796, 3113, 13, 13949, 10100, 38816, 198, 34220, 14520,...
3.672566
113
import time import pytest from unittest import mock from dispatch.core import Reactor @pytest.fixture
[ 11748, 640, 198, 11748, 12972, 9288, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 27965, 13, 7295, 1330, 797, 11218, 628, 198, 31, 9078, 9288, 13, 69, 9602, 198 ]
3.387097
31
from office365api import Mail from dotenv import load_dotenv from os.path import join, dirname, normpath from os import environ dot_env_path = normpath(join(dirname(__file__), '../', '.env')) load_dotenv(dot_env_path) if __name__ == '__main__': authorization = (environ.get('OFFICE_USER'), environ.get('OFFICE_...
[ 6738, 2607, 24760, 15042, 1330, 11099, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 26672, 3672, 11, 2593, 6978, 198, 6738, 28686, 1330, 551, 2268, 198, 198, 26518, 62, 24330, 62, 69...
2.844156
154
""" Estimation of the total magnetization vector of homogeneous bodies. It estimates parameters related to the magnetization vector of homogeneous bodies. **Algorithms** * :class:`~geoist.pfm.magdir.DipoleMagDir`: This class estimates the Cartesian components of the magnetization vector of homogeneous dipolar bo...
[ 37811, 198, 22362, 18991, 286, 262, 2472, 19972, 1634, 15879, 286, 3488, 32269, 5920, 13, 198, 198, 1026, 7746, 10007, 3519, 284, 262, 19972, 1634, 15879, 286, 3488, 32269, 198, 65, 5042, 13, 198, 198, 1174, 2348, 7727, 907, 1174, 198, ...
2.565092
2,074
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from recipe_engine.types import freeze DEPS = [ 'chromium', 'pgo', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/step', ] ...
[ 2, 15069, 1946, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 6738,...
2.110997
973
class cached_property: """Дескриптор для создания разово исполняемых property. Скопировано с библиотеки `pyramid`. Args: Returns: """
[ 4871, 39986, 62, 26745, 25, 198, 220, 220, 220, 37227, 140, 242, 16843, 21727, 31583, 21169, 18849, 140, 123, 20375, 15166, 21169, 12466, 112, 30143, 40623, 220, 21727, 25443, 115, 43666, 16142, 22177, 18849, 40623, 220, 21169, 16142, 140, ...
1.401786
112
# Generated by Django 3.1.7 on 2021-05-05 08:41 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 2713, 12, 2713, 8487, 25, 3901, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
#Install the dependencies import quandl import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.svm import SVR from sklearn.model_selection import train_test_split import datetime from assets import config, tickers #Get the stock data df = q...
[ 2, 15798, 262, 20086, 198, 11748, 627, 392, 75, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330...
2.730981
907
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 2, 198, 2, 15069, 357, 34, 8, 1853, 12, 5304, 402, 3620, 5693, 198, 2, 198,...
2.122071
2,646
#!/usr/bin/python # Converts open-ephys .kwd files to raw binary, a format ready # for spike sorting with the Phy spike sorting program from __future__ import division, print_function, unicode_literals import os.path import numpy as np from openephys.kwik import load, load_all from openephys.klustafiles import _prm_f...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 1482, 24040, 1280, 12, 27446, 893, 764, 74, 16993, 3696, 284, 8246, 13934, 11, 257, 5794, 3492, 198, 2, 329, 20240, 29407, 351, 262, 1380, 88, 20240, 29407, 1430, 198, 198, 6738, 11...
2.261872
737
#!flask/bin/python from app import app app.run(debug=True, threaded=True, host='0.0.0.0')
[ 2, 0, 2704, 2093, 14, 8800, 14, 29412, 198, 6738, 598, 1330, 598, 198, 1324, 13, 5143, 7, 24442, 28, 17821, 11, 40945, 28, 17821, 11, 2583, 11639, 15, 13, 15, 13, 15, 13, 15, 11537, 198 ]
2.432432
37
from Utils import Grammar from AST import * # Grammar CoolGrammar = Grammar() # non-terminals program = CoolGrammar.NonTerminal('<program>', startSymbol=True) class_list, def_class = CoolGrammar.NonTerminals('<class-list> <def-class>') feature_list, feature = CoolGrammar.NonTerminals('<feature-list> <feature>') para...
[ 6738, 7273, 4487, 1330, 20159, 3876, 198, 6738, 29273, 1330, 1635, 198, 198, 2, 20159, 3876, 198, 198, 34530, 38, 859, 3876, 796, 20159, 3876, 3419, 198, 198, 2, 1729, 12, 23705, 874, 198, 23065, 796, 15226, 38, 859, 3876, 13, 15419, ...
2.333015
3,141
from PyInstaller.compat import is_win from PyInstaller.utils.hooks import collect_all if is_win: datas, binaries, _ = collect_all('openbabel')
[ 6738, 9485, 15798, 263, 13, 5589, 265, 1330, 318, 62, 5404, 198, 6738, 9485, 15798, 263, 13, 26791, 13, 25480, 82, 1330, 2824, 62, 439, 198, 198, 361, 318, 62, 5404, 25, 198, 197, 19608, 292, 11, 38640, 11, 4808, 796, 2824, 62, 43...
2.9
50
from permuta import Perm from permuta.permutils.polynomial import PolyPerms expected = { frozenset( { Perm((1, 0, 2, 3)), Perm((1, 2, 0, 3)), Perm((0, 3, 1, 2)), Perm((2, 4, 0, 3, 1)), Perm((3, 4, 2, 1, 0)), Perm((0, 1)), } ...
[ 6738, 9943, 29822, 1330, 2448, 76, 198, 6738, 9943, 29822, 13, 16321, 26791, 13, 35428, 26601, 498, 1330, 12280, 5990, 907, 198, 198, 40319, 796, 1391, 198, 220, 220, 220, 8400, 8247, 316, 7, 198, 220, 220, 220, 220, 220, 220, 220, ...
1.480143
25,936
from runthis import parse_kwargs from precise.skatervaluation.battleutil.arrangingbattles import manager_var_battle, manager_info_battle import os # Hey thanks for running this, it will generate more Elo rating data # The results will be put in a new file in precise/battleresults/manager_var/ # You can PR the new fil...
[ 6738, 1057, 5661, 1330, 21136, 62, 46265, 22046, 198, 6738, 7141, 13, 8135, 265, 712, 282, 2288, 13, 38471, 22602, 13, 3258, 4924, 65, 1078, 829, 1330, 4706, 62, 7785, 62, 38471, 11, 4706, 62, 10951, 62, 38471, 198, 11748, 28686, 628,...
2.726496
234
from simian.scene.base_scene import BaseScene, State from simian.utils.singleton import Singleton
[ 6738, 985, 666, 13, 29734, 13, 8692, 62, 29734, 1330, 7308, 36542, 11, 1812, 198, 6738, 985, 666, 13, 26791, 13, 12215, 10565, 1330, 5573, 10565, 628 ]
3.666667
27
# -*- coding: utf-8 -*- """Advent of Code 2021 - Day 11: Dumbo Octopus.""" from copy import deepcopy from aoclib.geometry import Position from aoclib.helpers import timing def neighbors(pos: Position) -> list[Position]: """Return all neighbor positions for the given position.""" neighbors: list[Position]...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 2782, 1151, 286, 6127, 33448, 532, 3596, 1367, 25, 360, 29309, 2556, 25790, 526, 15931, 628, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 257, 420, 8019, 1...
2.688331
677
import json import pathlib import numpy as np import pandas as pd import scipy import scipy.interpolate import scipy.stats from .kde import gaussian_kde from .util import bin_calc_one, bin_calc_log, logmsg UNITS = { 'length': 'packets', 'size': 'bytes', 'duration': 'milliseconds', 'rate': 'bps' } ST...
[ 11748, 33918, 198, 11748, 3108, 8019, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 629, 541, 88, 198, 11748, 629, 541, 88, 13, 3849, 16104, 378, 198, 11748, 629, 541, 88, 13, 34242, 198, ...
2.293269
208
CSI = '\x1b[' OSC = '\x1b]' BEL = '\a'
[ 7902, 40, 796, 705, 59, 87, 16, 65, 17816, 198, 2640, 34, 796, 705, 59, 87, 16, 65, 49946, 198, 33, 3698, 796, 705, 59, 64, 6, 628 ]
1.428571
28
# encoding: utf-8 ''' ログインAPIサーバー 1. database/rest.py: Databaseサーバー(localhost:5000)を起動 2. this file: ログインAPサーバー(localhost:4000)を起動 3. curlコマンドでログイン ``` $ curl -c cookie -d 'username=admin' -d 'password=adminadmin' http://localhost:4000/login # リダイレクト有効なら 4. の手順は不要 $ curl -L -c cookie -d 'username=admi...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 7061, 6, 198, 16253, 26095, 11482, 6527, 17614, 26503, 12045, 238, 6312, 198, 198, 16, 13, 6831, 14, 2118, 13, 9078, 25, 24047, 26503, 12045, 238, 6312, 7, 36750, 25, 27641, 8, 31758, 164, 113, ...
1.929825
570
from unittest import TestCase, mock from unittest.mock import MagicMock from representation.dataset_infos import DatasetInfos from usecase.download_dataset_as_zip import ( download_dataset_as_zip, download_datasets_as_zip, )
[ 6738, 555, 715, 395, 1330, 6208, 20448, 11, 15290, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 6738, 10552, 13, 19608, 292, 316, 62, 10745, 418, 1330, 16092, 292, 316, 18943, 418, 198, 6738, 779, 7442, 13, 15002...
2.785714
84
''' MPI STRONG AND WEAK SCALING Tables and visualization Tests strong and weak scaling for a given mesh or set of meshes. ''' import argparse import numpy as np import sys import matplotlib from copy import deepcopy import subprocess from matplotlib.ticker import MultipleLocator, FuncFormatter matplotlib.use("Agg"...
[ 7061, 6, 198, 198, 7378, 40, 19269, 18494, 5357, 12887, 10206, 6374, 1847, 2751, 198, 51, 2977, 290, 32704, 198, 198, 51, 3558, 1913, 290, 4939, 20796, 329, 257, 1813, 19609, 393, 900, 286, 48754, 13, 198, 198, 7061, 6, 198, 198, 11...
2.328577
2,383
# Copyright 2019 Systems & Technology Research, LLC # Use of this software is governed by the license.txt file. import os.path import torch import torch.nn as nn import math import torch.nn.functional as F import torchvision.transforms as transforms from torch.autograd import Variable import PIL from PIL import Imag...
[ 2, 15069, 13130, 11998, 1222, 8987, 4992, 11, 11419, 198, 2, 5765, 286, 428, 3788, 318, 21825, 416, 262, 5964, 13, 14116, 2393, 13, 628, 198, 198, 11748, 28686, 13, 6978, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, ...
2.577441
594
import pytest from pyformlang.cfg import CFG from project import ( convert_ecfg_to_rsm, regex_to_min_dfa, convert_cfg_to_ecfg, Box, minimize_rsm, ) @pytest.mark.parametrize( "cfg_text", [ ( """ S -> B B -> C C...
[ 11748, 12972, 9288, 198, 6738, 12972, 687, 17204, 13, 37581, 1330, 18551, 38, 198, 198, 6738, 1628, 1330, 357, 198, 220, 220, 220, 10385, 62, 721, 40616, 62, 1462, 62, 3808, 76, 11, 198, 220, 220, 220, 40364, 62, 1462, 62, 1084, 62,...
1.335068
961
from os import system, name import time ''' CLASS that defines the board and its behaviour over a tic tac toe game ''' class TicTacToe: ''' CONSTRUCTOR: defines board to use in tic tac toe games constructor makes empty list of 9 _. 0 | 1 | 2 3 | 4 | 5 6 | 7 | 8 ''...
[ 6738, 28686, 1330, 1080, 11, 1438, 198, 11748, 640, 198, 198, 7061, 6, 198, 220, 220, 220, 42715, 326, 15738, 262, 3096, 290, 663, 9172, 625, 257, 256, 291, 26142, 21189, 983, 198, 7061, 6, 198, 4871, 309, 291, 51, 330, 2514, 68, ...
2.393939
297
#!/usr/bin/env python import pytest """ Test 1936. Add Minimum Number of Rungs """ @pytest.fixture(scope="session")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 12972, 9288, 198, 198, 37811, 198, 14402, 27653, 13, 3060, 26265, 7913, 286, 371, 2150, 82, 198, 37811, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 29891, 4943,...
2.813953
43
#!/usr/bin/env python3 # coding: utf8 import ConjugationConvertor c = ConjugationConvertor.ConjugationConvertor() bases = ['走る','押す','愛する','見る','食べる','来る','悲しい','ござる'] for base in bases: d = c.get(base) for conj in d.keys(): print('===== {} {} ====='.format(base, conj)) for word in d[conj]: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 23, 198, 11748, 1482, 31761, 341, 3103, 1851, 273, 198, 198, 66, 796, 1482, 31761, 341, 3103, 1851, 273, 13, 3103, 31761, 341, 3103, 1851, 273, 3419, 198,...
1.445652
368
"""https://open.kattis.com/problems/datum""" D, M = map(int, input().split()) months = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] # 01/01/2009 was a Thursday day = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"] total_days = 0 for i in range(M): total_days += months[i] tota...
[ 37811, 5450, 1378, 9654, 13, 74, 1078, 271, 13, 785, 14, 1676, 22143, 14, 19608, 388, 37811, 198, 198, 35, 11, 337, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 41537, 796, 685, 15, 11, 3261, 11, 2579, 11, 3261, 11, 1542...
2.545455
143
import datetime from decimal import Decimal from django.contrib.humanize.templatetags import humanize from django.template import Context, Template, defaultfilters from django.test import SimpleTestCase, modify_settings, override_settings from django.utils import translation from django.utils.html import escape from d...
[ 11748, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 10734, 1096, 13, 11498, 489, 265, 316, 3775, 1330, 1692, 1096, 198, 6738, 42625, 14208, 13, 28243, 1330, 30532, 11, 37350, 11, 4277,...
3.468182
220
import setuptools import os import importlib.util setup_path = os.path.dirname(os.path.realpath(__file__)) asset_path = os.path.join(setup_path, '..', 'assets') base_path = os.path.join(setup_path, '..', '..') app_path = os.path.join(base_path, 'app') spec = importlib.util.spec_from_file_location('version', os.path...
[ 11748, 900, 37623, 10141, 198, 11748, 28686, 198, 11748, 1330, 8019, 13, 22602, 628, 198, 40406, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 562, 316, 62, 6978, 79...
2.553047
443
import time import numpy as np import tensorflow as tf import operator from collections import Counter import utils import matplotlib.pyplot as plt from sklearn.manifold import TSNE from urllib.request import urlretrieve from os.path import isfile, isdir from tqdm import tqdm import zipfile import random dataset_fold...
[ 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 10088, 198, 6738, 17268, 1330, 15034, 198, 11748, 3384, 4487, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, ...
2.280634
2,840
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
[ 2, 15069, 357, 34, 8, 3050, 3012, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403, 389, 198, ...
2.733162
1,559
""" Exam 1, problem 4. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Jonah Egertson. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. import rosegraphics as rg def main(): """ Calls the TEST functions in th...
[ 37811, 198, 3109, 321, 352, 11, 1917, 604, 13, 198, 198, 30515, 669, 25, 3271, 337, 7140, 1754, 11, 569, 571, 3099, 978, 648, 283, 11, 4705, 40808, 695, 11, 9935, 14388, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 2940, 367, ...
2.606838
1,404
import pathlib import ctypes from objc_util import c, create_objc_class, ObjCClass, ObjCInstance import ui #import pdbg shader_path = pathlib.Path('./Shaders.js') # --- load objc classes MTKView = ObjCClass('MTKView') # --- initialize MetalDevice MTLCreateSystemDefaultDevice = c.MTLCreateSystemDefaultDevice MTLCre...
[ 11748, 3108, 8019, 198, 11748, 269, 19199, 198, 198, 6738, 26181, 66, 62, 22602, 1330, 269, 11, 2251, 62, 26801, 66, 62, 4871, 11, 38764, 34, 9487, 11, 38764, 34, 33384, 198, 11748, 334, 72, 198, 198, 2, 11748, 279, 9945, 70, 198, ...
2.671924
317
from spdy.connection import Connection, SERVER b = b'\x80\x02\x00\x01\x01\x00\x01\x0e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x008\xea\xdf\xa2Q\xb2b\xe0b`\x83\xa4\x17\x06{\xb8\x0bu0,\xd6\xae@\x17\xcd\xcd\xb1.\xb45\xd0\xb3\xd4\xd1\xd2\xd7\x02\xb3,\x18\xf8Ps,\x83\x9cg\xb0?\xd4=:`\x07\x81\xd5\x99\xeb@\xd4\x1b3\xf0\xa3\xe5i\x...
[ 6738, 599, 9892, 13, 38659, 1330, 26923, 11, 18871, 5959, 198, 198, 65, 796, 275, 6, 59, 87, 1795, 59, 87, 2999, 59, 87, 405, 59, 87, 486, 59, 87, 486, 59, 87, 405, 59, 87, 486, 59, 87, 15, 68, 59, 87, 405, 59, 87, 405, 59...
1.395046
767
import socket from termcolor import colored from Crypto.Cipher import AES from Crypto.Hash import SHA256 so = socket.socket() host = socket.gethostname() port = 12345 so.connect((host, port)) print(colored("[+] connected to the server..", 'green')) password = input(colored("Set the key/password: ", 'red')) has...
[ 11748, 17802, 198, 6738, 3381, 8043, 1330, 16396, 628, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 198, 6738, 36579, 13, 26257, 1330, 25630, 11645, 628, 628, 198, 568, 796, 17802, 13, 44971, 3419, 198, 4774, 796, 17802, 13, 1136, 4774...
2.851163
215
from utils import modifying import tensorflow as tf from model import NerModel import pandas as pd import tensorflow_addons as tf_ad import os import numpy as np import datetime import argparse from dataloader import load_data ############################################################################################...
[ 6738, 3384, 4487, 1330, 30620, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 2746, 1330, 21783, 17633, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 11192, 273, 11125, 62, 39996, 355, 48700, 62, 324, 198, 11748, 28686, 198, ...
3.100321
1,246
''' Module providing functions and classes to control the grounding and solving process. Next follow some concepts used throughout the modules of the clingo package. Terms ----- Terms without variables and interpreted functions are called symbols in the following. They are wrapped in the `clingo.symbol.Symbol` class....
[ 7061, 6, 198, 26796, 4955, 5499, 290, 6097, 284, 1630, 262, 48459, 290, 18120, 198, 14681, 13, 198, 198, 10019, 1061, 617, 10838, 973, 3690, 262, 13103, 286, 262, 537, 32735, 5301, 13, 198, 198, 15156, 907, 198, 30934, 198, 15156, 907...
3.218945
1,119
from config import API_KEY, IEX_KEY_SANDBOX, IEX_KEY from datetime import datetime, timedelta from collections import defaultdict import pandas as pd import threading import requests import json import time if __name__ == '__main__': stocks = IEXCloud() stocks.run() print(stocks.get_stats('aapl')) ti...
[ 6738, 4566, 1330, 7824, 62, 20373, 11, 314, 6369, 62, 20373, 62, 50, 6981, 39758, 11, 314, 6369, 62, 20373, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 19798, 292, 355, 2...
2.868217
129
#pragma repy """ Files should not be hashable... """ if callfunc == "initialize": myfileobj = file('junk_test.out','w') try: mydict = {} try: mydict[myfileobj] = 7 except AttributeError: # I should get an exception here... pass else: print 'files are hashable!' finall...
[ 2, 1050, 363, 2611, 1128, 88, 198, 198, 37811, 198, 220, 13283, 815, 407, 307, 12234, 540, 986, 198, 37811, 198, 198, 361, 869, 20786, 6624, 366, 36733, 1096, 1298, 198, 220, 616, 7753, 26801, 796, 2393, 10786, 73, 2954, 62, 9288, 1...
2.386076
158
# Generated by Django 3.1.8 on 2021-10-05 15:30 import django.core.validators from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 23, 319, 33448, 12, 940, 12, 2713, 1315, 25, 1270, 198, 198, 11748, 42625, 14208, 13, 7295, 13, 12102, 2024, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.95122
41
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 4 11:44:24 2020 @author: hamishgibbs """ import __main__ as main import os import sys import pickle if not hasattr(main, '__file__'): argv = ['code', '/Users/hamishgibbs/Documents/Covid-19/facebook_mobility_uk/data/processed/params/date_rang...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 2447, 220, 604, 1367, 25, 2598, 25, 1731, 12131, 198, 198, 31, 9800, 25, 8891, 680...
2.379545
440
# coding: utf-8 """ Digitick REST API The Digitick REST API is a set of methods giving access to catalog, user and cart management. OpenAPI spec version: v1.0 Contact: contact@digitick.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six i...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 7367, 270, 624, 30617, 7824, 628, 220, 220, 220, 383, 7367, 270, 624, 30617, 7824, 318, 257, 900, 286, 5050, 3501, 1895, 284, 18388, 11, 2836, 290, 6383, 4542, 1...
2.269208
6,612
#!/usr/bin/env python """ Download debugging symbols from the Microsoft Symbol Server. Can use as an input an executable file OR a GUID+Age and filename. Examples: $ python symcheck.py -e ntoskrnl.exe $ python symchk.py -g 32962337f0f646388b39535cd8dd70e82 -s ntoskrnl.pdb The GUID+Age here corresponds to the kernel ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 10002, 28769, 14354, 422, 262, 5413, 38357, 9652, 13, 198, 6090, 779, 355, 281, 5128, 281, 28883, 2393, 6375, 257, 19348, 2389, 10, 23396, 290, 29472, 13, 198, 27730, ...
2.630474
1,096
import autograd.numpy as anp import numpy as np from pymoo.util.misc import stack from pymoo.model.problem import Problem from pymoo.factory import get_problem from pymoo.algorithms.nsga2 import NSGA2 from pymoo.factory import get_sampling, get_crossover, get_mutation from pymoo.factory import get_termination from pymo...
[ 11748, 1960, 519, 6335, 13, 77, 32152, 355, 281, 79, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 279, 4948, 2238, 13, 22602, 13, 44374, 1330, 8931, 198, 6738, 279, 4948, 2238, 13, 19849, 13, 45573, 1330, 20647, 198, 6738, 279, 4948...
2.991935
248
def recursive_transform(obj): """ Recursive converting object to properly handle int and float. :param obj: json object :return: another json object """ if isinstance(obj, dict): return {k: recursive_transform(v) for k, v in obj.items()} if isinstance(obj, list): return [rec...
[ 4299, 45115, 62, 35636, 7, 26801, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3311, 30753, 23202, 2134, 284, 6105, 5412, 493, 290, 12178, 13, 628, 220, 220, 220, 1058, 17143, 26181, 25, 33918, 2134, 198, 220, 220, 220, 1058, ...
2.223404
282
import sys from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.pdfpage import PDFPage from pdfminer.converter import XMLConverter, HTMLConverter, TextConverter from pdfminer.layout import LAParams from cStringIO import StringIO from wand.image import Image from PIL import Image as PI imp...
[ 11748, 25064, 198, 6738, 37124, 1084, 263, 13, 12315, 3849, 79, 1330, 12960, 26198, 13511, 11, 14340, 5837, 496, 9492, 3866, 353, 198, 6738, 37124, 1084, 263, 13, 12315, 7700, 1330, 14340, 5837, 496, 198, 6738, 37124, 1084, 263, 13, 110...
3.135338
133
#!/usr/bin/env python """ Generate a file of X Mb with text, where X is fetched from the command line. """ if __name__ == '__main__': import sys generate(float(sys.argv[1]))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 8645, 378, 257, 2393, 286, 1395, 40001, 351, 2420, 11, 810, 1395, 318, 11351, 1740, 422, 262, 198, 21812, 1627, 13, 198, 37811, 198, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.554054
74
""" Simple locustfile that creates a single session to exec GET request on target API """ from random import randint from locust import HttpUser, task, between class InvokeDelay(HttpUser): """ Client Class that is able to make requests to the target system """ wait_time = between(0.5, 2) @task ...
[ 37811, 198, 26437, 1179, 436, 7753, 326, 8075, 257, 2060, 6246, 284, 2452, 17151, 2581, 319, 2496, 7824, 198, 37811, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 1179, 436, 1330, 367, 29281, 12982, 11, 4876, 11, 1022, 628, 198, 4871, ...
2.777143
175
"""`{{cookiecutter.__project_name}}`: _A DataJoint SciOps Workflow for {{cookiecutter.organization}}, {{cookiecutter.workflow}}_ """ import logging def get_version() -> str: """_Get version number for the package `{{cookiecutter.__project_name}}`._ Returns: str: Version number taken from the install...
[ 37811, 63, 27007, 44453, 8968, 353, 13, 834, 16302, 62, 3672, 11709, 63, 25, 198, 62, 32, 6060, 41, 1563, 10286, 41472, 5521, 11125, 329, 198, 27007, 44453, 8968, 353, 13, 9971, 1634, 92, 5512, 22935, 44453, 8968, 353, 13, 1818, 11125...
2.98017
353
from openprocurement.tender.core.procedure.context import get_request from openprocurement.tender.core.procedure.state.tender import TenderState
[ 6738, 1280, 36942, 495, 434, 13, 83, 2194, 13, 7295, 13, 1676, 771, 495, 13, 22866, 1330, 651, 62, 25927, 198, 6738, 1280, 36942, 495, 434, 13, 83, 2194, 13, 7295, 13, 1676, 771, 495, 13, 5219, 13, 83, 2194, 1330, 309, 2194, 9012,...
3.244444
45
"""3. Estimate pose from your webcam ==================================== This article will demonstrate how to estimate people's pose from your webcam video stream. First, import the necessary modules. .. code-block:: python from __future__ import division import argparse, time, logging, os, math, tqdm, cv...
[ 37811, 18, 13, 10062, 1920, 12705, 422, 534, 49823, 198, 10052, 1421, 198, 198, 1212, 2708, 481, 10176, 703, 284, 8636, 661, 338, 12705, 422, 534, 49823, 2008, 4269, 13, 628, 198, 5962, 11, 1330, 262, 3306, 13103, 13, 198, 198, 492, ...
2.735275
1,511
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 220, 198 ]
3.285714
7
# -*- coding: utf-8 -*- import sys sys.path.append('.') from common import TestCase import unittest import fatuv as uv import socket if __name__ == '__main__': unittest.main(verbosity=2)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 2637, 8, 198, 198, 6738, 2219, 1330, 6208, 20448, 198, 11748, 555, 715, 395, 198, 11748, 3735, 14795, 355, 334...
2.594595
74
from neo.Network.core.blockbase import BlockBase from neo.Network.core.exceptions import DeserializationError from neo.Network.core.uint256 import UInt256 from typing import Union from neo.Network.core.io.binary_reader import BinaryReader from neo.Network.core.io.binary_writer import BinaryWriter
[ 6738, 19102, 13, 26245, 13, 7295, 13, 9967, 8692, 1330, 9726, 14881, 198, 6738, 19102, 13, 26245, 13, 7295, 13, 1069, 11755, 1330, 2935, 48499, 1634, 12331, 198, 6738, 19102, 13, 26245, 13, 7295, 13, 28611, 11645, 1330, 471, 5317, 11645...
3.807692
78
from __future__ import absolute_import from yt.config import ytcfg ytcfg["yt","loglevel"] = '50' ytcfg["yt","suppressStreamLogging"] = 'True' from . import hydro_tests # Just importing will register the tests! from . import halo_tests from . import particle_tests from .runner import RegressionTestRunner first_runner ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 331, 83, 13, 11250, 1330, 331, 83, 37581, 198, 20760, 37581, 14692, 20760, 2430, 75, 2467, 626, 8973, 796, 705, 1120, 6, 198, 20760, 37581, 14692, 20760, 2430, 18608, 601, 12124...
3.359712
139
import paramiko import os import re import base64 import json import logging from datetime import datetime,timedelta from timeit import default_timer as timer paramiko.util.log_to_file("paramiko.log") logging.basicConfig(filename='paramiko.log', level=logging.DEBUG, filemode='a+', format='%(asctime)s - %(nam...
[ 11748, 5772, 12125, 201, 198, 11748, 28686, 201, 198, 11748, 302, 201, 198, 11748, 2779, 2414, 201, 198, 11748, 33918, 201, 198, 11748, 18931, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 16514, 276, 12514, 201, 198, 6738, 640, 270...
2.590308
227
import os import sys from flask_migrate import Migrate, upgrade from flaskprj import create_app from flaskprj.models import db, User, Post, Tag, Role, Profile app = create_app() migrate = Migrate(app, db) @app.shell_context_processor @app.cli.command()
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 42903, 62, 76, 42175, 1330, 337, 42175, 11, 8515, 198, 6738, 42903, 1050, 73, 1330, 2251, 62, 1324, 198, 6738, 42903, 1050, 73, 13, 27530, 1330, 20613, 11, 11787, 11, 2947, 11, 17467, 11, 20...
3.084337
83
from .. import impl from .base import Widget
[ 6738, 11485, 1330, 4114, 198, 6738, 764, 8692, 1330, 370, 17484, 628 ]
3.833333
12
#Program to find the solution for the given linear equations. #Developed by: SRIJITH R #RegisterNumber: 21004191 import numpy as np x=np.array([[5,-3,-10],[2,2,-3],[-3,-1,5]]) y=np.array([-9,4,-1]) value=np.linalg.solve(x,y) print(value)
[ 2, 15167, 284, 1064, 262, 4610, 329, 262, 1813, 14174, 27490, 13, 201, 198, 2, 19246, 276, 416, 25, 311, 7112, 41, 10554, 371, 201, 198, 2, 38804, 15057, 25, 2310, 22914, 26492, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201...
2.256881
109
from sqlalchemy import Column from sqlalchemy import DateTime, func from sqlalchemy.ext.declarative import declarative_base, declared_attr from app import log # from app.utils import alchemy LOG = log.get_logger() Base = declarative_base(cls=BaseModel)
[ 6738, 44161, 282, 26599, 1330, 29201, 198, 6738, 44161, 282, 26599, 1330, 7536, 7575, 11, 25439, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 11, 6875, 62, 35226, 198, 198, 6738, 598, 13...
3.2125
80
# -*- coding: utf-8 -*- """ This app monitors your internet connection and generates prometheus metrics. """ import datetime import logging import os import sys import requests from apscheduler.executors.pool import ThreadPoolExecutor from apscheduler.schedulers.background import BlockingScheduler from icmplib import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1212, 598, 19374, 534, 5230, 4637, 290, 18616, 1552, 36916, 20731, 13, 198, 37811, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25...
2.496769
2,631
from django.contrib.auth.mixins import PermissionRequiredMixin from django.shortcuts import redirect from django.views import View from church_site.views import AdminListView, BaseDetailView from contactus.models import ContactMessage
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 2448, 3411, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 198, 6738, 4928, 62, 15654, ...
3.765625
64
""" Script for fetching ModelNet40 Dataset """ import os import requests import zipfile from tqdm import tqdm from torch.utils.data import Dataset, DataLoader def get_modelnet_40( data_dir="./data/", data_url="https://shapenet.cs.stanford.edu/media/modelnet40_ply_hdf5_2048.zip", extract_file=True, ): ...
[ 37811, 198, 7391, 329, 21207, 278, 9104, 7934, 1821, 16092, 292, 316, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 19974, 7753, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 28034, 13, 26791, 13, 7890,...
2.381928
830
#!/usr/bin/env python3 ''' this module is used to build whitebox-tools. ''' import os import sys from subprocess import call def main(): ''' main function ''' try: update_cargo = False clean_code = False doc_code = False build_code = True mode = 'release' # 'check'...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 7061, 6, 428, 8265, 318, 973, 284, 1382, 2330, 3524, 12, 31391, 13, 198, 7061, 6, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 850, 14681, 1330, 869, 628, 198, 4299, 1388, 33...
1.920565
1,133
class FpolicyProto(basestring): """ Protocol Possible values: <ul> <li> "cifs" - CIFS protocol, <li> "nfsv3" - NFSv3 protocol, <li> "nfsv4" - NFSv4 protocol </ul> """ @staticmethod
[ 4871, 376, 30586, 2964, 1462, 7, 12093, 395, 1806, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 20497, 198, 220, 220, 220, 33671, 3815, 25, 198, 220, 220, 220, 1279, 377, 29, 198, 220, 220, 220, 1279, 4528, 29, 366, 66, 36...
1.839695
131
#!/usr/bin/env python import os, sys, time import matplotlib.nxutils as nxutils import matplotlib.numerix as nx for i in range(500): report_memory(i) verts = nx.mlab.rand(100, 2) b = nxutils.pnpoly(x, y, verts) for i in range(500): report_memory(i) verts = nx.mlab.rand(100, 2) ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 11, 25064, 11, 640, 198, 11748, 2603, 29487, 8019, 13, 77, 87, 26791, 355, 299, 87, 26791, 198, 11748, 2603, 29487, 8019, 13, 77, 6975, 844, 355, 299, 87, 628, 198...
2.102041
196
from django.conf.urls import url from . import views app_name = "pinax_lms_activities" urlpatterns = [ url(r"(?P<key>[\w\-]+)/start/$", views.activity_start, name="activity_start"), url(r"(?P<key>[\w\-]+)/play/$", views.activity_play, name="activity_play"), url(r"(?P<key>[\w\-]+)/completed/$", views.acti...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 366, 11635, 897, 62, 75, 907, 62, 15791, 871, 1, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19...
2.592233
206
# Generated by Django 3.2.10 on 2022-06-05 00:17 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 940, 319, 33160, 12, 3312, 12, 2713, 3571, 25, 1558, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
import ctre import wpilib import math from ctre import WPI_TalonSRX as Talon from wpilib.drive.differentialdrive import DifferentialDrive from wpilib.speedcontrollergroup import SpeedControllerGroup from wpilib.smartdashboard import SmartDashboard as SD from wpilib.command import Subsystem #from robotpy_ext.common_dri...
[ 11748, 269, 33945, 198, 11748, 266, 79, 22282, 198, 11748, 10688, 198, 6738, 269, 33945, 1330, 370, 11901, 62, 31466, 261, 12562, 55, 355, 7193, 261, 198, 6738, 266, 79, 22282, 13, 19472, 13, 39799, 498, 19472, 1330, 20615, 498, 24825, ...
2.457983
476
from . import BaseInjector
[ 6738, 764, 1330, 7308, 818, 752, 273, 198 ]
3.375
8
import pandas as pd from sklearn.model_selection import KFold from tensorflow import random from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout import matplotlib.pyplot as plt random.set_seed(5577) # Data Preparation trainFeatures = pd.read_csv('./databases/lish...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 509, 37, 727, 198, 198, 6738, 11192, 273, 11125, 1330, 4738, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 27530, 1330, 24604, 1843, 198, 673...
2.665385
1,040
import numpy as np import codecs, json import copy from .helpers import randomize, sig, xav
[ 11748, 299, 32152, 355, 45941, 198, 11748, 40481, 82, 11, 33918, 198, 11748, 4866, 198, 198, 6738, 764, 16794, 364, 1330, 4738, 1096, 11, 43237, 11, 2124, 615, 198 ]
3.206897
29
from datetime import datetime, timedelta # GET THE DATE YESTERDAY DATE = datetime.now() # TURN THE DATETIME TO STRING DATE = datetime.strftime(DATE, '%Y-%m-%d') PARENT_DIR = './outputs/' OUTPUT_DIR = datetime.strftime(DATE, '%m-%d-%Y(%H_%M)') FILES_TO_GATHER = [ 'sample1.csv', 'sample2.xlsx', 'sample3.tx...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 2, 17151, 3336, 360, 6158, 21560, 5781, 26442, 198, 35, 6158, 796, 4818, 8079, 13, 2197, 3419, 198, 198, 2, 309, 27064, 3336, 360, 1404, 2767, 12789, 5390, 19269, 2751, 1...
2.155477
283
# coding: utf-8 """ Copyright 2016 SmartBear Software 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, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 15269, 1584, 10880, 36352, 10442, 628, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 220, 345, 743, 407, 779,...
2.382929
2,554
import bcrypt from flask import current_app from itsdangerous import TimedJSONWebSignatureSerializer as JWT from sqlalchemy.dialects.postgresql import JSONB from actor_libs.database.orm import BaseModel, db from config import BaseConfig __all__ = [ 'User', 'UserGroup', 'Role', 'Resource', 'Permission', 'Tenant',...
[ 11748, 275, 29609, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 663, 38537, 516, 1330, 5045, 276, 40386, 13908, 11712, 1300, 32634, 7509, 355, 449, 39386, 198, 6738, 44161, 282, 26599, 13, 38969, 478, 82, 13, 7353, 34239, 13976, 1...
2.670951
389
from pyabf.abf2.section import Section from pyabf.names import getDigitizerName class ProtocolSection(Section): """ This section contains information about the recording settings. This is useful for determining things like sample rate and channel scaling factors. """
[ 6738, 12972, 397, 69, 13, 397, 69, 17, 13, 5458, 1330, 7275, 198, 6738, 12972, 397, 69, 13, 14933, 1330, 651, 19511, 3029, 263, 5376, 628, 198, 4871, 20497, 16375, 7, 16375, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, ...
3.670886
79
import unittest import numpy as np import pandas as pd from sklearn.datasets import make_classification from sklearn.datasets import make_regression from Amplo.AutoML import FeatureProcesser
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 787, 62, 4871, 2649, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 787, 62, 2301...
3.490909
55
import sys ############## check files and folders ###################### from pre_check_generate import check_structure err = check_structure() if err > 0: print("Error while checking structure... generation broken") sys.exit() ############## parse arguments for script ###################### import argparse parser...
[ 11748, 25064, 628, 198, 7804, 4242, 2235, 2198, 3696, 290, 24512, 1303, 14468, 4242, 2, 198, 6738, 662, 62, 9122, 62, 8612, 378, 1330, 2198, 62, 301, 5620, 198, 8056, 796, 2198, 62, 301, 5620, 3419, 198, 361, 11454, 1875, 657, 25, 1...
3.317285
1,724
# Run benchmarks in Python # In the past I've had bad experiences running more than one Biogeme model in a single Python session # Thus, run each in its own process from biogeme_swissmetro import BiogemeSwissmetro from biogeme_nhts import NHTS if __name__ == "__main__": bsmn = 10 bsm = BiogemeSwissmetro.bench...
[ 2, 5660, 31747, 287, 11361, 198, 2, 554, 262, 1613, 314, 1053, 550, 2089, 6461, 2491, 517, 621, 530, 8436, 519, 34755, 2746, 287, 257, 2060, 11361, 6246, 198, 2, 6660, 11, 1057, 1123, 287, 663, 898, 1429, 198, 198, 6738, 3182, 519, ...
2.684492
187
from flask import Flask, redirect, url_for, render_template, request, redirect, session from db_connector.db_connector import connect_to_database, execute_query # from datetime import datetime app = Flask(__name__) # home @app.route("/home") # log in @app.route("/login", methods=["GET", "POST"]) def login() if r...
[ 6738, 42903, 1330, 46947, 11, 18941, 11, 19016, 62, 1640, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 11, 6246, 198, 6738, 20613, 62, 8443, 273, 13, 9945, 62, 8443, 273, 1330, 2018, 62, 1462, 62, 48806, 11, 12260, 62, 22766, 198, 2, ...
2.577617
554
import os import shutil from datetime import datetime import json import traceback from GitAnalysis import GitAnalysis
[ 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 11748, 12854, 1891, 198, 198, 6738, 15151, 32750, 1330, 15151, 32750, 628, 628, 198 ]
4
31
from kivy.uix.boxlayout import BoxLayout from kivy.uix.popup import Popup from kivy.uix.label import Label from kivy.uix.button import Button from kivy.core.window import Window
[ 6738, 479, 452, 88, 13, 84, 844, 13, 3524, 39786, 1330, 8315, 32517, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 12924, 929, 1330, 8099, 929, 220, 220, 220, 220, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 18242, 1330, 36052, 198, 6...
2.731343
67
#!/usr/bin/env python3 """ This module contains the make-toc function which tries to create a valid table of contents file for SE projects. Strictly speaking, the generate_toc() function should be a class member of SeEpub. But the function is very big and it makes editing easier to put in a separate file. """ from en...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 1212, 8265, 4909, 262, 787, 12, 40301, 2163, 543, 8404, 284, 2251, 257, 198, 12102, 3084, 286, 10154, 2393, 329, 7946, 4493, 13, 198, 198, 1273, 2012, 306, 5486, 11, ...
2.725057
8,329
import os import unittest from sportradar import Golf # Import API keys from environment variables api_key_name = "SPORTRADAR_API_KEY_GOLF" 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 = Golf.Golf(api_key...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 6332, 6335, 283, 1330, 19709, 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, 38, ...
2.8
130
import idom victory = idom.web.module_from_template("react", "victory-bar", fallback="⌛") VictoryBar = idom.web.export(victory, "VictoryBar") bar_style = {"parent": {"width": "500px"}, "data": {"fill": "royalblue"}} idom.run(idom.component(lambda: VictoryBar({"style": bar_style})))
[ 11748, 4686, 296, 628, 198, 32433, 652, 796, 4686, 296, 13, 12384, 13, 21412, 62, 6738, 62, 28243, 7203, 45018, 1600, 366, 32433, 652, 12, 5657, 1600, 2121, 1891, 2625, 158, 234, 249, 4943, 198, 21944, 652, 10374, 796, 4686, 296, 13, ...
2.672897
107
import pretty_midi
[ 11748, 2495, 62, 13602, 72, 628, 198 ]
3
7
r""" =============================================================================== throat_normal -- calculate from the normal vector to the throat vertices =============================================================================== """ import scipy as sp from scipy.spatial import ConvexHull def voronoi(network...
[ 81, 37811, 198, 23926, 25609, 18604, 198, 26110, 265, 62, 11265, 1377, 15284, 422, 262, 3487, 15879, 284, 262, 13589, 9421, 1063, 198, 23926, 25609, 18604, 198, 198, 37811, 198, 11748, 629, 541, 88, 355, 599, 198, 6738, 629, 541, 88, ...
2.402626
457
import unittest import brainyquote if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 3632, 88, 22708, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.575758
33
# -*- coding:utf-8 -*- import urllib.request,time,_thread,urllib.parse
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 11748, 2956, 297, 571, 13, 25927, 11, 2435, 11, 62, 16663, 11, 333, 297, 571, 13, 29572, 201, 198 ]
2.212121
33
from __future__ import absolute_import, division, print_function import os import cv2 import sys import matplotlib.pyplot as plt import numpy as np from mmcv import Config import torch from torch.utils.data import DataLoader sys.path.append('.') from mono.model.registry import MONO from mono.model.mono_b...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 201, 198, 11748, 28686, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 25064, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, ...
2.555283
407
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 15069, 2177, 383, 17508, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1...
2.383621
3,016
# 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 # # Unless required by applica...
[ 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, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
2.922087
1,476
import os import pathlib import requests import pandas as pd # Get Playlist Item Ids AUTH_URL = 'https://accounts.spotify.com/api/token' CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID") CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET") PLAYLIST_ID = os.getenv("PLAYLIST_ID") BASE_URL = 'https://api.spotify.com/v1/' if no...
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 7007, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 3497, 3811, 4868, 9097, 5121, 82, 198, 32, 24318, 62, 21886, 796, 705, 5450, 1378, 23317, 82, 13, 20485, 1958, 13, 785, 14, 1...
2.516866
919
"""Common get info functions for platform""" # Python import os import logging import re # pyATS from pyats.easypy import runtime # Genie from genie.metaparser.util.exceptions import SchemaEmptyParserError, SchemaMissingKeyError from genie.utils import Dq # Unicon from unicon.core.errors import SubCommandFailure l...
[ 37811, 17227, 651, 7508, 5499, 329, 3859, 37811, 198, 198, 2, 11361, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 302, 198, 198, 2, 12972, 33586, 198, 6738, 12972, 1381, 13, 38171, 9078, 1330, 19124, 198, 198, 2, 49405, 198, 6738, ...
1.942466
13,592
from ophyd import (EpicsSignal, EpicsSignalRO) from .. import (RecordBase, _register_record_type, FieldComponent as Cpt) @_register_record_type('motor')
[ 6738, 267, 746, 5173, 1330, 357, 13807, 873, 11712, 282, 11, 4551, 873, 11712, 282, 13252, 8, 198, 198, 6738, 11485, 1330, 357, 23739, 14881, 11, 4808, 30238, 62, 22105, 62, 4906, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.492754
69
from project import db db.create_all()
[ 6738, 1628, 1330, 20613, 628, 198, 198, 9945, 13, 17953, 62, 439, 3419, 198 ]
3
14
# Only for local development server from root import app if __name__ == "__main__": app.run()
[ 2, 5514, 329, 1957, 2478, 4382, 198, 198, 6738, 6808, 1330, 598, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 598, 13, 5143, 3419 ]
3.09375
32
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json
[ 2, 24700, 1137, 11617, 11050, 509, 2662, 6981, 26144, 532, 8410, 5626, 48483, 198, 11748, 11281, 8443, 62, 33803, 62, 43282, 198, 11748, 33918, 628, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 628 ]
2.833333
36
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
[ 2, 49962, 284, 262, 23881, 32173, 11, 3457, 19203, 25896, 32173, 11537, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383...
3.280992
484