content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
intgr = 11 flt = 11.11 stng = "Eleven" tple = (1,2) lst = [1,2,3,4,5] h_i = hash(intgr) h_f = hash(flt) h_s = hash(stng) h_t = hash(tple) #h_l = hash(lst) print("hash of {} is {} ".format(intgr,h_i)) print("hash of {} is {} ".format(flt,h_f)) print("hash of {} is {} ".format(stng,h_s)) print("hash of {} is ...
[ 600, 2164, 796, 1367, 198, 69, 2528, 220, 220, 796, 1367, 13, 1157, 198, 301, 782, 220, 796, 366, 28827, 574, 1, 198, 83, 1154, 220, 796, 357, 16, 11, 17, 8, 198, 75, 301, 220, 220, 796, 685, 16, 11, 17, 11, 18, 11, 19, 11, ...
1.942708
192
""" Display a line depicting a noisy signal consisting of a lot of points. """ import numpy as np import pygfx as gfx from PySide6 import QtWidgets from wgpu.gui.qt import WgpuCanvas app = QtWidgets.QApplication([]) canvas = WgpuCanvas() renderer = gfx.WgpuRenderer(canvas) scene = gfx.Scene() # todo: crank this ...
[ 37811, 198, 23114, 257, 1627, 27561, 257, 31210, 6737, 17747, 286, 257, 1256, 286, 2173, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 12972, 70, 21373, 355, 308, 21373, 198, 198, 6738, 9485, 24819, 21, 1330,...
2.502857
350
from rest_framework.serializers import ModelSerializer from rocket_erp.apps.accounts.models import Account class AccountSerializer(ModelSerializer): """Serializer for account app, with all fields."""
[ 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 9104, 32634, 7509, 198, 198, 6738, 10701, 62, 263, 79, 13, 18211, 13, 23317, 82, 13, 27530, 1330, 10781, 628, 198, 4871, 10781, 32634, 7509, 7, 17633, 32634, 7509, 2599, 198, 220, 220, 22...
3.763636
55
__description__ = \ """ Main class for holding fit parameters, including guesses, values, ranges, etc. """ __date__ = "2016-09-02" __author__ = "Michael J. Harms" import copy import numpy as np class FitParameter: """ Class for storing and manipulating generic fit parameters. """ def __init__(self,na...
[ 834, 11213, 834, 796, 3467, 198, 37811, 198, 13383, 1398, 329, 4769, 4197, 10007, 11, 1390, 44774, 11, 3815, 11, 16069, 11, 3503, 13, 198, 37811, 198, 834, 4475, 834, 796, 366, 5304, 12, 2931, 12, 2999, 1, 198, 834, 9800, 834, 796, ...
2.3232
2,500
from abc import abstractmethod from collections import OrderedDict import os import pickle import re from typing import Tuple, Union import pandas as pd import numpy as np import gym from gridworld.log import logger from gridworld import ComponentEnv from gridworld.utils import to_scaled, to_raw, maybe_rescale_box_s...
[ 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 302, 198, 6738, 19720, 1330, 309, 29291, 11, 4479, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, ...
2.583609
1,208
__test__ = {"API_TESTS": r""" >>> from django.conf import settings >>> ORIGINAL_TIME_ZONE = settings.TIME_ZONE >>> settings.TIME_ZONE = "UTC" >>> from timezones import forms # the default case where no timezone is given explicitly. # uses settings.TIME_ZONE. >>> f = forms.LocalizedDateTimeField() >>> f.clean("2008-0...
[ 198, 834, 9288, 834, 796, 19779, 17614, 62, 51, 1546, 4694, 1298, 374, 37811, 198, 33409, 422, 42625, 14208, 13, 10414, 1330, 6460, 198, 33409, 43901, 17961, 62, 34694, 62, 57, 11651, 796, 6460, 13, 34694, 62, 57, 11651, 198, 33409, 6...
2.589041
584
from functions import Profile from mongodb import MongoDb from flask import Flask, render_template, request, redirect app= Flask(__name__) @app.route('/') @app.route('/',methods=['POST']) if __name__=='__main__': app.run(debug=True)
[ 6738, 5499, 1330, 13118, 198, 6738, 285, 506, 375, 65, 1330, 42591, 43832, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 198, 198, 1324, 28, 46947, 7, 834, 3672, 834, 8, 198, 198, 31, 1324, 13, 38629, 1078...
2.741573
89
from tkinter import ttk import tkinter as tk import tkinter.messagebox from gui.menu_bar import MenuBar from gui.stream_frame import StreamFrame from config_file.fire_stream import ConfigFile ### Represents the main application, which is the combination of multiple frames
[ 6738, 256, 74, 3849, 1330, 256, 30488, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 11748, 256, 74, 3849, 13, 20500, 3524, 198, 198, 6738, 11774, 13, 26272, 62, 5657, 1330, 21860, 10374, 198, 6738, 11774, 13, 5532, 62, 14535, 1330, ...
3.767123
73
# -*- coding: utf-8 -*- from __future__ import print_function import abc # import clu.abstract import collections.abc import contextlib import json import sys, os abstract = abc.abstractmethod from clu.constants import consts from clu.constants.exceptions import CDBError from clu.fs.abc import BaseFSName from clu.fs...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 450, 66, 198, 2, 1330, 537, 84, 13, 397, 8709, 198, 11748, 17268, 13, 39305, 198, 11748, 4732, 8019, 19...
2.848708
271
import os import sys sys.path.append('../../arl-python') import numpy as np import time import argparse from arl.image.cleaners import * from utils import * if __name__ == '__main__': np.random.seed(0) parser = argparse.ArgumentParser() parser.add_argument('--data_dir', type=str, default='./data') ...
[ 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 40720, 7063, 12, 29412, 11537, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 198, 6738, 610, 75, 13, 9060, 13, 277...
2.501292
387
l = [1, 2, 3] id1 = id(l) print(f"id1: {id1}") l *= 2 id2 = id(l) print(f"id2: {id2}") assert id1 == id2 print(f"id1 == id2: {id1 == id2}")
[ 75, 796, 685, 16, 11, 362, 11, 513, 60, 198, 312, 16, 796, 4686, 7, 75, 8, 198, 4798, 7, 69, 1, 312, 16, 25, 1391, 312, 16, 92, 4943, 198, 198, 75, 1635, 28, 362, 198, 312, 17, 796, 4686, 7, 75, 8, 198, 4798, 7, 69, 1, ...
1.662791
86
# -*- coding: utf-8 -*- # (C) 2015 Muthiah Annamalai # # This file is part of 'open-tamil' package tests # # setup the paths from __future__ import print_function from opentamiltests import * if __name__ == "__main__": unittest.main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 357, 34, 8, 1853, 337, 1071, 9520, 5506, 321, 282, 1872, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 705, 9654, 12, 83, 321, 346, 6, 5301, 5254, 198, 2, 198, 19...
2.589474
95
from django.contrib import admin from .models import Publication admin.site.register(Publication)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 45065, 198, 198, 28482, 13, 15654, 13, 30238, 7, 15202, 341, 8, 198 ]
3.807692
26
"""Async Mopidy Client via JSON/RPC Websocket interface""" # Fork of https://github.com/ismailof/mopidy-json-client by ismailof __author__ = 'svinerus (svinerus@gmail.com)' __version__ = '0.6.4' from .client import MopidyClient __all__ = [ 'MopidyClient', ]
[ 37811, 42367, 337, 404, 19325, 20985, 2884, 19449, 14, 49, 5662, 47736, 5459, 7071, 37811, 198, 198, 2, 39812, 286, 3740, 1378, 12567, 13, 785, 14, 1042, 603, 1659, 14, 35244, 19325, 12, 17752, 12, 16366, 416, 318, 4529, 1659, 198, 83...
2.598039
102
from django.utils.translation import ugettext_lazy as _ from i18nfield.forms import I18nFormField, I18nTextarea from pretix.base.forms import SettingsForm
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 1312, 1507, 77, 3245, 13, 23914, 1330, 314, 1507, 77, 8479, 15878, 11, 314, 1507, 77, 8206, 20337, 198, 6738, 2181, 844, 13, 8692, ...
3.25
48
def get_dapp_type(dapp): """Return the available dapp implementation.""" if hasattr(dapp, "ipfsdapp"): return "ipfs" return None
[ 4299, 651, 62, 67, 1324, 62, 4906, 7, 67, 1324, 2599, 198, 220, 220, 220, 37227, 13615, 262, 1695, 288, 1324, 7822, 526, 15931, 198, 220, 220, 220, 611, 468, 35226, 7, 67, 1324, 11, 366, 541, 9501, 67, 1324, 1, 2599, 198, 220, 2...
2.403226
62
"""Parse a kraken output file and generate a report and possibly extract reads for selected clades. (Adapted from original kraken-report.pl) """ import sys import gzip from csv import reader from Bio import SeqIO from pysam import AlignmentFile from collections import defaultdict import argparse from pathlib import Pa...
[ 37811, 10044, 325, 257, 479, 430, 3464, 5072, 2393, 290, 7716, 257, 989, 290, 5457, 7925, 9743, 329, 6163, 537, 2367, 13, 357, 48003, 276, 422, 2656, 479, 430, 3464, 12, 13116, 13, 489, 8, 198, 37811, 198, 198, 11748, 25064, 198, 11...
2.238757
2,446
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory from pythonforandroid.toolchain import CompiledComponentsPythonRecipe from pythonforandroid.util import current_directory, ensure_dir from pythonforandroid.logger import debug, shprint, info from os.path import exists, join, dirname impor...
[ 6738, 21015, 1640, 19411, 13, 25981, 7983, 1330, 26694, 11, 427, 4798, 11, 4423, 346, 11, 1459, 62, 34945, 198, 6738, 21015, 1640, 19411, 13, 25981, 7983, 1330, 3082, 3902, 7293, 3906, 37906, 37523, 198, 6738, 21015, 1640, 19411, 13, 22...
3.913043
92
#!/usr/bin/python import argparse import subprocess import json import re import config import collections from datetime import datetime, timedelta import time from pprint import pprint from slacker import Slacker slack = Slacker(config.token) option_age = "" option_owner = None option_protocol = 'slack' option_ss...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 4566, 198, 11748, 17268, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, ...
2.0138
1,884
import numpy as np import unittest from rlscore.measure.cindex_measure import cindex from rlscore.measure.measure_utilities import UndefinedPerformance
[ 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 198, 198, 6738, 374, 75, 26675, 13, 1326, 5015, 13, 66, 9630, 62, 1326, 5015, 1330, 269, 9630, 198, 6738, 374, 75, 26675, 13, 1326, 5015, 13, 1326, 5015, 62, 315, 2410, 1330,...
3.018868
53
"""The window_event_manager module implements the WindowEventManager class.""" from typing import Callable, Dict, List, Set, Union from pyglet.window import Window as PygletWindow from pycat.base.event.key_event import KeyEvent from pycat.base.event.mouse_event import MouseEvent from pycat.geometry.point import Poin...
[ 37811, 464, 4324, 62, 15596, 62, 37153, 8265, 23986, 262, 26580, 9237, 13511, 1398, 526, 15931, 198, 198, 6738, 19720, 1330, 4889, 540, 11, 360, 713, 11, 7343, 11, 5345, 11, 4479, 198, 198, 6738, 12972, 70, 1616, 13, 17497, 1330, 2658...
2.53436
1,688
''' this module contains all the urls for the whole project ''' from django.contrib import admin from django.urls import path,include from article import views as articleViews from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from django.conf.urls.static impo...
[ 7061, 6, 201, 198, 5661, 8265, 4909, 477, 262, 2956, 7278, 329, 262, 2187, 1628, 201, 198, 7061, 6, 201, 198, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 201, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 1725...
2.92
325
#!/usr/bin/env python3 # (c) https://t.me/TelethonChat/37677 # This Source Code Form is subject to the terms of the GNU # MIT TeamDragons If a copy of the developer was not distributed with this # file, You can obtain one at https://www.gnu.org/licenses/MIT/TeamDragons from telethon.sessions import StringSession from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 357, 66, 8, 3740, 1378, 83, 13, 1326, 14, 31709, 400, 261, 30820, 14, 2718, 40179, 198, 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 22961, 198, 2, 17168, ...
3.237288
236
node=[1,2,3] key=0 current_level={} node_store=[] main(node,key,current_level,node_store)
[ 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 17440, 41888, 16, 11, 17, 11, 18, 60, 198, 2539, 28, 15, 198, 198, 14421, 62, 5715, 34758, 92, 198, 17440, 62, 8095, 28, 21737, 198, 12417, 7, 17440, 11, 2539, 11, 14421, 62...
1.980769
52
#!/usr/bin/env python import rospy from ar_track_alvar_msgs.msg import AlvarMarkers import tf from tf.transformations import ( translation_matrix, quaternion_matrix, translation_from_matrix, quaternion_from_matrix, ) import threading import copy import numpy import ipdb comfortable_pick_frame = numpy.m...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 6738, 610, 62, 11659, 62, 282, 7785, 62, 907, 14542, 13, 19662, 1330, 978, 7785, 9704, 364, 198, 11748, 48700, 198, 6738, 48700, 13, 35636, 602, 1330, 357, ...
1.743558
3,997
# Copyright 2017 Huawei Technologies Co.,LTD. # # 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 agre...
[ 2, 15069, 2177, 43208, 21852, 1766, 1539, 43, 21016, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
2.909091
550
""" Scenarios for ODD generation/restriction of a base graph. Steps to create scenarios: 1. Define your reference graph: Add/choose graph fixture -> This is your base/reference graph, analogous to our OSM base map 2. Define your final odd graph (expected output) Restrict base graph using/adding `restricti...
[ 37811, 198, 3351, 268, 13010, 329, 440, 16458, 5270, 14, 2118, 46214, 286, 257, 2779, 4823, 13, 198, 198, 8600, 82, 284, 2251, 13858, 25, 198, 16, 13, 2896, 500, 534, 4941, 4823, 25, 198, 220, 220, 220, 3060, 14, 6679, 577, 4823, ...
2.654198
1,203
#-*- coding=utf-8 -*- #author: zhihua.ye@spreadtrum.com import os from tmtc_ut import * from time import gmtime, strftime from lib.report import * from lib.htmlgenerator import * from lib.jinjagenerator import * if __name__ == '__main__': sdk = Sdkut(casedir="./cases", bindir='./bin') sdk.run() ...
[ 2, 12, 9, 12, 19617, 28, 40477, 12, 23, 532, 9, 12, 201, 198, 2, 9800, 25, 1976, 71, 4449, 6413, 13, 5948, 31, 43639, 2213, 388, 13, 785, 201, 198, 11748, 28686, 201, 198, 6738, 256, 16762, 66, 62, 315, 1330, 1635, 201, 198, 6...
2.308219
146
import csv import os lnr_genomes_aa = [] # aa = assembly_accession with open("bacteria_as_comref_genomes_wo_ecoli",'r') as f: next(f) # skip headings reader=csv.reader(f,delimiter='\t') tmp_size = None tmp_aa = None tmp_s_id = None for line in reader: filepath = line[20].replace("/cygdrive/h/","H:/") print...
[ 11748, 269, 21370, 198, 11748, 28686, 198, 198, 18755, 81, 62, 5235, 2586, 62, 7252, 796, 17635, 1303, 257, 64, 796, 10474, 62, 15526, 295, 198, 198, 4480, 1280, 7203, 65, 10634, 62, 292, 62, 785, 5420, 62, 5235, 2586, 62, 21638, 62...
2.155598
527
from functools import wraps @cache fn(1) fn(1) fn(3)
[ 6738, 1257, 310, 10141, 1330, 27521, 628, 198, 31, 23870, 198, 198, 22184, 7, 16, 8, 198, 22184, 7, 16, 8, 198, 22184, 7, 18, 8, 198 ]
2.074074
27
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2019 Bitcraze AB # # Th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 220, 220, 8614, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1427, 220, 4808, 11593, 198, 2, 220, 1343, 23031, 10, 220, 220, 220, 220, 22...
2.830645
496
from flask import Flask, render_template, request app = Flask(__name__) @app.route('/upload', methods=['GET', 'POST']) @app.route('/upload/progress') @app.route('/progress') if __name__ == '__main__': app.run(debug=True)
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 201, 198, 201, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 201, 198, 201, 198, 31, 1324, 13, 38629, 10786, 14, 25850, 3256, 5050, 28, 17816, 18851, 3256, 705, 32782, 6, 12962...
2.43
100
''' Visualize steps of the calibration process to ensure everything went according to plan ''' from matplotlib import pyplot as plt from astropy.io import fits from visualization import zscale #https://github.com/abostroem/utilities overscan_size = 32 #pixels unusable_bottom = 48//2 #pixels
[ 7061, 6, 198, 36259, 1096, 4831, 286, 262, 36537, 1429, 284, 4155, 2279, 1816, 1864, 284, 1410, 198, 7061, 6, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 198, 198, 6738...
3.141414
99
import time class log: """ This module is used to track the progress of events and write it into a log file. """
[ 11748, 640, 198, 198, 4871, 2604, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 8265, 318, 973, 284, 2610, 262, 4371, 286, 2995, 198, 220, 220, 220, 290, 3551, 340, 656, 257, 2604, 2393, 13, 198, 220, 220, 220, 37227, 19...
2.954545
44
{ "targets": [ { "target_name": "forbidden-point-finder", "sources": [ "src/binding/finder.cpp", "forbidden-point-finder/ForbiddenPointFinder.cpp" ] } ] }
[ 90, 198, 220, 220, 220, 366, 83, 853, 1039, 1298, 685, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 16793, 62, 3672, 1298, 366, 1640, 37978, 12, 4122, 12, 22805, ...
1.662162
148
# Copyright 2020 The MuLT 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 applicable la...
[ 2, 15069, 12131, 383, 8252, 27734, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
4.236994
173
from datetime import datetime import json from collections import OrderedDict import os.path from math import log from math import e from sklearn.preprocessing import minmax_scale from sklearn.preprocessing import MinMaxScaler import numpy as np from math import sqrt import pandas as pd data = OrderedDict() weights = ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 28686, 13, 6978, 198, 6738, 10688, 1330, 2604, 198, 6738, 10688, 1330, 304, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, ...
2.390476
735
"""一个纯 Python 实现的 Python 字节码解释器""" # 改编自 # 1. pyvm2 作者:Paul Swartz,来自 http://www.twistedmatrix.com/users/z3p/ # 2. byterun 作者:Ned Batchelder,github.com/nedbat/byterun import dis, operator, sys, collections, inspect, types Block = collections.namedtuple("Block", "type, handler, stack_height") class Function(object): ...
[ 37811, 31660, 10310, 103, 163, 118, 107, 11361, 10263, 106, 252, 163, 236, 108, 21410, 11361, 10263, 255, 245, 164, 232, 224, 163, 254, 223, 164, 100, 96, 34932, 232, 161, 247, 101, 37811, 198, 2, 10545, 242, 117, 163, 120, 244, 164...
1.592048
1,157
from abc import ABC from jax.ops import index_update, index_add, index from typing import List, Union, Any from spdc_inv.utils.defaults import QUBIT import scipy.special as sp import jax.numpy as np import math # Constants: pi = np.pi c = 2.99792458e8 # speed of light [meter/sec] eps0 = 8.854187817e-1...
[ 6738, 450, 66, 1330, 9738, 198, 6738, 474, 897, 13, 2840, 1330, 6376, 62, 19119, 11, 6376, 62, 2860, 11, 6376, 198, 6738, 19720, 1330, 7343, 11, 4479, 11, 4377, 198, 6738, 599, 17896, 62, 16340, 13, 26791, 13, 12286, 82, 1330, 1195,...
2.136486
5,964
""" Testing WCS projections on LSST simulation files """ import os, sys sys.path.append(os.path.abspath('..')) import numpy as np import matplotlib.pyplot as plt from spheredb.get_data import\ get_stripe82_file, all_lsst_exposures, get_LSST_file from spheredb.conversions import FITS_to_HPX, HPX_grid_step from sp...
[ 37811, 198, 44154, 45410, 19887, 319, 30948, 2257, 18640, 3696, 198, 37811, 198, 11748, 28686, 11, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 10786, 492, 6, 4008, 628, 198, 11748, 299, 32152, 355, 45...
2.231579
665
import logging import shutil import pytest import salt.features import salt.loader import salt.pillar log = logging.getLogger(__name__) @pytest.fixture(scope="package") @pytest.fixture(scope="module") @pytest.fixture(scope="module") @pytest.fixture(scope="module") @pytest.fixture(scope="module") @pytest....
[ 11748, 18931, 198, 11748, 4423, 346, 198, 198, 11748, 12972, 9288, 198, 11748, 8268, 13, 40890, 198, 11748, 8268, 13, 29356, 198, 11748, 8268, 13, 41643, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 19...
2.826446
121
import csv import numpy as np ### I had only used numpy , as this is when I had just dived in ### this universe ### So , for beginners go search for pandas you will reduce the lines of code and it ### is awesome !! ### read data with open('../Data/train.csv') as f: reader = csv.reader(f, delimiter=',') data...
[ 11748, 269, 21370, 198, 11748, 299, 32152, 355, 45941, 198, 198, 21017, 314, 550, 691, 973, 299, 32152, 837, 355, 428, 318, 618, 314, 550, 655, 288, 1572, 287, 198, 21017, 428, 6881, 198, 198, 21017, 1406, 837, 329, 31729, 467, 2989, ...
2.546481
1,151
from __future__ import absolute_import
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 628, 198 ]
4.1
10
import logging from typing import Optional import qcodes as qc from qcodes import Instrument, InstrumentChannel, Parameter from qcodes import validators as vals from qcodes.instrument.base import InstrumentBase from qcodes.utils.validators import Validator import nanotune as nt logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 10662, 40148, 355, 10662, 66, 198, 6738, 10662, 40148, 1330, 42410, 11, 42410, 29239, 11, 25139, 2357, 198, 6738, 10662, 40148, 1330, 4938, 2024, 355, 410, 874, 198, 6738, 1066...
3.72093
86
import argparse import os import sys from sys import stdout import mdtraj as md import numpy as np import parmed import simtk.openmm as mm import simtk.openmm.app as app import simtk.unit as unit from openforcefield.topology import Molecule, Topology from openmmforcefields.generators import SystemGenerator from perses...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 25064, 1330, 14367, 448, 198, 198, 11748, 45243, 9535, 73, 355, 45243, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1582, 1150, 198, 11748, 985, 30488, 13, 9654, 3020...
2.76284
2,901
"""Holds AnswerSelect model.""" import datetime from .. import db class AnswerSelect(db.Model): """Model to hold a users selected answers.""" __tablename__ = "answerselects" id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey("users.id")) quiz_id = db.Col...
[ 37811, 39, 10119, 23998, 17563, 2746, 526, 15931, 198, 198, 11748, 4818, 8079, 198, 198, 6738, 11485, 1330, 20613, 628, 198, 4871, 23998, 17563, 7, 9945, 13, 17633, 2599, 198, 220, 220, 220, 37227, 17633, 284, 1745, 257, 2985, 6163, 742...
2.637681
345
import typer from .app import run_as_service from .sensitivity_ua_services import ( sensitivity_ua_linear_regression, sensitivity_ua_test_func, ) from .demo_services import demo_func main = typer.Typer() @main.command() @main.command() @main.command() if __name__ == "__main__": main()
[ 11748, 1259, 525, 198, 198, 6738, 764, 1324, 1330, 1057, 62, 292, 62, 15271, 198, 6738, 764, 82, 40545, 62, 6413, 62, 30416, 1330, 357, 198, 220, 220, 220, 14233, 62, 6413, 62, 29127, 62, 2301, 2234, 11, 198, 220, 220, 220, 14233, ...
2.725664
113
from mongodb_statedb import StateDb
[ 6738, 285, 506, 375, 65, 62, 21989, 65, 1330, 1812, 43832, 628 ]
3.083333
12
# -*- encoding: utf-8 -*- """ DeepQ Learning is a Reinforcement Learning Platform where AI Learns to Play Games In this project, I'm trying to develop some 'Q-Learning Algorithms' where the neural network will learn to play various games. The `engine` is specifically designed to build games that can be used to train ...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 29744, 48, 18252, 318, 257, 22299, 13442, 18252, 19193, 810, 9552, 30667, 284, 3811, 5776, 198, 198, 818, 428, 1628, 11, 314, 1101, 2111, 284, 1205, 617...
3.486188
181
""" Constants for ocrd_utils. """ from pkg_resources import get_distribution __all__ = [ 'VERSION', 'MIMETYPE_PAGE', 'EXT_TO_MIME', 'MIME_TO_EXT' ] VERSION = get_distribution('ocrd_utils').version MIMETYPE_PAGE = 'application/vnd.prima.page+xml' EXT_TO_MIME = { '.tif': 'image/tiff', '.tiff':...
[ 37811, 198, 34184, 1187, 329, 267, 66, 4372, 62, 26791, 13, 198, 37811, 198, 6738, 279, 10025, 62, 37540, 1330, 651, 62, 17080, 3890, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 43717, 3256, 198, 220, 220, 220, 705, ...
2.062914
302
from logging import exception from math import sqrt from random import uniform
[ 6738, 18931, 1330, 6631, 198, 6738, 10688, 1330, 19862, 17034, 198, 6738, 4738, 1330, 8187, 198 ]
4.9375
16
"""UI Templates: For reusable ui pieces built from components.""" from zygrader import ui from zygrader.zybooks import Zybooks def filename_input(purpose, text=""): """Get a valid filename from the user""" window = ui.get_window() path_input = ui.layers.PathInputLayer("Filepath Entry") path_input.s...
[ 37811, 10080, 5825, 17041, 25, 1114, 42339, 334, 72, 5207, 3170, 422, 6805, 526, 15931, 198, 198, 6738, 1976, 88, 2164, 5067, 1330, 334, 72, 198, 6738, 1976, 88, 2164, 5067, 13, 7357, 12106, 1330, 40905, 12106, 628, 198, 198, 4299, 29...
2.704433
203
if __name__ == "__main__": print(selection_sort([])) print(selection_sort([1])) print(selection_sort([0, 100000000, 20000])) print(selection_sort([1, 0])) print(selection_sort([1.5, -2.6, 2, 1.1])) print(selection_sort([3, 6, 8, 1, 2, 5, 3, 9, 3, 5, 9, 2])) print(selection_sort([3, 6, -45,...
[ 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 49283, 62, 30619, 7, 21737, 4008, 198, 220, 220, 220, 3601, 7, 49283, 62, 30619, 26933, 16, 60, 4008, 198, 220, 220, 220, 3601, 7, 492...
2.010989
273
#// #//------------------------------------------------------------------------------ #// Copyright 2007-2011 Mentor Graphics Corporation #// Copyright 2007-2011 Cadence Design Systems, Inc. #// Copyright 2010-2011 Synopsys, Inc. #// Copyright 2013 NVIDIA Corporation #// All Rights Reserved Worldwide #/...
[ 2, 1003, 220, 198, 2, 1003, 10097, 26171, 198, 2, 1003, 220, 220, 15069, 4343, 12, 9804, 31879, 273, 19840, 10501, 198, 2, 1003, 220, 220, 15069, 4343, 12, 9804, 20517, 594, 8495, 11998, 11, 3457, 13, 198, 2, 1003, 220, 220, 15069, ...
3.053269
413
# Houston # Connects a serial device on Windows this would COMx # Sets the board type # Then starts polling analog pin 17 which is Analog pin 3 # You will need MRLComm.ino loaded on the Arduino # If all goes well - you should have 2 traces running # in the arduino->oscope tab - you can at this point connect # input - ...
[ 2, 6995, 198, 2, 8113, 82, 257, 11389, 3335, 319, 3964, 428, 561, 9440, 87, 220, 198, 2, 21394, 262, 3096, 2099, 198, 2, 3244, 4940, 13985, 15075, 6757, 1596, 543, 318, 50088, 6757, 513, 198, 2, 921, 481, 761, 17242, 5639, 2002, 1...
2.963542
960
from datetime import datetime from typing import Dict from flask import Flask, request, send_file from music import BeatTimestamp, FileOffsetRecording from room import Room app = Flask(__name__) rooms: Dict[str, Room] = {} # Accepts datetime in milliseconds and converts to microseconds @app.route("/") # -----...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 3758, 62, 7753, 198, 198, 6738, 2647, 1330, 12568, 14967, 27823, 11, 9220, 34519, 6690, 1284, 198, 6738, 2119, 1330,...
3.581794
758
""" Created on 16 Apr 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ from scs_dfe.interface.component.pca8574 import PCA8574State # -------------------------------------------------------------------------------------------------------------------- PCA8574State.init()
[ 37811, 198, 41972, 319, 1467, 2758, 2177, 198, 198, 31, 9800, 25, 31045, 3944, 2364, 357, 1671, 36909, 13, 6667, 2364, 31, 35782, 1073, 5773, 4234, 13, 785, 8, 198, 37811, 198, 198, 6738, 629, 82, 62, 67, 5036, 13, 39994, 13, 42895,...
4.15493
71
#!/usr/bin/env python3 import argparse import datetime import os import shutil import sys import time from subprocess import check_output import geopandas as gpd import numpy as np from colorama import Fore, Style, init from basin_setup import __version__ # Initialize colors init() DEBUG = False out = Messages(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 850, 14681, 1330, 2198, 62, 22915, 198, 198,...
2.232222
10,434
"""Compute entropy """ from typing import Union import numpy from mlxtk.log import get_logger def compute_entropy( natpop: numpy.ndarray, normalize: bool = False ) -> Union[numpy.ndarray, numpy.float64]: """Compute the Boltzmann entropy from natural populations. The entropy is computed using the formul...
[ 37811, 7293, 1133, 40709, 198, 37811, 198, 6738, 19720, 1330, 4479, 198, 198, 11748, 299, 32152, 198, 198, 6738, 25962, 742, 74, 13, 6404, 1330, 651, 62, 6404, 1362, 628, 198, 4299, 24061, 62, 298, 28338, 7, 198, 220, 220, 220, 34664,...
2.051114
763
# Author: # Romain Bentz (pixis - @hackanddo) # Website: # https://beta.hackndo.com
[ 2, 6434, 25, 198, 2, 220, 3570, 391, 20421, 89, 357, 79, 844, 271, 532, 2488, 31153, 392, 4598, 8, 198, 2, 15887, 25, 198, 2, 220, 3740, 1378, 31361, 13, 31153, 358, 78, 13, 785, 628 ]
2.351351
37
class FreinerConfigurationError(Exception): """ Raised when a configuration problem is encountered. """
[ 4871, 4848, 7274, 38149, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7567, 1417, 618, 257, 8398, 1917, 318, 12956, 13, 198, 220, 220, 220, 37227, 198 ]
3.625
32
""" Script to run all the produce_results scripts in the validation_tests/xxx/xxx/ directories """ import os import time import anuga from anuga import indent #from anuga.validation_utilities.parameters import alg #from anuga.validation_utilities.parameters import cfl args = anuga.get_args() alg = args.alg np = arg...
[ 37811, 198, 7391, 284, 1057, 477, 262, 4439, 62, 43420, 14750, 287, 262, 198, 12102, 341, 62, 41989, 14, 31811, 14, 31811, 14, 29196, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 281, 30302, 198, 6738, 281, 30...
2.36457
1,558
from . import track from . import webserver from . import tracksocketserver from . import globalconfig
[ 6738, 764, 1330, 2610, 198, 6738, 764, 1330, 2639, 18497, 198, 6738, 764, 1330, 8339, 11603, 18497, 198, 6738, 764, 1330, 3298, 11250, 198 ]
4.291667
24
''' https://www.codeeval.com/open_challenges/113/ ''' import sys if __name__ == '__main__': main()
[ 7061, 6, 198, 5450, 1378, 2503, 13, 8189, 18206, 13, 785, 14, 9654, 62, 36747, 34120, 14, 16616, 14, 198, 7061, 6, 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388,...
2.386364
44
_ntypes = 0 TYPE_VOID = add_type() TYPE_INT = add_type() TYPE_FLOAT = add_type() TYPE_STRING = add_type() TYPE_LVALUE = add_type() TYPE_FUNCTION = add_type() _funs = dict()
[ 198, 198, 62, 429, 9497, 796, 657, 198, 198, 25216, 62, 29516, 2389, 796, 751, 62, 4906, 3419, 198, 25216, 62, 12394, 796, 751, 62, 4906, 3419, 198, 25216, 62, 3697, 46, 1404, 796, 751, 62, 4906, 3419, 198, 25216, 62, 18601, 2751, ...
2.26506
83
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from mojo.UI import CurrentGlyphWindow from mojo.events import addObserver, removeObserver import vanilla class PrevNextGlyph: """ ControlBoard "PrevNextGlyph" demo Use a Rotary Encoder component to swtich the Current Glyph Window to the previous or next glyphs. After rem...
[ 6738, 6941, 7639, 13, 10080, 1330, 9236, 38, 306, 746, 27703, 198, 6738, 6941, 7639, 13, 31534, 1330, 751, 31310, 18497, 11, 4781, 31310, 18497, 198, 11748, 16858, 628, 198, 4871, 43280, 10019, 38, 306, 746, 25, 198, 220, 220, 220, 22...
2.291667
216
import pprint import argparse from src.knowledgehub.api import KnowledgeHubAPI if __name__ == "__main__": main()
[ 11748, 279, 4798, 198, 11748, 1822, 29572, 198, 198, 6738, 12351, 13, 45066, 40140, 13, 15042, 1330, 20414, 16066, 17614, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
3.025
40
num1 = int( input() ) num2 = int( input() ) if num1 > 0: if num2 > 0: print(num1, num2)
[ 22510, 16, 796, 493, 7, 5128, 3419, 1267, 201, 198, 22510, 17, 796, 493, 7, 5128, 3419, 1267, 201, 198, 201, 198, 361, 997, 16, 1875, 657, 25, 201, 198, 220, 220, 220, 611, 997, 17, 1875, 657, 25, 201, 198, 220, 220, 220, 220, ...
1.844828
58
from PyQt5.QtCore import QDate, Qt p1 = QDate(1996, 4, 2) p2 = QDate(1994, 6, 13) dayspassed = p1.daysTo(p2) print("{0} days have passed since {1} to {2}".format(dayspassed, p1.toString(Qt.ISODate), p2.toString(Qt.ISODate)))
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 10430, 11, 33734, 198, 198, 79, 16, 796, 1195, 10430, 7, 22288, 11, 604, 11, 362, 8, 198, 79, 17, 796, 1195, 10430, 7, 22666, 11, 718, 11, 1511, 8, 198, 198, 12545, 6603, ...
2.121495
107
import torch from qtorch import Number, FixedPoint, BlockFloatingPoint, FloatingPoint import torch.nn as nn import torch.nn.functional as F import numpy as np from torch.utils.cpp_extension import load import os current_path = os.path.dirname(os.path.realpath(__file__)) quant_cpu = load( name='quant_cpu', ...
[ 11748, 28034, 198, 6738, 10662, 13165, 354, 1330, 7913, 11, 10832, 12727, 11, 9726, 33574, 803, 12727, 11, 49768, 12727, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 321...
2.414916
4,331
""" Base class and common constants needed for pylmod tests """ import os from unittest import TestCase class BaseTest(TestCase): """ Base class with convenient constants and URL endpoints for pylmod testing. """ # This should be removed if we end up with common methods, but for # now they are jus...
[ 37811, 198, 14881, 1398, 290, 2219, 38491, 2622, 329, 279, 2645, 4666, 5254, 198, 37811, 198, 11748, 28686, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 628, 198, 4871, 7308, 14402, 7, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 198,...
2.656667
300
#!/usr/bin/env python3 from taptaptap3.proc import plan, ok, out plan(tests=10) ok("Starting the program") ok("Starting the engine") ok("Find the object") ok("Transport object to target") ok("Check for existing fire") ok("Place it beneath the desk") ok("Search for fire extinguisher") ok("Extinguish fire") ok("Put fir...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 256, 2373, 2373, 499, 18, 13, 36942, 1330, 1410, 11, 12876, 11, 503, 198, 198, 11578, 7, 41989, 28, 940, 8, 198, 482, 7203, 22851, 262, 1430, 4943, 198, 482, 7203, 2...
2.881988
161
import unittest from classes.nag import Nag if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 6097, 13, 77, 363, 1330, 15196, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419 ]
2.676471
34
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import unittest import torch from hydra.experimental import compose, initialize_config_module from vissl.utils.hydra_config import ...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 628, 198, ...
3.302013
149
from src.PCA import * from src.generate_data import * from src.generate_picture import * from src.dimensionality_reduction_image import * if __name__ == '__main__': main()
[ 6738, 12351, 13, 5662, 32, 1330, 1635, 198, 6738, 12351, 13, 8612, 378, 62, 7890, 1330, 1635, 198, 6738, 12351, 13, 8612, 378, 62, 34053, 1330, 1635, 198, 6738, 12351, 13, 46156, 1483, 62, 445, 8110, 62, 9060, 1330, 1635, 628, 628, ...
2.983607
61
import pybullet import time import numpy as np import random # np.random.seed(5) # random.seed(5) import sys import os import argparse import csv from scipy.spatial.transform import Rotation from collect_pose_data import PoseDataCollector sys.path.insert(1, '../utils/') from coord_helper import * from data_helper im...
[ 11748, 12972, 15065, 1616, 220, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 2, 45941, 13, 25120, 13, 28826, 7, 20, 8, 198, 2, 4738, 13, 28826, 7, 20, 8, 198, 11748, 25064, 198, 11748, 28686, 198, 1174...
2.422729
2,543
# Software License Agreement (BSD License) # # Copyright (c) 2013, Open Source Robotics Foundation, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code mus...
[ 2, 10442, 13789, 12729, 357, 21800, 13789, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 11, 4946, 8090, 47061, 5693, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5...
3.569358
483
import avanza
[ 11748, 1196, 35819, 628 ]
3.75
4
import unittest from rsgis import Metadata import os if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 44608, 70, 271, 1330, 3395, 14706, 198, 11748, 28686, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 628 ]
2.675
40
from ma import ma from models.entities import Todo
[ 6738, 17266, 1330, 17266, 198, 6738, 4981, 13, 298, 871, 1330, 309, 24313, 628 ]
3.714286
14
from ulauncher_virtualbox.VirtualboxExtension import VirtualboxExtension if __name__ == '__main__': VirtualboxExtension().run()
[ 6738, 14856, 1942, 2044, 62, 32844, 3524, 13, 37725, 3524, 11627, 3004, 1330, 15595, 3524, 11627, 3004, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 15595, 3524, 11627, 3004, 22446, 5143, 3419, ...
3.243902
41
#! -*- coding:utf8 -*- # This file used to calculate avg temperature of everyday import sys import numpy as np import pandas as pd from filter import check_threshold, check_data_integrity, check_column_name def calculate_average(data, column_names): """计算温度相关列的平均值 :param data: :param column_names: ...
[ 2, 0, 532, 9, 12, 19617, 25, 40477, 23, 532, 9, 12, 198, 198, 2, 770, 2393, 973, 284, 15284, 42781, 5951, 286, 10908, 198, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198,...
2.345521
547
import os import logging from dataclasses import dataclass, field from typing import Optional import pandas as pd import torch from tqdm import tqdm from transformers import T5Tokenizer, BartTokenizer, HfArgumentParser logger = logging.getLogger(__name__) @dataclass class DataTrainingArguments: """ Argume...
[ 11748, 28686, 198, 11748, 18931, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020...
2.549356
699
# -*- coding: UTF-8 -*- import os from flask import Flask, redirect, url_for from app.config import DevelopmentConfig, ProductionConfig __author__ = 'lpe234' # create application bms_app = Flask(__name__) if os.environ.get('BMS_ENV') == 'PRODUCTION': bms_app.config.from_object(ProductionConfig) else: bm...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 6738, 42903, 1330, 46947, 11, 18941, 11, 19016, 62, 1640, 198, 198, 6738, 598, 13, 11250, 1330, 7712, 16934, 11, 19174, 16934, 628, 198, 834, 9...
2.687719
285
#!/usr/bin/env python3 import base64 import yaml import sys import re import os import random import string import subprocess import json from d3des import encrypt as d3des try: from passlib.hash import md5_crypt, sha256_crypt, sha512_crypt from cryptography.hazmat.primitives import serialization as crypto_serializ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 2779, 2414, 198, 11748, 331, 43695, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 850, 14681, 198, 11748, 33918, 198, ...
2.5
890
"""empty message Revision ID: 1b5bbc75de44 Revises: 1531599e3534 Create Date: 2014-01-02 20:52:28.389571 """ # revision identifiers, used by Alembic. revision = '1b5bbc75de44' down_revision = '1531599e3534' from alembic import op import sqlalchemy as sa from kozmic.models import db
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 352, 65, 20, 11848, 66, 2425, 2934, 2598, 198, 18009, 2696, 25, 24652, 1314, 2079, 68, 2327, 2682, 198, 16447, 7536, 25, 1946, 12, 486, 12, 2999, 1160, 25, 4309, 25, 2078, 13, 297...
2.54386
114
import os import sys import attrdict import ssl import json import zipfile import random import traceback import gnupg import base64 from Crypto.Cipher import AES, PKCS1_OAEP from Crypto.PublicKey import RSA from web3.auto import w3 from eth_account.messages import defunct_hash_message from shutil import copyfile kec...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 708, 4372, 713, 198, 11748, 264, 6649, 198, 11748, 33918, 198, 11748, 19974, 7753, 198, 11748, 4738, 198, 11748, 12854, 1891, 198, 11748, 19967, 929, 70, 198, 11748, 2779, 2414, 198, 198, 6738,...
2.811966
234
from lightning_baselines3.off_policy_models.off_policy_model import OffPolicyModel from lightning_baselines3.off_policy_models.dqn import DQN from lightning_baselines3.off_policy_models.td3 import TD3 from lightning_baselines3.off_policy_models.ddpg import DDPG from lightning_baselines3.off_policy_models.sac import SAC...
[ 6738, 14357, 62, 12093, 20655, 18, 13, 2364, 62, 30586, 62, 27530, 13, 2364, 62, 30586, 62, 19849, 1330, 3242, 36727, 17633, 198, 6738, 14357, 62, 12093, 20655, 18, 13, 2364, 62, 30586, 62, 27530, 13, 49506, 77, 1330, 360, 48, 45, 1...
3.21
100
from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import train_test_split from tensorflow.keras.utils import to_categorical default_folds = 5 default_test_size = 0.2
[ 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 29186, 1431, 42, 37, 727, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 26791, 1330, 284, 62, 66, 2397, ...
3.229508
61
""" Airmap package init code AirMapSDK Created by AirMap Team on 6/28/16. Copyright (c) 2016 AirMap, Inc. All rights reserved. """ import airdefs import connect import statusAPI import flightAPI import drone import log import telemetryAPI import alertsAPI
[ 37811, 198, 220, 317, 2533, 499, 5301, 2315, 2438, 198, 220, 3701, 13912, 10305, 42, 628, 220, 15622, 416, 3701, 13912, 4816, 319, 718, 14, 2078, 14, 1433, 13, 198, 220, 15069, 357, 66, 8, 1584, 3701, 13912, 11, 3457, 13, 1439, 2489...
3.283951
81
import subprocess from re import search from .methods import config_read
[ 11748, 850, 14681, 198, 6738, 302, 1330, 2989, 198, 198, 6738, 764, 24396, 82, 1330, 4566, 62, 961, 628, 198 ]
3.8
20
'''input 3 1 1 1 2 2 2 3 3 3 27 6 3 14 159 2 6 53 58 9 79 323 84 6 2643 383 2 79 50 288 87 2 1 5 2 4 3 6 3 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem C if __name__ == '__main__': n = int(input()) a = sorted(list(map(int, input().split()))) b = list(ma...
[ 7061, 6, 15414, 201, 198, 18, 201, 198, 16, 352, 352, 201, 198, 17, 362, 362, 201, 198, 18, 513, 513, 201, 198, 1983, 201, 198, 201, 198, 21, 201, 198, 18, 1478, 26422, 362, 718, 7192, 201, 198, 3365, 860, 9225, 38446, 9508, 718...
2.054054
407
#! python3 # __author__ = "YangJiaHao" # date: 2018/3/13 if __name__ == '__main__': so = Solution() res = so.restoreIpAddresses('010010') print(res)
[ 2, 0, 21015, 18, 198, 2, 11593, 9800, 834, 796, 366, 38663, 41, 544, 39, 5488, 1, 198, 2, 3128, 25, 2864, 14, 18, 14, 1485, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 523, 796, 28186,...
2.232877
73
# Generated by Django 3.2.7 on 2021-09-27 16:18 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 2931, 12, 1983, 1467, 25, 1507, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import requests from bs4 import BeautifulSoup
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486 ]
4.090909
11
#!/usr/bin/python3 import sys diction={} for line in sys.stdin: line=line.strip() line_val=line.split(',') bowl,bat,runs,balls=line_val runs=int(runs) print(runs) balls=int(balls) key=(bowl,bat) if key in diction: diction[key][0].append(runs) diction[key][1].append(balls) else: diction[key]...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 201, 198, 11748, 25064, 201, 198, 201, 198, 67, 2867, 34758, 92, 201, 198, 201, 198, 1640, 1627, 287, 25064, 13, 19282, 259, 25, 201, 198, 197, 1370, 28, 1370, 13, 36311, 3419, 201, 198, 1...
2
349
from django.shortcuts import render, redirect, reverse from django.template import RequestContext from django.views import View from django import http from django.contrib.auth import login, logout, mixins from django.db import DatabaseError from django_redis import get_redis_connection from django.contrib.auth import ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 11, 9575, 198, 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 1330, 2638, 198, 6738, 42625, 14208, 1...
1.890415
3,422
import Rhino.Geometry as rg import math # grasshoppper variables # geometric variables base_points normals layer_count layer_height # pattern variables min_max_val period phase_shift base_layer_set = [] for i, pt in enumerate(base_points): local_pt = rg.Point3d(pt.X, pt.Y, 0.0) base_layer_set.append(Poin...
[ 11748, 47759, 13, 10082, 15748, 355, 48670, 198, 11748, 10688, 198, 198, 2, 8701, 8873, 381, 525, 9633, 198, 198, 2, 38445, 9633, 198, 8692, 62, 13033, 198, 27237, 874, 198, 29289, 62, 9127, 198, 29289, 62, 17015, 198, 198, 2, 3912, ...
2.651007
149
""" Copyright 2020 The OneFlow 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 applicable law or agr...
[ 37811, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.327068
266