content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
macroCommand = MacroCommand() macroCommand()
[ 198, 20285, 305, 21575, 796, 42755, 21575, 3419, 198, 20285, 305, 21575, 3419 ]
3.461538
13
import struct import os BUILD_DIR = os.environ.get('BUILD_DIR', 'build') if __name__ == '__main__': f = open(os.path.join(BUILD_DIR, 'test_io.bin'), 'wb') f.write(struct.pack('6I',0,1,2,0,1,2)) f.close() f = open(os.path.join(BUILD_DIR, 'test_io_false.bin'), 'wb') f.write(struct.pack('5I',0,1,1,2,...
[ 11748, 2878, 198, 11748, 28686, 198, 198, 19499, 26761, 62, 34720, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 19499, 26761, 62, 34720, 3256, 705, 11249, 11537, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 22...
2.017857
168
import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.rcParams.update({'font.size': 18}) pol_thres=0.7 xlsx_filename='/home/ashindin/owncloud/0002_see_incl/Data_1_5.83.xlsx' table=pd.read_excel(xlsx_filename, index_col=None, header=None) Ex, Ey, Ez, h, X, T, n2, labs =[],[],[],[],[],[],[],[] fo...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 489, 83, 13, 6015, 10044, 4105, 13, 19119, 15090, 6, 10331, 13, 7857, 10354, 1248, 30072, 198...
1.849954
5,405
from __future__ import unicode_literals import argparse import csv import json import re import os import unicodedata import itertools import concurrent.futures # import editdistance import pandas as pd try: import pylcs except: print("Could not import pylcs; falling back to py_common_subseq") import py_c...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 28000, 9043, 1045, 198, 11748, 340, 861, 10141, 198, 11748, 24...
2.439024
574
from manim import * from tests.test_graphical_units.testing.frames_comparison import frames_comparison __module_test__ = "functions" @frames_comparison
[ 6738, 582, 320, 1330, 1635, 198, 6738, 5254, 13, 9288, 62, 34960, 605, 62, 41667, 13, 33407, 13, 37805, 62, 785, 1845, 1653, 1330, 13431, 62, 785, 1845, 1653, 198, 198, 834, 21412, 62, 9288, 834, 796, 366, 12543, 2733, 1, 628, 198, ...
3.1
50
import os from pathlib import Path from contextlib import AsyncExitStack from tempfile import TemporaryDirectory from glob import glob import pydicom from pytest import mark from ...store.local_dir import LocalDir from ..conftest import dicom_dir, dicom_files @mark.asyncio @mark.asyncio
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4732, 8019, 1330, 1081, 13361, 30337, 25896, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 6738, 15095, 1330, 15095, 198, 198, 11748, 279, 5173, 291, 296, 198, 198, 6738, 129...
3.252747
91
'''Utility functions for the Feature Selection Notebook''' import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import StratifiedKFold from sklearn.metrics import accuracy_score, f1_score import lightgbm as lgbm def plot_ANOVA(imp_f_classif, save=True): ''' Plo...
[ 7061, 6, 18274, 879, 5499, 329, 262, 27018, 29538, 5740, 2070, 7061, 6, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 1341,...
2.092795
1,832
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-09-21 12:47 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1314, 319, 2864, 12, 2931, 12, 2481, 1105, 25, 2857, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.709091
55
from flask import Flask, redirect from flask_wtf.csrf import CSRFProtect from addon import db, login_manager, ma from config import app_config app = create_app('development') if __name__ == '__main__': app.run(debug=True, host='0.0.0.0')
[ 6738, 42903, 1330, 46947, 11, 18941, 198, 6738, 42903, 62, 86, 27110, 13, 6359, 41871, 1330, 9429, 32754, 41426, 198, 198, 6738, 48557, 1330, 20613, 11, 17594, 62, 37153, 11, 17266, 198, 6738, 4566, 1330, 598, 62, 11250, 628, 198, 198, ...
2.952381
84
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # 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, 12131, 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.237031
5,282
#!/usr/bin/env python """ Script to download historical data from CCXT. Use as: # Download data for CCXT for trading universe `v03` from 2019-01-01 to now: > download_historical_data.py \ --dst_dir 'test' \ --universe 'v03' \ --start_datetime '2019-01-01' Import as: import im_v2.ccxt.data.extract.dow...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 7391, 284, 4321, 6754, 1366, 422, 12624, 25010, 13, 198, 198, 11041, 355, 25, 198, 198, 2, 10472, 1366, 329, 12624, 25010, 329, 7313, 6881, 4600, 85, 3070, 63, 422, 13130, ...
2.618182
275
import pytest from time import sleep from selenium import webdriver @pytest.fixture
[ 11748, 12972, 9288, 198, 6738, 640, 1330, 3993, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198 ]
3.4
25
#!/usr/bin/env python """ Filename: handler.py Author: Keith Gladstone Description: This file is the heart of the program It handles all vehicle allocation and repositioning Contains trip_buffer, trip_location_hash_table, etc. """ import csv import sys from collections import deque from math im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 220, 220, 220, 7066, 12453, 25, 21360, 13, 9078, 198, 220, 220, 220, 6434, 25, 14926, 28442, 6440, 628, 220, 220, 220, 12489, 25, 198, 220, 220, 220, 770, 2393, 318, 262,...
2.228387
11,301
from django import forms from .models import BillingAddress from django_countries.fields import CountryField from django_countries.widgets import CountrySelectWidget PAYMENT_METHOD = ( ('S', 'stripe'), ('P', 'paypal') )
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 764, 27530, 1330, 3941, 278, 20231, 198, 6738, 42625, 14208, 62, 9127, 1678, 13, 25747, 1330, 12946, 15878, 198, 6738, 42625, 14208, 62, 9127, 1678, 13, 28029, 11407, 1330, 12946, 17563, 38300, 6...
3.180556
72
import sys from celery.__main__ import main as celerymain from sea.cli import jobm @jobm.job("async_task", proxy=True, help="invoke celery cmds for async tasks") @jobm.job("bus", proxy=True, help="invoke celery cmds for bus")
[ 11748, 25064, 198, 198, 6738, 18725, 1924, 13, 834, 12417, 834, 1330, 1388, 355, 18725, 1924, 12417, 198, 198, 6738, 5417, 13, 44506, 1330, 1693, 76, 628, 198, 198, 31, 21858, 76, 13, 21858, 7203, 292, 13361, 62, 35943, 1600, 15741, 2...
2.9125
80
#!/usr/bin/env python # # Public Domain 2014-present MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a com...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 5094, 20021, 1946, 12, 25579, 42591, 11012, 11, 3457, 13, 198, 2, 5094, 20021, 3648, 12, 4967, 39721, 51, 8254, 11, 3457, 13, 198, 2, 198, 2, 770, 318, 1479, 290, 555, ...
3.756356
472
# petition test dummy data petition = { "office": 1, "contested_by": 2, "body": "some string", "evidence": ['https://image.url'] } invalid_petition_data = { "office": "Not integer", "body": 2, "evidence": "Not a list of url" }
[ 2, 8853, 1332, 31548, 1366, 198, 198, 6449, 653, 796, 1391, 198, 220, 220, 220, 366, 31810, 1298, 352, 11, 198, 220, 220, 220, 366, 3642, 7287, 62, 1525, 1298, 362, 11, 198, 220, 220, 220, 366, 2618, 1298, 366, 11246, 4731, 1600, ...
2.401869
107
import pandas as pd from requests import Response def transform_uppercase(data_set: Response) -> pd.DataFrame: """ Transform a lowercase dataframe to uppercase. Args: data (pd.DataFrame): A raw dataframe Returns: pd.DataFrame: An uppercase dataframe """ json_data = data_set.j...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 7007, 1330, 18261, 628, 198, 4299, 6121, 62, 7211, 2798, 589, 7, 7890, 62, 2617, 25, 18261, 8, 4613, 279, 67, 13, 6601, 19778, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 26981, 2...
2.591954
174
frase = 'O rato roeu a roupa do rei de roma' tamanho = len(frase) contador = 0 nova_string = '' print(frase) while True: input_do_usuario = input('Qual letra voce deseja colocar maiuscula: ') if input_do_usuario not in frase: print('Escolha uma letra que esteja no texto') else: break whi...
[ 8310, 589, 796, 705, 46, 4227, 78, 686, 12496, 257, 13805, 8957, 466, 302, 72, 390, 374, 6086, 6, 198, 83, 10546, 8873, 796, 18896, 7, 8310, 589, 8, 198, 3642, 7079, 796, 657, 198, 38438, 62, 8841, 796, 10148, 198, 198, 4798, 7, ...
2.174797
246
from abc import ABCMeta, abstractmethod from colorama import init, Fore, Style RST = Style.RESET_ALL init()
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 3124, 1689, 1330, 2315, 11, 4558, 11, 17738, 198, 49, 2257, 796, 17738, 13, 19535, 2767, 62, 7036, 198, 15003, 3419 ]
3.34375
32
#!/usr/bin/env python # # path.py - Utility functions for working with file/directory paths. # # Author: Paul McCarthy <pauldmccarthy@gmail.com> # """This module contains a few utility functions for working with file system paths. .. autosummary:: :nosignatures: deepest shallowest allFiles hasExt a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 3108, 13, 9078, 532, 34030, 5499, 329, 1762, 351, 2393, 14, 34945, 13532, 13, 198, 2, 198, 2, 6434, 25, 3362, 18751, 1279, 79, 30406, 76, 535, 18270, 31, 14816, 13, 785,...
2.53218
7,225
"""Data I/O: Import and export data to other useable formats.""" import csv from pathlib import Path from model import Job def import_csv(filename, base_dir=Path("data/")): """Converts CSV files with the relevant data (see columns below) to a list of Jobs. """ datafile = base_dir / filename with ...
[ 37811, 6601, 314, 14, 46, 25, 17267, 290, 10784, 1366, 284, 584, 779, 540, 17519, 526, 15931, 198, 11748, 269, 21370, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 2746, 1330, 15768, 628, 198, 4299, 1330, 62, 40664, 7, 34345, 11...
2.154369
1,030
from turing import turing_machine_from_file from turing import tape_from_file from turing import Tape main()
[ 6738, 256, 870, 1330, 256, 870, 62, 30243, 62, 6738, 62, 7753, 198, 6738, 256, 870, 1330, 9154, 62, 6738, 62, 7753, 198, 6738, 256, 870, 1330, 40849, 628, 198, 198, 12417, 3419, 198 ]
3.294118
34
# Copyright 2022 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 33160, 3012, 11419, 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, 743, 733...
3.381089
349
#!/usr/bin/python3 # # Midi routing layer between jack and jamulus # For Behringer X-Touch Mini MIDI controller # # Layer A: control 8 jamulus channels 0-7 (slider controls ALSA master level) # Layer B: Control 8 jamulus channels 8-15 (slider controls ALSA capture level) # # Rotary encoder has 2 states (push to t...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 7215, 72, 28166, 7679, 1022, 14509, 290, 16853, 23515, 198, 2, 1114, 10407, 1806, 263, 1395, 12, 35211, 12558, 33439, 10444, 198, 2, 198, 2, 34398, 317, 25, 1630, 807, 16853,...
2.437634
3,720
#!/usr/bin/env python """ Adapted from bx/scripts/axt_to_fasta.py """ from galaxy import eggs import pkg_resources pkg_resources.require( "bx-python" ) import sys import bx.align.axt # $$$ this should be moved to a bx.align.fasta module if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 48003, 276, 422, 275, 87, 14, 46521, 14, 64, 742, 62, 1462, 62, 7217, 64, 13, 9078, 198, 37811, 198, 6738, 16161, 1330, 9653, 198, 11748, 279, 10025, 62, 37540, 198, 3533...
2.699029
103
import io import unittest from contextlib import redirect_stdout import solution if __name__ == '__main__': unittest.main()
[ 11748, 33245, 198, 11748, 555, 715, 395, 198, 6738, 4732, 8019, 1330, 18941, 62, 19282, 448, 198, 198, 11748, 4610, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417,...
3
44
# Copyright 2014 Cisco Systems, 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 requir...
[ 2, 15069, 1946, 28289, 11998, 11, 3457, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779,...
2.755721
1,879
""" Define the Channel model """ from . import db from .abc import BaseModel, MetaBaseModel from binascii import hexlify import os KEY_LENGTH = 64 class Client(db.Model, BaseModel, metaclass=MetaBaseModel): """ The Channel model """ __tablename__ = 'client' slug = db.Column(db.String(300), primary_key=T...
[ 37811, 198, 7469, 500, 262, 11102, 2746, 198, 37811, 198, 6738, 764, 1330, 20613, 198, 6738, 764, 39305, 1330, 7308, 17633, 11, 30277, 14881, 17633, 198, 6738, 9874, 292, 979, 72, 1330, 17910, 75, 1958, 198, 11748, 28686, 198, 198, 2037...
2.504132
363
from collections import namedtuple from typing import List from unittest import TestCase from electrum import Transaction from electrum.three_keys.multikey_generator import MultiKeyScriptGenerator from electrum.three_keys.transaction import ThreeKeysTransaction, TxType TX = '0200000001eaa85f4446a8d48b345592b7bc540678...
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 19720, 1330, 7343, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 1742, 6582, 1330, 45389, 198, 6738, 1742, 6582, 13, 15542, 62, 13083, 13, 16680, 522, 88, 62, 8612, 1352, 1...
2.491597
238
#!/usr/bin/env python # -*- coding: utf-8 -*- from math import ceil import os import yaml CONFIG_DIR = os.path.abspath(os.path.join(__file__, '..', 'shipping_configs')) # ups ground UPS_GROUND_ZIP_TO_ZONE = yaml.load(open(os.path.join(CONFIG_DIR, 'ups_ground_zip_to_zone.yaml'), 'r')) UPS_GROUND_ZONE_WEIGHT_PRICE =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 10688, 1330, 2906, 346, 198, 11748, 28686, 198, 198, 11748, 331, 43695, 628, 198, 10943, 16254, 62, 34720, 7...
2.281796
1,203
import re import random import discord import lavalink from discord.ext import commands import asyncio import fileRead url_rx = re.compile(r'https?://(?:www\.)?.+') """ Robert A. USF Computer Science A cog to hold all of the functions used to play music for the bot. """
[ 11748, 302, 198, 11748, 4738, 198, 11748, 36446, 198, 11748, 300, 9226, 676, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 30351, 952, 198, 11748, 2393, 5569, 198, 6371, 62, 40914, 796, 302, 13, 5589, 576, 7, 81, 6, 5450, 30, ...
3.333333
81
# %% import datetime import pandas import altair from plot_shared import plot_points_average_and_trend # %% df = pandas.read_csv('https://api.coronavirus.data.gov.uk/v2/data?areaType=nation&metric=cumPeopleVaccinatedFirstDoseByPublishDate&metric=cumPeopleVaccinatedSecondDoseByPublishDate&format=csv') df.rename(column...
[ 2, 43313, 198, 11748, 4818, 8079, 198, 198, 11748, 19798, 292, 198, 11748, 5988, 958, 198, 6738, 7110, 62, 28710, 1330, 7110, 62, 13033, 62, 23913, 62, 392, 62, 83, 10920, 198, 198, 2, 43313, 198, 7568, 796, 19798, 292, 13, 961, 62,...
2.497904
1,908
import sys import copy import numpy as np import pandas as pd from sklearn.svm import SVR import matplotlib.pyplot as plt from matplotlib.finance import candlestick from matplotlib.dates import date2num, WeekdayLocator, DateFormatter, MONDAY, MonthLocator from stock.utils.symbol_util import * from stock.globalvar impor...
[ 11748, 25064, 198, 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 82, 14761, 1330, 311, 13024, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, ...
2.313477
1,024
import matplotlib.pyplot as plt plt.plot(range(10)) plt.show()
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 489, 83, 13, 29487, 7, 9521, 7, 940, 4008, 198, 489, 83, 13, 12860, 3419 ]
2.384615
26
"""Functional tests for ``accretion_cli._stepfunctions``.""" import json import pytest from accretion_cli._templates.services.stepfunctions import _artifact_builder_workflow, _replication_listener_workflow from .functional_test_utils import load_vector pytestmark = [pytest.mark.local, pytest.mark.functional]
[ 37811, 22203, 282, 5254, 329, 7559, 4134, 12307, 62, 44506, 13557, 9662, 12543, 2733, 15506, 526, 15931, 198, 11748, 33918, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 697, 12307, 62, 44506, 13557, 11498, 17041, 13, 30416, 13, 9662, 125...
3.302083
96
import pytest from src.tweet_sentiment import ( EmoScores, PronounCounts, SentimentAnalysis, summarize_sentiment, _get_emotion_scores, _get_pronoun_counts, _get_sentiment ) sample_text = "It was the best of times, it was the worst of times, " \ "it was the age of wisdom, it was the ag...
[ 11748, 12972, 9288, 198, 198, 6738, 12351, 13, 83, 7277, 62, 34086, 3681, 1330, 357, 198, 220, 220, 220, 2295, 78, 3351, 2850, 11, 198, 220, 220, 220, 350, 1313, 977, 12332, 82, 11, 198, 220, 220, 220, 11352, 3681, 32750, 11, 198, ...
3.023529
340
# -------------- import pandas as pd import scipy.stats as stats import math import numpy as np import warnings warnings.filterwarnings('ignore') #Sample_Size sample_size=2000 #Z_Critical Score z_critical = stats.norm.ppf(q = 0.95) # path [File location variable] data=pd.read_csv(path) #Cod...
[ 2, 220, 26171, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 629, 541, 88, 13, 34242, 355, 9756, 201, 198, 11748, 10688, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 14601, 201, 198, 201, 198, 40539, 654, 13, 2...
2.560185
1,080
import cv2 import time import threading from flask import Response, Flask import time import os import sys import socket import select # Flask 객체로 Image frame 전달 global video_frame video_frame = None # 다양한 브라우저에서 프레임들의 thread-safe 출력을 잠근다. global thread_lock thread_lock = threading.Lock() # Raspberry Camera에 접근하기 위한...
[ 11748, 269, 85, 17, 198, 11748, 640, 198, 11748, 4704, 278, 198, 6738, 42903, 1330, 18261, 11, 46947, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 17802, 198, 11748, 2922, 198, 198, 2, 46947, 220, 166, 108, 251, ...
1.959759
994
""" @Author: huuuuusy @GitHub: https://github.com/huuuuusy 系统: Ubuntu 18.04 IDE: VS Code 1.37 工具: python == 3.7.3 """ """ 思路: 暴力解法,直接取出所有元素,排序后再存入新的链表中 结果: 执行用时 : 48 ms, 在所有 Python3 提交中击败了76.77%的用户 内存消耗 : 13.8 MB, 在所有 Python3 提交中击败了5.93%的用户 """ # 定义链表 if __name__ == "__main__": l1 = L...
[ 37811, 198, 31, 13838, 25, 289, 12303, 12303, 385, 88, 198, 31, 38, 270, 16066, 25, 3740, 1378, 12567, 13, 785, 14, 71, 12303, 12303, 385, 88, 198, 163, 111, 119, 163, 119, 253, 171, 120, 248, 14949, 1248, 13, 3023, 198, 14114, 25...
1.397753
445
# this file creates new log files in the particular folders created by the # createFolder file and generates separate log files for separate programs import os,inspect import logging,logging.config from createFolder import createFolder # logging levels loglevel = "debug" if loglevel.upper() == "DEBUG": loglevel...
[ 2, 428, 2393, 8075, 649, 2604, 3696, 287, 262, 1948, 24512, 2727, 416, 262, 220, 198, 2, 2251, 41092, 2393, 290, 18616, 4553, 2604, 3696, 329, 4553, 4056, 198, 198, 11748, 28686, 11, 1040, 806, 198, 11748, 18931, 11, 6404, 2667, 13, ...
3.066667
210
from flask import Flask, render_template, request, jsonify,redirect, url_for from werkzeug.utils import secure_filename import requests import random import json import os import time import xlrd from flask_cors import CORS from requests_toolbelt import MultipartEncoder app = Flask(__name__) #CORS(app, supports_crede...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 33918, 1958, 11, 445, 1060, 11, 19016, 62, 1640, 198, 6738, 266, 9587, 2736, 1018, 13, 26791, 1330, 5713, 62, 34345, 198, 11748, 7007, 198, 11748, 4738, 198, 11748, 33918, 1...
2.148789
289
"""Count the number of prime numbers less than a non-negative number, n. Example 1: Input: n = 10 Output: 4 Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7. Example 2: Input: n = 0 Output: 0 Example 3: Input: n = 1 Output: 0""" import math s = Solution() print(s.countPrimes(12))
[ 37811, 12332, 262, 1271, 286, 6994, 3146, 1342, 621, 257, 1729, 12, 31591, 1271, 11, 299, 13, 628, 198, 198, 16281, 352, 25, 198, 198, 20560, 25, 299, 796, 838, 198, 26410, 25, 604, 198, 3109, 11578, 341, 25, 1318, 389, 604, 6994, ...
2.828829
111
""" Code for applying grid search to find the best parameters for knowledge distillation. The distillation ratio and temperature parameters are being tuned in this search. """ import torch from train.distill_knowledge import main from utils.options import knowledge_distillation_options if __name__ == '__main__': ...
[ 37811, 198, 10669, 329, 11524, 10706, 2989, 284, 1064, 262, 1266, 10007, 329, 3725, 1233, 40903, 13, 198, 464, 1233, 40903, 8064, 290, 5951, 10007, 389, 852, 16524, 287, 428, 2989, 13, 198, 37811, 198, 11748, 28034, 198, 198, 6738, 4512...
3.570313
128
from datetime import datetime, timedelta import airflow from airflow import DAG from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator from airflow.utils.dates import days_ago # GLOBAL ENV VARIABLES IMAGE_VERSION = "v1.0.0" IMAGE = f"593291632749.dkr.ecr.eu-west-1.amazonaws.com/airflow-ps...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 11748, 45771, 198, 6738, 45771, 1330, 360, 4760, 198, 6738, 45771, 13, 3642, 822, 13, 3575, 2024, 13, 74, 18478, 3262, 274, 62, 33320, 62, 46616, 1330, 12554, 527, 3262, ...
2.375
472
""" This file contains constants for the IPv4 protocol. .. versionchanged:: 0.2.0 ip_constants has been moved into the connections subpackage. The full path is now boofuzz.connections.ip_constants """ IPV4_PROTOCOL_UDP = 0x11 #: Theoretical maximum length of a UDP packet, based on constraints in the UDP #: pac...
[ 37811, 198, 1212, 2393, 4909, 38491, 329, 262, 25961, 19, 8435, 13, 198, 198, 492, 2196, 40985, 3712, 657, 13, 17, 13, 15, 198, 220, 220, 220, 20966, 62, 9979, 1187, 468, 587, 3888, 656, 262, 8787, 850, 26495, 13, 198, 220, 220, 2...
3.240196
204
#! /usr/bin/env python import requests from collections import OrderedDict from utils import check_response def select_all(host,user,pswd,cert=None,format=None): """Get all data from the MDCS server Inputs: host - string, URL of MDCS instance user - string, username of desired account on M...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 7007, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 3384, 4487, 1330, 2198, 62, 26209, 198, 198, 4299, 2922, 62, 439, 7, 4774, 11, 7220, 11, 862, 16993, 11, 22583...
2.726858
1,534
########################################################################## # Copyright 2013-2021 Aerospike, 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/...
[ 29113, 29113, 7804, 2235, 198, 2, 15069, 2211, 12, 1238, 2481, 15781, 2117, 522, 11, 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, 2...
2.29577
19,975
#/usr/bin/env python3 my_file = '/opt/MkCheck/files/tiks.txt' sorting = True hold_lines = [] with open(my_file,'r') as text_file: for row in text_file: hold_lines.append(row) outer_count = 1 line_count = 0 while sorting: count = 0 increment = (outer_count-1) * 51 left = len(hold_lines) - increme...
[ 2, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 1820, 62, 7753, 796, 31051, 8738, 14, 44, 74, 9787, 14, 16624, 14, 20259, 591, 13, 14116, 6, 198, 82, 24707, 796, 6407, 198, 2946, 62, 6615, 796, 17635, 198, 4480, 1280, 7, 1820, ...
2.127404
416
import enum import json import colander import deform from websauna.compat.typing import Union from websauna.compat.typing import Callable from websauna.system.model.json import NestedMutationDict, NestedMutationList, json_serializer def defer_widget_values(widget: type, values_callback: Callable, **kwargs) -> defo...
[ 11748, 33829, 198, 11748, 33918, 198, 198, 11748, 951, 4066, 198, 11748, 47577, 198, 198, 6738, 2639, 32837, 13, 5589, 265, 13, 774, 13886, 1330, 4479, 198, 6738, 2639, 32837, 13, 5589, 265, 13, 774, 13886, 1330, 4889, 540, 198, 6738, ...
2.433655
1,349
# Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). # # 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...
[ 2, 15069, 33160, 1041, 88, 478, 418, 331, 311, 396, 368, 292, 390, 36987, 268, 320, 1153, 78, 12419, 357, 68, 35726, 8083, 737, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 1...
3.557196
271
""" Account admin register. """ # Django from django.contrib import admin from django.contrib import messages # Models from accounts.models import UserRequest @admin.register(UserRequest) class UserRequestAdmin(admin.ModelAdmin): """User Request Admin""" list_display = ( 'username', 'email',...
[ 37811, 198, 30116, 13169, 7881, 13, 198, 37811, 198, 198, 2, 37770, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 198, 2, 32329, 198, 6738, 5504, 13, 27530, 1330, 11787, ...
2.475248
202
"""Unit test package for ct1."""
[ 37811, 26453, 1332, 5301, 329, 269, 83, 16, 526, 15931, 198 ]
3
11
# -*- coding: utf-8 -*- """Exporters for ComPath resources.""" from .bel import get_bel # noqa:F401 from .rdf import get_rdf # noqa:F401
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 3109, 1819, 1010, 329, 955, 15235, 4133, 526, 15931, 198, 198, 6738, 764, 6667, 1330, 651, 62, 6667, 220, 1303, 645, 20402, 25, 37, 21844, 198, 6738, 764, ...
2.389831
59
import struct from PyFDP.FDP import FDP if __name__ == '__main__': #fdp = FDP("7_SP1_x64") fdp = FDP("8_1_x64") #fdp = FDP("10_x64") fdp.Restore()
[ 11748, 2878, 198, 198, 6738, 9485, 37, 6322, 13, 37, 6322, 1330, 376, 6322, 628, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 16344, 79, 796, 376, 6322, 7203, 22, 62, ...
1.726415
106
VERSION = "0.4.14.2"
[ 43717, 796, 366, 15, 13, 19, 13, 1415, 13, 17, 1, 198 ]
1.75
12
import numpy as np import plotly.graph_objs as go import networkx as nx #creates the data graph instance #this will create our initial plotly graph to display
[ 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198, 11748, 3127, 87, 355, 299, 87, 198, 198, 2, 20123, 274, 262, 1366, 4823, 4554, 628, 198, 2, 5661, 481, 2251, 674, 4238, 7110, ...
3.416667
48
# -*- coding: utf-8 -*- import numpy as np from .bclib import inner_product
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 65, 565, 571, 1330, 8434, 62, 11167, 628, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 1...
1.96
50
# Copyright (c) 2007 gocept gmbh & co. kg # See also LICENSE.txt # $Id$ """Process related views""" import zope.component from Products.CMFCore.utils import getToolByName from Products.Archetypes.config import UID_CATALOG import Products.AlphaFlow.interfaces import Products.AlphaFlow.process from Products.AlphaFlow....
[ 2, 15069, 357, 66, 8, 4343, 467, 984, 308, 2022, 71, 1222, 763, 13, 14211, 198, 2, 4091, 635, 38559, 24290, 13, 14116, 198, 2, 720, 7390, 3, 198, 37811, 18709, 3519, 5009, 37811, 198, 198, 11748, 1976, 3008, 13, 42895, 198, 198, 6...
3.172872
376
#!/usr/bin/env python3 # # Copyright (C) 2018--2019 Chi-kwan Chan # Copyright (C) 2018--2019 Steward Observatory # # This file is part of ehtplot. # # ehtplot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, ei...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 34, 8, 2864, 438, 23344, 21380, 12, 74, 8149, 18704, 198, 2, 15069, 357, 34, 8, 2864, 438, 23344, 12194, 446, 25758, 198, 2, 198, 2, 770, 2393, 318, 63...
2.889447
398
from pathlib import Path import configparser import json import discord from app import client, config @client.event def load_extensions(cogs: str) -> None: ''' Loads all extensions recursively.\n Params: cogs: str Relative path to cogs dir. ''' for extension in Path(cogs).rgl...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 4566, 48610, 198, 11748, 33918, 198, 198, 11748, 36446, 198, 198, 6738, 598, 1330, 5456, 11, 4566, 628, 198, 31, 16366, 13, 15596, 628, 198, 4299, 3440, 62, 2302, 5736, 7, 66, 18463, 25, 965,...
2.331126
302
#!/usr/bin/env python ''' Calling davidson solver for the lowest eigenvalues of a Hermitian matrix ''' import numpy from pyscf import lib n = 100 a = numpy.random.rand(n,n) a = a + a.T # Define the matrix-vector operation # Define the preconditioner. It can be just the diagonal elements of the # ma...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 7061, 6, 201, 198, 48593, 21970, 1559, 1540, 332, 329, 262, 9016, 304, 9324, 27160, 286, 257, 2332, 2781, 666, 17593, 201, 198, 7061, 6, 201, 198, 201, 198, 11748, 299...
2.428571
217
import numpy as np import math import uuid import tensorflow as tf margin = 4 beta = 100 scale = 0.99 beta_min = 0 eps = 0 c_map = [] k_map = [] c_m_n = lambda m, n: math.factorial(n) / math.factorial(m) / math.factorial(n - m) for i in range(margin + 1): c_map.append(c_m_n(i, margin)) k_map.append(math.cos(i ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 334, 27112, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 36153, 796, 604, 198, 31361, 796, 1802, 198, 9888, 796, 657, 13, 2079, 198, 31361, 62, 1084, 796, 657, 198, ...
2.034783
460
# AUTOGENERATED! DO NOT EDIT! File to edit: 01_config.ipynb (unless otherwise specified). __all__ = ['device', 'imsize', 'normalization_mean', 'normalization_std', 'content_layers_default', 'style_layers_default'] # Cell import torch device = torch.device("cuda" if torch.cuda.is_available() else "cpu") im...
[ 2, 47044, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 5534, 62, 11250, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 25202, 3256, 705, 320, 7857, 3256, 705, 11265, 16...
2.717054
258
from django import forms # from django.forms import ModelChoiceField from .models import Incident
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 2, 422, 42625, 14208, 13, 23914, 1330, 9104, 46770, 15878, 198, 6738, 764, 27530, 1330, 32731, 628 ]
4.166667
24
import pytest from django.db import IntegrityError from mailauth.contrib.user import models try: import psycopg2 except ImportError: psycopg2 = None postgres_only = pytest.mark.skipif( psycopg2 is None, reason="at least mymodule-1.1 required" )
[ 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 9945, 1330, 39348, 12331, 198, 198, 6738, 6920, 18439, 13, 3642, 822, 13, 7220, 1330, 4981, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 17331, 22163, 70, 17, 198, 16341, 17267, 12331, ...
2.817204
93
STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = '+' NAPACNA_CRKA = '-' PONOVLJENA_CRKA = 'o' ZMAGA = 'W' PORAZ = 'L' bazen_besed = [] with open ("Vislice/besede.txt") as datoteka_bazena: for beseda in datoteka_bazena: bazen_besed.append(beseda.strip().lower()) impor...
[ 2257, 20114, 4146, 46, 62, 35, 8874, 3535, 41, 1677, 40, 39, 62, 45, 2969, 10206, 796, 838, 201, 198, 47, 3861, 53, 4146, 4535, 62, 9419, 25123, 796, 705, 10, 6, 201, 198, 45, 2969, 2246, 4535, 62, 9419, 25123, 796, 705, 19355, ...
1.58159
239
print('-=' * 15) print('{:^30}'.format('LOJA SUPER BARATÃO')) print('-=' * 15) total = cont1000 = menor = cont = 0 nomemenor = '' while True: nomeP = str(input('Nome do produto: ')) preco = float(input('Preço: R$ ')) cont += 1 soun = ' ' print('-' * 30) while soun not in 'SN': soun = str...
[ 4798, 10786, 12, 11639, 1635, 1315, 8, 198, 4798, 10786, 90, 25, 61, 1270, 92, 4458, 18982, 10786, 21982, 37048, 33088, 31597, 1404, 5746, 46, 6, 4008, 198, 4798, 10786, 12, 11639, 1635, 1315, 8, 198, 23350, 796, 542, 12825, 796, 1450...
2.054455
404
import numpy as np import matplotlib.pyplot as plt paths = '/Users/lls/Documents/deep_halos_files/regression/rolling_val/' paths_all = [paths + '0dropout/', paths + '0.1dropout/', paths + '0.2dropout/', paths + '0.3dropout/', paths + 'no_sim3/'] dropout_pc = ["0", "10", "20", "30", "40"] f, axes = plt.s...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 6978, 82, 796, 31051, 14490, 14, 297, 82, 14, 38354, 14, 22089, 62, 14201, 418, 62, 16624, 14, 2301, 2234, 14, 18886, 62, 2100, 1...
2.015437
1,749
from panda3d.core import * # needs to be improved later on (maybe) from ProceduralGen import * from copy import deepcopy from physX import engine, PhysXNode, LinArrayFormat, ArrayLinFormat from NodeStates import State
[ 6738, 279, 5282, 18, 67, 13, 7295, 1330, 1635, 1303, 2476, 284, 307, 6596, 1568, 319, 357, 25991, 8, 198, 6738, 23652, 1523, 13746, 1330, 1635, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 2281, 55, 1330, 3113, 11, 8687, 55, 19667, ...
3.639344
61
from util.prim_ops_set import * from .fcn import FCNHead from .base import BaseNet from util.functional import * from torch.nn.functional import interpolate class BuildCell(nn.Module): """Build a cell from genotype""" class NasUnet(BaseNet): """Construct a network"""
[ 6738, 7736, 13, 19795, 62, 2840, 62, 2617, 1330, 1635, 201, 198, 6738, 764, 16072, 77, 1330, 10029, 45, 13847, 201, 198, 6738, 764, 8692, 1330, 7308, 7934, 201, 198, 6738, 7736, 13, 45124, 1330, 1635, 201, 198, 6738, 28034, 13, 20471,...
2.969388
98
# Generated by Django 3.2.2 on 2021-05-13 15:34 from django.db import migrations, models from metecho.api.models import TaskStatus
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 17, 319, 33448, 12, 2713, 12, 1485, 1315, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 198, 6738, 1138, 30328, 13, 15042, 13, 27530, 1330, 15941, 19580...
3.022222
45
import time from tsm.common.app import exception import requests import json from requests.packages.urllib3.util.retry import Retry from requests.adapters import HTTPAdapter KANGROUTER_WEBSERVICE_APPLICATION_ROOT="/kangrouter/srv/v1"
[ 11748, 640, 198, 198, 6738, 256, 5796, 13, 11321, 13, 1324, 1330, 6631, 198, 198, 11748, 7007, 198, 11748, 33918, 198, 6738, 7007, 13, 43789, 13, 333, 297, 571, 18, 13, 22602, 13, 1186, 563, 1330, 4990, 563, 198, 6738, 7007, 13, 324...
2.786517
89
import os import shutil import requests import hashlib import tempfile import datetime from bson.objectid import ObjectId import enCount # populate list with currently queued jobs submitted_downloads = dict( (j.meta['file_path'], j) for j in enCount.queues.downloads.jobs ) def get_file_path(e_acc, f_acc, f_url...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 7007, 198, 11748, 12234, 8019, 198, 11748, 20218, 7753, 198, 11748, 4818, 8079, 198, 6738, 275, 1559, 13, 15252, 312, 1330, 9515, 7390, 198, 198, 11748, 551, 12332, 198, 198, 2, 48040, 13...
2.005022
1,593
__author__ = 'sparklingSky' import ipcalc f = open('VT_links.txt', 'w') subnet = raw_input('Enter subnet with prefix in format 1.2.3.0/24: ') for x in ipcalc.Network(subnet): f.write('https://www.virustotal.com/en/ip-address/' + str(x) + '/information/' + '\n') f.close() print 'Completed. See the result in file...
[ 834, 9800, 834, 796, 705, 2777, 668, 1359, 22308, 6, 198, 198, 11748, 20966, 9948, 66, 198, 198, 69, 796, 1280, 10786, 36392, 62, 28751, 13, 14116, 3256, 705, 86, 11537, 198, 7266, 3262, 796, 8246, 62, 15414, 10786, 17469, 850, 3262, ...
2.481481
135
from flask_login import ( LoginManager as _LoginManager, logout_user as _logout_user, login_user as _login_user ) from .models import User from navycut.utils.security import check_password_hash from navycut.errors.misc import DataTypeMismatchError from .decorators import ( login_required as login_...
[ 6738, 42903, 62, 38235, 1330, 357, 198, 220, 220, 220, 23093, 13511, 355, 4808, 47790, 13511, 11, 220, 198, 220, 220, 220, 2604, 448, 62, 7220, 355, 4808, 6404, 448, 62, 7220, 11, 198, 220, 220, 220, 17594, 62, 7220, 355, 4808, 3823...
2.678042
1,348
# # Uncomplicated VM Builder # Copyright (C) 2007-2009 Canonical Ltd. # # See AUTHORS for list of contributors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as # published by the Free Software Foundation. # # ...
[ 2, 198, 2, 220, 220, 220, 791, 23855, 3474, 16990, 35869, 198, 2, 220, 220, 220, 15069, 357, 34, 8, 4343, 12, 10531, 19507, 605, 12052, 13, 198, 2, 198, 2, 220, 220, 220, 4091, 37195, 20673, 329, 1351, 286, 20420, 198, 2, 198, 2...
2.512353
1,700
#!/usr/bin/env python # # Copyright (c) 2020 BlackArrow # # # This product includes software developed by # SecureAuth Corporation (https://www.secureauth.com/). # # Description: [MS-TDS] & [MC-SQLR] example. # # Original author: # Alberto Solino (beto@coresecurity.com/@agsolino) # # Author: # Pablo Martinez (https:/...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 2619, 3163, 808, 198, 2, 198, 2, 198, 2, 770, 1720, 3407, 3788, 4166, 416, 198, 2, 26707, 30515, 10501, 357, 5450, 1378, 2503, 13, 22390, 18439...
2.412464
2,776
import argparse from blesuite.connection_manager import BLEConnectionManager from blesuite_wrapper import ble_service_read, ble_service_read_async, ble_service_write, \ ble_handle_subscribe, ble_service_scan, ble_service_write_async, ble_run_smart_scan from blesuite import utils from blesuite.utils.print_helper imp...
[ 11748, 1822, 29572, 198, 6738, 698, 274, 84, 578, 13, 38659, 62, 37153, 1330, 347, 2538, 32048, 13511, 198, 6738, 698, 274, 84, 578, 62, 48553, 1330, 7245, 62, 15271, 62, 961, 11, 7245, 62, 15271, 62, 961, 62, 292, 13361, 11, 7245, ...
1.856832
10,575
""" NOTE: ノートブックを作成するサンプル """ from decouple import config from pyevernote import EvernoteApp TOKEN = config("EVERNOTE_DEVELOPPER_TOKEN") USE_SANDBOX = config("USE_SANDBOX", True, cast=bool) if __name__ == "__main__": main()
[ 37811, 198, 16580, 25, 14524, 236, 12045, 230, 24001, 35702, 31758, 43291, 22755, 238, 33623, 25748, 26503, 6527, 30965, 9202, 198, 37811, 198, 6738, 875, 43846, 1330, 4566, 198, 198, 6738, 279, 5948, 933, 1258, 1330, 412, 933, 1258, 4677...
2.343434
99
# Generated by Django 3.0.3 on 2020-02-15 22:28 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 18, 319, 12131, 12, 2999, 12, 1314, 2534, 25, 2078, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from django.urls import path from django.contrib.auth.views import LoginView from .views import UserCreateFormView urlpatterns = [ path("login/", LoginView.as_view(), name="login"), path("register/", UserCreateFormView.as_view(), name="register") ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 33571, 1330, 23093, 7680, 198, 6738, 764, 33571, 1330, 11787, 16447, 8479, 7680, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, ...
3.108434
83
#!/usr/bin/env python3 # coding=utf-8 import numpy as np from sklearn.svm import SVC from sklearn.externals import joblib from sklearn import linear_model from sklearn.neural_network import MLPClassifier from sklearn.preprocessing import StandardScaler from sklearn.tree import DecisionTreeClassifier import time ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 82, 14761, 1330, 311, 15922, 198, 6738, 1341, 35720, 13, 1069, 759, 874, 1330, 1693, ...
1.772284
3,074
# Generated by Django 3.1.8 on 2021-05-02 11:09 import django.db.models.deletion from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 23, 319, 33448, 12, 2713, 12, 2999, 1367, 25, 2931, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.818182
44
import ivy import sys try: import shortcodes except ImportError: shortcodes = None # Use a single parser instance to parse all files. parser = None # The bare 'shortcodes' attribute for custom settings is deprecated. if shortcodes: @ivy.filters.register('node_text')
[ 11748, 21628, 88, 198, 11748, 25064, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 1790, 40148, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1790, 40148, 796, 6045, 628, 198, 2, 5765, 257, 2060, 30751, 4554, 284, 21136, 477, 369...
3.313953
86
import numpy as np import unittest import os import openmdao.api as om from openmdao.utils.assert_utils import assert_near_equal import pycycle.api as pyc from example_cycles.electric_propulsor import MPpropulsor if __name__ == "__main__": unittest.main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 198, 11748, 1280, 9132, 5488, 13, 15042, 355, 39030, 198, 6738, 1280, 9132, 5488, 13, 26791, 13, 30493, 62, 26791, 1330, 6818, 62, 40093, 62, 40496, 198, ...
2.944444
90
import os print(':::IMPORTANTE::: USE AS LETRAS CORRESPONDENTES => C (CESIUS), K (KELVIN) OU F (FIRENHEIT)\n\n') temp = input('Qual temperatura quer saber? ') tv = float(input('Digite o valor da temperatura: ')) if(temp == 'c'): fah = ((tv * 1.8) + 32) kel = (tv + 273.15) cel = tv print('Fah...
[ 11748, 28686, 201, 198, 4798, 10786, 3712, 25, 3955, 15490, 8643, 36, 3712, 25, 220, 220, 23210, 7054, 37994, 49, 1921, 23929, 19535, 47, 18672, 3525, 1546, 5218, 327, 357, 34, 1546, 40, 2937, 828, 509, 357, 42, 3698, 53, 1268, 8, 4...
1.918987
395
from webthing import (MultipleThings, Property, Thing, Value, WebThingServer) from pi_awning_webthing.awning import Awning, AwningPropertyListener from pi_awning_webthing.switch import Switch from pi_awning_webthing.motor_tb6612Fng import load_tb6612fng from time import sleep import logging import tornado.ioloop ...
[ 6738, 3992, 1197, 1330, 357, 31217, 22248, 11, 14161, 11, 21561, 11, 11052, 11, 5313, 51, 722, 10697, 8, 198, 6738, 31028, 62, 3832, 278, 62, 12384, 1197, 13, 3832, 278, 1330, 317, 675, 278, 11, 317, 675, 278, 21746, 33252, 198, 673...
3.290541
148
import tensorflow as tf from tensorflow.python.layers.layers import *
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 75, 6962, 13, 75, 6962, 1330, 1635, 628, 198 ]
3.130435
23
#!/usr/bin/env python3 # -*- coding: ascii -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # """Simple test suite using unittest. By clach04 (Chris Clark). Calling: python test/testsuite.py or cd test ./testsuite.py Could use any unitest compatible test runner (nose, etc.) Aims to test for regress...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 355, 979, 72, 532, 9, 12, 198, 2, 43907, 25, 912, 28, 19, 25, 2032, 28, 19, 25, 4215, 8658, 11338, 28, 19, 25, 27004, 8658, 25, 11201, 392, 8658, ...
2.215243
6,193
""" control of LCD160CR display. See: https://docs.micropython.org/en/latest/library/lcd160cr.html This module provides control of the MicroPython LCD160CR display. """ # source version: latest # origin module:: micropython/docs/library/lcd160cr.rst from typing import Any, Tuple from .machine import SPI # Orienta...
[ 37811, 198, 13716, 286, 23598, 14198, 9419, 3359, 13, 4091, 25, 3740, 1378, 31628, 13, 9383, 1773, 7535, 13, 2398, 14, 268, 14, 42861, 14, 32016, 14, 75, 10210, 14198, 6098, 13, 6494, 198, 198, 1212, 8265, 3769, 1630, 286, 262, 4527, ...
2.431815
6,387
import torch.nn as nn import torch import torch.nn.functional as F # net=Convnet4(2,64,z_dim=32) # t=torch.randn((5,2,320,300)) # output=net(t) # output.shape
[ 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 2, 2010, 28, 3103, 85, 3262, 19, 7, 17, 11, 2414, 11, 89, 62, 27740, 28, 2624, 8, 198, 2, 256, 28, 13165...
2.232877
73
#! /usr/bin/env python import sys def check_python(): "Check if the correct python version is installed" if sys.version_info < (3, 0): raise SystemExit("Python2 is not supported. Try rerunning with python3 or download the latest **64-bit** version from https://www.python.org/downloads/") if sys.maxsize <= 2**32: ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 198, 4299, 2198, 62, 29412, 33529, 198, 197, 1, 9787, 611, 262, 3376, 21015, 2196, 318, 6589, 1, 198, 197, 361, 25064, 13, 9641, 62, 10951, 1279, 357, 18, 11, ...
3.078571
280
from typing import Dict from transformers.pipelines.base import GenericTensor, Pipeline class NewFeatureExtractionPipeline(Pipeline): """ Feature extraction pipeline using no model head. This pipeline extracts the hidden states from the base transformer, which can be used as features in downstream tasks. ...
[ 6738, 19720, 1330, 360, 713, 198, 6738, 6121, 364, 13, 79, 541, 20655, 13, 8692, 1330, 42044, 51, 22854, 11, 37709, 198, 198, 4871, 968, 38816, 11627, 7861, 47, 541, 4470, 7, 47, 541, 4470, 2599, 198, 220, 220, 220, 37227, 198, 220,...
2.806271
893
import pytest from decimal import Decimal @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 6738, 32465, 1330, 4280, 4402, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, ...
2.586207
58
import os,sys import numpy as np from generate_synthetic_data import * sys.path.insert(0, '../../fair_classification/') # the code for fair classification is in this directory import utils as ut import funcs_disp_mist as fdm import plot_syn_boundaries as psb def test_synthetic_data(): """ Generate the synthetic d...
[ 11748, 28686, 11, 17597, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 7716, 62, 1837, 429, 6587, 62, 7890, 1330, 1635, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 40720, 40720, 22043, 62, 4871, 2649, 14, 11537, 1303, 262, 2438,...
2.826271
1,180
from flask import Flask, render_template, redirect from flask_pymongo import PyMongo import scrape_mars app = Flask(__name__) #use flask_pymongo to set up mongo connection app.config ["MONGO_URI"] = "mongodb://localhost:27017/mars_app" mongo = PyMongo(app) @app.route("/") @app.route("/scrape") if __name__ =="__mai...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18941, 198, 6738, 42903, 62, 79, 4948, 25162, 1330, 9485, 44, 25162, 198, 11748, 42778, 62, 76, 945, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 2, 1904, 42903, 62, ...
2.646617
133
# For local development #from utils.mock_di_api import mock_api #api = mock_api(__file__,False) import pandas as pd import copy import zipfile import re import io from datetime import datetime CREATE_SQL = False api.set_port_callback('input',on_input) # datatype: message
[ 2, 1114, 1957, 2478, 198, 2, 6738, 3384, 4487, 13, 76, 735, 62, 10989, 62, 15042, 1330, 15290, 62, 15042, 198, 2, 15042, 796, 15290, 62, 15042, 7, 834, 7753, 834, 11, 25101, 8, 628, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748...
2.947368
95
#!/usr/bin/env python # -*- coding: utf-8 -*- from json import JSONDecodeError, loads from os import makedirs from os.path import exists, isdir from urllib.error import HTTPError from cache import Cache from config import Config, ConfigNotValidError, load_config from logger import InfoLogger from mapper import Mapper...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 33918, 1330, 19449, 10707, 1098, 12331, 11, 15989, 198, 6738, 28686, 1330, 285, 4335, 17062, 198, 6738, 28686,...
3.378641
103
# import sys import com.example.utils.commons as commons from pyspark.sql import SparkSession if __name__ == "__main__": if len(sys.argv) != 1: print("Usages: spark-file <in-path> <out-path>") sys.exit(-1) # spark = SparkSession \ .builder \ .master("spark://spark-master:7077")\ .appN...
[ 2, 198, 11748, 25064, 198, 11748, 401, 13, 20688, 13, 26791, 13, 9503, 684, 355, 36523, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, ...
2.356941
706