content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from typing import Any, List, Dict from anytree import Node, RenderTree, ContRoundStyle class RenderState: " Render state class. View shablbot module active in tree style. " def render(self, style = ContRoundStyle) -> None: """ Render tree with state bot modules. Args: style ([t...
[ 6738, 19720, 1330, 4377, 11, 7343, 11, 360, 713, 198, 198, 6738, 597, 21048, 1330, 19081, 11, 46722, 27660, 11, 2345, 22685, 21466, 628, 198, 4871, 46722, 9012, 25, 198, 220, 220, 220, 366, 46722, 1181, 1398, 13, 3582, 427, 23117, 136...
2.67019
473
# %% import matplotlib.pyplot as plt from torch_geometric.data import download_url, extract_tar from foam_graph.utils.graph_from_foam import read_foam from foam_graph.visualization.graph_plotting import plot_graph # %% Extract tar and read case as a graph download_url("https://github.com/gfngoncalves/openfoam_cases/bl...
[ 2, 43313, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 28034, 62, 469, 16996, 13, 7890, 1330, 4321, 62, 6371, 11, 7925, 62, 18870, 198, 6738, 19828, 62, 34960, 13, 26791, 13, 34960, 62, 6738, 62, 6513, 32...
2.633452
281
from __future__ import annotations from typing import Type, Optional, List from Exceptions.BranchHaveDiverged import BranchHaveDiverged from Exceptions.BranchNotExist import BranchNotExist from Exceptions.GitMergeConflictError import GitMergeConflictError from Exceptions.NotCleanWorkingTree import NotCleanWorkingTree...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 5994, 11, 32233, 11, 7343, 198, 198, 6738, 1475, 11755, 13, 33, 25642, 11980, 35, 1428, 2004, 1330, 20551, 11980, 35, 1428, 2004, 198, 6738, 1475, 11755, 13, 33, 25642, ...
3.969072
194
from dataclasses import fields from pydantic import conint from pydantic.fields import Field import numpy as np from .bounding_box import BoundingBox from .trajectory import Trajectory from ..settings import DefaultValues from ..enums import ReferenceTypes from ..geometry import BBXCornersClass from ..reference_resol...
[ 6738, 4818, 330, 28958, 1330, 7032, 198, 6738, 279, 5173, 5109, 1330, 369, 600, 198, 6738, 279, 5173, 5109, 13, 25747, 1330, 7663, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 7784, 278, 62, 3524, 1330, 347, 9969, 142...
3.365385
156
import calendar import datetime import logging import operator import os import pytz from pdb import set_trace from django.db import models from django.conf import settings from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import DjangoUnico...
[ 11748, 11845, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 10088, 198, 11748, 28686, 198, 11748, 12972, 22877, 198, 198, 6738, 279, 9945, 1330, 900, 62, 40546, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625...
2.892344
418
#!/usr/bin/env python3 # # Adobe Photoshop "*.act" palette file conversion to GIMP "*.gpl" palette # format (which is also recognized by many other tools). # # How to use: # ./act_to_gpl.py some_palette.act > some_palette.gpl # # Code based on swatchbook/codecs/adobe_act.py from: # http://www.selapa.net/swatchbooker/...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 21771, 29153, 366, 24620, 529, 1, 27043, 2393, 11315, 284, 402, 3955, 47, 366, 24620, 70, 489, 1, 27043, 198, 2, 5794, 357, 4758, 318, 635, 8018, 416, 867, 584, 4899...
2.510204
196
from flask import Flask, request, redirect, render_template from werkzeug.utils import secure_filename import os import tensorflow as tf import numpy as np import cv2 food_classes = ['Broken street sign', 'Damaged bollard', 'Damaged street light', 'Pothole'] app = Flask(__name__, static_url_path='/static') app.conf...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 18941, 11, 8543, 62, 28243, 198, 6738, 266, 9587, 2736, 1018, 13, 26791, 1330, 220, 5713, 62, 34345, 198, 11748, 28686, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 4594...
2.665428
269
import numpy as np from numba import jit import matplotlib.pyplot as plt import quantecon as qe from quantecon.distributions import BetaBinomial n, a, b = 50, 200, 100 w_min, w_max = 10, 60 w_vals = np.linspace(w_min, w_max, n+1) dist = BetaBinomial(n, a, b) psi_vals = dist.pdf() reservation_wage = compute_reserv...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 474, 270, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 5554, 721, 261, 355, 10662, 68, 198, 6738, 5554, 721, 261, 13, 17080, 2455, 507, 1330, 1799...
2.5
150
import xmlrpc.client as xmlrpclib import json config_path = "./blog_config.json" def have_config(): ''' return bool value : whether config file exists ''' try: with open(config_path, "r", encoding = "utf-8") as f: try: cfg = json.load(f) return cfg !...
[ 11748, 35555, 81, 14751, 13, 16366, 355, 35555, 81, 79, 565, 571, 198, 11748, 33918, 198, 198, 11250, 62, 6978, 796, 366, 19571, 14036, 62, 11250, 13, 17752, 1, 198, 198, 4299, 423, 62, 11250, 33529, 198, 220, 220, 220, 705, 7061, 1...
1.988722
798
# Generated by Django 3.1.6 on 2021-02-11 12:42 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 2999, 12, 1157, 1105, 25, 3682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import traceback from flask import current_app from numbers import Real from decimal import Decimal from itertools import tee, filterfalse class DeferredSourceMatcher(object): """ # Defer loading of the actual source matcher to runtime to save on # startup time when we don't need it. """ def __g...
[ 11748, 12854, 1891, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 198, 6738, 3146, 1330, 6416, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 340, 861, 10141, 1330, 30479, 11, 8106, 9562, 628, 198, 4871, 2896, 17436, 7416, 19044, 20...
2.353403
4,966
""" filename: TraceGenerator.py contents: this script calls the GenerateSyntheticTrace method that creates and stream of memory references that models the memory performance of the input application or applications author: Trevor Gale date: 3.4.16""" import h5py as h5 import numpy as np import...
[ 37811, 29472, 25, 34912, 8645, 1352, 13, 9078, 198, 220, 220, 220, 10154, 25, 428, 4226, 3848, 262, 2980, 378, 13940, 429, 6587, 2898, 558, 2446, 326, 198, 220, 220, 220, 8075, 290, 4269, 286, 4088, 10288, 326, 4981, 262, 4088, 198, ...
2.537544
3,689
import pandas as pd def read_filter_lbmp(path): """ Read one csv file with pandas. Convert the Time Stamp field to pandas datetime format. Filter out non-NYC nodes and only keep required columns. Change column names to snake case for easier access. Parameters ---------- path : str or ...
[ 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 1100, 62, 24455, 62, 23160, 3149, 7, 6978, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4149, 530, 269, 21370, 2393, 351, 19798, 292, 13, 38240, 262, 3862, 40694, 2214, 284, 1...
2.499065
535
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging import os.path from concurrent.futures import as_completed import requests from ..download import FuturesSessionFlex from ..processor import IndexFileProcessor logger = logging.getLogger('update.IndexUpdate')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 198, 11748, 28686, 13, 6978, 198, 6738, 24580, 13, 69, 315, 942, 1330, 355, 62, 785, 16838, 19...
3.301205
83
## TODO: define the convolutional neural network architecture import torch from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F # can use the below import should you choose to initialize the weights of your Net import torch.nn.init as I
[ 2235, 16926, 46, 25, 8160, 262, 3063, 2122, 282, 17019, 3127, 10959, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, ...
3.653846
78
#! /usr/bin/env python import pygame import sys import random def main (): """Main function""" rt = Robot() p = rt.init_probability_map() while True: #rt.display_robot() rt.display_probability_map(p) m = rt.robot_random_move() rt.perception() rt...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 11748, 12972, 6057, 201, 198, 11748, 25064, 201, 198, 11748, 4738, 201, 198, 197, 197, 201, 198, 4299, 1388, 357, 2599, 201, 198, 220, 220, 220, 37227, 13383, 2163, 37811, 201, ...
1.855705
298
import json from io import StringIO import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description=""" Generate Java Utility class from GeoJson Input for AnyLogic GISShape """) parser.add_argument('geojsonfile', help='path to geojson file of region...
[ 11748, 33918, 198, 6738, 33245, 1330, 10903, 9399, 198, 11748, 1822, 29572, 628, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, ...
2.008523
352
import pytest from tests.constants import public_key, private_key, auth_result_url @pytest.fixture(scope="session")
[ 11748, 12972, 9288, 198, 6738, 5254, 13, 9979, 1187, 1330, 1171, 62, 2539, 11, 2839, 62, 2539, 11, 6284, 62, 20274, 62, 6371, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 29891, 4943, 198 ]
3.189189
37
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import logging import time import azure.functions logger = logging.getLogger('my function')
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 11748, 18931, 198, 11748, 640, 198, 198, 11748, 35560, 495, 13, 12543, 2733, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 1...
3.877551
49
"""Url configuration for the auth module.""" from django.conf.urls import include, url from .views import ( IdPRedirectView, inactive_user_view, lti_login_and_complete_view, post_to_custom_auth_form, saml_metadata_view ) urlpatterns = [ url(r'^auth/inactive', inactive_user_view, name="third_p...
[ 37811, 28165, 8398, 329, 262, 6284, 8265, 526, 15931, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 198, 6738, 764, 33571, 1330, 357, 198, 220, 220, 220, 5121, 4805, 276, 1060, 7680, 11, 198, 220, ...
2.39726
438
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions to rebin light curves and frequency spectra.""" from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np from .io import get_file_type from .io import save_data from .io i...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 24629, 2733, 284, 3405, 259, 1657, 23759, 290, 8373, 5444, 430, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 357, 48546...
2.071532
4,823
import faulthandler import atexit import signal import traceback import os import multiprocessing # To test with doctest... if not __package__: # pragma: no cover LIB_PATH = "." else: from .. import LIB_PATH # Global configuration DUMP_DIRECTORY = LIB_PATH + "/dump/" DUMP_CURRENT_PROCESS = DUMP_DIRECTORY + ...
[ 11748, 277, 2518, 400, 392, 1754, 198, 11748, 379, 37023, 198, 11748, 6737, 198, 11748, 12854, 1891, 198, 11748, 28686, 198, 11748, 18540, 305, 919, 278, 198, 198, 2, 1675, 1332, 351, 10412, 395, 986, 198, 361, 407, 11593, 26495, 834, ...
2.838323
501
# -*- coding: utf-8 -*- """ Created on Fri May 7 11:32:58 2021 @author: helena """ class IcebergCalc(): """ Class declaration for the IcebergCalc class. Provides methods for calculating an iceberg's area, volume and mass. """ def __init__(self, lidardata, radardata, seaice_m): "...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 1737, 220, 767, 1367, 25, 2624, 25, 3365, 33448, 198, 198, 31, 9800, 25, 932, 8107, 198, 37811, 198, 198, 4871, 6663, 3900, 9771, 66, 33...
2.287958
1,910
from keras.layers import Conv2D, BatchNormalization, Input, DepthwiseConv2D, Lambda, Concatenate from keras.layers import GlobalAveragePooling2D, Reshape, ReLU, Add, Dropout import keras.backend as K from ..functions.mutations import channel_split, channel_shuffle # Emulate class behaviour for parameterization def S...
[ 6738, 41927, 292, 13, 75, 6962, 1330, 34872, 17, 35, 11, 347, 963, 26447, 1634, 11, 23412, 11, 36350, 3083, 3103, 85, 17, 35, 11, 21114, 6814, 11, 1482, 9246, 268, 378, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 8060, 26287, 27201, ...
2.434134
1,207
outer = {"inner": {"hooray": "python"}}
[ 39605, 796, 19779, 5083, 1298, 19779, 71, 2675, 323, 1298, 366, 29412, 1, 11709, 201, 198 ]
2.5625
16
from selenium import webdriver driver = webdriver.Chrome() driver.get('https://web.whatsapp.com/') all_names = ['Sachin Yadav'] msg = input('Enter the message') count = int(input('no.of times to send message')) input('click any random key after qr scanning') for name in all_names: user = driver.find...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 26230, 796, 3992, 26230, 13, 1925, 5998, 3419, 201, 198, 201, 198, 26230, 13, 1136, 10786, 5450, 1378, 12384, 13, 1929, 1381, 1324, 13, 785, 14, 11537, 201, 198, 201, 198, 439, 62, ...
2.423387
248
from django.conf import settings from django.contrib.auth import get_user_model from django.utils import timezone from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from home.models import SiteSettings from iogt_users.filters import GroupsFilter modeladmin_register(UsersExportAdmin)
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 266, 363, 13199, 13, 3642, 822, 13, 19849, ...
3.632184
87
from .constants import BLOCK_TAGS def add_0x(string): """Add 0x to string at start. """ if isinstance(string, bytes): string = string.decode('utf-8') return '0x' + str(string) def hex_to_dec(x): """Convert hex to decimal """ return int(x, 16) def wei_to_ether(wei): """Conve...
[ 6738, 764, 9979, 1187, 1330, 9878, 11290, 62, 42197, 50, 628, 198, 4299, 751, 62, 15, 87, 7, 8841, 2599, 198, 220, 220, 220, 37227, 4550, 657, 87, 284, 4731, 379, 923, 13, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 318, ...
2.334123
422
from .models import RedirectVariable
[ 6738, 764, 27530, 1330, 2297, 1060, 43015, 198 ]
4.625
8
from enum import Enum, auto from autorepr import AutoRepr from birdway import Unary, Type, Binary for name in [ "KeywordMeta", "KeywordArgs", "KeywordParam", "KeywordRun", "KeywordIf", "KeywordThen", "KeywordElse", "KeywordPrintln", "KeywordOption", "BlockBegin", "BlockEnd...
[ 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 6738, 1960, 382, 1050, 1330, 11160, 6207, 81, 198, 6738, 6512, 1014, 1330, 791, 560, 11, 5994, 11, 45755, 628, 198, 198, 1640, 1438, 287, 685, 198, 220, 220, 220, 366, 9218, 4775, 48526, ...
2.242105
380
file1 = open('input_7.txt', 'r') Lines = file1.readlines() bingo_numbers = Lines[0].split(",") bingo_tables = [] bingo_win = 0 bingo_row_number = 0 for line in Lines[2:]: new_row = [] if line == '\n': continue row = line.split(" ") for element in row: if element == '\n' or element == ''...
[ 7753, 16, 796, 1280, 10786, 15414, 62, 22, 13, 14116, 3256, 705, 81, 11537, 198, 43, 1127, 796, 2393, 16, 13, 961, 6615, 3419, 198, 198, 4623, 78, 62, 77, 17024, 796, 26299, 58, 15, 4083, 35312, 7, 2430, 8, 198, 4623, 78, 62, 83...
1.854402
886
username = input("Please enter your name : ") print(type(username)) print(f'Your name is : {username}')
[ 29460, 796, 5128, 7203, 5492, 3802, 534, 1438, 1058, 366, 8, 198, 4798, 7, 4906, 7, 29460, 4008, 198, 4798, 7, 69, 6, 7120, 1438, 318, 1058, 1391, 29460, 92, 11537 ]
3.322581
31
import requests, json def userApiKey(apikey): """ Returns information about an apikey apikey: Your ApiKey from FileCrypt Attention: this API is limited to 10 requests for an timeframe of 1 hour. """ data={"api_key":apikey,"sub":"apikey","fn":"user"} return json.loads(requests.post("https://filecrypt...
[ 11748, 7007, 11, 33918, 201, 198, 201, 198, 4299, 2836, 32, 14415, 9218, 7, 499, 522, 88, 2599, 201, 198, 197, 37811, 201, 198, 197, 35561, 1321, 546, 281, 2471, 522, 88, 201, 198, 197, 499, 522, 88, 25, 3406, 5949, 72, 9218, 422,...
2.554287
3,592
#!/usr/bin/env python3 import RPi.GPIO as GPIO import sys import time if __name__ == '__main__': main(int(sys.argv[1]))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 25064, 198, 11748, 640, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388...
2.333333
54
# Copyright (c) 2010 Tim Medina # # 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, ...
[ 2, 220, 15069, 357, 66, 8, 3050, 5045, 41946, 198, 2, 198, 2, 220, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 198, 2, 220, 16727, 257, 4866, 286, 428, 3788, 290, 3917, 10314, 198, 2, 220, 3696, 357, 1...
3.502646
378
from app import db import datetime
[ 6738, 598, 1330, 20613, 198, 11748, 4818, 8079, 198 ]
3.888889
9
import numpy as np import random import xlwt # # 市界的地理坐标为:北纬39”26’至41”03’,东经115”25’至 117”30’ workbook = xlwt.Workbook(encoding='utf-8') worksheet = workbook.add_sheet("My Workbook") print(worksheet) a=[] for i in range(0,5107): x=random.uniform(115,117) y=random.uniform(39,41) a.append(str( ( st...
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 2124, 75, 46569, 198, 198, 2, 198, 2, 10263, 116, 224, 45911, 234, 21410, 28839, 108, 49426, 228, 161, 251, 238, 43718, 229, 10310, 118, 171, 120, 248, 44293, 245, 163,...
1.728395
243
# -*- coding: utf-8 -*- """ Created on Wed Feb 29 10:12:38 2012 Author: Josef Perktold License: BSD-3 """ import itertools try: #python 2.6, 2.7 zip_longest = itertools.izip_longest pass except AttributeError: #python 3.2 try: zip_longest = itertools.zip_longest pass except ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 41972, 319, 3300, 3158, 2808, 838, 25, 1065, 25, 2548, 2321, 198, 198, 13838, 25, 5264, 69, 2448, 21841, 727, 198, 34156, 25, 347, 10305, 12, 18, 198,...
1.897119
972
import paddle import numpy as np import torch import torch.optim.lr_scheduler as lr_scheduler from reprod_log import ReprodLogger from reprod_log import ReprodDiffHelper from mobilenetv3_paddle.paddlevision.models import mobilenet_v3_small as mv3_small_paddle from mobilenetv3_ref.torchvision.models import mobilenet_v3...
[ 11748, 39517, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 40085, 13, 14050, 62, 1416, 704, 18173, 355, 300, 81, 62, 1416, 704, 18173, 198, 6738, 1128, 14892, 62, 6404, 1330, 1432, 14892, 11187, 1362, 19...
2.631206
282
# ---------------------------------------------------------- #Erick Alberto Bustos Cruz A01378966 # # # ---------------------------------------------------------- from functools import total_ordering import math as m @total_ordering class Racional: """Instancias de esta clase representan números racionales ...
[ 2, 20368, 22369, 438, 198, 2, 36, 5557, 40649, 36988, 418, 8742, 317, 486, 2718, 4531, 2791, 198, 2, 220, 198, 2, 198, 2, 20368, 22369, 438, 198, 198, 6738, 1257, 310, 10141, 1330, 2472, 62, 34555, 198, 11748, 10688, 355, 285, 198, ...
2.955414
157
import numpy as np import pandas as pd import json from mplsoccer.pitch import Pitch, VerticalPitch path = "C:/Users/brand/desktop/events/events_England.json" with open(path) as f: data = json.load(f) train = pd.DataFrame(data) path2 = "C:/Users/brand/desktop/players.json" with open(path...
[ 11748, 299, 32152, 355, 45941, 220, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 33918, 201, 198, 6738, 285, 489, 35634, 2189, 13, 79, 2007, 1330, 33517, 11, 38937, 47, 2007, 201, 198, 201, 198, 201, 198, 6978, 796, 3...
2.096182
5,552
#!/usr/bin/env python # # Copyright 2014 - 2018 The BCE Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the license.txt file. # import bce.parser.interface.printer as _interface_printer class SubstituteError(Exception): """Molecule substitution...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 220, 15069, 1946, 532, 2864, 383, 37078, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 220, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, ...
2.480519
1,694
from moto.core.exceptions import JsonRESTError class NoSuchBucketException(JsonRESTError): """We are *only* validating that there is value that is not '' here.""" code = 400 class InvalidSNSTopicARNException(JsonRESTError): """We are *only* validating that there is value that is not '' here."...
[ 6738, 285, 2069, 13, 7295, 13, 1069, 11755, 1330, 449, 1559, 49, 6465, 12331, 628, 628, 628, 628, 628, 198, 4871, 1400, 16678, 33, 38811, 16922, 7, 41, 1559, 49, 6465, 12331, 2599, 198, 220, 220, 220, 37227, 1135, 389, 1635, 8807, 9...
2.928
125
# File: generators.py # Description: Examples on how to create and use generators in Python # Environment: PyCharm and Anaconda environment # # MIT License # Copyright (c) 2018 Valentyn N Sichkar # github.com/sichkar-valentyn # # Reference to: # [1] Valentyn N Sichkar. Examples on how to create and use generators in Py...
[ 2, 9220, 25, 27298, 13, 9078, 198, 2, 12489, 25, 21066, 319, 703, 284, 2251, 290, 779, 27298, 287, 11361, 198, 2, 9344, 25, 9485, 1925, 1670, 290, 1052, 330, 13533, 2858, 198, 2, 198, 2, 17168, 13789, 198, 2, 15069, 357, 66, 8, ...
3.401961
306
#!/usr/bin/env python """ Loading data from Excel files stored at /src/data. """ # Copyright (c) 2014, Pavlo Bazilinskyy <pavlo.bazilinskyy@gmail.com> # Department of Computer Science, National University of Ireland, Maynooth # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this sof...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 19031, 1366, 422, 24134, 3696, 8574, 379, 1220, 10677, 14, 7890, 13, 198, 37811, 198, 2, 15069, 357, 66, 8, 1946, 11, 24081, 5439, 47099, 346, 19870, 88, 1279, 79, 615, 5...
3.517021
470
from django.urls import path, include from django.contrib import admin from django.contrib.auth import views from authentication.views import HomeView urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name='home'), path('auth/', include('authentication.urls')), path('', incl...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 5009, 198, 6738, 18239, 13, 33571, 1330, 5995, 7680, 198, 198, 6371, ...
2.982759
116
from arbitrary_dateparser.dateparser import *
[ 6738, 14977, 62, 4475, 48610, 13, 4475, 48610, 1330, 1635, 201, 198 ]
3.916667
12
import csv import os import time from selenium.webdriver.support.select import Select from Data.parameters import Data from filenames import file_extention from get_dir import pwd from reuse_func import GetData
[ 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 640, 198, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 19738, 1330, 9683, 198, 198, 6738, 6060, 13, 17143, 7307, 1330, 6060, 198, 6738, 1226, 268, 1047, 1330, 2393, 62, ...
3.566667
60
########################################################################################### # # # ObjectTracker 2.0 # # ...
[ 29113, 29113, 14468, 7804, 21017, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
1.650623
1,766
import cv2 import mediapipe as mp mp_drawing = mp.solutions.drawing_utils # mp_drawing_styles = mp.solutions.drawing_styles mp_face_mesh = mp.solutions.face_mesh # for webcam input: if __name__ == '__main__': main()
[ 11748, 269, 85, 17, 198, 11748, 16957, 499, 3757, 355, 29034, 198, 198, 3149, 62, 19334, 278, 796, 29034, 13, 82, 14191, 13, 19334, 278, 62, 26791, 198, 2, 29034, 62, 19334, 278, 62, 47720, 796, 29034, 13, 82, 14191, 13, 19334, 278,...
2.556818
88
# Designed by Andy OConnell <aoconnel@bu.edu> <andrewoconnell89@gmail.com> class CacheRow(object): """This represents a row of cache. Instance Variables Slot : middle 4 bits Valid : If the row is real data Tag : left 4 Bits Data : 16 Bytes of information from memory Dirt...
[ 2, 39198, 416, 12382, 440, 15559, 1279, 64, 36221, 4954, 31, 11110, 13, 15532, 29, 1279, 392, 1809, 36221, 10076, 4531, 31, 14816, 13, 785, 29, 198, 198, 4871, 34088, 25166, 7, 15252, 2599, 198, 220, 220, 220, 37227, 1212, 6870, 257, ...
2.693431
137
from ckeditor.fields import RichTextFormField from django import forms from django.conf import settings from django.contrib.auth.models import User from django.db.models import Count from django.forms import ModelChoiceField from django.utils.module_loading import import_string from helpdesk.models import State, Comme...
[ 6738, 269, 9091, 2072, 13, 25747, 1330, 3998, 8206, 8479, 15878, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, ...
3.813725
102
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
2.596222
17,522
import numpy as np import torch
[ 11748, 299, 32152, 355, 45941, 220, 198, 11748, 28034, 628, 628 ]
3.272727
11
"""A command line interface that exposes softlearning examples to user. run_example_* methods, which run the experiments by invoking `tune.run_experiments` function. """ import click import sys sys.path.append('./') from examples.instrument import run_example_local @click.group() @cli.command( name='run...
[ 37811, 32, 3141, 1627, 7071, 326, 32142, 2705, 40684, 6096, 284, 2836, 13, 198, 198, 5143, 62, 20688, 62, 9, 5050, 11, 543, 1057, 262, 10256, 416, 39744, 198, 220, 220, 220, 4600, 83, 1726, 13, 5143, 62, 23100, 6800, 63, 2163, 13, ...
2.994975
199
# Generated by Django 3.2.5 on 2021-07-31 21:18 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 20, 319, 33448, 12, 2998, 12, 3132, 2310, 25, 1507, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python # Python imports import collections # Project imports import util import util_date NAMESPACE = 'LivingResources' DATE_RANGE = util_date.DATES[NAMESPACE] """ LivingResources data has 3 top-level categories (programs) -- Tidal Plankton Data, Tidal Benthic Data, and Nontidal Benthic Data. """ #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 11361, 17944, 198, 11748, 17268, 198, 198, 2, 4935, 17944, 198, 11748, 7736, 198, 11748, 7736, 62, 4475, 198, 198, 45, 29559, 47, 11598, 796, 705, 36376, 33236, 6, 198, 198, ...
2.159918
4,396
import csv import json from flask import Flask from flask import Response from flask import request from flask import render_template from flask.ext.triangle import Triangle import data.database_commands as database_commands app = Flask(__name__) Triangle(app) @app.route("/") @app.route("/tweets") # @app.route("/...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 18261, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 13, 2302, 13, 28461, 9248, 1330, 33233, 198, 1174...
2.273563
435
# -*- coding: utf-8 -*- import os import json from simmate.workflow_engine import ErrorHandler from simmate.calculators.vasp.inputs import Incar class RotationNonIntMatrix(ErrorHandler): """ This a simple error handler that is active when VASP finds an issue with the rotation matrix. """ is_mon...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 6738, 985, 9830, 13, 1818, 11125, 62, 18392, 1330, 13047, 25060, 198, 6738, 985, 9830, 13, 9948, 3129, 2024, 13, 85, 5126...
2.765714
175
import sys import argparse import darshan if __name__ == "__main__": main()
[ 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 288, 5406, 272, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.636364
33
"""Main class for the Crownstone cloud cloud.""" from __future__ import annotations import asyncio import logging import aiohttp from crownstone_cloud.cloud_models.crownstones import Crownstone from crownstone_cloud.cloud_models.spheres import Spheres from crownstone_cloud.exceptions import CrownstoneNotFoundError f...
[ 37811, 13383, 1398, 329, 262, 12223, 6440, 6279, 6279, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 198, 11748, 257, 952, 4023, 198, 198, 6738, 12389, 6440, 62, 17721, 13, 1...
2.434104
1,859
from corehq.apps.commtrack.models import SupplyPointCase from corehq.apps.products.models import Product from corehq.apps.locations.models import Location, SQLLocation from corehq.apps.domain.models import Domain from corehq.util.quickcache import quickcache from dimagi.utils.decorators.memoized import memoized from di...
[ 6738, 4755, 71, 80, 13, 18211, 13, 9503, 11659, 13, 27530, 1330, 22663, 12727, 20448, 198, 6738, 4755, 71, 80, 13, 18211, 13, 29498, 13, 27530, 1330, 8721, 198, 6738, 4755, 71, 80, 13, 18211, 13, 17946, 602, 13, 27530, 1330, 13397, ...
2.461781
1,269
# Copyright 2017 The Forseti Security 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 ap...
[ 2, 15069, 2177, 383, 27325, 316, 72, 4765, 46665, 13, 1439, 2489, 10395, 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, 11...
2.592421
2,586
from django.conf import settings from django.conf.urls import url, include urlpatterns = [] if 'admin_tools.menu' in settings.INSTALLED_APPS: urlpatterns.append(url(r'^menu/', include('admin_tools.menu.urls'))) if 'admin_tools.dashboard' in settings.INSTALLED_APPS: urlpatterns.append( url(r'^dashboard/...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 198, 6371, 33279, 82, 796, 17635, 198, 361, 705, 28482, 62, 31391, 13, 26272, 6, 287, 6460, 13, 38604, 7036, 1961...
2.591549
142
from app.models.Note.note import Note from app.models.Message.message import Message from app.models.User.user import User from app.models.Analytics.analytics import Analytics from app.models.Benefits.benefits import Benefits from app.models.KeyManagement.key_management import KeyManagement from app.models.PaidTimeOff....
[ 6738, 598, 13, 27530, 13, 6425, 13, 11295, 1330, 5740, 198, 6738, 598, 13, 27530, 13, 12837, 13, 20500, 1330, 16000, 198, 6738, 598, 13, 27530, 13, 12982, 13, 7220, 1330, 11787, 198, 6738, 598, 13, 27530, 13, 37702, 14094, 13, 38200, ...
3.839506
162
# Copyright (c) 2018 Cisco and/or its affiliates. # 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 ag...
[ 2, 15069, 357, 66, 8, 2864, 28289, 290, 14, 273, 663, 29116, 13, 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...
2.054498
15,964
import coreutil import unittest
[ 11748, 4755, 22602, 198, 11748, 555, 715, 395, 628 ]
3.666667
9
#!usr/bin/env python # coding=utf-8 # Created by zhezhiyong@163.com on 2016/11/16. """ 启动 """ from scrapy import cmdline cmdline.execute("scrapy crawl biquge".split())
[ 2, 0, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 15622, 416, 1976, 258, 89, 5303, 88, 506, 31, 24136, 13, 785, 319, 1584, 14, 1157, 14, 1433, 13, 198, 198, 37811, 198, 28938, 107, 27950, 101, 19...
2.375
72
from cx_Freeze import setup, Executable files = {"include_files": [ "command/", ], "packages": []} setup( name="pykage", version="0.1.5", description="npmjs en python", options={'build_exe': files}, executables=[Executable("pykage.py", base=None)])
[ 6738, 43213, 62, 11146, 2736, 1330, 9058, 11, 8393, 18187, 198, 16624, 796, 19779, 17256, 62, 16624, 1298, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, ...
2.270677
133
from onegov.core.framework import Framework from onegov.core.security import Public, Personal, Private, Secret @Framework.setting_section(section="roles") def get_roles_setting(): """ Returns the default roles available to onegov.core applications. Applications building on onegov.core may add more roles and ...
[ 6738, 530, 9567, 13, 7295, 13, 30604, 1330, 25161, 198, 6738, 530, 9567, 13, 7295, 13, 12961, 1330, 5094, 11, 15644, 11, 15348, 11, 3943, 628, 198, 31, 21055, 6433, 13, 33990, 62, 5458, 7, 5458, 2625, 305, 829, 4943, 198, 4299, 651,...
2.528696
575
# Copyright: 2006 Brian Harring <ferringb@gmail.com> # License: GPL2/BSD from snakeoil.test.mixins import TempDirMixin from pkgcore.cache import flat_hash from pkgcore.test.cache import util, test_base
[ 2, 15069, 25, 4793, 8403, 2113, 1806, 1279, 2232, 1806, 65, 31, 14816, 13, 785, 29, 198, 2, 13789, 25, 38644, 17, 14, 21800, 198, 198, 6738, 17522, 9437, 13, 9288, 13, 19816, 1040, 1330, 24189, 35277, 35608, 259, 198, 198, 6738, 279...
3.029412
68
# -*- coding: utf-8 -*- # 版权所有 2019 深圳米筐科技有限公司(下称“米筐科技”) # # 除非遵守当前许可,否则不得使用本软件。 # # * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件): # 遵守 Apache License 2.0(下称“Apache 2.0 许可”), # 您可以在以下位置获得 Apache 2.0 许可的副本:http://www.apache.org/licenses/LICENSE-2.0。 # 除非法律有要求或以书面形式达成协议,否则本软件分发时...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 13328, 231, 230, 30266, 225, 33699, 222, 17312, 231, 13130, 10545, 115, 109, 28839, 111, 163, 109, 111, 163, 255, 238, 163, 100, 239, 162, 232, 222, 17312, 231, 165...
0.752868
1,133
from collections import namedtuple import numpy as np """ Templates for glycan residues """ AA_info = namedtuple('AA_info', 'coords atom_names bonds bb sc offset') BDP_info = AA_info(coords=np.array([[-14.69, 10.15, -18.15], [-15.46, 11.47, -18.33], ...
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 299, 32152, 355, 45941, 198, 37811, 198, 12966, 17041, 329, 13874, 5171, 47185, 198, 37811, 198, 198, 3838, 62, 10951, 796, 3706, 83, 29291, 10786, 3838, 62, 10951, 3256, 705, 1073, 3669, ...
1.371651
10,639
import torch from torch import nn import math
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 10688, 628 ]
3.916667
12
""" ## Metadata Store The configuration of each pipeline, step, backend, and produced artifacts are all tracked within the metadata store. The metadata store is an SQL database, and can be `sqlite` or `mysql`. Metadata are the pieces of information tracked about the pipelines, experiments and configurations that you a...
[ 37811, 198, 2235, 3395, 14706, 9363, 198, 464, 8398, 286, 1123, 11523, 11, 2239, 11, 30203, 11, 290, 4635, 20316, 389, 198, 439, 18283, 1626, 262, 20150, 3650, 13, 383, 20150, 3650, 318, 281, 16363, 6831, 11, 198, 392, 460, 307, 4600,...
3.595855
193
from django.test import TestCase from ..service import shift_client_priority from ..models import Client, ProductArea, FeatureRequest class TestShiftClientPriority(TestCase): """Test service.shift_client_priority""" def test_basic(self): """Should shift all priorities up by one""" # Add 10 ...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 11485, 15271, 1330, 6482, 62, 16366, 62, 49336, 198, 6738, 11485, 27530, 1330, 20985, 11, 8721, 30547, 11, 27018, 18453, 628, 198, 198, 4871, 6208, 33377, 11792, 22442, 414,...
2.434164
843
#!/usr/bin/env python # Small web app to allow a user to top up their personal PaperCut balance # Add a custom URL to the PaperCut user web page, which is used by end users # when they want to add credit to their PaperCut personal account. The url # should refer to this small web app When the user clicks on the URL l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 10452, 3992, 598, 284, 1249, 257, 2836, 284, 1353, 510, 511, 2614, 14962, 26254, 5236, 198, 198, 2, 3060, 257, 2183, 10289, 284, 262, 14962, 26254, 2836, 3992, 2443, 11, 543, ...
3.502695
742
#!/usr/bin/env python import os, yaml, json, shlex, datetime import logging logging.basicConfig(level=logging.INFO) from jinja2 import Environment, FileSystemLoader from datetime import datetime from shutil import copyfile # Mimic Ansible addional Jinja filter # Prepare Jinja envs env = Environment(loader = FileSys...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 11, 331, 43695, 11, 33918, 11, 427, 2588, 11, 4818, 8079, 198, 11748, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 8, 198, 198, 67...
2.90068
735
"""Module: Creates a WeatherScraper class to scrape data from website.""" import urllib.request import datetime import time from time import strptime from html.parser import HTMLParser from html.entities import name2codepoint class WeatherScraper(HTMLParser): """This class contains HTMLParser functions.""" d...
[ 37811, 26796, 25, 7921, 274, 257, 15615, 3351, 38545, 1398, 284, 42778, 1366, 422, 3052, 526, 15931, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 4818, 8079, 198, 11748, 640, 198, 6738, 640, 1330, 965, 457, 524, 198, 6738, 27711, ...
1.789543
3,787
import time, cv2 from threading import Thread from djitellopy import Tello FPS = 30 tello = Tello() tello.connect() print("Battery level:", tello.get_battery()) keepRecording = True tello.streamon() frame_read = tello.get_frame_read() # we need to run the recorder in a seperate thread, otherwise blocking options # ...
[ 11748, 640, 11, 269, 85, 17, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 42625, 578, 297, 11081, 1330, 309, 11109, 198, 198, 37, 3705, 796, 1542, 198, 198, 660, 18798, 796, 309, 11109, 3419, 198, 660, 18798, 13, 8443, 3419, 198, 4...
2.793522
247
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import utils.fields
[ 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, 3384, 4487, 13, 25747, 628 ]
2.953488
43
from textwrap import dedent import pytest from pylox.lox import Lox # Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/variable/use_local_in_initializer.lox TEST_SRC = dedent( """\ var a = "outer"; { var a = a; // Error at 'a': Can't read local variable in its own...
[ 6738, 2420, 37150, 1330, 4648, 298, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 279, 2645, 1140, 13, 75, 1140, 1330, 406, 1140, 198, 198, 2, 7308, 2663, 422, 3740, 1378, 12567, 13, 785, 14, 6199, 21559, 14, 3323, 278, 3849, 3866, ...
2.656805
169
import re import spacy spacy_en = spacy.load('en_core_web_sm') # Setting LF output values ABSTAIN_VAL = 0 SEIZURE_VAL = 1 NO_SEIZURE_VAL = -1 ###################################################################################################### ##### HELPFUL REGEXES AND ONTOLOGIES ####################################...
[ 11748, 302, 198, 11748, 599, 1590, 198, 2777, 1590, 62, 268, 796, 599, 1590, 13, 2220, 10786, 268, 62, 7295, 62, 12384, 62, 5796, 11537, 198, 198, 2, 25700, 47629, 5072, 3815, 198, 6242, 2257, 29833, 62, 23428, 796, 657, 198, 5188, ...
2.186413
6,153
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Find the missing term in an Arithmetic Progression #Problem level: 5 kyu
[ 2, 42, 18835, 402, 2306, 321, 198, 2, 43806, 413, 945, 1058, 2488, 42, 18835, 33320, 198, 2, 40781, 1438, 25, 9938, 262, 4814, 3381, 287, 281, 943, 29848, 1041, 32383, 198, 2, 40781, 1241, 25, 642, 479, 24767, 198 ]
3.1
40
import os import unittest from dataverk.datapackage import Datapackage from dataverk.exceptions.dataverk_exceptions import EnvironmentVariableNotSet from dataverk.utils import storage_paths valid_metadata = { 'title': 'title', 'readme': "readme", 'license': 'MIT', 'accessRights': 'Open', 'auth': 'u...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 1366, 332, 74, 13, 19608, 499, 441, 496, 1330, 16092, 499, 441, 496, 198, 6738, 1366, 332, 74, 13, 1069, 11755, 13, 7890, 332, 74, 62, 1069, 11755, 1330, 9344, 43015, 3673, 7248, 1...
2.568465
241
from django.shortcuts import render,redirect from .models import * from django.contrib import messages from django.contrib.auth import login,logout,authenticate # Create your views here. from datetime import date
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 445, 1060, 198, 6738, 764, 27530, 1330, 1635, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 17594, 11, 6404, 448, 11, ...
3.754386
57
#!/usr/bin/env python3 # encoding: utf-8 """Classes used for representing Tables, TableRows and TableCells.""" from typing import List from itertools import chain, accumulate from inscriptis.html_properties import HorizontalAlignment, VerticalAlignment from inscriptis.annotation import Annotation, horizontal_shift fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 9487, 274, 973, 329, 10200, 33220, 11, 8655, 49, 1666, 290, 8655, 34, 19187, 526, 15931, 198, 198, 6738, 19720, 1330, 7343, 198, 6738,...
2.170582
4,086
from config import Config from flask import Flask
[ 6738, 4566, 1330, 17056, 198, 6738, 42903, 1330, 46947, 628, 198 ]
4.727273
11
data_x, data_x_unseen = prepare_data_x(normalized_data_close_price, window_size=config["data"]["window_size"]) data_y = prepare_data_y(normalized_data_close_price, window_size=config["data"]["window_size"]) # split dataset split_index = int(data_y.shape[0]*config["data"]["train_split_size"]) data_x_train = data_x[:...
[ 198, 198, 7890, 62, 87, 11, 1366, 62, 87, 62, 403, 15898, 796, 8335, 62, 7890, 62, 87, 7, 11265, 1143, 62, 7890, 62, 19836, 62, 20888, 11, 4324, 62, 7857, 28, 11250, 14692, 7890, 1, 7131, 1, 17497, 62, 7857, 8973, 8, 198, 7890, ...
2.462185
714
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # Third Party Apps 'wid...
[ 198, 11748, 28686, 198, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 22305, 198, 198, 38604, 7036, 1961, 62, 2969, 37...
2.17905
2,463
# TESS - ToastmastErs Simple Scheduler # This simple script will create a shuffled list of suggested meeting roles for multiple meetings. from random import shuffle from os import linesep import csv import sys if __name__ == "__main__": main(sys.argv[1:])
[ 2, 309, 7597, 532, 46831, 47616, 36, 3808, 17427, 27774, 18173, 198, 2, 770, 2829, 4226, 481, 2251, 257, 32299, 992, 1351, 286, 5220, 3249, 9176, 329, 3294, 8292, 13, 220, 198, 198, 6738, 4738, 1330, 36273, 198, 6738, 28686, 1330, 395...
3.48
75
# Copyright 2008-2018 Univa Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 15069, 3648, 12, 7908, 791, 12151, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2...
3.426593
361
import sshclient from launch_db import get_constellation_data from launch_db import log_msg
[ 11748, 26678, 16366, 198, 6738, 4219, 62, 9945, 1330, 651, 62, 9979, 28828, 62, 7890, 198, 6738, 4219, 62, 9945, 1330, 2604, 62, 19662, 628, 198 ]
3.615385
26
from .general import check_for_block_tag, check_for_comment, split_info_lines, read_face_column, dimension_reference from typing import List, Union, Any FORMAT: List[int] = [2, 1, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10] # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12, 13,14, 15
[ 6738, 764, 24622, 1330, 2198, 62, 1640, 62, 9967, 62, 12985, 11, 2198, 62, 1640, 62, 23893, 11, 6626, 62, 10951, 62, 6615, 11, 1100, 62, 2550, 62, 28665, 11, 15793, 62, 35790, 198, 6738, 19720, 1330, 7343, 11, 4479, 11, 4377, 198, ...
2.146853
143
# -*- coding: utf-8 -*- ############################################################################# # # Copyright © Dragon Dollar Limited # contact: contact@dragondollar.com # # This software is a collection of webservices designed to provide a secure # and scalable framework to build e-commerce websites. # # This s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 7804, 4242, 2, 198, 2, 198, 2, 15069, 10673, 2851, 29747, 15302, 198, 2, 2800, 25, 2800, 31, 7109, 363, 623, 13228, 13, 785, 198, 2, 198, 2, 770, ...
4.37296
429
import mmcv import numpy as np import torch from mmhuman3d.core.parametric_model.builder import build_registrant from mmhuman3d.models.builder import build_body_model body_model_load_dir = 'data/body_models' batch_size = 2
[ 11748, 8085, 33967, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 8085, 10734, 18, 67, 13, 7295, 13, 17143, 19482, 62, 19849, 13, 38272, 1330, 1382, 62, 2301, 396, 5250, 198, 6738, 8085, 10734, 18, 67, 13, 275...
3.026667
75
""" * Python program to open, display, and save an image. * """ import skimage.io import skimage.viewer # read image image = skimage.io.imread(fname="chair.jpg") # display image and wait for keypress, using a resizable window viewer = skimage.viewer.ImageViewer(image) viewer.show() # save a new version in .tif for...
[ 37811, 198, 1635, 11361, 1430, 284, 1280, 11, 3359, 11, 290, 3613, 281, 2939, 13, 198, 1635, 198, 37811, 198, 11748, 1341, 9060, 13, 952, 198, 11748, 1341, 9060, 13, 1177, 263, 198, 198, 2, 1100, 2939, 198, 9060, 796, 1341, 9060, 13...
2.976
125
import pandas as pd import json from sklearn.feature_extraction.text import CountVectorizer import argparse from functools import reduce if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-m', '--mode', help='What to do', required=True) parser.add_argument('-d', '--data', h...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 33918, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 198, 11748, 1822, 29572, 198, 6738, 1257, 310, 10141, 1330, 4646, 628, 198, 361, 11593, 3672, 834,...
2.678466
339
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198 ]
3.285714
21
#!/usr/bin/env python3 import os import time import logging import requests from emoji import emojize from functools import wraps from pssh.clients import SSHClient from pssh.exceptions import AuthenticationException from requests.exceptions import RequestException from telegram import ReplyKeyboardMarkup, ChatAction, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 7007, 198, 6738, 44805, 1330, 795, 13210, 1096, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 279, 45824, 13, 565...
2.808871
1,533