content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from flask import Flask from flask_cors import CORS from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy from app.config import app_config db = SQLAlchemy() def create_app(flask_config='development', db_uri=""): """Create and configure an instance of the application.""" app = Flask(__na...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 42903, 62, 76, 42175, 1330, 337, 42175, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 598, 13, 11250, 1330, 598, 62, ...
2.510363
386
import re import urllib.parse as url from asyncio import create_subprocess_shell from asyncio.subprocess import PIPE from base64 import b64encode from datetime import datetime from io import BytesIO from random import choice, randint, sample, seed from time import time import discord import pytesseract imp...
[ 11748, 302, 201, 198, 11748, 2956, 297, 571, 13, 29572, 355, 19016, 201, 198, 6738, 30351, 952, 1330, 2251, 62, 7266, 14681, 62, 29149, 201, 198, 6738, 30351, 952, 13, 7266, 14681, 1330, 350, 4061, 36, 201, 198, 6738, 2779, 2414, 1330...
2.355183
656
import pandas as pd import numpy as np import matplotlib.pyplot as plt from pycaret import classification as pyclf from pathlib import Path from typing import List from loguru import logger from fatector.help_functions import get_config class Classification: """this class runs automl thanks to pycaret"...
[ 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 12972, 6651, 83, 1330, 17923, 355, 12972, 565, 69, 201, 198, 6738, 3108, 8019...
2.031857
1,852
import nengo from nengo.exceptions import ObsoleteError class Oscillator(nengo.Network): """A two-dimensional ensemble with interacting recurrent connections. The ensemble connects to itself in a manner similar to the integrator; however, here the two dimensions interact with each other to implement ...
[ 11748, 299, 1516, 78, 198, 6738, 299, 1516, 78, 13, 1069, 11755, 1330, 1835, 23869, 12331, 628, 198, 4871, 440, 22360, 1352, 7, 77, 1516, 78, 13, 26245, 2599, 198, 220, 220, 220, 37227, 32, 734, 12, 19577, 34549, 351, 24986, 42465, ...
3.121951
287
import sys sys.path.insert(0,'..') sys.path.insert(0,'../../') import numpy as np import copy import random import ot from nasbench import api as nb101_api #import time from scipy.sparse.csgraph import shortest_path from nas_201_api import NASBench201API as API from tw_2g_v2b import TW_2G_NB201,TW_2G_NB101,TW_NASBENC...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 4032, 492, 11537, 198, 17597, 13, 6978, 13, 28463, 7, 15, 4032, 40720, 40720, 11537, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4866, 198, 11748, 4738, 198, 11748, 30972, ...
2.263736
273
from matplotlib.lines import Line2D from matplotlib import transforms, rcParams from matplotlib import pylab # 1pt = 1/27 inches _pt = 1.0/72 _MIN = -1e20 def add_comparisons_to_axes(axes, comparisons, **kwargs): """ Add pairwise comparisons to plots in the same axis. Comparisons will stack automatical...
[ 6738, 2603, 29487, 8019, 13, 6615, 1330, 6910, 17, 35, 198, 6738, 2603, 29487, 8019, 1330, 31408, 11, 48321, 10044, 4105, 198, 6738, 2603, 29487, 8019, 1330, 279, 2645, 397, 628, 198, 2, 352, 457, 796, 352, 14, 1983, 8331, 198, 62, ...
2.579545
616
import unittest from users import User if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 2985, 1330, 11787, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419 ]
2.69697
33
from django.urls import path from .views import EpisodeListView, EpisodeDetail, HowWePodcast app_name = "podcast" urlpatterns = [ path("", EpisodeListView.as_view(), name="episodes"), path("details/<int:id>/", EpisodeDetail.as_view(), name="episodes-detail"), path("how-we-podcast/", HowWePodcast.as_view()...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 1330, 7922, 8053, 7680, 11, 7922, 11242, 603, 11, 1374, 1135, 47, 7107, 198, 198, 1324, 62, 3672, 796, 366, 46032, 1, 198, 198, 6371, 33279, 82, 796, 685, 198, 220...
2.806452
124
"""Module to call MATLAB and get the output.""" # Module that replaces "system" in Python from subprocess import check_output # Function to call MATLAB and get the stdout as a string. def matlab(cmd): """ Function to call MATLAB and return the output as a string. """ # Versions: # 2013-10-09 @dalle : First ve...
[ 37811, 26796, 284, 869, 36775, 48780, 290, 651, 262, 5072, 526, 15931, 198, 198, 2, 19937, 326, 24020, 366, 10057, 1, 287, 11361, 198, 6738, 850, 14681, 1330, 2198, 62, 22915, 198, 198, 2, 15553, 284, 869, 36775, 48780, 290, 651, 262,...
2.874286
175
""" Serializers for the ES's search result object. .. note:: Some fields are re-named to make their meaning more clear. They should be renamed in the ES index too. """ import itertools from operator import attrgetter from django.shortcuts import get_object_or_404 from rest_framework import serializers from re...
[ 37811, 198, 32634, 11341, 329, 262, 13380, 338, 2989, 1255, 2134, 13, 198, 198, 492, 3465, 3712, 198, 220, 220, 2773, 7032, 389, 302, 12, 13190, 284, 787, 511, 3616, 517, 1598, 13, 198, 220, 220, 1119, 815, 307, 25121, 287, 262, 133...
3.385417
288
# -*- coding: utf-8 -*- ####################################################################### # Name: peg.py # Purpose: Implementing PEG language # Author: Igor R. Dejanovic <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2009-2014 Igor R. Dejanovic <igor DOT dejanovic AT gmail DOT com> # License: MIT License ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 4242, 21017, 198, 2, 6530, 25, 41350, 13, 9078, 198, 2, 32039, 25, 48282, 278, 350, 7156, 3303, 198, 2, 6434, 25, 46157, 371, 13, 1024, 13881, 17215, 127...
3.134058
276
#!/usr/bin/env python ''' Project: Geothon (https://github.com/MBoustani/Geothon) File: Conversion_Tools/shp_to_kml.py Description: This code converts shapefile data format to kml format. Author: Maziyar Boustani (github.com/MBoustani) ''' try: import ogr except ImportError: from osgeo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 198, 16775, 25, 220, 220, 220, 220, 220, 220, 2269, 849, 261, 357, 5450, 1378, 12567, 13, 785, 14, 10744, 23968, 3216, 14, 10082, 849, 261, 8, 198, 8979, 25, 220, 220...
2.536273
703
from handover.common.communication import ControllerCommunicator if __name__ == '__main__': next_vnf = 1 prio = 10 print ("start by pressing enter") raw_input() while True: add_rule(vnf_id=next_vnf + 1, priority=prio, ipv4_src='10.0.0.101') print ...
[ 6738, 1021, 2502, 13, 11321, 13, 32560, 1330, 22741, 30813, 26407, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1306, 62, 85, 77, 69, 796, 352, 198, 220, 220, 220, 1293, 78, 796, 838, ...
1.955157
223
#!/usr/bin/env python ############################################################################### # # $Id$ # ############################################################################### import time import os import threading try: import multiprocessing except ImportError: pass try: io_lock = mult...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 198, 2, 720, 7390, 3, 198, 2, 198, 29113, 29113, 7804, 4242, 21017, 198, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 4704, 278, 198, ...
3.2125
160
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import pytest from .test_main import get_main from ..explore import Launcher, Explorer, Herd from ..shep import Shepherd
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 42...
3.809524
84
from pyautogui import press, write import time def wait_write_press(delay: int, text: str, hotkey: str): ''' This function is to perform /wait, write, press/ sequence Args: delay: (int) - delay time in [seconds] text: (str) - text to be written hotkey: (str) - hotkey to be pressed ...
[ 6738, 12972, 2306, 519, 9019, 1330, 1803, 11, 3551, 198, 11748, 640, 198, 198, 4299, 4043, 62, 13564, 62, 8439, 7, 40850, 25, 493, 11, 2420, 25, 965, 11, 3024, 2539, 25, 965, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220...
2.406504
369
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.plugins.xep_0060.stanza.pubsub import * from sleekxmpp.plugins.xep_0060.stanza.pubsub_owner import * from sleekxmpp.plugins.xep_0...
[ 37811, 198, 220, 220, 220, 19498, 988, 55, 7378, 47, 25, 383, 19498, 988, 1395, 7378, 47, 10074, 198, 220, 220, 220, 15069, 357, 34, 8, 2813, 220, 32607, 2271, 417, 327, 13, 45954, 198, 220, 220, 220, 770, 2393, 318, 636, 286, 194...
2.59375
160
# 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 argparse import logging from pathlib import Path from ..configuration import Configuration from ..errors import Errors from ..filesyst...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 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, 198, ...
3.955556
135
import setuptools # Load the __version__ variable without importing the package already exec(open("kiauhoku/version.py").read()) setuptools.setup( name="kiauhoku", version=__version__, author="Zachary R. Claytor", author_email="zclaytor@hawaii.edu", description="Utilities for interacting and inter...
[ 11748, 900, 37623, 10141, 198, 198, 2, 8778, 262, 11593, 9641, 834, 7885, 1231, 33332, 262, 5301, 1541, 198, 18558, 7, 9654, 7203, 74, 544, 7456, 11601, 14, 9641, 13, 9078, 11074, 961, 28955, 198, 198, 2617, 37623, 10141, 13, 40406, 7...
2.700809
371
import sys import os from platform import python_version # https://github.com/willmcgugan/rich from rich.console import Console from rich.theme import Theme import pydbhub.dbhub as dbhub if __name__ == '__main__': custom_theme = Theme({ "info": "green", "warning": "yellow", "error": "bold...
[ 11748, 25064, 198, 11748, 28686, 198, 6738, 3859, 1330, 21015, 62, 9641, 198, 198, 2, 3740, 1378, 12567, 13, 785, 14, 10594, 23209, 70, 1018, 272, 14, 7527, 198, 6738, 5527, 13, 41947, 1330, 24371, 198, 6738, 5527, 13, 43810, 1330, 26...
2.418675
664
# coding:utf-8 """ Created by cheng star at 2022/1/15 22:00 @email : xxcheng0708@163.com """ import torch from torch import nn from torch.nn import functional as F from torchlibrosa.augmentation import SpecAugmentation from models.non_local import NONLocalBlock1D from torchlibrosa.augmentation import SpecAugmen...
[ 2, 19617, 25, 40477, 12, 23, 198, 37811, 198, 220, 220, 220, 15622, 416, 1125, 782, 3491, 379, 33160, 14, 16, 14, 1314, 2534, 25, 405, 198, 220, 220, 220, 2488, 12888, 1058, 31383, 2395, 782, 15, 32583, 31, 24136, 13, 785, 198, 37...
2.760369
217
# HARD # 1. if s1 == s2 => True # 2. Counter(s1) != Counter(s2) => False, we cannot get a matched result if # they have different chars # 3. compare each two parts of s1,s2 # eg. s1 = great s2 = rgeat # s1[:2] ?= s2[:2] s1[2:] ?= s2[2:] # compare swaped # s1[:2] ?= s2[5-2:] s1...
[ 2, 367, 9795, 198, 2, 352, 13, 611, 264, 16, 6624, 264, 17, 5218, 6407, 220, 198, 2, 362, 13, 15034, 7, 82, 16, 8, 14512, 15034, 7, 82, 17, 8, 5218, 10352, 11, 356, 2314, 651, 257, 14451, 1255, 611, 220, 198, 2, 220, 220, 22...
1.846154
182
from output.models.nist_data.list_pkg.string.schema_instance.nistschema_sv_iv_list_string_pattern_1_xsd.nistschema_sv_iv_list_string_pattern_1 import NistschemaSvIvListStringPattern1 __all__ = [ "NistschemaSvIvListStringPattern1", ]
[ 6738, 5072, 13, 27530, 13, 77, 396, 62, 7890, 13, 4868, 62, 35339, 13, 8841, 13, 15952, 2611, 62, 39098, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 4868, 62, 8841, 62, 33279, 62, 16, 62, 87, 21282, 13, 77, 1023, 2395, 261...
2.479167
96
from __future__ import absolute_import, print_function import datetime import os import sys import chi from heatclient.client import Client as heatclient sys.path.append("..") from utils import helpers
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 198, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 33166, 198, 6738, 4894, 16366, 13, 16366, 1330, 20985, 355, 4894, 16366, 198, 198, 1...
3.696429
56
import turtle __main__()
[ 11748, 28699, 628, 198, 834, 12417, 834, 3419, 198 ]
3
9
# # PySNMP MIB module POLYCOM-VIDEO-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/POLYCOM-VIDEO-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:41:19 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 20634, 56, 9858, 12, 42937, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, ...
2.906552
6,838
# # KIPR's Masked Control Library to interface with the DJI Tello EDU # For Use with the KIPR Autonomous Aerial Challnege Program and Curriculum # http://www.kipr.org # # 6/24/2019 import threading import socket import sys import time #Lines 16 - 38 straight from DJI's Tello3.py Demo Program on GitHub ...
[ 2, 201, 198, 2, 509, 4061, 49, 338, 18007, 276, 6779, 10074, 284, 7071, 351, 262, 13004, 40, 309, 11109, 8392, 52, 201, 198, 2, 1114, 5765, 351, 262, 509, 4061, 49, 5231, 38175, 47475, 10772, 710, 469, 6118, 290, 4424, 1173, 14452, ...
2.698851
870
import time from flask import Flask from flask_restful import Resource, Api, reqparse from flask_cors import CORS import json from master import Master master = Master() app = Flask(__name__) api = Api(app) CORS(app) # every body can send request parser = reqparse.RequestParser() parser.add_argument('bot') parser.add...
[ 11748, 640, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 5949, 72, 11, 43089, 29572, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 11748, 33918, 198, 6738, 4958, 1330, 5599, 198, 198, 9866, ...
2.948339
271
#!/usr/bin/env python3 """ @author: M. Garbellini @email: matteo.garbellini@studenti.unimi.it Albert-Ludwigs-Universität Freiburg Computational Physics: Material Science Exercise Sheet 10: Modelling a water nano-droplet *Comments*: - The bond contribution of the force seems to work perfectly, and indeed osci...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 31, 9800, 25, 220, 220, 220, 337, 13, 7164, 7923, 5362, 198, 31, 12888, 25, 220, 220, 220, 220, 36908, 78, 13, 4563, 7923, 5362, 31, 50139, 72, 13, 403, 25236,...
2.59434
1,378
from ._private import BaseLiquidbRevertCommand
[ 6738, 47540, 19734, 1330, 7308, 41966, 65, 49, 964, 83, 21575, 628 ]
4
12
# -*- coding: utf-8 -*- """ Formularios """ # Django Library from django import forms from django.utils.translation import ugettext_lazy as _ # Thirdparty Library from dal import autocomplete # Localfolder Library from ..models import PyPartner class PartnerForm(forms.ModelForm): """Fromulario para los producto...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 8479, 934, 4267, 198, 37811, 198, 2, 37770, 10074, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, ...
3.113208
106
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring import unittest from tempfile import NamedTemporaryFile import os import io import warnings from Orange.data import Table, ContinuousVariable, DiscreteVariable from Orange.data.io import CSVReader from Orange.tests impo...
[ 2, 6208, 5050, 351, 890, 35644, 3891, 460, 42848, 2205, 37336, 198, 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 198, 198, 11748, 555, 715, 395, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 11748, 28686, 1...
2.028205
390
import pandas as pd import matplotlib.pyplot as plt if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description='Plot performance as a function of the proportion ' 'n features / n samples rate.') parser.add_argument('files', narg...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1330, 1822, 29572, 628, 220, 220, 220, 30751, 796, ...
2.01514
1,321
# -*- coding: utf-8 -*- """ 这是RSA的主窗体,主要的业务都在这里完成。 """ from PyQt5.QtGui import QCursor from PyQt5.QtCore import pyqtSlot, Qt from PyQt5.QtWidgets import QMainWindow, QApplication, QFileSystemModel,\ QMenu, QMessageBox, QFileDialog import os import pyqtgraph as pg from utils import * color...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 32573, 247, 42468, 49, 4090, 21410, 10310, 119, 163, 103, 245, 19526, 241, 171, 120, 234, 10310, 119, 17358, 223, 21410, 10310, 248, 27950, 94, 32849, 1...
1.933333
240
import datetime def generate_datetime_period_query(field_name, last_x_days=None, include_leading_space=False, exclude=False, include=False): ''' :param field_name: :type field_name: str :param last_x_days: if None we assume beginning of time is meant :type last_x_days: int or None :param exc...
[ 11748, 4818, 8079, 628, 628, 198, 4299, 7716, 62, 19608, 8079, 62, 41007, 62, 22766, 7, 3245, 62, 3672, 11, 938, 62, 87, 62, 12545, 28, 14202, 11, 2291, 62, 12294, 62, 13200, 28, 25101, 11, 19607, 28, 25101, 11, 2291, 28, 25101, 2...
2.53598
403
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created in February 2017 in ComplexCity Lab @author: github.com/fpfaende what it does extract a graph from parameters graph how it works return """ import sys sys.path.insert(0, '/Users/fabien/Documents/workspace/github/policosm') from policosm.classes.roads impo...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 287, 3945, 2177, 287, 19157, 14941, 3498, 198, 198, 31, 9800, 25, 33084, 13, 785, 14, 46428, 13331, 38396, ...
2.703297
182
from contextlib import contextmanager from datetime import datetime, timedelta from unittest import mock from ariadne_jwt.settings import jwt_settings @contextmanager @contextmanager
[ 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 257, 21244, 710, 62, 73, 46569, 13, 33692, 1330, 474, 46569, 62, 33692, 628, 198, 3...
3.78
50
import datetime import random from discord.ext import commands import discord from cogs.pokemon import pokechannel from utils.menus import Menus, STAR, GLOWING_STAR, SPACER from utils.utils import wrap, unique, emoji_trans from utils.orm import Trainer
[ 11748, 4818, 8079, 198, 11748, 4738, 198, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 36446, 198, 198, 6738, 269, 18463, 13, 79, 12717, 1330, 22620, 17620, 198, 6738, 3384, 4487, 13, 3653, 385, 1330, 6065, 385, 11, 25424, 11, ...
3.486486
74
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 33448, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330, 257, 486...
2.973438
640
from copy import deepcopy from raiden.utils.typing import Dict def redact_secret(data: Dict) -> Dict: """Modify `data` and replace keys named `secret`.""" if not isinstance(data, dict): raise ValueError("data must be a dict.") # FIXME: assess performance impact of this deepcopy data_copy = d...
[ 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 9513, 268, 13, 26791, 13, 774, 13886, 1330, 360, 713, 628, 198, 4299, 2266, 529, 62, 21078, 7, 7890, 25, 360, 713, 8, 4613, 360, 713, 25, 198, 220, 220, 220, 37227, 5841, 1958, 4600, ...
2.613734
233
# Time: O(N+M) # Space: O(min(N,M)) # NlogM # a1 = [5,6] N # a2 = [0...100] M arr1 = [1, 2, 3, 5, 6, 7] # N arr2 = [3, 6, 7, 8, 20] # M print(find_duplicates(arr1, arr2)) print(pow(2, 32)) print(8 * 32)
[ 2, 3862, 25, 440, 7, 45, 10, 44, 8, 198, 2, 4687, 25, 440, 7, 1084, 7, 45, 11, 44, 4008, 628, 220, 220, 198, 220, 220, 198, 2, 399, 6404, 44, 198, 2, 257, 16, 796, 685, 20, 11, 21, 60, 399, 198, 2, 257, 17, 796, 685, 1...
1.701613
124
##======================================================================================== import numpy as np from scipy import linalg """ -------------------------------------------------------------------------------------- fit h0 and w based on Expectation Reflection input: features x[l,n], target: y[l] output: h0...
[ 2235, 23926, 4770, 2559, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 300, 1292, 70, 198, 198, 37811, 16529, 19351, 438, 198, 11147, 289, 15, 290, 266, 1912, 319, 23600, 341, 6524, 1564, 198, 15414, 25, 3033, 212...
4.571429
112
# Generated by Django 2.2 on 2019-04-21 19:29 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 13130, 12, 3023, 12, 2481, 678, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
""" Basically, if you have a dictionary like this: {"a": 1, "b.c": 2, "b.d": 3 } This function turns that into this: {"a": 1, "b": { "c": 2, "d": 3 } } This is used because form-encoded POST data is always flattened. It make...
[ 37811, 201, 198, 220, 220, 220, 20759, 11, 611, 345, 423, 257, 22155, 588, 428, 25, 201, 198, 220, 220, 220, 19779, 64, 1298, 352, 11, 220, 201, 198, 220, 220, 220, 220, 366, 65, 13, 66, 1298, 362, 11, 220, 201, 198, 220, 220, ...
2.053476
187
""" Implementation of the paper 'Sparsified SGD with Memory' This is mainly based on the code available at 'https://github.com/epfml/sparsifiedSGD' especially the file memory.py """ import numpy as np
[ 37811, 198, 220, 220, 220, 46333, 286, 262, 3348, 705, 4561, 945, 1431, 26147, 35, 351, 14059, 6, 198, 220, 220, 220, 770, 318, 8384, 1912, 319, 262, 2438, 1695, 379, 705, 5450, 1378, 12567, 13, 785, 14, 538, 38122, 14, 2777, 945, ...
3.19403
67
from herpetologist import check_type @check_type def load(file: str): """ Load RTTM file. Parameters ---------- file: str Returns ------- result : Dict[str, malaya_speech.model.annotation.Annotation] """ from malaya_speech.model.annotation import Annotation from malaya_sp...
[ 6738, 607, 6449, 7451, 1330, 2198, 62, 4906, 628, 198, 31, 9122, 62, 4906, 198, 4299, 3440, 7, 7753, 25, 965, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8778, 11923, 15972, 2393, 13, 628, 220, 220, 220, 40117, 198, 220, ...
2.180579
587
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # pylint: d...
[ 2, 10097, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 10097, 35937, 198, 1...
2.630114
18,257
#!/usr/bin/env python3 import os import argparse import sys from time import sleep import subprocess import fileinput import platform if(platform.system() == 'Darwin'): # Mac system (local machine) OPENAWSEM_LOCATION = "/Users/mingchenchen/Documents/openmmawsem/openmmawsem/" elif(platform.system() == 'Linux'): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 6738, 640, 1330, 3993, 198, 11748, 850, 14681, 198, 11748, 2393, 15414, 198, 11748, 3859, 198, 198, 361, 7, 24254, 13, ...
2.382396
2,045
from hashlib import sha256 from threading import Thread from typing import Iterable, Dict, Any import pymongo from django.conf import settings from administrator import jwt_keys from core import service
[ 198, 6738, 12234, 8019, 1330, 427, 64, 11645, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 19720, 1330, 40806, 540, 11, 360, 713, 11, 4377, 198, 11748, 279, 4948, 25162, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 18382,...
3.886792
53
errands = ['Go to gym', 'Grab lunch', 'Get promoted at work', 'Sleep'] print(enumerate(errands)) for index, errand in enumerate(errands, 1): print(f"{errand} is number {index} on my list of things to do today!")
[ 8056, 1746, 796, 37250, 5247, 284, 11550, 3256, 705, 48400, 9965, 3256, 705, 3855, 13722, 379, 670, 3256, 705, 40555, 20520, 198, 198, 4798, 7, 268, 6975, 378, 7, 8056, 1746, 4008, 628, 198, 1640, 6376, 11, 11454, 392, 287, 27056, 378...
2.894737
76
from allSettings import AllSettings
[ 6738, 477, 26232, 1330, 1439, 26232, 198 ]
5.142857
7
from requests.exceptions import HTTPError from ..forms import CreditCardPaymentFormWithName from ..core import get_credit_card_issuer from .. import PaymentStatus
[ 6738, 7007, 13, 1069, 11755, 1330, 14626, 12331, 198, 198, 6738, 11485, 23914, 1330, 10504, 16962, 19197, 434, 8479, 3152, 5376, 198, 6738, 11485, 7295, 1330, 651, 62, 43082, 62, 9517, 62, 747, 15573, 198, 6738, 11485, 1330, 28784, 19580,...
4.02439
41
# Imports import pytest from os import path # Test Subject Imports from pwbs.pwm.pwm_debug import * from pwbs.pwm.pwm_exec import * from pwbs.pwm.pwm_json import * from pwbs.pwm.pwm_system import * from pwbs.pwm.pwm_watcher import * # Classes and Functions # Test for execute() from pwm_exec.py | Single Command # Test...
[ 2, 1846, 3742, 198, 11748, 12972, 9288, 198, 6738, 28686, 1330, 3108, 198, 2, 6208, 15540, 1846, 3742, 198, 6738, 279, 86, 1443, 13, 79, 26377, 13, 79, 26377, 62, 24442, 1330, 1635, 198, 6738, 279, 86, 1443, 13, 79, 26377, 13, 79, ...
2.879668
241
"""packer_builder/specs/provisioners/linux.py""" def linux_provisioners(**kwargs): """Linux specific provisioners.""" # Setup vars from kwargs vagrant_box = kwargs['data']['vagrant_box'] build_scripts_dir = kwargs['data']['build_scripts_dir'] template = kwargs['data']['template'] scripts = [...
[ 37811, 8002, 263, 62, 38272, 14, 4125, 6359, 14, 1676, 10178, 364, 14, 23289, 13, 9078, 37811, 628, 198, 4299, 32639, 62, 1676, 10178, 364, 7, 1174, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 19314, 2176, 8287, 364, 526, 15931, 62...
2.202778
360
from z3 import * from util import * import copy import warnings # immutable string: an array of u64s (represented using UF) StringOffsetSort = SizeSort StringElementSort = BlockElementSort # mutable - easy to extract to C # immutable # A wrapper around an uninterpreted function that supports easily up...
[ 6738, 1976, 18, 1330, 1635, 198, 6738, 7736, 1330, 1635, 198, 11748, 4866, 198, 11748, 14601, 628, 198, 2, 40139, 4731, 25, 281, 7177, 286, 334, 2414, 82, 357, 33469, 1262, 471, 37, 8, 198, 10100, 34519, 42758, 796, 12849, 42758, 198,...
3.787234
94
__author__ = 'flipajs' import sys import cv2 import numpy as np from PyQt4 import QtGui from PyQt4 import QtCore from skimage.transform import resize from core.region.mser import get_regions_in_img from core.project.project import Project from gui.img_controls.gui_utils import cvimg2qtpixmap from scripts.region_grap...
[ 834, 9800, 834, 796, 705, 2704, 541, 1228, 82, 6, 628, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 8205, 72, 198, 6738, 9485, 48, 83, 19, 1330, 337...
2.629851
335
# SPDX-FileCopyrightText: (c) 2021 Artёm IG <github.com/rtmigo> # SPDX-License-Identifier: MIT import unittest from framefile import hash_extract_number, pct_extract_number, \ PatternMismatchError
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 357, 66, 8, 33448, 3683, 141, 239, 76, 35336, 1279, 12567, 13, 785, 14, 17034, 76, 14031, 29, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 555, 715, 395, 198, ...
2.697368
76
# -*- coding: utf-8 -*- """ And once again new serializer to / from JSON. Getting better at this :) """ import re import json import base64 from fractions import Fraction from uuid import UUID from datetime import datetime, date, time from array import array from collections import OrderedDict as oDict from collect...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 198, 1870, 1752, 757, 649, 11389, 7509, 284, 1220, 422, 19449, 13, 198, 20570, 1365, 379, 428, 14373, 198, 198, 37811, 198, 198, 11748, 302, 198, 11748,...
1.9734
1,391
import pandas as pd def load_from_excel(file): """ Функция формирует список из списков, состоящих из фамилии имени отчества и адреса электронной почты. Если адресов электронной почты у одного контакта несколько, то формируется список из адресов эл. почты. Пример вывода: [['Фамилия Имя отчество', 'emai...
[ 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 3440, 62, 6738, 62, 1069, 5276, 7, 7753, 2599, 198, 220, 220, 220, 37227, 12466, 97, 35072, 22177, 31583, 141, 228, 18849, 40623, 220, 141, 226, 15166, 21169, 43108, 18849, 21169, 35072, ...
1.37243
827
# Copyright 2018 The Cornac 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 ...
[ 2, 15069, 2864, 383, 11424, 330, 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, ...
3.380878
638
import datetime from typing import Optional from humanfriendly import parse_timespan, parse_size import json import os import shutil import stat import traceback import subprocess from sqlalchemy import desc from db import session import model import util """ Specifikace \data v databazi modulu pro "programming": ...
[ 11748, 4818, 8079, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 1692, 13120, 1330, 21136, 62, 22355, 6839, 11, 21136, 62, 7857, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 1185, 198, 11748, 12854, 1891, 198,...
2.071486
7,498
from openeye.oechem import * from openeye.oeomega import * from openeye.oeiupac import * from openeye.oeshape import * from openeye.oequacpac import * mol = OEMol() OESmilesToMol(mol, "[NH4+]") #OEAddExplicitHydrogens(mol) omega = OEOmega() omega.SetMaxConfs(1) omega.SetStrictStereo(False) omega.SetStrictAtomTypes(Fa...
[ 6738, 1280, 25379, 13, 78, 721, 4411, 1330, 1635, 198, 6738, 1280, 25379, 13, 2577, 462, 4908, 1330, 1635, 198, 6738, 1280, 25379, 13, 2577, 72, 929, 330, 1330, 1635, 198, 6738, 1280, 25379, 13, 3028, 71, 1758, 1330, 1635, 198, 6738, ...
2.391837
245
from functools import reduce from random import random time = 5 car_positions = [1, 1, 1] if __name__ == '__main__': # run1() # run2() # run3() # lower() # upper() # avg1() # avg2() # pip1() # pip2() # pip3() # pip4() pip5()
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 4738, 1330, 4738, 628, 198, 198, 2435, 796, 642, 198, 7718, 62, 1930, 1756, 796, 685, 16, 11, 352, 11, 352, 60, 628, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 70...
2.042553
141
from tkinter import Button,Label,Frame,Entry,Tk,Canvas,BOTH,LEFT,RIGHT,W,X,NORMAL,DISABLED from random import randint from PIL import ImageTk,Image # * Player Class to set the players details # * Game Class if __name__ == "__main__": Game()
[ 6738, 256, 74, 3849, 1330, 20969, 11, 33986, 11, 19778, 11, 30150, 11, 51, 74, 11, 6090, 11017, 11, 33, 26946, 11, 2538, 9792, 11, 49, 9947, 11, 54, 11, 55, 11, 35510, 42126, 11, 26288, 6242, 30465, 198, 6738, 4738, 1330, 43720, 6...
2.673684
95
import numpy as np import h0rton.h0_inference.plotting_utils as plotting_utils import unittest class TestPlottingUtils(unittest.TestCase): """A suite of tests for the h0rton.h0_inference.plotting_utils package """ @classmethod
[ 11748, 299, 32152, 355, 45941, 198, 11748, 289, 15, 81, 1122, 13, 71, 15, 62, 259, 4288, 13, 29487, 889, 62, 26791, 355, 29353, 62, 26791, 198, 11748, 555, 715, 395, 198, 198, 4871, 6208, 43328, 889, 18274, 4487, 7, 403, 715, 395, ...
2.614583
96
import numpy as np import torch from torch.utils.tensorboard import SummaryWriter from tqdm import tqdm from custom.criterion import smooth_cross_entropy from torch_lr_finder import LRFinder from torch.optim.lr_scheduler import OneCycleLR from torch.nn.functional import cross_entropy import os
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 83, 22854, 3526, 1330, 21293, 34379, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 2183, 13, 22213, 28019, 1330, 7209, 62, 19692, 62, 298, ...
3.482353
85
""" Utilities for tests within the django_comment_client module. """ from unittest.mock import patch from common.djangoapps.student.tests.factories import CourseEnrollmentFactory, UserFactory from common.djangoapps.util.testing import UrlResetMixin from openedx.core.djangoapps.course_groups.tests.helpers import Coho...
[ 37811, 198, 18274, 2410, 329, 5254, 1626, 262, 42625, 14208, 62, 23893, 62, 16366, 8265, 13, 198, 37811, 628, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 2219, 13, 28241, 14208, 18211, 13, 50139, 13, 41989, 13, ...
2.752373
1,159
""" This module contains the probe coroutine used to validate that a target device has a given port open. """ # ----------------------------------------------------------------------------- # System Imports # ----------------------------------------------------------------------------- import asyncio __all__ = ["pro...
[ 37811, 198, 1212, 8265, 4909, 262, 12774, 1162, 28399, 973, 284, 26571, 326, 257, 2496, 3335, 198, 10134, 257, 1813, 2493, 1280, 13, 198, 37811, 198, 198, 2, 16529, 32501, 198, 2, 4482, 1846, 3742, 198, 2, 16529, 32501, 198, 198, 1174...
3.1875
448
from vedirect import VEDirect from vedirect_device_emulator import VEDirectDeviceEmulator
[ 6738, 410, 276, 1060, 1330, 569, 1961, 1060, 198, 6738, 410, 276, 1060, 62, 25202, 62, 368, 8927, 1330, 569, 1961, 1060, 24728, 10161, 8927, 628 ]
3.5
26
import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras.layers.experimental.preprocessing import Normalization from tensorflow.keras.layers.experimental.preprocessing import Rescaling from tensorflow.keras.layers.experimental.preprocessing import CenterCrop from tensorflow.keras ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 13, 23100, 9134, 13, 3866, 36948, 1330, 14435, 163...
2.679719
996
""" Simple sketch that uses the saturation channel """ # add the needed libs add_library('video') add_library('opencv_processing') # declare the global variables we need video = None opencv = None # setup is run once # now our loop
[ 37811, 198, 26437, 17548, 326, 3544, 262, 36275, 6518, 198, 37811, 198, 198, 2, 751, 262, 2622, 9195, 82, 198, 2860, 62, 32016, 10786, 15588, 11537, 198, 2860, 62, 32016, 10786, 9654, 33967, 62, 36948, 11537, 198, 198, 2, 13627, 262, ...
3.449275
69
from random import Random import numpy as np from tensorflow.keras.preprocessing.image import ImageDataGenerator from ...dataloading import DataLoader, LoaderWrapper from ..image import ImageSize, get_image_size from .patching import get_patch, get_patches_per_dimension class PatchingSamplerLoader(LoaderWrapper): ...
[ 6738, 4738, 1330, 14534, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 3866, 36948, 13, 9060, 1330, 7412, 6601, 8645, 1352, 198, 198, 6738, 2644, 67, 10254, 1170, 278, 1330, 6060, 17401, 11, ...
3.539568
139
""" Tools for parsing the WikiQA corpus Microsoft Research WikiQA Corpus https://www.microsoft.com/en-us/download/details.aspx?id=52419 """ import itertools import more_itertools def get_rows(iterable): """Yield a sequence of rows as dict's The input format follows that of WikiQA.tsv """ firstline =...
[ 37811, 198, 33637, 329, 32096, 262, 13078, 48, 32, 35789, 198, 198, 15905, 4992, 13078, 48, 32, 44874, 198, 5450, 1378, 2503, 13, 40485, 13, 785, 14, 268, 12, 385, 14, 15002, 14, 36604, 13, 31740, 30, 312, 28, 48057, 1129, 198, 3781...
2.248639
551
#!/usr/bin/env python # -*- coding: utf-8 -*- # coding=utf-8 import logging import sys logging.basicConfig(level=logging.NOTSET, format='[%(asctime)s][%(levelname)7s][%(threadName)s][%(filename)s:%(funcName)s:%(lineno)d] %(message)s', datefmt='%Y-%m-%d %H:%M:%S', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 19617, 28, 40477, 12, 23, 201, 198, 11748, 18931, 201, 198, 11748, 25064, 201, 198, 201, 198, 6404, 2667...
2.130719
306
# from flask import render_template # import app # from .request import get_quote # @app.route('/') # def index(): # ''' # View root page function that returns the index page and its data # ''' # # Getting a Random quote # quotes = get_quote() # return render_template('index.html', quotes=quo...
[ 2, 422, 42903, 1330, 8543, 62, 28243, 198, 2, 1330, 598, 198, 2, 422, 764, 25927, 1330, 651, 62, 22708, 198, 198, 2, 2488, 1324, 13, 38629, 10786, 14, 11537, 198, 2, 825, 6376, 33529, 198, 198, 2, 220, 220, 220, 220, 705, 7061, ...
2.842105
114
""" Number of Ones Task: Count the number of ones in the binary representation of a given integer. Input Format: An integer. Output Format: An integer representing the count of ones in the binary representation of the input. Sample Input: 9 Sample Output: 2 Explanation: The binary representation of 9 is 1001,...
[ 37811, 198, 15057, 286, 32606, 198, 198, 25714, 25, 198, 198, 12332, 262, 1271, 286, 3392, 287, 262, 13934, 10552, 286, 257, 1813, 18253, 13, 628, 198, 20560, 18980, 25, 198, 2025, 18253, 13, 198, 198, 26410, 18980, 25, 220, 198, 2025...
3.25
132
import pandas as pd from typing import List, Dict from bs4 import BeautifulSoup from requests import get def scale(result_dict: Dict[str, Dict[str, float]]): """Scales the value range to [0, 1]""" max = -9999 min = 9999 for topic_id in result_dict: for doc_id in result_dict[topic_id]: ...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 7007, 1330, 651, 628, 628, 628, 198, 198, 4299, 5046, 7, 20274, 62, 11600, 25, 360, 713, 58, 2...
2.037227
779
''' Contains custom transform functions supporting a image and a mask as io To ensure compatibility input should be always numpy Author: Diedre Carmo https://github.com/dscarmo ''' import sys import time import os import torch import subprocess import torch.nn.functional as F from math import inf import numpy as np im...
[ 7061, 6, 198, 4264, 1299, 2183, 6121, 5499, 6493, 257, 2939, 290, 257, 9335, 355, 33245, 198, 2514, 4155, 17764, 5128, 815, 307, 1464, 299, 32152, 198, 198, 13838, 25, 34288, 260, 17998, 78, 198, 5450, 1378, 12567, 13, 785, 14, 67, ...
1.984328
14,165
from ._version import __version__ from .my_app import main, square
[ 6738, 47540, 9641, 1330, 11593, 9641, 834, 198, 6738, 764, 1820, 62, 1324, 1330, 1388, 11, 6616 ]
3.882353
17
# -*- coding: utf-8 -*- # Copyright 2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 1584, 44628, 3457, 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...
3.604255
235
#!python # coding: utf-8 import frontmatter from yaml.parser import ParserError from pathlib import Path from cover import make_cover, make_theme import time from bs4 import BeautifulSoup from markdown import markdown import re import requests import textwrap import twitter pages = Path("../../src/pages") static = P...
[ 2, 0, 29412, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 2166, 47635, 198, 6738, 331, 43695, 13, 48610, 1330, 23042, 263, 12331, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 3002, 1330, 787, 62, 9631, 11, 787, 62, 43810,...
2.216353
2,177
a=0 for i in range(1,7): n =int(input("Digite um valor ")) if n % 2 == 0 : a += n else: pass print(a)
[ 64, 28, 15, 198, 1640, 1312, 287, 2837, 7, 16, 11, 22, 2599, 198, 220, 220, 220, 299, 796, 600, 7, 15414, 7203, 19511, 578, 23781, 1188, 273, 366, 4008, 198, 220, 220, 220, 611, 299, 4064, 362, 6624, 657, 220, 1058, 198, 220, 22...
1.838235
68
#!/usr/bin/env python2 from werkzeug.serving import run_simple from werkzeug.wsgi import DispatcherMiddleware from bind_manager_v3 import app from bind_manager_v3.modules.config import configuration import os import sys config = configuration("/home/jaakko/Code/bind_manager_v3/bind_manager_v3/bind_manager.cfg") confi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 6738, 266, 9587, 2736, 1018, 13, 31293, 1330, 1057, 62, 36439, 198, 6738, 266, 9587, 2736, 1018, 13, 18504, 12397, 1330, 3167, 8071, 2044, 34621, 1574, 198, 6738, 11007, 62, 3...
2.753304
227
# Copyright 2010 Pierre Schaus pschaus@gmail.com, lperron@google.com # # 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 ...
[ 2, 220, 220, 15069, 3050, 21204, 3059, 8717, 279, 20601, 8717, 31, 14816, 13, 785, 11, 300, 525, 1313, 31, 13297, 13, 785, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 240...
2.780229
1,224
from .module_classes import * from .module_tools import *
[ 6738, 764, 21412, 62, 37724, 1330, 1635, 198, 6738, 764, 21412, 62, 31391, 1330, 1635, 628 ]
3.6875
16
import codecs import re from setuptools import setup from setuptools import find_packages version = "" with open("habanero/__init__.py", "r") as fd: version = re.search( r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE ).group(1) if not version: raise RuntimeError("Cannot find ve...
[ 11748, 40481, 82, 198, 11748, 302, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 198, 198, 9641, 796, 13538, 198, 4480, 1280, 7203, 5976, 272, 3529, 14, 834, 15003, 834, 13, 9078, 1600, ...
2.561644
584
import unittest import myfft from ddt import ddt, data, dataproduct @ddt
[ 11748, 555, 715, 395, 201, 198, 11748, 616, 487, 83, 201, 198, 6738, 288, 28664, 1330, 288, 28664, 11, 1366, 11, 4818, 499, 2076, 310, 201, 198, 201, 198, 31, 1860, 83, 201, 198, 201, 198 ]
2.25
36
# -*- coding: utf-8 -*- from flask_script import Manager from app import create_app from flask import request, abort, session from werkzeug.contrib.fixers import ProxyFix app = create_app() manager = Manager(app) app.wsgi_app = ProxyFix(app.wsgi_app) @app.before_request @manager.command def runserver(): """Ru...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42903, 62, 12048, 1330, 9142, 198, 6738, 598, 1330, 2251, 62, 1324, 198, 6738, 42903, 1330, 2581, 11, 15614, 11, 6246, 198, 6738, 266, 9587, 2736, 1018, 13, ...
2.764706
170
import praw import time from praw.handlers import MultiprocessHandler import OAuth2Util import apscheduler from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from apscheduler.executors.pool import ThreadPoolExecutor from datetime import date...
[ 11748, 279, 1831, 198, 11748, 640, 198, 6738, 279, 1831, 13, 4993, 8116, 1330, 7854, 541, 305, 919, 25060, 198, 11748, 440, 30515, 17, 18274, 346, 198, 11748, 257, 862, 1740, 18173, 198, 6738, 257, 862, 1740, 18173, 13, 1416, 704, 377...
2.927711
415
#!/usr/bin/python from netifaces import interfaces, ifaddresses, AF_INET from optparse import OptionParser import boto3 import logging import socket import sys LOG_FILE = '/var/log/update-computer-dns.log' SCRIPT = 'update-computer-dns.py' #Logging logger = logging.getLogger(SCRIPT) logger.setLevel(logging.INFO) hd...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 2010, 361, 2114, 1330, 20314, 11, 611, 2860, 16746, 11, 12341, 62, 1268, 2767, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 11748, 275, 2069, 18, 198, 11748, 18931, 198, 11748, ...
2.295168
952
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from SimPEG import Utils from SimPEG.EM.Base import BaseEMProblem from .SurveyDC import Survey_ky from .FieldsDC_2D import Fields_ky, Fields_ky_CC, Fields_ky_N from .Fiel...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 3184, 47, 715...
1.701787
8,675
#!/usr/bin/env python3 # # Copyright (c) 2017 Weitian LI <liweitianux@live.com> # MIT license # # 2017-04-08 # """ Make images from simulated visibilities using CASA 'clean' task. Credits ------- [1] CASA: Common Astronomy Software Applications https://casa.nrao.edu/ [2] CASA: clean https://casa.nrao.edu/doc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 775, 270, 666, 24653, 1279, 4528, 732, 270, 666, 2821, 31, 12583, 13, 785, 29, 198, 2, 17168, 5964, 198, 2, 198, 2, 2177, 12, 3023, 12, ...
2.264637
854
from django.contrib import admin from .models import Address, Social, Client admin.site.register(Address) admin.site.register(Social) admin.site.register(Client)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 17917, 11, 5483, 11, 20985, 628, 198, 28482, 13, 15654, 13, 30238, 7, 20231, 8, 198, 28482, 13, 15654, 13, 30238, 7, 20636, 8, 198, 28482, 13, 15654, 13, 3...
3.489362
47
# Generated by Django 2.2.11 on 2020-05-04 07:33 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1157, 319, 12131, 12, 2713, 12, 3023, 8753, 25, 2091, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628, 198 ]
2.741935
31
import sys import time import numpy as np import tensorflow as tf import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers.normalization import BatchNormalization from keras import callbacks from keras import backend as K print(time.strftime('%Y/%m/%d %H:%M')...
[ 11748, 25064, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 41927, 292, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 3...
2.344086
1,767
import os import os.path as osp import cv2 from uuid import uuid1 from imutils import paths width = 100 codelen = 5 def generate_xy(width, codelen): """Generate start and end indice of certain image width Args: width: image width piece: max number of piece to divide into Returns: l...
[ 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 269, 85, 17, 198, 6738, 334, 27112, 1330, 334, 27112, 16, 198, 6738, 545, 26791, 1330, 13532, 198, 198, 10394, 796, 1802, 198, 19815, 417, 268, 796, 642, 198, 198,...
2.335474
623
"""This contains code to read a yaml file to define calibration 'flavors' which provide a single key for a set of calibration options """ import yaml from lsst.eo_utils.base.defaults import DEFAULT_CALIB_FILE def _find_value_by_key(a_dict, key): """Find a key and return it, with a flag saying if it was found"""...
[ 37811, 1212, 4909, 2438, 284, 1100, 257, 331, 43695, 2393, 284, 8160, 36537, 705, 2704, 615, 669, 6, 198, 4758, 2148, 257, 2060, 1994, 329, 257, 900, 286, 36537, 3689, 198, 37811, 198, 198, 11748, 331, 43695, 198, 198, 6738, 43979, 30...
2.258545
1,141
#!/usr/bin/env python3 # See LICENSE for licensing information. # # Copyright (c) 2016-2021 Regents of the University of California # All rights reserved. # import debug import design from tech import cell_properties as props
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 4091, 38559, 24290, 329, 15665, 1321, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 12, 1238, 2481, 3310, 658, 286, 262, 2059, 286, 3442, 198, 2, 1439, 2489, 10395, 13, 198, ...
3.677419
62
#☆𝒐𝒎𝒂𝒋𝒊𝒏𝒂𝒊☆# import sys import math from math import ceil, floor import itertools from functools import lru_cache from collections import deque inf=10**20 sys.setrecursionlimit(10000000) input=lambda : sys.stdin.readline().rstrip() '''''✂''''''''''''''''''''''''''''''''''''''''''''''''''''''''' count=0 x=int(i...
[ 2, 35283, 47728, 240, 238, 47728, 240, 236, 47728, 240, 224, 47728, 240, 233, 47728, 240, 232, 47728, 240, 237, 47728, 240, 224, 47728, 240, 232, 35283, 2, 198, 11748, 25064, 198, 11748, 10688, 198, 6738, 10688, 1330, 2906, 346, 11, 4...
2.36478
159
import datetime from time import mktime import json from securitylib.crypto import generate_authenticator __all__ = ['CountersStorage', 'SessionStorage'] class CountersStorage(object): """ This class represents the storage used to store counters and can be used to configure storage parameters. :param s...
[ 11748, 4818, 8079, 198, 6738, 640, 1330, 33480, 2435, 198, 11748, 33918, 198, 6738, 2324, 8019, 13, 29609, 78, 1330, 7716, 62, 41299, 26407, 628, 198, 834, 439, 834, 796, 37250, 34, 15044, 31425, 3256, 705, 36044, 31425, 20520, 628, 198...
2.178241
3,787