content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# More details on this kata # https://www.codewars.com/kata/52b7ed099cdc285c300001cd
[ 2, 3125, 3307, 319, 428, 479, 1045, 198, 2, 3740, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 4309, 65, 22, 276, 15, 2079, 10210, 66, 26279, 66, 18, 2388, 16, 10210, 628 ]
2.324324
37
""" This module contains white-box unit tests of CertDB package """ # pylint: disable=W0212, C0103, C0302 import sys import os import subprocess import time import shutil import string import random import unittest import unittest.mock from collections import OrderedDict import toml from cevast.utils import make_PEM_fi...
[ 37811, 198, 1212, 8265, 4909, 2330, 12, 3524, 4326, 5254, 286, 14965, 11012, 5301, 198, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 54, 2999, 1065, 11, 327, 486, 3070, 11, 327, 15, 22709, 198, 11748, 25064, 198, 11748, 28686, 198, ...
2.567568
851
import uuid import numpy as np def fitness_offsprings(mutated_offsprings, func_weights): fitness_array = [] for indv in mutated_offsprings: fitness_array.append(fitness_max_function(indv.weights, func_weights)) print("Actual offsprings fitness values:") print(fitness_array) return fitness_array def fitne...
[ 11748, 334, 27112, 198, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 198, 4299, 13547, 62, 8210, 1050, 654, 7, 21973, 515, 62, 8210, 1050, 654, 11, 25439, 62, 43775, 2599, 198, 197, 69, 3659, 62, 18747, 796, 17635, 198, 197, 1...
2.941176
442
# Generated by Django 2.2.1 on 2020-01-14 19:19 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 16, 319, 12131, 12, 486, 12, 1415, 678, 25, 1129, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import sc2 from sc2.constants import * #our own classes from unit_counters import UnitCounter from warpprism import WarpPrism as wpControl from immortal import Immortal as imControl from stalker import Stalker as skControl from zealot import Zealot as zlControl from sentry import Sentry as snControl from ade...
[ 11748, 629, 17, 201, 198, 6738, 629, 17, 13, 9979, 1187, 1330, 1635, 201, 198, 201, 198, 2, 454, 898, 6097, 201, 198, 6738, 4326, 62, 66, 15044, 1330, 11801, 31694, 201, 198, 6738, 1175, 381, 81, 1042, 1330, 31382, 6836, 1042, 355, ...
3.400673
297
from .Versioned import Versioned
[ 6738, 764, 14815, 276, 1330, 10628, 276, 628 ]
4.25
8
# Generated by Django 3.2.8 on 2021-11-15 20:32 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 23, 319, 33448, 12, 1157, 12, 1314, 1160, 25, 2624, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from datetime import date from django.contrib import admin, messages from django.core.management import call_command from django.utils.html import format_html from django.http import HttpResponseRedirect from django.urls import path # Register your models here. from .models import ( FilingList, Filing, H...
[ 6738, 4818, 8079, 1330, 3128, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 11, 6218, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 5794, 62, 6494, 198, ...
2.907063
269
"""Advent of Code 2019 Day 6 - Universal Orbit Map.""" with open('inputs/day_06.txt', 'r') as f: orbits = f.read().split() objects_dict = {} for orbit in orbits: orbited, orbiter = orbit.split(')') objects_dict[orbiter] = orbited num_orbits = 0 for orbiter in objects_dict: next_orbit = objects_dict....
[ 37811, 2782, 1151, 286, 6127, 13130, 3596, 718, 532, 14499, 38161, 9347, 526, 15931, 628, 198, 4480, 1280, 10786, 15414, 82, 14, 820, 62, 3312, 13, 14116, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 37015, 796, 277, 13, ...
2.664103
390
from hookery import Handler, Hook
[ 6738, 8011, 1924, 1330, 32412, 11, 18531, 628, 198 ]
4
9
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/2/25 14:14 # @Author : ZJJ # @Email : 597105373@qq.com from .views import UserViewset, ChangeUserPasswdView, GroupsViewset, UserGroupViewset, GroupMemberViewset, \ PermissionViewset, GroupPermViewset, PersonalInfoViewset from rest_framework...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 17, 14, 1495, 1478, 25, 1415, 201, 198, 2, 2488, 13838, 22...
2.994334
353
# TODO: Add an appropriate license to your skill before publishing. See # the LICENSE file for more information. # Below is the list of outside modules you'll be using in your skill. # They might be built-in to Python, from mycroft-core or from external # libraries. If you use an external library, be sure to include...
[ 2, 16926, 46, 25, 3060, 281, 5035, 5964, 284, 534, 5032, 878, 12407, 13, 220, 4091, 198, 2, 262, 38559, 24290, 2393, 329, 517, 1321, 13, 198, 198, 2, 10383, 318, 262, 1351, 286, 2354, 13103, 345, 1183, 307, 1262, 287, 534, 5032, 1...
3.993789
161
"""Set up the package interface.""" from .add_update import add, update from .show import show from .delete import delete
[ 37811, 7248, 510, 262, 5301, 7071, 526, 15931, 198, 198, 6738, 764, 2860, 62, 19119, 1330, 751, 11, 4296, 198, 6738, 764, 12860, 1330, 905, 198, 6738, 764, 33678, 1330, 12233, 198 ]
3.84375
32
import webbrowser as web from bs4 import BeautifulSoup STARTING_URL = 'https://www.google.com/search?q='
[ 11748, 3992, 40259, 355, 3992, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 201, 198, 201, 198, 2257, 7227, 2751, 62, 21886, 796, 705, 5450, 1378, 2503, 13, 13297, 13, 785, 14, 12947, 30, 80, 11639, 201, 198, 201, 198 ]
2.666667
42
"""Test suite for the Talks Feedback microservice."""
[ 37811, 14402, 18389, 329, 262, 47595, 37774, 4580, 15271, 526, 15931, 198 ]
4.5
12
from django.db import models from django.contrib.auth.models import User import json
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 11748, 33918, 628, 628 ]
3.52
25
from .bigGay import bigGay
[ 6738, 764, 14261, 41787, 1330, 1263, 41787 ]
3.714286
7
from ai_constants import * import ai_generator if __name__ == '__main__': # generate and express a rule rule_tree = ai_generator.generate_rule() rule_script = express_node(rule_tree) print(rule_script) # generate and write a script script_tree = ai_generator.generate_script() write_sc...
[ 6738, 257, 72, 62, 9979, 1187, 1330, 1635, 198, 11748, 257, 72, 62, 8612, 1352, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 7716, 290, 4911, 257, 3896, 198, 220, 220, 220, ...
2.699248
133
import numpy as np from tabulate import tabulate np.set_printoptions(linewidth=400, threshold=100000) print(c(1000000000))
[ 11748, 299, 32152, 355, 45941, 198, 6738, 7400, 5039, 1330, 7400, 5039, 628, 198, 37659, 13, 2617, 62, 4798, 25811, 7, 2815, 413, 5649, 28, 7029, 11, 11387, 28, 3064, 830, 8, 628, 628, 628, 628, 198, 4798, 7, 66, 7, 16, 10535, 830...
2.891304
46
from django.conf import settings if 'modeltranslation' in settings.INSTALLED_APPS: from modeltranslation.translator import translator, NotRegistered def get_translated_fields(model): """Get translated fields from a model""" try: mto = translator.get_options_for_model(model) except NotRegister...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 361, 705, 4666, 2120, 26084, 7592, 6, 287, 6460, 13, 38604, 7036, 1961, 62, 2969, 3705, 25, 198, 220, 220, 220, 422, 953, 2120, 26084, 7592, 13, 7645, 41880, 1330, 33417, 11, 1892, ...
2.913907
151
# # PySNMP MIB module OSPF-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/OSPF-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:18:45 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 440, 4303, 37, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562, 19, ...
2.959404
46,606
from csv import reader import yaml import json go()
[ 6738, 269, 21370, 1330, 9173, 198, 11748, 331, 43695, 198, 11748, 33918, 198, 198, 2188, 3419, 628 ]
3.176471
17
import numpy as np import pandas as pd from types import FunctionType import warnings from .transform import BaseTransformer def drop_na(x, y, according='both'): """ Drop the values in both x and y if the element in `according` is missing ex. drop_na([1, 2, np.nan], [1, 2, 3], 'x') => [1, 2], [1, 2] ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3858, 1330, 15553, 6030, 198, 11748, 14601, 198, 198, 6738, 764, 35636, 1330, 7308, 8291, 16354, 628, 198, 4299, 4268, 62, 2616, 7, 87, 11, 331, 11, 1864,...
2.435159
1,388
__author__ = 'yinjun' """ Definition of ListNode class ListNode(object): def __init__(self, val, next=None): self.val = val self.next = next """
[ 834, 9800, 834, 796, 705, 88, 259, 29741, 6, 198, 198, 37811, 198, 36621, 286, 7343, 19667, 198, 4871, 7343, 19667, 7, 15252, 2599, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1188, 11, 1306, 28, 14202, 2599, 198, 220, ...
2.4
70
vid = input() object = Object(vid) a = int(input()) b = int(input()) print(f'{object.square(a,b)}')
[ 198, 16921, 796, 5128, 3419, 198, 198, 15252, 796, 9515, 7, 16921, 8, 198, 64, 796, 493, 7, 15414, 28955, 198, 65, 796, 493, 7, 15414, 28955, 198, 198, 4798, 7, 69, 6, 90, 15252, 13, 23415, 7, 64, 11, 65, 38165, 11537, 198 ]
2.340909
44
from .main import Main from .arguments import arg from textwrap import dedent main = Main() command = main.command main()
[ 6738, 764, 12417, 1330, 8774, 198, 6738, 764, 853, 2886, 1330, 1822, 198, 198, 6738, 2420, 37150, 1330, 4648, 298, 198, 198, 12417, 796, 8774, 3419, 198, 21812, 796, 1388, 13, 21812, 198, 198, 12417, 3419, 198 ]
3.378378
37
# ********************************************************* # Relative Stage Movement # # Stephanie Fung 2014 # ********************************************************* # Import modules. # --------------------------------------------------------- import visa import string import struct import sys import serial # =...
[ 2, 41906, 8412, 4557, 9, 198, 2, 45344, 15371, 15477, 198, 2, 220, 198, 2, 26085, 376, 2150, 1946, 198, 2, 41906, 8412, 4557, 9, 198, 198, 2, 17267, 13103, 13, 198, 2, 20368, 22369, 12, 198, 11748, 14552, 198, 11748, 4731, 198, 11...
5.113861
202
# Copyright (c) 2013 Per Unneberg # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ 2, 15069, 357, 66, 8, 2211, 2448, 791, 710, 3900, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 198, 2, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
3.412587
286
import sys import pandas as pd # Can open csv files as a dataframe dframe = pd.read_csv('lec25.csv') # Can also use read_table with ',' as a delimiter dframe = pd.read_table('lec25.csv', sep=',') # If we dont want the header to be the first row dframe = pd.read_csv('lec25.csv', header=None) # We can also indicate a...
[ 11748, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 1680, 1280, 269, 21370, 3696, 355, 257, 1366, 14535, 198, 7568, 28073, 796, 279, 67, 13, 961, 62, 40664, 10786, 293, 66, 1495, 13, 40664, 11537, 198, 198, 2, 1680, 635...
2.975477
367
#!/usr/bin/env python # -*- coding: utf-8 -*- # @author: x.huang # @date:17-8-17 from Crypto.Hash import MD5 if __name__ == '__main__': print(encrypto('arhieason'))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 9800, 25, 2124, 13, 13415, 648, 198, 2, 2488, 4475, 25, 1558, 12, 23, 12, 1558, 628, 198, 6738, 36579...
2.17284
81
from django.conf.urls import patterns from comments.views import CommentDebateList # This url file is included from items.urls with the prefix /comments/ urlpatterns = patterns('', # Add a comment to a topic (r'^(?P<topic_id>\d+)/add/$', 'comments.views.add'), ...
[ 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 198, 6738, 3651, 13, 33571, 1330, 18957, 16587, 378, 8053, 198, 198, 2, 770, 19016, 2393, 318, 3017, 422, 3709, 13, 6371, 82, 351, 262, 21231, 1220, 15944, 14, 198, 198, ...
1.782772
801
import sys from threading import Thread from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * from pyqtconsole.console import PythonConsole from view.console import Console from view.gui_dock import * from util.logger import * from model.engine import * # clear logs logge...
[ 11748, 25064, 201, 198, 6738, 4704, 278, 1330, 14122, 201, 198, 201, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1635, 201, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1635, 201, 198, 6738, 9485, ...
2.896848
698
#!/usr/bin/env python # -*- coding: utf-8 -*- # from behavioral_patterns.command.command import Command # # Holder of the past commands # #
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 198, 6738, 17211, 62, 33279, 82, 13, 21812, 13, 21812, 1330, 9455, 198, 198, 2, 220, 628, 198, 2, 24210, 28...
2.586207
58
import logging, os, time, multiprocessing, sys, signal logging.disable(logging.WARNING) os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" import tensorflow as tf import gym import pybullet, pybullet_envs, pybullet_data import numpy as np import pandas as pd from stable_baselines.sac.policies import MlpPolicy from stable_ba...
[ 11748, 18931, 11, 28686, 11, 640, 11, 18540, 305, 919, 278, 11, 25064, 11, 6737, 220, 198, 198, 6404, 2667, 13, 40223, 7, 6404, 2667, 13, 31502, 8, 198, 418, 13, 268, 2268, 14692, 10234, 62, 8697, 47, 62, 23678, 62, 25294, 62, 253...
2.470163
553
""" Copyright 2016 Andrea McIntosh Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
[ 37811, 198, 220, 220, 15069, 1584, 23174, 39086, 3768, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789...
2.869369
444
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Graphic User Interface.""" import sys import os import glob import ConfigParser from PyQt4.QtCore import * from PyQt4.QtGui import * from version import __version__ from algorithm.imtool import label...
[ 2, 795, 16436, 25, 532, 9, 12, 4235, 25, 21015, 26, 12972, 12, 521, 298, 12, 28968, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12, 198, 2, 25357, 25, 900, 10117, 28, 29412, 39747, 28, 19, 40379, 28, 19, 15...
3.666667
714
import yaml import json from pprint import pprint as pp my_list = [] while True: x = raw_input("Enter num or text to add to list or press enter to finish: ") if not x: break my_list.append(x) my_list.append({}) while True: y = raw_input("Enter the name of the key in the list or press enter to finish...
[ 11748, 331, 43695, 198, 11748, 33918, 198, 6738, 279, 4798, 1330, 279, 4798, 355, 9788, 198, 198, 1820, 62, 4868, 796, 17635, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 2124, 796, 8246, 62, 15414, 7203, 17469, 997, 393, 2420, 284, ...
2.963526
329
import colander from sqlalchemy import Column, ForeignKey from sqlalchemy.types import DateTime, Integer, Unicode, UnicodeText from naki.model.meta import Base
[ 11748, 951, 4066, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 8708, 9218, 198, 6738, 44161, 282, 26599, 13, 19199, 1330, 7536, 7575, 11, 34142, 11, 34371, 11, 34371, 8206, 198, 6738, 299, 8182, 13, 19849, 13, 28961, 1330, 7308, 198, ...
3.4
50
#!/usr/bin/python -u # -*- coding: latin-1 -*- # # Labeled dice and Building block problems in Z3 # # * Labeled dice # # From Jim Orlin 'Colored letters, labeled dice: a logic puzzle' # http://jimorlin.wordpress.com/2009/02/17/colored-letters-labeled-dice-a-logic-puzzle/ # ''' # My daughter Jenn bough a puzzle...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 532, 84, 198, 2, 532, 9, 12, 19617, 25, 3042, 259, 12, 16, 532, 9, 12, 198, 2, 220, 198, 2, 3498, 18449, 17963, 290, 11819, 2512, 2761, 287, 1168, 18, 198, 2, 198, 2, 1635, 3498, 18449, 17...
2.796687
664
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2017 Ben Lindsay <benjlindsay@gmail.com> from job_tree import job_tree # Tier 1 is 3 values of VAR_1 (1, 2, and 3) found in 'tier_1.csv' tier_1_csv_file = 'tier_1.csv' # Tier 2 is 2 values of VAR_2 for each VAR_1, defined as a function of VAR_1 # Tier ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 3932, 33127, 1279, 11722, 20362, 521, 16706, 31, 14816, 13, 785, 29, 198, 198, ...
2.16113
1,204
import pickle import random from argparse import ArgumentParser # Requires NLTK to be installed: # python3 -m pip install nltk # python3 -c 'import nltk;nltk.download("punkt")' # May be slow at first start due to NLTK preparing its dependencies from nltk.tokenize.treebank import TreebankWordDetokenizer from nltk.lm im...
[ 11748, 2298, 293, 198, 11748, 4738, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, 2, 26848, 22879, 51, 42, 284, 307, 6589, 25, 198, 2, 21015, 18, 532, 76, 7347, 2721, 299, 2528, 74, 198, 2, 21015, 18, 532, 66, 705, 11748, ...
3.135922
412
# -*- coding: utf-8 -*- # Max-Planck-Gesellschaft zur Frderung der Wissenschaften e.V. (MPG) is # holder of all proprietary rights on this computer program. # You can only use this computer program if you have closed # a license agreement with MPG or you get the right to use the computer # program from someone who is...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5436, 12, 20854, 694, 12, 38, 274, 19187, 11693, 701, 1976, 333, 1305, 1082, 2150, 4587, 370, 747, 641, 11693, 14785, 304, 13, 53, 13, 357, 44, 6968, 8,...
2.270051
1,970
######################### AABCAAADA from collections import OrderedDict def remove_duplicates(block): """ >>> remove_duplicates('AAB') >>> 'AB' """ freq = OrderedDict() for c in block: freq[c] = freq.get(c, 0) + 1 return ''.join(freq.keys()) print(solve('AABCAAADA', 3))
[ 14468, 7804, 2, 15923, 2749, 3838, 26853, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 220, 198, 198, 4299, 4781, 62, 646, 489, 16856, 7, 9967, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13163, 4781, 62, 646, 489, 16...
2.323529
136
__all__ = 'TMP_NAME_FACTORY', 'tmp_file_name', 'str_uuid' import os from tempfile import NamedTemporaryFile from uuid import uuid4 TMP_NAME_FACTORY = tmp_file_name
[ 834, 439, 834, 796, 705, 51, 7378, 62, 20608, 62, 37, 10659, 15513, 3256, 705, 22065, 62, 7753, 62, 3672, 3256, 705, 2536, 62, 12303, 312, 6, 628, 198, 11748, 28686, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 6738, ...
2.575758
66
import sys sys.path.append("apps/controllerx")
[ 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7203, 18211, 14, 36500, 87, 4943, 198 ]
3
16
from django_unicorn.components import UnicornView from django_unicorn.views.utils import _is_component_field_model_or_unicorn_field from example.coffee.models import Flavor def test_type_hint(): component = TypeHintView(component_name="asdf", component_id="hjkl") name = "model" actual = _is_component_fi...
[ 6738, 42625, 14208, 62, 46903, 1211, 13, 5589, 3906, 1330, 39481, 7680, 198, 6738, 42625, 14208, 62, 46903, 1211, 13, 33571, 13, 26791, 1330, 4808, 271, 62, 42895, 62, 3245, 62, 19849, 62, 273, 62, 46903, 1211, 62, 3245, 198, 6738, 16...
3.047809
251
import pytest testdata = [ (2, True), (3, False), (4, True), (5, True) # We expect this test to fail ] def check_if_even(a): """ Returns True if 'a' is an even number """ return a % 2 == 0
[ 198, 11748, 12972, 9288, 198, 198, 9288, 7890, 796, 685, 198, 220, 220, 220, 357, 17, 11, 6407, 828, 198, 220, 220, 220, 357, 18, 11, 10352, 828, 198, 220, 220, 220, 357, 19, 11, 6407, 828, 198, 220, 220, 220, 357, 20, 11, 6407,...
2.192308
104
import numpy as np from scipy.optimize import minimize from intvalpy.MyClass import Interval from intvalpy.intoper import zeros def Uni(A, b, x=None, maxQ=False, x0=None, tol=1e-12, maxiter=1e3): """ Uni. , maxQ=True . Parameters: A: Interval . ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 17775, 198, 198, 6738, 493, 2100, 9078, 13, 3666, 9487, 1330, 4225, 2100, 198, 6738, 493, 2100, 9078, 13, 600, 3575, 1330, 1976, 27498, 628, 198, 4299, 433...
1.569356
2,343
import math R_EARTH = 6371000 # meter def angle2radian(angle): """ convert from an angle to a radian :param angle: (float) :return: radian (float) """ return math.radians(angle) def spherical_law_of_cosines(phi1, lambda1, phi2, lambda2): """ calculate great circle distance with sp...
[ 11748, 10688, 198, 198, 49, 62, 17133, 4221, 796, 718, 2718, 12825, 220, 1303, 16430, 628, 198, 4299, 9848, 17, 6335, 666, 7, 9248, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 10385, 422, 281, 9848, 284, 257, 2511, 666, 198...
2.451811
1,463
""" Python Template for docstring ----------------------------- python.docstring is a package cotaining TEMPLATE for docstring in python. usage: >>> from python import docstring >>> help(docstring) >>> print(docstring.module_.__doc__) >>> print(docstring.class_.__doc__) >>> print(docstrin...
[ 37811, 201, 198, 37906, 37350, 329, 2205, 8841, 201, 198, 1783, 32501, 201, 198, 201, 198, 29412, 13, 15390, 8841, 318, 257, 5301, 269, 313, 1397, 309, 3620, 6489, 6158, 329, 2205, 8841, 287, 21015, 13, 201, 198, 26060, 25, 201, 198, ...
2.658986
434
import logging import sys import socket from cliff.app import App from cliff.command import Command from cliff.commandmanager import CommandManager def main(argv=sys.argv[1:]): myapp = AgentApp() return myapp.run(argv) if ("__main__" == __name__): sys.exit(main(sys.argv[1:])) # pragma: n...
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 17802, 198, 198, 6738, 19516, 13, 1324, 1330, 2034, 198, 6738, 19516, 13, 21812, 1330, 9455, 198, 6738, 19516, 13, 21812, 37153, 1330, 9455, 13511, 628, 628, 628, 628, 628, 628, 628, 628, 198...
2.82906
117
from format2 import Format2 from format40 import Format40 from format80 import Format80
[ 6738, 5794, 17, 1330, 18980, 17, 198, 6738, 5794, 1821, 1330, 18980, 1821, 198, 6738, 5794, 1795, 1330, 18980, 1795, 198 ]
4.190476
21
import sys import os import gzip import argparse import numpy as np import pysam import util import snptable import tables MAX_SEQS_DEFAULT = 64 MAX_SNPS_DEFAULT = 6 def parse_options(): parser = argparse.ArgumentParser(description="Looks for SNPs and indels " ...
[ 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 308, 13344, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 279, 893, 321, 198, 198, 11748, 7736, 198, 11748, 3013, 457, 540, 198, 198, 11748, 8893, 198, 19...
1.918625
7,361
# generated by update to not change manually import typing as t from bungieapi.base import BaseClient, clean_query_value from bungieapi.forge import forge from bungieapi.generated.components.responses import ( CEListOfGroupOptionalConversationClientResponse, DictionaryOfint32AndstringClientResponse, ListOf...
[ 2, 7560, 416, 4296, 284, 407, 1487, 14500, 198, 11748, 19720, 355, 256, 198, 198, 6738, 43974, 494, 15042, 13, 8692, 1330, 7308, 11792, 11, 3424, 62, 22766, 62, 8367, 198, 6738, 43974, 494, 15042, 13, 30293, 1330, 28325, 198, 6738, 43...
3.327473
455
from causalprob import CausalProb import unittest import jax.numpy as jnp import numpy as np
[ 6738, 26558, 1676, 65, 1330, 6488, 6775, 2964, 65, 198, 198, 11748, 555, 715, 395, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 11748, 299, 32152, 355, 45941, 628, 198 ]
2.909091
33
''' Generate a bar chart with error bars -- might be easier to read than a line graph with error bars. ''' import matplotlib.pyplot as plt import pandas as pd import numpy as np if __name__ == '__main__': figure_save_path = './results/synth2/' filename = 'r_pairs_bar.pdf' fig = None cs = [1,3,10,20]...
[ 7061, 6, 198, 8645, 378, 257, 2318, 8262, 351, 4049, 9210, 1377, 1244, 307, 4577, 284, 1100, 621, 257, 1627, 4823, 351, 4049, 9210, 13, 198, 7061, 6, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 2...
2.263314
338
from .loader import * from .model import * from .train_and_test import *
[ 6738, 764, 29356, 1330, 1635, 201, 198, 6738, 764, 19849, 1330, 1635, 201, 198, 6738, 764, 27432, 62, 392, 62, 9288, 1330, 1635 ]
3.217391
23
# Program 77 : make Tkinter menu from tkinter import * from tkinter import * root = Tk() menu = Menu(root) root.config(menu=menu) filemenu = Menu(menu) menu.add_cascade(label='File', menu=filemenu) filemenu.add_command(label='New') filemenu.add_command(label='Open...') filemenu.add_separator() filemenu.add_command(...
[ 2, 6118, 8541, 1058, 787, 309, 74, 3849, 6859, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 197, 198, 15763, 796, 309, 74, 3419, 198, 26272, 796, 21860, 7, 15763, 8, 198, 15763, 13, 11...
2.785714
168
import factory from chat.models import Chat, ChatRoom from users.factories import UserFactory
[ 11748, 8860, 198, 6738, 8537, 13, 27530, 1330, 24101, 11, 24101, 41178, 198, 6738, 2985, 13, 22584, 1749, 1330, 11787, 22810, 628, 198 ]
4.173913
23
"""Downloads the training dataset and removes bad samples. """ import csv import os import urllib.request import tarfile import glob DATA_URL = 'http://download.tensorflow.org/data/speech_commands_v0.01.tar.gz' TRAIN_DIR = '../dataset/train/audio/' FILE_BAD = 'bad_samples.txt' def maybe_download(data_url, dest_di...
[ 37811, 10002, 82, 262, 3047, 27039, 290, 20694, 2089, 8405, 13, 198, 37811, 198, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 13422, 7753, 198, 11748, 15095, 628, 198, 26947, 62, 21886, 7...
2.509398
532
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from http import HTTPStatus from authlib.jose import jwt from pytest import fixture from .utils import get_headers from api.errors import AUTH_ERROR def test_call_with_authorization_header_failure( route, client, authorization_errors_expected_payload ): response = client.post(route) a...
[ 6738, 2638, 1330, 14626, 19580, 198, 198, 6738, 6284, 8019, 13, 73, 577, 1330, 474, 46569, 198, 6738, 12972, 9288, 1330, 29220, 198, 198, 6738, 764, 26791, 1330, 651, 62, 50145, 198, 6738, 40391, 13, 48277, 1330, 37195, 62, 24908, 628, ...
2.736443
922
#!/usr/bin/env python3 # # Copyright 2020 IBM # 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 t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 12131, 19764, 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, 1...
2.914179
536
def sum_all_to(num: int) -> int: """ Return the sum of all numbers up to and including the input number """ return num * (num + 1) // 2 def square_pyramidal_number(num: int) -> int: """ Return the sum of the squares of all numbers up to and including the input number """ # https://en.wikipedia.org/wik...
[ 4299, 2160, 62, 439, 62, 1462, 7, 22510, 25, 493, 8, 4613, 493, 25, 198, 220, 220, 220, 37227, 8229, 262, 2160, 286, 477, 3146, 510, 284, 290, 1390, 262, 5128, 1271, 37227, 198, 220, 220, 220, 1441, 997, 1635, 357, 22510, 1343, 35...
2.984848
132
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
""" .. /------------------------------------------------------------------------------\ | -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- | |------------------------------------------------------------------------------| | ...
[ 37811, 198, 492, 198, 220, 220, 220, 1220, 10097, 26171, 59, 198, 220, 220, 220, 930, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1377, 44216, 19266, 44999, 45, 33462, 11015, 19387, 13, 220, 7102,...
2.484472
966
import sys from PIL import Image #import ImageChops #import numpy as np #import ImageChops if __name__ == '__main__': srcList = [] targetList = [] colorRate = [] avgColorRate = 0.0 sumColorRate = 0 validCount = 0 # image_src = '/root/Android_Application_source/recomended/0.png' fir...
[ 11748, 25064, 198, 6738, 350, 4146, 1330, 7412, 198, 2, 11748, 7412, 1925, 2840, 198, 2, 11748, 299, 32152, 355, 45941, 198, 2, 11748, 7412, 1925, 2840, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220...
2.314433
388
""" Web unit tests """ # pylint: disable=too-many-public-methods import time import unittest import requests from testing.communicationhelper import get_json, put_json from testing.functions import are_expected_items_in_list, are_expected_kv_pairs_in_list, \ get_item_from_embedded_dict...
[ 37811, 198, 13908, 4326, 5254, 198, 37811, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 18820, 12, 21834, 12, 11377, 12, 24396, 82, 198, 198, 11748, 640, 198, 11748, 555, 715, 395, 198, 198, 11748, 7007, 198, 198, 6738, 4856, 13, 325...
2.159504
3,793
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Factory method for easily getting imdbs by name.""" __sets = {} fro...
[ 2, 20368, 22369, 198, 2, 12549, 371, 12, 18474, 198, 2, 15069, 357, 66, 8, 1853, 5413, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 22503, 416, 9847, 23837, 1477, 624, 198, 2, 20368, 22369, ...
3.367188
256
from django.shortcuts import render,HTTpResponse # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 6535, 51, 79, 31077, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 220, 220, 220, 220, 198 ]
3
27
from setuptools import find_packages, setup setup( name='australian_housing', packages=find_packages(), version='0.2.1', description='"A data science exercise on Australian house approvements"', author='"luphord"', license='MIT', )
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 64, 436, 1373, 666, 62, 50028, 3256, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789, 22784, 198, 220, 220, 220, 2196, 11...
2.855556
90
import random squares = [ "Go", "Mediterranean Ave.", "Community Chest", "Baltic Ave.", "Income Tax", "Reading Railroad", "Oriental Ave.", "Chance", "Vermont Ave.", "Connecticut Ave.", "Jail", "St. Charles Place", "Electric Company", "States Ave.", "Virginia ...
[ 11748, 4738, 198, 198, 16485, 3565, 796, 685, 198, 220, 220, 220, 366, 5247, 1600, 198, 220, 220, 220, 366, 9921, 19012, 12761, 33283, 198, 220, 220, 220, 366, 20012, 25544, 1600, 198, 220, 220, 220, 366, 41312, 291, 12761, 33283, 198...
2.493232
1,182
#!/usr/bin/python3 from coinzdense.signing import SigningKey as _SigningKey from coinzdense.validation import ValidationEnv as _ValidationEnv from coinzdense.wallet import create_wallet as _create_wallet from coinzdense.wallet import open_wallet as _open_wallet
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 6738, 10752, 89, 67, 1072, 13, 12683, 278, 1330, 5865, 278, 9218, 355, 4808, 11712, 278, 9218, 198, 6738, 10752, 89, 67, 1072, 13, 12102, 341, 1330, 3254, 24765, 4834, 85, 355, 4808, 77...
3.234568
81
from collections.abc import Iterable from typing import Callable, Tuple import inspect from .definition import DataFlowInspector from .exceptions import DataFlowFunctionArgsError, DataFlowNotCallableError, DataFlowEmptyError, DataFlowNotTupleError def _check_positional_or_keyword_args(func: Callable) -> bool: ...
[ 6738, 17268, 13, 39305, 1330, 40806, 540, 198, 6738, 19720, 1330, 4889, 540, 11, 309, 29291, 198, 198, 11748, 10104, 198, 198, 6738, 764, 46758, 1330, 6060, 37535, 818, 4443, 273, 198, 6738, 764, 1069, 11755, 1330, 6060, 37535, 22203, 4...
3.015
200
from ants import registration, image_read, image_write, resample_image, crop_image from os import listdir mri_directory = "ADNI_baseline_raw/" template_loc = "MNI152_2009/mni_icbm152_t1_tal_nlin_sym_09a.nii" template = image_read(template_loc) template = resample_image(template, (192, 192, 160), True, 4) #template = ...
[ 6738, 27842, 1330, 9352, 11, 2939, 62, 961, 11, 2939, 62, 13564, 11, 581, 1403, 62, 9060, 11, 13833, 62, 9060, 198, 6738, 28686, 1330, 1351, 15908, 198, 198, 76, 380, 62, 34945, 796, 366, 2885, 22125, 62, 12093, 4470, 62, 1831, 3048...
2.784375
320
import torch from torch._six import with_metaclass from torch._C import _ImperativeEngine as ImperativeEngine Variable._execution_engine = ImperativeEngine()
[ 11748, 28034, 198, 6738, 28034, 13557, 19412, 1330, 351, 62, 4164, 330, 31172, 628, 628, 198, 6738, 28034, 13557, 34, 1330, 4808, 3546, 525, 876, 13798, 355, 28185, 876, 13798, 198, 43015, 13557, 18558, 1009, 62, 18392, 796, 28185, 876, ...
3.767442
43
# coding: utf-8 """ Selling Partner API for Finances The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 47919, 35532, 7824, 329, 4463, 1817, 628, 220, 220, 220, 383, 47919, 35532, 7824, 329, 4463, 1817, 5419, 345, 7330, 3176, 1321, 5981, 284, 257, 18583, 338, 1597, 1...
2.928382
377
from .utils import hypothesis_register from . import heparin from . import combinatorial_mammalian_n_linked from . import glycosaminoglycan_linkers from . import combinatorial_human_n_linked from . import biosynthesis_human_n_linked from . import biosynthesis_mammalian_n_linked from . import human_mucin_o_linked __al...
[ 6738, 764, 26791, 1330, 14078, 62, 30238, 198, 6738, 764, 1330, 339, 1845, 259, 198, 6738, 764, 1330, 1974, 20900, 498, 62, 76, 6475, 7199, 62, 77, 62, 25614, 198, 6738, 764, 1330, 13874, 6966, 5669, 34619, 5171, 62, 8726, 364, 198, ...
2.699074
216
from elasticsearch import Elasticsearch es = Elasticsearch([ {'host':'localhost','port':8200}, ]) print(es.search(index='ename_test_multiprocess',body={"query":{"match":{"name":str(input())}}})['hits']['hits'])
[ 6738, 27468, 12947, 1330, 48567, 12947, 198, 198, 274, 796, 48567, 12947, 26933, 198, 220, 220, 220, 1391, 6, 4774, 10354, 6, 36750, 41707, 634, 10354, 23, 2167, 5512, 198, 12962, 198, 4798, 7, 274, 13, 12947, 7, 9630, 11639, 12453, 6...
2.88
75
from .pastepdb import pastepdb
[ 6738, 764, 30119, 538, 9945, 1330, 1613, 538, 9945 ]
3.333333
9
# Copyright (C) 2015-2018 YouCompleteMe contributors # # This file is part of YouCompleteMe. # # YouCompleteMe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
[ 2, 15069, 357, 34, 8, 1853, 12, 7908, 921, 20988, 5308, 20420, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 921, 20988, 5308, 13, 198, 2, 198, 2, 921, 20988, 5308, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 1309...
3.673004
263
# Generated by Django 3.2.4 on 2021-07-14 02:49 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33448, 12, 2998, 12, 1415, 7816, 25, 2920, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import json import os import re import urllib.request
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 2956, 297, 571, 13, 25927, 628, 198 ]
3.294118
17
import os from pathlib import Path PROJECT_ROOT = get_project_root() PROJECT_SRC = get_project_src() DATA = get_project_data() JAVUS_ATTACKS_DIR = get_javus_attacks_dir()
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 628, 628, 628, 198, 31190, 23680, 62, 13252, 2394, 796, 651, 62, 16302, 62, 15763, 3419, 198, 31190, 23680, 62, 50, 7397, 796, 651, 62, 16302, 62, 10677, 3419, 198, 26947, 796, 651, 62...
2.602941
68
# Be sure to run this file from the "palm_sweeps" folder # cd examples/palm_sweeps import os import sys from datetime import datetime path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) sys.path.insert(0, path) from somo.sweep import iter_utils config_file = "sweeps/grid_diam_height.yam...
[ 2, 1355, 1654, 284, 1057, 428, 2393, 422, 262, 366, 18596, 76, 62, 46280, 25386, 1, 9483, 198, 2, 220, 220, 220, 220, 22927, 6096, 14, 18596, 76, 62, 46280, 25386, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 4818, 8079, 13...
2.563363
797
from collections import deque as LL
[ 6738, 17268, 1330, 390, 4188, 355, 27140, 628 ]
4.625
8
""" General framework for reading/writing data from/to files on the local system. """ import json import random from pathlib import Path ############################################################################### # FILE READING ################################################# ####################...
[ 37811, 198, 12218, 9355, 329, 3555, 14, 16502, 1366, 422, 14, 1462, 3696, 319, 198, 1169, 1957, 1080, 13, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 4738, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 29113, 29113, 7804, 4242, 2101...
5.878378
148
import gym import torch import numpy as np from pg_methods.interfaces import common_interfaces as common
[ 11748, 11550, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 23241, 62, 24396, 82, 13, 3849, 32186, 1330, 2219, 62, 3849, 32186, 355, 2219, 198 ]
3.75
28
"""Unit test for emlib.py To run: PYTHONPATH=../src python test_emlib.py """ __author__ = "Mike Pekala" __copyright__ = "Copyright 2015, JHU/APL" __license__ = "Apache 2.0" import unittest import numpy as np from sklearn.metrics import precision_recall_fscore_support as smetrics import emlib if __name__ ...
[ 37811, 26453, 1332, 329, 795, 8019, 13, 9078, 198, 198, 2514, 1057, 25, 198, 220, 220, 220, 350, 56, 4221, 1340, 34219, 28, 40720, 10677, 21015, 1332, 62, 368, 8019, 13, 9078, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 16073, 3...
2.601266
158
"""Module containing scripts for different feature extraction techniques from raw IMU data.""" from biopsykit.signals.imu.feature_extraction import static_moments __all__ = ["static_moments"]
[ 37811, 26796, 7268, 14750, 329, 1180, 3895, 22236, 7605, 422, 8246, 8959, 52, 1366, 526, 15931, 198, 6738, 3182, 44522, 15813, 13, 12683, 874, 13, 320, 84, 13, 30053, 62, 2302, 7861, 1330, 9037, 62, 32542, 658, 198, 198, 834, 439, 834...
3.86
50
#!/usr/bin/python """ Author: Fabio Hellmann <info@fabio-hellmann.de> """ from attr import s, ib from attr.validators import instance_of
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 220, 220, 220, 6434, 25, 14236, 952, 5783, 9038, 1279, 10951, 31, 36434, 952, 12, 12758, 9038, 13, 2934, 29, 198, 37811, 198, 198, 6738, 708, 81, 1330, 264, 11, 24283, 198, 6738...
2.698113
53
""" 1102. Path With Maximum Minimum Value Medium Given a matrix of integers A with R rows and C columns, find the maximum score of a path starting at [0,0] and ending at [R-1,C-1]. The score of a path is the minimum value in that path. For example, the value of the path 8 4 5 9 is 4. A path moves some number ...
[ 37811, 198, 11442, 17, 13, 10644, 2080, 22246, 26265, 11052, 198, 31205, 198, 198, 15056, 257, 17593, 286, 37014, 317, 351, 371, 15274, 290, 327, 15180, 11, 1064, 262, 5415, 4776, 286, 257, 3108, 3599, 379, 685, 15, 11, 15, 60, 290, ...
2.487578
322
import pytest import data_pipeline.db.factory as db_factory import data_pipeline.extractor.factory as extractor_factory import tests.unittest_utils as utils import data_pipeline.constants.const as const from pytest_mock import mocker from data_pipeline.db.exceptions import UnsupportedDbTypeError def test_build_unsu...
[ 11748, 12972, 9288, 198, 11748, 1366, 62, 79, 541, 4470, 13, 9945, 13, 69, 9548, 355, 20613, 62, 69, 9548, 198, 11748, 1366, 62, 79, 541, 4470, 13, 2302, 40450, 13, 69, 9548, 355, 7925, 273, 62, 69, 9548, 198, 11748, 5254, 13, 403...
2.786802
197
# SurEmCo - C++ tracker wrapper import ctypes from enum import IntEnum import sys import os import numpy import numpy.ctypeslib
[ 2, 4198, 10161, 7222, 532, 327, 4880, 30013, 29908, 198, 198, 11748, 269, 19199, 198, 6738, 33829, 1330, 2558, 4834, 388, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 299, 32152, 198, 11748, 299, 32152, 13, 310, 9497, 8019, 628 ]
3.25
40
# coding=utf-8 from flask import Flask from flask_sqlalchemy import SQLAlchemy from config import Config app = Flask(__name__) app.config.from_object(Config) db = SQLAlchemy(app) if __name__ == '__main__': db.create_all() app.run()
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 4566, 1330, 17056, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 1324, 13, 11250, ...
2.741573
89
from IPython.core.display import display, HTML import translation
[ 6738, 6101, 7535, 13, 7295, 13, 13812, 1330, 3359, 11, 11532, 198, 11748, 11059, 220, 628, 198 ]
4.058824
17
import requests import json import pandas as pd import os from .endpoints import *
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 198, 6738, 764, 437, 13033, 1330, 1635, 220, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628 ]
2.771429
35
#%% uiNames = ['plotter_uiDesign'] makeUI(uiNames) # %%
[ 2, 16626, 628, 198, 198, 9019, 36690, 796, 37250, 29487, 353, 62, 9019, 23067, 20520, 198, 15883, 10080, 7, 9019, 36690, 8, 198, 198, 2, 43313, 198 ]
2.222222
27
from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from bs4 import BeautifulSoup import pandas as pd # ChromeChrome browser = webdriver.Chrome(ChromeDriverManager().install()) browser.get( "https://old.accupass.com/search/r/0/0/0/0/4/0/00010101/99991231?q=python") soup = Beau...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 3992, 26230, 62, 37153, 13, 46659, 1330, 13282, 32103, 13511, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 2, 13282, 1925, 5998, ...
2.419714
629
from mpcontribs.config import mp_level01_titles from mpcontribs.io.core.recdict import RecursiveDict from mpcontribs.io.core.utils import clean_value, get_composition_from_string from mpcontribs.users.utils import duplicate_check
[ 6738, 29034, 3642, 822, 82, 13, 11250, 1330, 29034, 62, 5715, 486, 62, 83, 30540, 198, 6738, 29034, 3642, 822, 82, 13, 952, 13, 7295, 13, 8344, 11600, 1330, 3311, 30753, 35, 713, 198, 6738, 29034, 3642, 822, 82, 13, 952, 13, 7295, ...
3.164384
73