content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import pytest from html_form_to_dict import html_form_to_dict
[ 11748, 12972, 9288, 198, 6738, 27711, 62, 687, 62, 1462, 62, 11600, 1330, 27711, 62, 687, 62, 1462, 62, 11600, 628, 628, 628, 628, 628, 198 ]
2.769231
26
import os from asgan.output_generator import pretty_number
[ 11748, 28686, 198, 6738, 355, 1030, 13, 22915, 62, 8612, 1352, 1330, 2495, 62, 17618, 628, 628 ]
3.647059
17
from asyncio import sleep from datetime import datetime from traitlets.config import LoggingConfigurable from traitlets import Any, Bool, Integer from tornado.log import app_log class Builder(LoggingConfigurable): """Base class for building a dashboard, e.g. by cloning an existing server which is a Docker contai...
[ 6738, 30351, 952, 1330, 3993, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 1291, 2578, 912, 13, 11250, 1330, 5972, 2667, 16934, 11970, 198, 6738, 1291, 2578, 912, 1330, 4377, 11, 347, 970, 11, 34142, 198, 6738, 33718, 13, ...
2.423699
2,844
from typing import Dict from feast.entity import Entity from feast.feature_view import FeatureView from google.protobuf.json_format import MessageToDict from more_itertools import flatten from odd_models.models import DataEntity, DataSet, DataEntityType from oddrn_generator import FeastGenerator from . import metadat...
[ 6738, 19720, 1330, 360, 713, 198, 198, 6738, 26951, 13, 26858, 1330, 20885, 198, 6738, 26951, 13, 30053, 62, 1177, 1330, 27018, 7680, 198, 6738, 23645, 13, 11235, 672, 3046, 13, 17752, 62, 18982, 1330, 16000, 2514, 35, 713, 198, 6738, ...
3.776596
94
#!python import sqlite3 import time,datetime import traceback import cgi hide_column = 1 print("content-type:text/html") print("") print("<meta http-equiv = 'refresh' content = 30 />") ddns_count_show()
[ 2, 0, 29412, 198, 11748, 44161, 578, 18, 198, 11748, 640, 11, 19608, 8079, 198, 11748, 12854, 1891, 198, 11748, 269, 12397, 198, 198, 24717, 62, 28665, 796, 352, 198, 4798, 7203, 11299, 12, 4906, 25, 5239, 14, 6494, 4943, 198, 4798, ...
2.833333
72
# Copyright 2015 Google Inc. 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 a...
[ 2, 15069, 1853, 3012, 3457, 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, 262, 13789, ...
3.877698
278
########################################################################## # Copyright (c) 2017, ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092...
[ 29113, 29113, 7804, 2235, 198, 2, 15069, 357, 66, 8, 2177, 11, 35920, 43412, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2393, 318, 9387, 739, 262, 2846, 287, 262, 7223, 38559, 24290, 2393, 13, 198, 2, 1002, 345, 466, ...
2.375269
930
from google.appengine.ext import db from models import User # Blog db # check if blog exist, if so return blog
[ 6738, 23645, 13, 1324, 18392, 13, 2302, 1330, 20613, 198, 6738, 4981, 1330, 11787, 628, 198, 2, 14001, 20613, 628, 198, 2, 2198, 611, 4130, 2152, 11, 611, 523, 1441, 4130, 628, 198 ]
3.545455
33
"""textanalyzerpy URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Clas...
[ 37811, 5239, 38200, 9107, 9078, 10289, 28373, 198, 198, 464, 4600, 6371, 33279, 82, 63, 1351, 11926, 32336, 284, 5009, 13, 1114, 517, 1321, 3387, 766, 25, 198, 220, 220, 220, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, ...
2.88491
1,173
# template for "Guess the number" mini-project # input will come from buttons and an input field # all output for the game will be printed in the console import simplegui import random import math number_range = 100 player_guess = 0 secret_number = 0 number_of_guesses = 7 counter = 7 # helper function to...
[ 2, 11055, 329, 366, 8205, 408, 262, 1271, 1, 9927, 12, 16302, 201, 198, 2, 5128, 481, 1282, 422, 12163, 290, 281, 5128, 2214, 201, 198, 2, 477, 5072, 329, 262, 983, 481, 307, 10398, 287, 262, 8624, 201, 198, 201, 198, 11748, 2829,...
3.111969
259
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= # @file rootshelve.py # # This is shelve-like database with ROOT.TFile as internal storage # # @see zipshelve # @see sqliteshelve # # # Create new DB: # # @code # # >>> import rootshelve as DB...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 38093, 25609, 198, 2, 2488, 7753, 11135, 2978, 303, 13, 9078, 198, 2, 220, 198, 2, 770, 318, 7497, 303, 12, 2339...
2.300311
9,004
pytest_plugins = ["model_runner.validator._tests.validator_test_fixtures"]
[ 9078, 9288, 62, 37390, 796, 14631, 19849, 62, 16737, 13, 12102, 1352, 13557, 41989, 13, 12102, 1352, 62, 9288, 62, 69, 25506, 8973, 198 ]
3.125
24
#!/usr/bin/python """ INPUT: A file named specified from the command line The file is a single line JSON format like this: ["424344455354X738492939495", "424344535463X738492939495"] each element represents a game canvass map INTERMEDIATE OUTPUT: a series of png files numbered from 0 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 37811, 198, 1268, 30076, 25, 317, 2393, 3706, 7368, 422, 262, 3141, 1627, 198, 220, 220, 220, 220, 220, 220, 383, 2393, 318, 257, 2060, 1627, 19449, 5794, 588, 428, 25, 198, 220, 220, ...
2.444231
520
import sys import argparse from transtory.flight import logger, switch_to_test_mode from transtory.flight import get_public_data_app from transtory.flight import FlightRecorder, FlightTripStats, FlightPlaneStats parser = argparse.ArgumentParser(description="Flight database command.") parser.add_argument("--testmode...
[ 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 6738, 491, 272, 13571, 13, 22560, 1330, 49706, 11, 5078, 62, 1462, 62, 9288, 62, 14171, 198, 6738, 491, 272, 13571, 13, 22560, 1330, 651, 62, 11377, 62, 7890, 62, 1324, 198, 6738, 491, ...
3.023256
387
from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.select import Select from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys import selenium.webdriver.chrome.service as service import tracebac...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 9019, 1330, 5313, 32103, 21321, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 19738, 1330, 9683, 198, 6738, 384, 11...
3.201149
174
import hugectr from mpi4py import MPI solver = hugectr.CreateSolver(max_eval_batches = 1000, batchsize_eval = 2770, batchsize = 17548, lr = 0.0045, vvgpu = [[0]], metrics...
[ 11748, 3236, 24087, 198, 6738, 285, 14415, 19, 9078, 1330, 4904, 40, 198, 82, 14375, 796, 3236, 24087, 13, 16447, 50, 14375, 7, 9806, 62, 18206, 62, 8664, 2052, 796, 8576, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.694785
1,956
from django.conf.urls import patterns, url, include from dajaxice.core import dajaxice_autodiscover, dajaxice_config from django.contrib.staticfiles.urls import staticfiles_urlpatterns dajaxice_autodiscover() urlpatterns = patterns('', url(dajaxice_config.dajaxice_url, include('dajaxice.urls')), url(r'^$', 'B...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 11, 2291, 198, 6738, 288, 1228, 897, 501, 13, 7295, 1330, 288, 1228, 897, 501, 62, 2306, 375, 29392, 11, 288, 1228, 897, 501, 62, 11250, 198, 6738, 42625, 14208, 13...
2.656863
204
#!/usr/bin/env python # coding:utf-8 from gevent import monkey monkey.patch_all() from gevent.pool import Pool from app.libs.PyMysqlPool import PyMysqlPool from app.script.config import * import pymysql import time from bs4 import BeautifulSoup import re thread_number = 40 pool = Pool(size=thread_number) netflix_po...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 40477, 12, 23, 198, 6738, 4903, 1151, 1330, 21657, 198, 198, 49572, 13, 17147, 62, 439, 3419, 198, 198, 6738, 4903, 1151, 13, 7742, 1330, 19850, 198, 6738, 598, 13, 801...
2.805031
159
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() description = "reconstruct the shape of a 2D point cloud." setup(name="alpha_shapes", description=description, author="Panagiotis Zestanakis", author_email="panosz@gmail.com", packa...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 11213, ...
2.367347
441
from lxml import etree import glob from collections import defaultdict, Counter import json def get_entries(xmlfile): "Get entries from an XML file." root = etree.parse(xmlfile) return root.xpath('//entry') def count_templates(filename): "Count the templates for each predicate in a file." templa...
[ 6738, 300, 19875, 1330, 2123, 631, 198, 11748, 15095, 198, 6738, 17268, 1330, 4277, 11600, 11, 15034, 198, 11748, 33918, 628, 198, 4299, 651, 62, 298, 1678, 7, 87, 76, 1652, 576, 2599, 198, 220, 220, 220, 366, 3855, 12784, 422, 281, ...
2.507752
1,032
from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Rate from car.tests.test_cars_api import sample_car RATE_URL = reverse('car:rate-list') class PublicRateApiTests(TestCase): """Test the publicly ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2149, 75, 1153, 198, 198, 6738, 4755, 1...
2.467213
488
# Copyright 2012 Google Inc. All Rights Reserved. """Project representation. A project is a module (or set of modules) that provides a namespace of rules. Rules may refer to each other and will be resolved in the project namespace. """ __author__ = 'benvanik@google.com (Ben Vanik)' import base64 import os import p...
[ 2, 15069, 2321, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 198, 37811, 16775, 10552, 13, 198, 198, 32, 1628, 318, 257, 8265, 357, 273, 900, 286, 13103, 8, 326, 3769, 257, 25745, 286, 3173, 13, 198, 37766, 743, 3522, 284, 1123, 584,...
2.885736
2,608
from talon import Module, ui, registry, skia, actions, cron from talon.canvas import Canvas import re import webbrowser import math mod = Module() mod.mode("cursorless_cheat_sheet", "Mode for showing cursorless cheat sheet gui") cheat_sheet = None instructions_url = "https://github.com/pokey/cursorless-talon/tree/mas...
[ 6738, 3305, 261, 1330, 19937, 11, 334, 72, 11, 20478, 11, 1341, 544, 11, 4028, 11, 1067, 261, 198, 6738, 3305, 261, 13, 5171, 11017, 1330, 1680, 11017, 198, 11748, 302, 198, 11748, 3992, 40259, 198, 11748, 10688, 198, 198, 4666, 796, ...
2.802281
263
# -*- coding:utf-8 -*- import logging from multiprocessing import Pool from operator import itemgetter from collections import OrderedDict from service.doc_etl import doc_etl from service.api.tencent_ai import tencent_ai from service.api.baidu_ai import baidu_ai from service.api.jd_ai import jd_ai from service.api.face...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 2139, 13, 15390,...
3.248588
177
from PIL import ImageGrab import numpy as np import cv2 from win32api import GetSystemMetrics width = GetSystemMetrics(0) height = GetSystemMetrics(1) forcecc = cv2.VideoWriter_fourcc('m','p','4','v') captured_video = cv2.VideoWriter('output.mp4', forcecc, 20.0, (width, height)) while True: img = ImageG...
[ 6738, 350, 4146, 1330, 7412, 48400, 201, 198, 11748, 299, 32152, 355, 45941, 220, 201, 198, 11748, 269, 85, 17, 201, 198, 6738, 1592, 2624, 15042, 1330, 3497, 11964, 9171, 10466, 201, 198, 201, 198, 10394, 796, 3497, 11964, 9171, 10466,...
2.304
250
import random from java.lang import String from org.myrobotlab.net import BareBonesBrowserLaunch holygrail = Runtime.createAndStart("holygrail", "WebGui") wksr = Runtime.createAndStart("webkitspeechrecognition", "WebkitSpeechRecognition") alice2 = Runtime.createAndStart("alice2", "ProgramAB") alice2.startSession("C:/mr...
[ 11748, 4738, 198, 6738, 20129, 13, 17204, 1330, 10903, 198, 6738, 8745, 13, 1820, 305, 13645, 23912, 13, 3262, 1330, 38234, 33, 1952, 46532, 38296, 198, 44287, 70, 30224, 796, 43160, 13, 17953, 1870, 10434, 7203, 44287, 70, 30224, 1600, ...
2.783784
222
# Lint as: python3 # pylint: disable=g-bad-file-header # Copyright 2020 DeepMind Technologies Limited. 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.a...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 279, 2645, 600, 25, 15560, 28, 70, 12, 14774, 12, 7753, 12, 25677, 198, 2, 15069, 12131, 10766, 28478, 21852, 15302, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789...
3.231618
544
# encoding: utf-8 from six import text_type from sqlalchemy import orm, types, Column, Table, ForeignKey from sqlalchemy.ext.associationproxy import association_proxy import meta import core import package as _package import extension import domain_object import types as _types import ckan.lib.dictization import acti...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 6738, 2237, 1330, 2420, 62, 4906, 198, 6738, 44161, 282, 26599, 1330, 393, 76, 11, 3858, 11, 29201, 11, 8655, 11, 8708, 9218, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 562, 41003, 36436, ...
2.814103
468
from .NamedObject import NamedObject from ..enums import AudioType, AudioCompressionFormat, AUDIO_TYPE_EXTEMSION from ..export import AudioClipConverter from ..helpers.ResourceReader import get_resource_data
[ 6738, 764, 45, 2434, 10267, 1330, 34441, 10267, 198, 6738, 11485, 268, 5700, 1330, 13491, 6030, 11, 13491, 7293, 2234, 26227, 11, 41260, 9399, 62, 25216, 62, 13918, 39201, 2849, 198, 6738, 11485, 39344, 1330, 13491, 2601, 541, 3103, 332, ...
3.732143
56
import unittest from core_lib.core_lib import CoreLib from core_lib.data_layers.data_access.data_access import DataAccess from core_lib.core_lib_listener import CoreLibListener from core_lib.data_layers.service.service import Service
[ 11748, 555, 715, 395, 198, 198, 6738, 4755, 62, 8019, 13, 7295, 62, 8019, 1330, 7231, 25835, 198, 6738, 4755, 62, 8019, 13, 7890, 62, 75, 6962, 13, 7890, 62, 15526, 13, 7890, 62, 15526, 1330, 6060, 15457, 198, 6738, 4755, 62, 8019, ...
3.273973
73
# coding=utf-8 # Copyright 2021-present, the Recognai S.L. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
[ 2, 220, 19617, 28, 40477, 12, 23, 198, 2, 220, 15069, 33448, 12, 25579, 11, 262, 31517, 1872, 311, 13, 43, 13, 1074, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 1...
2.638594
4,239
from .startr import Startr
[ 6738, 764, 9688, 81, 1330, 7253, 81, 198 ]
3.375
8
import io import numpy as np import json import datetime from pathlib import Path # http://stackoverflow.com/a/27050186 class SummaryEncoder(Encoder): """ Often, you may want a very short summary, just containing some shapes of numpy arrays in a Jupyter Notebook. Example usage: >>> import nump...
[ 198, 11748, 33245, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 2, 2638, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 1983, 2713, 486, 4521, 628, 198, 4...
2.479424
972
import ctypes from matplotlib.backends.backend_qt5 import _BackendQT5, FigureCanvasQT from matplotlib.backends.qt_compat import QtGui from . import _util from .base import FigureCanvasCairo @_BackendQT5.export
[ 11748, 269, 19199, 198, 198, 6738, 2603, 29487, 8019, 13, 1891, 2412, 13, 1891, 437, 62, 39568, 20, 1330, 4808, 7282, 437, 48, 51, 20, 11, 11291, 6090, 11017, 48, 51, 198, 6738, 2603, 29487, 8019, 13, 1891, 2412, 13, 39568, 62, 5589...
2.75641
78
""" pyrad.graph.plot_timeseries =========================== Functions to plot Pyrad datasets .. autosummary:: :toctree: generated/ plot_timeseries plot_timeseries_comp plot_monitoring_ts plot_intercomp_scores_ts plot_ml_ts plot_sun_retrieval_ts """ from warnings import warn import nump...
[ 37811, 198, 79, 2417, 324, 13, 34960, 13, 29487, 62, 22355, 10640, 198, 4770, 2559, 18604, 198, 198, 24629, 2733, 284, 7110, 27958, 324, 40522, 198, 198, 492, 44619, 388, 6874, 3712, 198, 220, 220, 220, 1058, 1462, 310, 631, 25, 7560,...
2.088328
11,378
# Copyright (c) 2012, James Hensman and Ricardo Andrade # Licensed under the BSD 3-clause license (see LICENSE.txt) from .kern import Kern import numpy as np from ...core.parameterization import Param from ...core.parameterization.transformations import Logexp from ...util.config import config # for assesing whether t...
[ 2, 15069, 357, 66, 8, 2321, 11, 3700, 367, 641, 805, 290, 38847, 843, 27585, 198, 2, 49962, 739, 262, 347, 10305, 513, 12, 565, 682, 5964, 357, 3826, 38559, 24290, 13, 14116, 8, 198, 198, 6738, 764, 74, 1142, 1330, 49132, 198, 117...
3.067179
521
import os import numpy as np import pandas as pd import torch from torch import nn from torch import optim from torch.utils import data import matplotlib import matplotlib.pyplot as plt import GEV import display from config import config import selection from train import train from construct import construct from skle...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 1330, 6436, 198, 6738, 28034, 13, 26791, 1330, 1366, 198, 11748, 2603, 29487, ...
2.3379
1,095
#!/bin/env python3 # # Build the amp-mgms tarball for distribution # import argparse import logging import tempfile from pathlib import Path import shutil import sys import yaml from datetime import datetime import os import subprocess from amp_bootstrap_utils import run_cmd, build_package if __name__ == "...
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 10934, 262, 20766, 12, 11296, 907, 13422, 1894, 329, 6082, 198, 2, 198, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 20218, 7753, 198, 6738, 3108, 8019, 1330, 10644, 198...
3.081081
111
import os import cv2 from base_camera import BaseCamera import numpy as np import time import threading import imutils ''' Set the color of the line, 255 is white line, 0 is black line ''' lineColorSet = 255 ''' Set the reference horizontal position, the larger the value, the lower, but it cannot be greater than the ...
[ 11748, 28686, 198, 11748, 269, 85, 17, 198, 6738, 2779, 62, 25695, 1330, 7308, 35632, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 545, 26791, 198, 198, 7061, 6, 198, 7248, 262, 3124, 286, 26...
3.622642
106
from ..DB import NBADB from ..Models import (DailyBoxScore, DailyFileManager, DailyMatchup, DailySchedule, NBAPlayer, League, NBAReport) ################################################################################ ##########################################################################...
[ 6738, 11485, 11012, 1330, 41354, 2885, 33, 198, 6738, 11485, 5841, 1424, 1330, 357, 28545, 14253, 26595, 11, 6714, 8979, 13511, 11, 6714, 23850, 929, 11, 6714, 27054, 5950, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
5.648352
91
# coding=utf-8 """ Makes a PDF document from a source folder """ import shutil import urllib.parse from pathlib import Path import elib from edlm import LOGGER from edlm.convert import Context from edlm.external_tools import PANDOC from ._check_for_unused_images import check_for_unused_images from ._get_includes im...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 44, 1124, 257, 12960, 3188, 422, 257, 2723, 9483, 198, 37811, 198, 198, 11748, 4423, 346, 198, 11748, 2956, 297, 571, 13, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 1288, ...
2.457958
666
import sys from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtPrintSupport import * import urllib.request class MainApp(QMainWindow): """ the main class of our app """ def __init__(self): """ init things here """ super().__init__() ...
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1635, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1635, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1635, 198, 6738, 9485, 48, ...
2.264977
434
from YarrrmlUtils import Yarrrml from SparqlUtils import Sparql from SqlUtils import Sql import json import sys dataset = "./test/gtfs/" queryDir = "query2/" if __name__ == '__main__': main()
[ 6738, 575, 3258, 81, 4029, 18274, 4487, 1330, 575, 3258, 81, 4029, 198, 6738, 1338, 283, 13976, 18274, 4487, 1330, 1338, 283, 13976, 198, 6738, 311, 13976, 18274, 4487, 1330, 311, 13976, 198, 11748, 33918, 198, 11748, 25064, 198, 19608, ...
2.578947
76
default_app_config = 'django_rdkit.apps.DjangoRDKitConfig'
[ 12286, 62, 1324, 62, 11250, 796, 705, 28241, 14208, 62, 4372, 15813, 13, 18211, 13, 35, 73, 14208, 35257, 20827, 16934, 6, 198 ]
2.565217
23
from rest_framework import serializers from ..serializers import TranslatedModelSerializer from .models import Project, Activity, Markers, ChannelReported
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 11485, 46911, 11341, 1330, 3602, 17249, 17633, 32634, 7509, 198, 6738, 764, 27530, 1330, 4935, 11, 24641, 11, 2940, 364, 11, 11102, 6207, 9741, 628, 628, 628, 198 ]
4.351351
37
# A cryptarithm is a mathematical puzzle for which the goal is to find the correspondence between letters and digits, such that the given arithmetic equation consisting of letters holds true when the letters are converted to digits. # You have an array of strings crypt, the cryptarithm, and an an array containing the m...
[ 2, 317, 8194, 283, 342, 76, 318, 257, 18069, 15027, 329, 543, 262, 3061, 318, 284, 1064, 262, 22440, 1022, 7475, 290, 19561, 11, 884, 326, 262, 1813, 34768, 16022, 17747, 286, 7475, 6622, 2081, 618, 262, 7475, 389, 11513, 284, 19561, ...
2.836735
588
import os import pathlib import shutil import tempfile import unittest from unittest.mock import patch import anndata import boto3 import numpy import pandas from moto import mock_s3 from backend.corpora.common.corpora_orm import ( CollectionVisibility, DatasetArtifactType, DatasetArtifactFileType, U...
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 281, 358, 1045, 198, 11748, 275, 2069, 18, 198, 11748...
3.139535
172
import re def stripped(text): """ Removes all whitespace from a string """ return re.sub(r'\s+', '', text)
[ 11748, 302, 628, 198, 4299, 18818, 7, 5239, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3982, 5241, 477, 13216, 10223, 422, 257, 4731, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 302, 13, 7266, 7, 81, 6, 59, 82, ...
2.45098
51
# @Author: Edmund Lam <edl> # @Date: 18:44:31, 17-Apr-2018 # @Filename: __init__.py # @Last modified by: edl # @Last modified time: 10:05:18, 13-Oct-2019 # __all__=['settings', 'utilities', 'fun', 'economy', 'help', 'quiz', 'trivia', 'wolframalpha', 'ascii_art', 'regex_commands'] __all__=['moderation', 'help', 'u...
[ 2, 2488, 13838, 25, 35646, 10923, 1279, 276, 75, 29, 198, 2, 2488, 10430, 25, 220, 220, 1248, 25, 2598, 25, 3132, 11, 1596, 12, 13680, 12, 7908, 198, 2, 2488, 35063, 25, 11593, 15003, 834, 13, 9078, 198, 2, 2488, 5956, 9518, 416, ...
2.460993
141
from io import open as io_open import os from setuptools import find_packages, setup dirname = os.path.dirname(__file__) readme_file = os.path.join(dirname, "README.md") if os.path.exists(readme_file): with io_open(readme_file, "r", encoding="utf-8") as f: long_description = f.read() else: # When this...
[ 6738, 33245, 1330, 1280, 355, 33245, 62, 9654, 198, 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 15908, 3672, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 961, 1326, ...
2.422425
767
from sense_hat import SenseHat sense = SenseHat() while True: acceleration = sense.get_accelerometer_raw() x = acceleration['x'] y = acceleration['y'] z = acceleration['z'] x=round(x, 0) y=round(y, 0) z=round(z, 0) print("x={0}, y={1}, z={2}".format(x, y, z))
[ 6738, 2565, 62, 5183, 1330, 24956, 40483, 198, 198, 33819, 796, 24956, 40483, 3419, 198, 198, 4514, 6407, 25, 198, 197, 330, 7015, 341, 796, 2565, 13, 1136, 62, 330, 7015, 15635, 62, 1831, 3419, 198, 197, 87, 796, 20309, 17816, 87, ...
2.365217
115
"""Kata url: https://www.codewars.com/kata/57126304cdbf63c6770012bd."""
[ 37811, 42, 1045, 19016, 25, 3740, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 3553, 19420, 21288, 66, 9945, 69, 5066, 66, 3134, 9879, 1065, 17457, 526, 15931, 628 ]
2.212121
33
import asyncio import aioredis import uvloop from tqdm.asyncio import tqdm uvloop.install() asyncio.run(main())
[ 11748, 30351, 952, 198, 11748, 257, 72, 1850, 271, 198, 11748, 334, 85, 26268, 198, 6738, 256, 80, 36020, 13, 292, 13361, 952, 1330, 256, 80, 36020, 198, 198, 14795, 26268, 13, 17350, 3419, 628, 198, 292, 13361, 952, 13, 5143, 7, 12...
2.555556
45
import os from app import ds_config from flask import Flask from flask_wtf.csrf import CSRFProtect session_path = "/tmp/python_recipe_sessions" app = Flask(__name__) app.config.from_pyfile("config.py") app.secret_key = ds_config.DS_CONFIG["session_secret"] csrf = CSRFProtect(app) # See https://flask-wtf.readthedocs....
[ 11748, 28686, 198, 6738, 598, 1330, 288, 82, 62, 11250, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 86, 27110, 13, 6359, 41871, 1330, 9429, 32754, 41426, 628, 198, 29891, 62, 6978, 796, 12813, 22065, 14, 29412, 62, 29102, 431, ...
2.666667
246
footer = "By: EJ Studios for>> EJ Studios"
[ 5898, 263, 796, 366, 3886, 25, 412, 41, 13799, 329, 4211, 412, 41, 13799, 1 ]
2.8
15
from flask import after_this_request from app.domain.permissions import company_admin from app.helpers.authentication import ( current_user, set_auth_cookies, create_access_tokens_for, AuthenticatedMutation, require_auth_with_write_access, ) import graphene from datetime import datetime, date, time...
[ 6738, 42903, 1330, 706, 62, 5661, 62, 25927, 198, 198, 6738, 598, 13, 27830, 13, 525, 8481, 1330, 1664, 62, 28482, 198, 6738, 598, 13, 16794, 364, 13, 41299, 3299, 1330, 357, 198, 220, 220, 220, 1459, 62, 7220, 11, 198, 220, 220, ...
2.776119
1,206
import pytest from pheasant.renderers.number.number import Anchor, Header @pytest.fixture(scope="module") @pytest.fixture(scope="module") @pytest.fixture()
[ 11748, 12972, 9288, 198, 198, 6738, 279, 258, 8775, 13, 10920, 19288, 13, 17618, 13, 17618, 1330, 29253, 273, 11, 48900, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 21412, 4943, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7,...
2.859649
57
from gmodetector_py import regress from gmodetector_py import find_desired_channel from gmodetector_py import slice_desired_channel from gmodetector_py import CLS_to_image import h5py import numpy as np import pandas as pd import os class WeightArray: """A 3D array containing weights for each spectral component, ...
[ 6738, 308, 4666, 316, 9250, 62, 9078, 1330, 50252, 198, 6738, 308, 4666, 316, 9250, 62, 9078, 1330, 1064, 62, 8906, 1202, 62, 17620, 198, 6738, 308, 4666, 316, 9250, 62, 9078, 1330, 16416, 62, 8906, 1202, 62, 17620, 198, 6738, 308, ...
2.670213
846
#!/usr/bin/python import ldap, logging, shelve import subprocess as sb import xml.etree.ElementTree as ET import os, time, sys, urllib2, ConfigParser, pwd from datetime import datetime, timedelta from base64 import b64encode CONFIG_FILE_INI = '/opt/zimbra/conf/zbackup.ini' ZIMBRA_ACCOUNT_STATUS = ['active', 'locked', ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 300, 67, 499, 11, 18931, 11, 7497, 303, 198, 11748, 850, 14681, 355, 264, 65, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 28686, 11, 640, 11, 25064, 11...
2.617424
264
import unittest import numpy as np from preprocessing import split_data, principal_components if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 662, 36948, 1330, 6626, 62, 7890, 11, 10033, 62, 5589, 3906, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, ...
3.086957
46
import pygame import sys import time from threepy.core import * import os pwd = os.path.abspath(os.path.dirname(__file__)) # set window title # WARNING: calling this method loses the original OpenGL context; # only use before calling OpenGL functions # implement by extending class # implemen...
[ 11748, 12972, 6057, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 294, 260, 538, 88, 13, 7295, 1330, 1635, 198, 11748, 28686, 198, 79, 16993, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834,...
3.31068
103
""" Code to specify constraints on parameters of distributions. :Authors: - Wilker Aziz """ import tensorflow as tf class Parameter: """ This class helps predict parameters by setting an appropriate activation to convert from the real line to some subset of it. """ class Location(Parameter): ""...
[ 37811, 198, 10669, 284, 11986, 17778, 319, 10007, 286, 24570, 13, 198, 198, 25, 30515, 669, 25, 532, 5187, 6122, 7578, 528, 198, 37811, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4871, 25139, 2357, 25, 198, 220, 220, 220, 37...
3.30303
231
def obfuscate_API_key(API_key): """ Return a mostly obfuscated version of the API Key :param API_key: input string :return: str """ if API_key is not None: return (len(API_key)-8)*'*'+API_key[-8:] def assert_is_string(value): """ Checks if the provided value is a valid string ...
[ 4299, 44080, 378, 62, 17614, 62, 2539, 7, 17614, 62, 2539, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8229, 257, 4632, 44080, 515, 2196, 286, 262, 7824, 7383, 628, 220, 220, 220, 1058, 17143, 7824, 62, 2539, 25, 5128, 4731...
2.63586
541
from warnings import warn try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict from modeltree.tree import trees SORT_DIRECTIONS = ('asc', 'desc')
[ 6738, 14601, 1330, 9828, 198, 28311, 25, 198, 220, 220, 220, 422, 17268, 1330, 14230, 1068, 35, 713, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 6149, 11600, 1330, 14230, 1068, 35, 713, 198, 6738, 953, 2120, 631, 13, 21048,...
3.290323
62
# ### Problem 1 # Ask the user to enter a number. # Using the provided list of numbers, use a for loop to iterate # the array and print out all the values that are smaller than the user input and print # out all the values that are larger than the number entered by the user. # ``` # # Start with this List list_of_man...
[ 2, 44386, 20647, 352, 198, 2, 16981, 262, 2836, 284, 3802, 257, 1271, 13, 220, 198, 2, 8554, 262, 2810, 1351, 286, 3146, 11, 779, 257, 329, 9052, 284, 11629, 378, 198, 2, 262, 7177, 290, 3601, 503, 477, 262, 3815, 326, 389, 4833, ...
3.26087
345
'''TCP ping.''' import socket import time import cping.protocols class Ping(cping.protocols.Ping): '''TCP ping. The possible results: * latency=x, error=False: successful TCP handshake * latency=x, error=True: connection failure, like TCP-RST * latency=-1, error=False: timeout ''' ...
[ 7061, 6, 4825, 47, 29400, 2637, 7061, 198, 11748, 17802, 198, 11748, 640, 198, 198, 11748, 269, 13886, 13, 11235, 4668, 82, 628, 198, 4871, 34263, 7, 13155, 278, 13, 11235, 4668, 82, 13, 49806, 2599, 198, 220, 220, 220, 705, 7061, 4...
2.237164
409
from collections import namedtuple from modules.deco.constants import DecoConstants import math import copy from modules.deco.utilities import *
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 13103, 13, 12501, 78, 13, 9979, 1187, 1330, 4280, 78, 34184, 1187, 198, 11748, 10688, 198, 11748, 4866, 198, 6738, 13103, 13, 12501, 78, 13, 315, 2410, 1330, 1635, 198 ]
3.815789
38
from django.contrib import admin from import_export.admin import ImportExportMixin from dashboard.models import Inquerito, TipoSementeGerminou, TipoAreaGerminacao, VerificacaoSementes, RowControl, Sementeira admin.site.site_header = 'Genesis App Administration' admin.site.register(Inquerito, InqueritoAdmin) admin...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 1330, 62, 39344, 13, 28482, 1330, 17267, 43834, 35608, 259, 628, 198, 6738, 30415, 13, 27530, 1330, 554, 10819, 10094, 11, 23095, 34049, 972, 68, 38069, 1084, 280, 11, 23095, 78...
3.026882
186
# -*- coding: utf-8 -*- from __future__ import unicode_literals from rest_framework.views import exception_handler
[ 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, 1334, 62, 30604, 13, 33571, 1330, 6631, 62, 30281, 628 ]
3.162162
37
from django.urls import path from twitter_data.views import HomeView from . import views urlpatterns = [ path('', HomeView.as_view(), name='home') ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 17044, 62, 7890, 13, 33571, 1330, 5995, 7680, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5995, 7680, 13, 292, 62, ...
3.06
50
"""@file deepattractornetnoise_soft_loss.py contains the DeepattractornetnoisesoftLoss""" import loss_computer from nabu.neuralnetworks.components import ops class DeepattractornetnoisesoftLoss(loss_computer.LossComputer): """A loss computer that calculates the loss""" def __call__(self, targets, logits, se...
[ 37811, 31, 7753, 2769, 1078, 974, 1211, 316, 3919, 786, 62, 4215, 62, 22462, 13, 9078, 198, 3642, 1299, 262, 10766, 1078, 974, 1211, 316, 3919, 2696, 11205, 43, 793, 37811, 198, 198, 11748, 2994, 62, 33215, 198, 6738, 47822, 84, 13, ...
2.557427
653
import sys from ..converter import Converter, ConversionError, ValidationError class Ginkgo(Converter): """Convert Transcriptic samples.json to sample-set schema""" VERSION = '0.0.2' FILENAME = 'ginkgo_samples' def convert(self, input_fp, output_fp=None, verbose=True, config={}, enforce_validation=Tru...
[ 11748, 25064, 198, 6738, 11485, 1102, 332, 353, 1330, 35602, 353, 11, 44101, 12331, 11, 3254, 24765, 12331, 198, 198, 4871, 402, 676, 2188, 7, 3103, 332, 353, 2599, 198, 220, 220, 220, 37227, 3103, 1851, 42978, 291, 8405, 13, 17752, 2...
2.230986
355
'''Module containing decoders for different websited This module contains decoders for decoding information from various websites. Any new website that needs to be added will contain information about how a particular website is to be decoded over here. You should include modules here as they become important. The f...
[ 7061, 6, 26796, 7268, 875, 375, 364, 329, 1180, 2639, 863, 198, 198, 1212, 8265, 4909, 875, 375, 364, 329, 39938, 1321, 422, 198, 7785, 699, 9293, 13, 4377, 649, 3052, 326, 2476, 284, 307, 2087, 198, 10594, 3994, 1321, 546, 703, 257...
3.988024
167
from .globals import Renderer, WidgetHandler from .globals.constantes import *
[ 6738, 764, 4743, 672, 874, 1330, 28703, 11882, 11, 370, 17484, 25060, 198, 6738, 764, 4743, 672, 874, 13, 9979, 39781, 1330, 1635, 198 ]
3.291667
24
from listenerlibrary import listenerlibrary
[ 6738, 24783, 32016, 1330, 24783, 32016, 628 ]
6.428571
7
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next
[ 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398, 7343, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1188, 28, 15, 11, 1306, 28, 14202, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, ...
2.105263
76
from unittest import TestCase from unittest.mock import Mock, patch from telegram.ext import ConversationHandler from civbot.commands import cmd_cancel
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 8529, 198, 198, 6738, 573, 30536, 13, 2302, 1330, 42427, 25060, 198, 198, 6738, 36317, 13645, 13, 9503, 1746, 1330, 23991, 62, 66, 21130, ...
3.604651
43
import numpy as np from sysmpy.entity import * from operator import add # Test ############################################################### # mn = MatrixForGraph(np.matrix([[1, 2, 3], [3, 4, 5], [6, 7, 8]])) # print(mn.sum_column())
[ 11748, 299, 32152, 355, 45941, 198, 6738, 25064, 3149, 88, 13, 26858, 1330, 1635, 198, 6738, 10088, 1330, 751, 628, 198, 2, 6208, 1303, 29113, 14468, 7804, 4242, 2235, 198, 2, 285, 77, 796, 24936, 1890, 37065, 7, 37659, 13, 6759, 8609...
3.144737
76
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Train a Fast R-CNN network.""" import caffe from fast_rcnn...
[ 2, 20368, 22369, 201, 198, 2, 12549, 371, 12, 18474, 201, 198, 2, 15069, 357, 66, 8, 1853, 5413, 201, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 201, 198, 2, 22503, 416, 9847, 23837, 1477, 624, ...
1.938687
3,686
"""Program that monitors a Raspberry Pi attached to a minus 80 freezer. Functions --------- monitor(): Creates Board object to watch the state of an input pin. """ # Local application imports from app.Board import Board PIN = 11 def monitor(): """Creates a Board object to monitor the state of an input pin."...
[ 37811, 15167, 326, 19374, 257, 24244, 13993, 7223, 284, 257, 20208, 4019, 30967, 13, 198, 198, 24629, 2733, 198, 45537, 198, 220, 220, 220, 5671, 33529, 7921, 274, 5926, 2134, 284, 2342, 262, 1181, 286, 281, 5128, 6757, 13, 198, 37811, ...
2.969432
229
import stop stop.main()
[ 11748, 2245, 198, 198, 11338, 13, 12417, 3419, 628 ]
2.888889
9
from command import Command
[ 6738, 3141, 1330, 9455, 198 ]
5.6
5
# In Byteland they have a very strange monetary system. # # Each Bytelandian gold coin has an integer number written on it. A coin n can be exchanged in a bank into # three coins: n/2, n/3 and n/4. But these numbers are all rounded down (the banks have to make a profit). # # You can also sell Bytelandian coins for Amer...
[ 2, 554, 2750, 83, 8822, 484, 423, 257, 845, 6283, 15331, 1080, 13, 198, 2, 198, 2, 5501, 2750, 83, 8822, 666, 3869, 10752, 468, 281, 18253, 1271, 3194, 319, 340, 13, 317, 10752, 299, 460, 307, 22112, 287, 257, 3331, 656, 198, 2, ...
3.257979
376
""" QuestionsSet model """ from random import random from django.db import models from polymorphic.models import PolymorphicModel class QuestionsSet(PolymorphicModel): """Abstract class, another way of regrouping question""" name = models.CharField(max_length=100) def get_branch_id(self): """g...
[ 37811, 198, 35741, 7248, 2746, 198, 37811, 198, 198, 6738, 4738, 1330, 4738, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 34196, 291, 13, 27530, 1330, 12280, 24503, 291, 17633, 628, 198, 4871, 20396, 7248, 7, 34220, 24...
2.671605
405
# python3 sort <http://github.com/Wind2esg/python3sort> # Copyright 2018 Wind2esg # Released under the MIT license <http://github.com/Wind2esg/python3sort/LICENSE> from _comparer import int_comparer
[ 2, 21015, 18, 3297, 1279, 4023, 1378, 12567, 13, 785, 14, 8731, 17, 274, 70, 14, 29412, 18, 30619, 29, 198, 2, 15069, 2864, 3086, 17, 274, 70, 198, 2, 28728, 739, 262, 17168, 5964, 1279, 4023, 1378, 12567, 13, 785, 14, 8731, 17, ...
3
67
__author__ = "Michael Rippey @nahamike01" __date__ = "2020/05/26" """ Author: Michael Rippey (c) 2020 Copyright 2020 Michael Rippey See LICENSE.md for details """ import httpx from bs4 import BeautifulSoup import urllib import sys scrape_news_articles('https://cybersecurity-jp.com')
[ 834, 9800, 834, 796, 366, 13256, 371, 3974, 2959, 2488, 40909, 321, 522, 486, 1, 198, 834, 4475, 834, 796, 366, 42334, 14, 2713, 14, 2075, 1, 198, 37811, 198, 13838, 25, 3899, 371, 3974, 2959, 357, 66, 8, 12131, 198, 198, 15269, 1...
2.579832
119
#!/usr/bin/env python3 """ A simple tool to send email by python References ---------- [1] http://jingyan.baidu.com/article/b24f6c822784b886bfe5dabe.html [2] email https://docs.python.org/3.4/library/email.mime.html """ import smtplib from email.mime.text import MIMEText import argparse def send_mail(from_user, from...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 32, 2829, 2891, 284, 3758, 3053, 416, 21015, 198, 198, 19927, 198, 35937, 198, 58, 16, 60, 2638, 1378, 49940, 4121, 13, 65, 1698, 84, 13, 785, 14, 20205, 14, 65, 17...
2.43314
1,032
""" Functions that help the run 'pps' command """ import functools import subprocess import inquirer import toml from .message import ( FILE_NOT_FOUND_MSG, INQUIRER_MSG, KEYBOARD_INTERRUPT_MSG, KEYWORD_NOT_FOUND_MSG, ) def exception(function): """ A decorator that wraps the passed in functio...
[ 37811, 198, 24629, 2733, 326, 1037, 262, 1057, 705, 41799, 6, 3141, 198, 37811, 198, 11748, 1257, 310, 10141, 198, 11748, 850, 14681, 198, 198, 11748, 38212, 81, 198, 11748, 284, 4029, 198, 198, 6738, 764, 20500, 1330, 357, 198, 220, ...
2.674677
541
import ipaddress import logging import tld from collections import UserList from typing import Iterable, List, Union from urlfinderlib.url import URL from urllib.parse import urlsplit from saq.constants import *
[ 11748, 20966, 21975, 198, 11748, 18931, 198, 11748, 256, 335, 198, 198, 6738, 17268, 1330, 11787, 8053, 198, 6738, 19720, 1330, 40806, 540, 11, 7343, 11, 4479, 198, 6738, 2956, 1652, 5540, 8019, 13, 6371, 1330, 10289, 198, 6738, 2956, 2...
3.540984
61
# # Copyright 2015-2020 Andrey Galkin <andrey@futoin.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ 2, 198, 2, 15069, 1853, 12, 42334, 843, 4364, 402, 971, 259, 1279, 392, 4364, 31, 69, 9390, 259, 13, 2398, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743...
3.052478
343
# $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: # ...
[ 2, 720, 35063, 3, 220, 201, 198, 2, 720, 30515, 669, 3, 201, 198, 2, 4586, 32068, 25, 720, 10430, 3, 720, 6935, 1967, 3, 720, 18009, 1166, 12, 7390, 3, 201, 198, 2, 201, 198, 2, 15069, 357, 66, 8, 5816, 12, 9804, 11, 2679, 4...
2.493392
1,816
from namsa import SupercellBuilder, MSAMPI from namsa.utils import imageTile import numpy as np from time import time import sys import h5py from mpi4py import MPI import os comm = MPI.COMM_WORLD comm_size = comm.Get_size() comm_rank = comm.Get_rank() #job_pid = os.environ.get('LS_JOBPID') #job_id = os.environ.get('L...
[ 6738, 299, 4105, 64, 1330, 3115, 3846, 32875, 11, 6579, 2390, 11901, 198, 6738, 299, 4105, 64, 13, 26791, 1330, 2939, 35103, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 640, 1330, 640, 198, 11748, 25064, 198, 11748, 289, 20, 9078, ...
1.955617
721
import MySQLdb
[ 11748, 33476, 9945, 628 ]
4
4
import os from flask import Flask, render_template, url_for basedir = os.path.abspath(os.path.dirname(__file__)) app = Flask(__name__) # Views @app.route('/') if __name__ == "__main__": app.run(debug=True)
[ 11748, 28686, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 19016, 62, 1640, 198, 198, 3106, 343, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 198, 1324, 796, ...
2.488372
86
# -*- coding: utf-8 -*- # Copyright 2012 splinter authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import sys from splinter.driver.webdriver.firefox import WebDriver as FirefoxWebDriver from splinter.driver.webdriver.remote import Web...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 2321, 4328, 3849, 7035, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 198, 2, 5964, 326, ...
3.019576
613
#!/usr/bin/env python # make_file_layout # init_paths # # align_dataset # write_dataset # write_selap_dataset # write_model # check_model # # make_model # predict_subgroups # # summarize_predictions # summarize_heatmap # summarize_subgroups # A SELAP model file contains: # mu.txt SELAPver3 nvar x nclust # s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 787, 62, 7753, 62, 39786, 198, 2, 2315, 62, 6978, 82, 198, 2, 198, 2, 10548, 62, 19608, 292, 316, 198, 2, 3551, 62, 19608, 292, 316, 198, 2, 3551, 62, 741, 499, 62, 196...
2.452282
241
# coding:utf-8 # --author-- lanhua.zhou from __future__ import print_function import os import json import datetime import logging import zfused_api # read database DATABASE_PATH = os.path.dirname(os.path.dirname(__file__)) STEP_DATABASE_FILE = "{}/database/step.json".format(DATABASE_PATH) PROJECT_STEP_DATABASE_FILE...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 1377, 9800, 438, 26992, 33061, 13, 38536, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 198, 11748, ...
2.356261
567
# import import random import time # main main()
[ 2, 1330, 201, 198, 11748, 4738, 201, 198, 11748, 640, 201, 198, 201, 198, 2, 1388, 201, 198, 201, 198, 12417, 3419, 201, 198, 197 ]
2.36
25
N = int(input()) for i in range(N): serial = list(map(int, input().split())) get_proportion(serial)
[ 45, 796, 493, 7, 15414, 28955, 198, 198, 1640, 1312, 287, 2837, 7, 45, 2599, 198, 220, 220, 220, 11389, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 220, 220, 220, 651, 62, 1676, 16864, 7, 46911, 8, 198 ]
2.477273
44
# Copyright 2020 The Kraken Authors # # 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 wr...
[ 2, 15069, 12131, 383, 43392, 46665, 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, 921, 74...
3.574766
214