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, make_response, request, render_template, jsonify import io import csv from flask_pymongo import PyMongo import pandas as pd import json from bson import ObjectId app = Flask(__name__,template_folder='templates') #Database name app.config['MONGO_DBNAME'] = 'tickets' # use mla...
[ 201, 198, 6738, 42903, 1330, 46947, 11, 787, 62, 26209, 11, 2581, 11, 8543, 62, 28243, 11, 33918, 1958, 201, 198, 11748, 33245, 201, 198, 11748, 269, 21370, 201, 198, 6738, 42903, 62, 79, 4948, 25162, 1330, 9485, 44, 25162, 201, 198, ...
2.387755
294
import pytest from skedulord.cron import parse_job_from_settings, Cron checks = [ { "name": "foo", "command": "python foobar.py", "arguments": {"hello": "world"}, "expected": "python foobar.py --hello world", }, { "name": "foo", "command": "python foobar.py",...
[ 11748, 12972, 9288, 198, 6738, 1341, 276, 377, 585, 13, 66, 1313, 1330, 21136, 62, 21858, 62, 6738, 62, 33692, 11, 31683, 198, 198, 42116, 796, 685, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, ...
2.358459
597
""" The BCN example for the $\lambda$ switch genetic network. Solved using the algebraic method developed by Yuqian Guo etc. Guo, Yuqian, Pan Wang, Weihua Gui, and Chunhua Yang. "Set stability and set stabilization of Boolean control networks based on invariant subsets." Automatica 61 (2015): 106-112. Please refer to...
[ 37811, 198, 464, 11843, 45, 1672, 329, 262, 39280, 50033, 3, 5078, 8513, 3127, 13, 198, 50, 5634, 1262, 262, 37139, 291, 2446, 4166, 416, 10605, 80, 666, 1962, 78, 3503, 13, 198, 198, 8205, 78, 11, 10605, 80, 666, 11, 5961, 15233, ...
3.022321
448
# See LICENSE for licensing information. # # Copyright (c) 2016-2019 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import debug class drc_lut(): """ Impl...
[ 2, 4091, 38559, 24290, 329, 15665, 1321, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 12, 23344, 3310, 658, 286, 262, 2059, 286, 3442, 290, 383, 5926, 198, 2, 286, 3310, 658, 329, 262, 10433, 36694, 290, 19663, 5535, 198, 2, 357, ...
2.481422
619
# (C) Copyright 2018-2021 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
[ 2, 357, 34, 8, 15069, 2864, 12, 1238, 2481, 2039, 28895, 11, 3457, 1539, 9533, 11, 15326, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 3788, 318, 2810, 1231, 18215, 739, 262, 2846, 286, 262, 347, 10305, 198, 2, 5964, 3017, ...
2.999136
1,158
import matplotlib.pyplot as plt
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628 ]
3
11
# From https://github.com/snap-stanford/GraphRNN/blob/1ef475d957414d7c0bf8c778a1d44cb52dd7829b/data.py import torch import torchvision as tv import torch.nn as nn from torch.autograd import Variable import matplotlib.pyplot as plt from random import shuffle import networkx as nx import pickle as pkl import scipy.spar...
[ 2, 3574, 3740, 1378, 12567, 13, 785, 14, 45380, 12, 14192, 3841, 14, 37065, 49, 6144, 14, 2436, 672, 14, 16, 891, 32576, 67, 24, 3553, 37309, 67, 22, 66, 15, 19881, 23, 66, 39761, 64, 16, 67, 2598, 21101, 4309, 1860, 3695, 1959, ...
2.288804
5,734
import contextlib import json from dataclasses import dataclass from argo_workflow_tools.dsl import building_mode_context as context from argo_workflow_tools.dsl.input_definition import InputDefinition from argo_workflow_tools.dsl.workflow_template_collector import ( push_condition, pop_condition, ) @datacla...
[ 11748, 4732, 8019, 198, 11748, 33918, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 1822, 78, 62, 1818, 11125, 62, 31391, 13, 67, 6649, 1330, 2615, 62, 14171, 62, 22866, 355, 4732, 198, 6738, 1822, 78, 62, 1818, 1112...
3.12037
108
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Andre Anjos <andre.anjos@idiap.ch> # Tue Jul 19 11:50:08 2011 +0200 # # Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland """This example shows how to use the Iris Flower (Fisher's) Dataset to create 3-class classifier based on Neural Networ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 900, 2393, 12685, 7656, 28, 40477, 12, 23, 1058, 198, 2, 10948, 1052, 73, 418, 1279, 49078, 13, 272, 73, 418, 31, 19830, 499, 13, 354, 29, 198, 2, 30030, 5979, 678, ...
2.613429
2,517
""" Servicio videos. """ from tornado.web import RequestHandler from tornado.gen import sleep from tornado.ioloop import IOLoop from tornado.httpclient import AsyncHTTPClient, HTTPRequest from time import time import os from subprocess import call rootFolder = os.path.dirname(os.path.abspath(os.path.dirname(__file__)...
[ 37811, 198, 11838, 46441, 5861, 13, 198, 37811, 198, 6738, 33718, 13, 12384, 1330, 19390, 25060, 198, 6738, 33718, 13, 5235, 1330, 3993, 198, 6738, 33718, 13, 1669, 11224, 1330, 314, 3535, 11224, 198, 6738, 33718, 13, 4023, 16366, 1330, ...
2.328533
1,111
import os import sys import subprocess import importlib.util as il spec = il.spec_from_file_location("config", snakemake.params.config) config = il.module_from_spec(spec) sys.modules[spec.name] = config spec.loader.exec_module(config) sys.path.append(snakemake.config['args']['mcc_path']) import scripts.mccutils as mccu...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 11748, 1330, 8019, 13, 22602, 355, 4229, 198, 16684, 796, 4229, 13, 16684, 62, 6738, 62, 7753, 62, 24886, 7203, 11250, 1600, 17522, 15883, 13, 37266, 13, 11250, 8, 198, 11250...
2.76
150
"""The clicksend_tts component."""
[ 37811, 464, 25785, 437, 62, 83, 912, 7515, 526, 15931, 198 ]
3.181818
11
import datetime import json from datetime import datetime from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render from django.template import loader from django.utils import translation from django.views.generic import Templat...
[ 11748, 4818, 8079, 198, 11748, 33918, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 2448, 3411, 21306, 798, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 6738, ...
2.862126
1,204
# Generated by Django 2.1.7 on 2019-11-23 10:11 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 1157, 12, 1954, 838, 25, 1157, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python import argparse import csv import itertools import logging import os import tkinter as tk from tkinter import filedialog from tkinter import messagebox LOGGER = logging.getLogger(__name__) LOGGER.addHandler(logging.StreamHandler()) if __name__ == '__main__': parser = argparse.ArgumentP...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 38...
2.982143
392
# Write your code here import math import numpy as np import itertools if __name__ == "__main__": n = int(input()) l = [] while n > 0 : x,y = map(int,input().split()) l.append((x,y)) n -= 1 dict = {} for i in l : if i in dict : dict[i] += 1 else...
[ 2, 19430, 534, 2438, 994, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 340, 861, 10141, 220, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 299, 796, 493, 7, 15414, ...
1.875912
274
#!/usr/bin/env python3 import sys from os import path sys.path.append(path.dirname(path.dirname(path.realpath(__file__)))) from pythonutils import gen_diffs if __name__ == '__main__': import argparse
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 6738, 28686, 1330, 3108, 198, 198, 17597, 13, 6978, 13, 33295, 7, 6978, 13, 15908, 3672, 7, 6978, 13, 15908, 3672, 7, 6978, 13, 5305, 6978, 7, 834, 7753, ...
2.773333
75
# Copyright (C) 2012 Red Hat # see file 'COPYING' for use and warranty information # # setrans is a tool for analyzing process transitions in SELinux policy # # This program 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...
[ 2, 15069, 357, 34, 8, 2321, 2297, 10983, 198, 2, 766, 2393, 705, 34, 3185, 45761, 6, 329, 779, 290, 18215, 1321, 198, 2, 198, 2, 900, 26084, 318, 257, 2891, 329, 22712, 1429, 27188, 287, 311, 3698, 259, 2821, 2450, 198, 2, 198, ...
3.169435
301
#! /usr/bin/env python # generates a dictionary in json format, with the import json from collections import Counter import click @click.command() @click.argument("input-file", type=click.Path(exists=True, dir_okay=False)) @click.argument("output-file", type=click.Path(exists=False, dir_okay=False)) @click.option(...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 18616, 257, 22155, 287, 33918, 5794, 11, 351, 262, 198, 198, 11748, 33918, 198, 6738, 17268, 1330, 15034, 198, 198, 11748, 3904, 628, 198, 31, 12976, 13, 21812, 3419, 198, ...
2.921429
140
# Copyright 2020 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, 12131, 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.686007
293
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # imports. from dev0s.classes.response import * from dev0s.classes.defaults import objects from dev0s.classes.response import response as _response_ # pip imports. from bs4 import BeautifulSoup as bs4 import urllib import requests as __requests__ # the requests class. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 17944, 13, 198, 6738, 1614, 15, 82, 13, 37724, 13, 26209, 1330, 1635, 198, 6738, 1614, 15, 82, 13, 3772...
3.016393
122
#!/usr/bin/env python """Extracts messages from CAN Bus interface and save to file""" import os import time import threading import queue import zipfile import can from can import Message # List of OBD-II parameter Ids to query PIDS = { "vehicle_speed": Message( arbitration_id=0x7DF, extended_id=...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 11627, 974, 82, 6218, 422, 15628, 5869, 7071, 290, 3613, 284, 2393, 37811, 198, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 16834, 198, 11748, 19974, 77...
2.236244
1,672
try: from psycopg2cffi._impl._libpq import ffi, lib as libpq except ImportError: from psycopg2cffi._impl._build_libpq import ffi, C_SOURCE, C_SOURCE_KWARGS libpq = ffi.verify(C_SOURCE, **C_SOURCE_KWARGS) PG_VERSION = libpq._PG_VERSION
[ 28311, 25, 198, 220, 220, 220, 422, 17331, 22163, 70, 17, 66, 487, 72, 13557, 23928, 13557, 8019, 79, 80, 1330, 277, 12463, 11, 9195, 355, 9195, 79, 80, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 17331, 22163, 70, 17, ...
2.254545
110
import re from sqlalchemy import text from yuuhpizzakebab import db from yuuhpizzakebab.topping.models import Topping class Pizza(): """The pizza class. variables: id - id of the pizza name - name of the pizza price - price of the pizza in USD image_url - image of the pizza topp...
[ 11748, 302, 198, 198, 6738, 44161, 282, 26599, 1330, 2420, 198, 6738, 331, 84, 7456, 79, 6457, 539, 65, 397, 1330, 20613, 198, 198, 6738, 331, 84, 7456, 79, 6457, 539, 65, 397, 13, 1462, 2105, 13, 27530, 1330, 1675, 2105, 628, 628, ...
2.860927
151
from .handlers import (DefaultHandler, MessageHandler, RegexHandler, StartswithHandler)
[ 6738, 764, 4993, 8116, 1330, 357, 19463, 25060, 11, 16000, 25060, 11, 797, 25636, 25060, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7253, 2032, 342, 25060, ...
2.488889
45
import json import pytest from model_mommy import mommy from rest_framework import status from unittest.mock import Mock from usaspending_api.awards.models import ( TransactionNormalized, TransactionFABS, TransactionFPDS, Subaward, BrokerSubaward, ) from usaspending_api.awards.v2.lookups.lookups i...
[ 11748, 33918, 198, 11748, 12972, 9288, 198, 198, 6738, 2746, 62, 32542, 1820, 1330, 1995, 1820, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 6738, 514, 5126, 1571, 62, 15042, 13...
2.5233
1,309
import os import sys import scipy.io import scipy.misc import matplotlib.pyplot as plt from matplotlib.pyplot import imshow from PIL import Image from utils import * import numpy as np import tensorflow as tf def content_cost(a_C, a_G): """ Computes the content cost Arguments: a_C -- tensor of di...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 629, 541, 88, 13, 952, 198, 11748, 629, 541, 88, 13, 44374, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 545, 12860, 19...
2.522576
2,547
# Generated by Django 2.0.2 on 2018-07-21 16:00 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 17, 319, 2864, 12, 2998, 12, 2481, 1467, 25, 405, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 6...
2.818182
44
# The vowel substrings in the word codewarriors are o,e,a,io. # The longest of these has a length of 2. Given a lowercase string that has # alphabetic characters only (both vowels and consonants) and no spaces, # return the length of the longest vowel substring. Vowels are any of aeiou. # Good luck! # If you lik...
[ 2, 383, 48617, 850, 37336, 287, 262, 1573, 14873, 413, 283, 8657, 389, 267, 11, 68, 11, 64, 11, 952, 13, 198, 2, 220, 383, 14069, 286, 777, 468, 257, 4129, 286, 362, 13, 11259, 257, 2793, 7442, 4731, 326, 468, 220, 198, 2, 220, ...
2.746795
312
# calls the functions from linalg/umath_linalg.c.src via cffi rather than cpyext # As opposed to the numpy version, this version leaves broadcasting to the responsibility # of the pypy extended frompyfunc, so the _umath_linag_capi functions are always called # with the final arguments, no broadcasting needed. import os...
[ 2, 3848, 262, 5499, 422, 300, 1292, 70, 14, 388, 776, 62, 75, 1292, 70, 13, 66, 13, 10677, 2884, 269, 487, 72, 2138, 621, 269, 9078, 2302, 198, 2, 1081, 6886, 284, 262, 299, 32152, 2196, 11, 428, 2196, 5667, 22978, 284, 262, 579...
1.697388
8,116
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() N = ni() S = [ns() for _ in range(N)] dd = [] for i in range(N): ...
[ 11748, 25064, 198, 11748, 10688, 198, 6738, 17268, 1330, 4277, 11600, 11, 390, 4188, 198, 198, 17597, 13, 2617, 8344, 24197, 32374, 7, 940, 12429, 718, 8, 198, 19282, 259, 796, 25064, 13, 19282, 259, 198, 198, 1268, 37, 796, 12178, 10...
2.156364
275
from .gconv_origin import ConvTemporalGraphical,ConvTemporalGraphicalBatchA,ConvTemporalGraphicalTwoA from .graph import Graph
[ 6738, 764, 70, 42946, 62, 47103, 1330, 34872, 12966, 35738, 37065, 605, 11, 3103, 85, 12966, 35738, 37065, 605, 33, 963, 32, 11, 3103, 85, 12966, 35738, 37065, 605, 7571, 32, 198, 6738, 764, 34960, 1330, 29681 ]
3.405405
37
import cv2 __all__ = ["read_bgr_image", "read_rgb_image"]
[ 11748, 269, 85, 17, 198, 198, 834, 439, 834, 796, 14631, 961, 62, 65, 2164, 62, 9060, 1600, 366, 961, 62, 81, 22296, 62, 9060, 8973, 628, 198 ]
2.178571
28
# -*- coding: utf-8 -*- import pytest from comport.department.models import Department, Extractor from comport.data.models import IncidentsUpdated, UseOfForceIncidentLMPD from testclient.JSON_test_client import JSONTestClient @pytest.mark.usefixtures('db')
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 12972, 9288, 198, 6738, 552, 419, 13, 10378, 1823, 13, 27530, 1330, 2732, 11, 29677, 273, 198, 6738, 552, 419, 13, 7890, 13, 27530, 1330, 3457, 3231, 17354, 11, ...
3.225
80
"""Public section, including homepage and signup.""" # Copyright 2020 Pax Syriana Foundation. Licensed under the Apache License, Version 2.0 # # from flask import Blueprint from flask_login import login_required from via_common.multiprocess.logger_manager import LoggerManager from via_cms.util.helper import get_loc...
[ 37811, 15202, 2665, 11, 1390, 34940, 290, 1051, 929, 526, 15931, 198, 2, 220, 15069, 12131, 48008, 3030, 2271, 5693, 13, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 198, 2, 198, 2, 628, 198, 6738, 42903, 1330, 39932, 198, ...
2.590226
532
won_bet = True big_win = True if won_bet or big_win: print("You can now stop betting!") won_bet = False big_win = True if won_bet or big_win: print("You can now stop betting!") won_bet = True big_win = False if won_bet or big_win: print("You can now stop betting!") won_bet = False big_win = False if ...
[ 26502, 62, 11181, 796, 6407, 198, 14261, 62, 5404, 796, 6407, 220, 198, 198, 361, 220, 1839, 62, 11181, 393, 1263, 62, 5404, 25, 198, 197, 4798, 7203, 1639, 460, 783, 2245, 22908, 2474, 8, 628, 197, 26502, 62, 11181, 796, 10352, 198...
2.604167
144
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' PyTorch implementation of LeNet5 ''' import torch.nn as nn
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 20519, 15884, 354, 7822, 286, 1004, 7934, 20, 198, 7061, 6, 198, 198, 11748, 28034, 13, 20471, 355...
2.333333
48
#!/usr/bin/env python # TODO: openbmc/openbmc#2994 remove python 2 support try: # python 2 import gobject except ImportError: # python 3 from gi.repository import GObject as gobject import dbus import dbus.service import dbus.mainloop.glib from obmc.dbuslib.bindings import get_dbus, DbusProperties, DbusObjec...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 16926, 46, 25, 1280, 20475, 66, 14, 9654, 20475, 66, 2, 1959, 5824, 4781, 21015, 362, 1104, 198, 28311, 25, 220, 1303, 21015, 362, 198, 220, 220, 220, 1330, 48484, 752, 198, ...
2.501377
363
#Programa que leia o cateto oposto e o adjacente de um triangulo retangulo #e mostre o comprimento da hipotenusa cat_o = float(input("comprimento do cateto oposto: ")) cat_a = float(input("comprimento do cateto adjacente: ")) c_hip = (cat_o ** 2 + cat_a ** 2) ** (1/2) print(f" A hipotenusa mede {c_hip:.2f}") import...
[ 2, 15167, 64, 8358, 443, 544, 267, 3797, 27206, 1034, 455, 78, 304, 267, 15909, 68, 390, 23781, 1333, 648, 43348, 1005, 648, 43348, 198, 2, 68, 749, 260, 267, 552, 3036, 50217, 12379, 10359, 313, 268, 22064, 198, 198, 9246, 62, 78, ...
2.38756
209
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # Copyright (C) 2021 TU Wien. # # Invenio-Vocabularies is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Pytest configuration. See https://pytest-invenio.readthedocs.io/ for docu...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 327, 28778, 13, 198, 2, 15069, 357, 34, 8, 33448, 309, 52, 370, 2013, 13, 198, 2, 198, 2, 554, 574, 952, 12, 53, 420, 397, ...
2.539875
2,558
import os import sys libPath = os.path.abspath('casper/cp/spexpr') sys.path.append(libPath) import cputil import util print "/* THIS FILE WAS AUTOGENERATED FROM explicit.cpp.py */" print "#include <casper/cp/spexpr/expr.h>" print "namespace Casper {" print "namespace Detail {" util.printViews(False) util.printPos...
[ 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 8019, 15235, 796, 28686, 13, 6978, 13, 397, 2777, 776, 10786, 66, 32981, 14, 13155, 14, 4125, 87, 1050, 11537, 198, 17597, 13, 6978, 13, 33295, 7, 8019, 15235, 8, 198, 198, 11748, ...
2.670732
164
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, parse_duration, int_or_none, )
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 302, 198, 198, 6738, 764, 11321, 1330, 14151, 11627, 40450, 198, 6738, 11485, 26791, 1330, 357, 198, 220, 220, 220, 5004...
2.772727
66
#!/usr/bin/env python3.8 # Copyright 2022 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import json import os import sys from typing import List from assembly import FileEntry, FilePath, ImageAssemblyConf...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 23, 198, 2, 15069, 33160, 383, 376, 37533, 544, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, ...
3.487805
123
from flask import Flask from flask.templating import render_template from models import provinsi,ambilTanggal,dunia,indonesia,harian_indo,india,india_global,turki,turki_global,us,us_global application = Flask(__name__) # Route untuk halaman utama @application.route('/') # Route untuk halaman awal @application.route(...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 13, 11498, 489, 803, 1330, 8543, 62, 28243, 198, 6738, 4981, 1330, 899, 1040, 72, 11, 4131, 346, 43909, 13528, 11, 67, 39934, 11, 521, 1952, 544, 11, 71, 3699, 62, 521, 78, 11, 521, 544, ...
3.027888
251
from python_framework import Service, ServiceMethod from domain import LoginConstants from enumeration.AuthenticationStatus import AuthenticationStatus from dto import QRCodeDto @Service()
[ 6738, 21015, 62, 30604, 1330, 4809, 11, 4809, 17410, 198, 198, 6738, 7386, 1330, 23093, 34184, 1187, 198, 6738, 27056, 341, 13, 47649, 3299, 19580, 1330, 48191, 19580, 198, 6738, 288, 1462, 1330, 1195, 7397, 1098, 35, 1462, 198, 198, 31...
4.340909
44
#!/usr/bin/env python # -*- coding:utf-8 -*- """================================================================= @Project : Algorithm_YuweiYin/LeetCode-All-Solution/Python3 @File : LC-0118-Pascals-Triangle.py @Author : [YuweiYin](https://github.com/YuweiYin) @Date : 2022-02-15 ==================================...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 23926, 28, 198, 31, 16775, 1058, 978, 42289, 62, 40728, 42990, 56, 259, 14, 3123, 316, 10669, 12, 3237, 12, 46344, ...
2.887538
329
# coding: utf-8 from caty.testutil import * from caty.jsontools.path.JsonPathLexer import * from StringIO import StringIO
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 3797, 88, 13, 9288, 22602, 1330, 1635, 198, 6738, 3797, 88, 13, 8457, 756, 10141, 13, 6978, 13, 41, 1559, 15235, 45117, 263, 1330, 1635, 198, 6738, 10903, 9399, 1330, 10903, 9399, 628, 198 ...
2.883721
43
# Generated by Django 3.1.6 on 2021-02-24 04:06 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 2999, 12, 1731, 8702, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... setup( name="DriveLink", version=read("VERSIO...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 34030, 2163, 284, 1100, 262, 20832, 11682, 2393, 13, 198, 2, 16718, 329, 262, 890, 62, 11213, 13, 220, 632, 338, 3621, 11, 780, 783, 352, 8, 356, 423, 257, 1353, ...
2.824324
370
# example of error estimation with numerical derivatives and using # Richardson extrapolation to reduce the leading order error. import math # function we are differentiating # analytic derivative (for comparison) # difference equation # desired tolerance -- be careful not to go too close to machine # epsilon,...
[ 2, 1672, 286, 4049, 31850, 351, 29052, 28486, 290, 1262, 198, 2, 21679, 36804, 21417, 284, 4646, 262, 3756, 1502, 4049, 13, 198, 198, 11748, 10688, 628, 198, 2, 2163, 356, 389, 1180, 26336, 628, 198, 2, 49166, 27255, 357, 1640, 7208, ...
2.789137
313
""" Provides unified interface for all Architect commands. Each command should live in a separate module and define an "arguments" variable which should contain the command's arguments and a "run" function which implements the command's behaviour. """ import os import sys import pkgutil import argparse from .. import...
[ 37811, 198, 15946, 1460, 22706, 7071, 329, 477, 17340, 9729, 13, 5501, 3141, 815, 2107, 198, 259, 257, 4553, 8265, 290, 8160, 281, 366, 853, 2886, 1, 7885, 543, 815, 3994, 262, 198, 21812, 338, 7159, 290, 257, 366, 5143, 1, 2163, 54...
2.820728
714
# Libraries import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import TensorDataset, DataLoader, Dataset import torchvision import torchvision.transforms as transforms from sklearn.model_selection import train_test_split import os import numpy as np import pandas as pd i...
[ 2, 46267, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 309, 22854, 27354, 292, 316, 11, 6060, 17401,...
2.22822
1,871
from waldur_core.core import WaldurExtension
[ 6738, 266, 1940, 333, 62, 7295, 13, 7295, 1330, 24261, 333, 11627, 3004, 628 ]
3.285714
14
from src.operation.execution import Execution from selenium.common.exceptions import ( ElementClickInterceptedException, ElementNotInteractableException, NoSuchElementException, ) from selenium.webdriver.support import expected_conditions as EC from time import sleep from bs4 import BeautifulSoup from selen...
[ 6738, 12351, 13, 27184, 13, 18558, 1009, 1330, 37497, 198, 6738, 384, 11925, 1505, 13, 11321, 13, 1069, 11755, 1330, 357, 198, 220, 220, 220, 11703, 8164, 9492, 984, 276, 16922, 11, 198, 220, 220, 220, 11703, 3673, 9492, 529, 540, 169...
2.167323
7,363
import numpy as np import torch class AverageMeter: """ Computes and stores the average and current value """
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 628, 198, 4871, 13475, 44, 2357, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3082, 1769, 290, 7000, 262, 2811, 290, 1459, 1988, 198, 220, 220, 220, 37227, 628, 198 ]
3.15
40
"""Push notification handling.""" from __future__ import annotations import asyncio from collections.abc import Callable from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.event import async_call_later from homeassistant.util.uuid import random_uuid_hex PUSH_CONFIRM_TIMEOUT = 10 # sec...
[ 37811, 49222, 14483, 9041, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 6738, 17268, 13, 39305, 1330, 4889, 540, 198, 198, 6738, 1363, 562, 10167, 13, 7295, 1330, 5995, 48902, 11, 23838, 198, ...
2.28831
1,266
import logging import re from abc import ABC, abstractmethod from typing import Dict, Any, List, Set, Optional, Generic, TypeVar, Tuple from sqlalchemy import text from sqlalchemy.sql.elements import TextClause from fidesops.graph.config import ROOT_COLLECTION_ADDRESS, CollectionAddress from fidesops.graph.traversal ...
[ 11748, 18931, 198, 11748, 302, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 7343, 11, 5345, 11, 32233, 11, 42044, 11, 5994, 19852, 11, 309, 29291, 198, 198, 6738, 44161, 282, 26599,...
2.36691
3,971
import numpy as np import random import logging import pandas as pd if __name__ == '__main__': logging.getLogger().setLevel(logging.INFO) logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) # logging.info('ddddd')...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 18931, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 18931, 13, 1136, 11187, 1362, 22446, ...
2.58871
124
from django import forms from expensesTracker.app.models import Profile, Expense
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 9307, 35694, 13, 1324, 13, 27530, 1330, 13118, 11, 5518, 1072, 628, 198 ]
4
21
__author__ = 'Teruaki Enoto' __version__ = '0.02' __date__ = '2018 November 26' """ HISTORY 2018-11-26 transfered from giantradiopulse library 2018-10-09 modified by T.Enoto 2018-10-01 created by T.Enoto """ import os import pandas as pd import astropy.io.fits as fits class GootTimeIntervalTextFile(GootTimeIn...
[ 834, 9800, 834, 220, 796, 705, 15156, 84, 8182, 412, 1662, 78, 6, 198, 834, 9641, 834, 796, 705, 15, 13, 2999, 6, 198, 834, 4475, 834, 220, 220, 220, 796, 705, 7908, 3389, 2608, 6, 198, 37811, 198, 39, 42480, 198, 7908, 12, 1157...
2.885321
218
#!/usr/local/bin/sage -python from sage.all import * n = 199843247 done = 0 for b in range(1, int(sqrt(199843247) + 1)): E = EllipticCurve(Integers(n),[0,0,0,b,-b]) P = E(1,1) for d in range(2, 21): # try: Q = d*P print(d,"!P &= (",Q[0],"," ,Q[1],")\\\\") P = Q # ...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 82, 496, 532, 29412, 198, 6738, 35021, 13, 439, 1330, 1635, 198, 198, 77, 796, 7795, 3559, 23753, 198, 28060, 796, 657, 198, 198, 1640, 275, 287, 2837, 7, 16, 11, 493, 7, 31166, 17034, 7, ...
1.641577
279
#1 -)SAY "HELLO, WORLD!" WITH PYTHON a = "Hello, World!" print(a) #2 -)PYTHON IF - ELSE # !/bin/python3 import math import os import random import re import sys # For all condition writing if or elif if __name__ == '__main__': n = int(input().strip()) if n % 2 == 1: print("Weird") elif n % 2 ...
[ 198, 2, 16, 532, 8, 27358, 366, 13909, 3069, 46, 11, 29564, 2474, 13315, 350, 56, 4221, 1340, 198, 198, 64, 796, 366, 15496, 11, 2159, 2474, 198, 4798, 7, 64, 8, 198, 198, 2, 17, 532, 8, 47, 56, 4221, 1340, 16876, 532, 17852, ...
2.510086
694
from pydantic import BaseModel from .models import UnprocessableEntity from .utils import get_model_key, parse_code class Response: """ response object :param codes: list of HTTP status code, format('HTTP_[0-9]{3}'), 'HTTP200' :param code_models: dict of <HTTP status code>: <`pydantic.BaseModel`> or...
[ 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 198, 6738, 764, 27530, 1330, 791, 14681, 540, 32398, 198, 6738, 764, 26791, 1330, 651, 62, 19849, 62, 2539, 11, 21136, 62, 8189, 628, 198, 4871, 18261, 25, 198, 220, 220, 220, 37227, 198,...
2.339893
1,677
n=int(input("number: ")) if n==1: print n if n<0: print("sorry..factorial does not exist") elif n==0: print ("the factorial of 0 is 1") else: for i in range(1,n): n=n*i print n
[ 77, 28, 600, 7, 15414, 7203, 17618, 25, 366, 4008, 198, 361, 299, 855, 16, 25, 198, 197, 4798, 299, 198, 361, 299, 27, 15, 25, 198, 197, 4798, 7203, 41599, 492, 22584, 5132, 857, 407, 2152, 4943, 198, 417, 361, 299, 855, 15, 25,...
2.176471
85
#!/usr/bin/env python # if the __init__.py is imported directly, import the # folowing classes from .ger import Booger from .geyman import Boogeyman, OogieBoogie # purposely do not define Bookbag here #from .kbag import Bookbag
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 611, 262, 11593, 15003, 834, 13, 9078, 318, 17392, 3264, 11, 1330, 262, 198, 2, 5955, 7855, 6097, 198, 6738, 764, 1362, 1330, 3248, 519, 263, 198, 6738, 764, 39608, 805, 1330...
3.271429
70
import threading from sqlalchemy import ( Column, String, Integer ) from . import SESSION, BASE # save user ids in whitelists # save warn msg ids # save warn counts PMTABLE.__table__.create(checkfirst=True) MSGID.__table__.create(checkfirst=True) DISAPPROVE.__table__.create(checkfirst=True) INSE...
[ 11748, 4704, 278, 198, 198, 6738, 44161, 282, 26599, 1330, 357, 198, 197, 39470, 11, 220, 198, 197, 10100, 11, 220, 198, 197, 46541, 198, 8, 198, 198, 6738, 764, 1330, 311, 47621, 11, 49688, 628, 628, 198, 2, 3613, 2836, 220, 2340, ...
2.847716
197
############ 계산기 만들기 연습 ########### calcul()
[ 7804, 4242, 220, 166, 111, 226, 168, 224, 108, 166, 116, 108, 31619, 100, 234, 167, 241, 97, 166, 116, 108, 23821, 245, 108, 168, 232, 113, 1303, 7804, 2235, 198, 198, 9948, 3129, 3419 ]
1.285714
35
import socket s= socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind(('127.0.0.1',9999)) print('Bind UDP on 9999') while True: data,addr=s.recvfrom(1024) print('Received from %s:%s' %addr) s.sendto(b'Hello, %s!' % data, addr)
[ 11748, 17802, 198, 198, 82, 28, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 44971, 13, 50, 11290, 62, 35, 10761, 2390, 8, 198, 82, 13, 21653, 7, 10786, 16799, 13, 15, 13, 15, 13, 16, 3256, 24214, 4008, 198, 4798, 1...
2.189189
111
from argparse import Namespace import csv from typing import List, Optional import numpy as np import torch from tqdm import tqdm from .predict import predict from chemprop.data import MoleculeDataset from chemprop.data.utils import get_data, get_data_from_smiles from chemprop.utils import load_args, load_checkpoint,...
[ 6738, 1822, 29572, 1330, 28531, 10223, 198, 11748, 269, 21370, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 764, 79...
2.441522
1,445
import numpy as np import tensorflow as tf import gym from datetime import datetime import time import roboschool def mlp(x, hidden_layers, output_layer, activation=tf.tanh, last_activation=None): ''' Multi-layer perceptron ''' for l in hidden_layers: x = tf.layers.dense(x, units=l, activation...
[ 11748, 299, 32152, 355, 45941, 220, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11550, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 640, 198, 11748, 3857, 418, 1251, 198, 198, 4299, 25962, 79, 7, 87, 11, 7104, 62, 7...
2.223952
5,845
# Copyright (c) 2017-2021 Neogeo-Technologies. # 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...
[ 2, 15069, 357, 66, 8, 2177, 12, 1238, 2481, 21227, 469, 78, 12, 25574, 5823, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, ...
3.300216
463
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu import tensorflow as tf a = tf.constant(10) b = tf.constant(20) # 使用with可以自动关闭Session() with tf.Session() as sess: ret = sess.run(a + b) print("ret:", ret)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 1772, 25, 1263, 6513, 692, 16115, 628, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 64, 796, 48700, 13, 9...
1.97479
119
from base import find_root from gaussian import truncated_gaussian from chi import truncated_chi, truncated_chi2 from T import truncated_T from F import truncated_F
[ 6738, 2779, 1330, 1064, 62, 15763, 198, 198, 6738, 31986, 31562, 1330, 40122, 515, 62, 4908, 31562, 198, 6738, 33166, 1330, 40122, 515, 62, 11072, 11, 40122, 515, 62, 11072, 17, 198, 6738, 309, 1330, 40122, 515, 62, 51, 198, 6738, 376...
3.458333
48
import <app_pkg_name> from <app_pkg_name>.bin import zlogger app = <app_pkg_name>.init_app() zlogger.startLogger("<app_pkg_name>") if __name__ == "__main__": ''' TODO: populate dummy data, setup zlogger ''' zlogger.log( "run.py" f"starting {__name__}" ) app.run(debug=True)
[ 11748, 1279, 1324, 62, 35339, 62, 3672, 29, 198, 6738, 1279, 1324, 62, 35339, 62, 3672, 28401, 8800, 1330, 1976, 6404, 1362, 220, 198, 198, 1324, 796, 1279, 1324, 62, 35339, 62, 3672, 28401, 15003, 62, 1324, 3419, 220, 198, 198, 89, ...
2.237037
135
import numpy as np class FFT_DIP: """ need to complete the implementation having issues with how to keep size, in order to avoid zero padding def bluestein(self, vector, inverse=False): transformed_vector = np.covolve() return vector """
[ 11748, 299, 32152, 355, 45941, 198, 198, 4871, 376, 9792, 62, 35, 4061, 25, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 761, 284, 1844, 262, 7822, 1719, 2428, 351, 198, 220, 220, 220, 703, 284, 1394, 2546, 11, 287, 1502, 284, 3...
2.85567
97
import os from setuptools import setup AUTHORS = ('Sebastian Krieger, Nabil Freij, Alexey Brazhe, ' 'Christopher Torrence, Gilbert P. Compo and contributors') setup( name='pycwt', version='0.3.0a22', author=AUTHORS, author_email='sebastian@nublia.com', description=('Continuous wavelet...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 198, 32, 24318, 20673, 796, 19203, 50, 1765, 459, 666, 509, 5034, 1362, 11, 399, 14991, 4848, 2926, 11, 4422, 2959, 41414, 258, 11, 705, 198, 220, 220, 220, 220, 220, ...
2.581509
411
import torch from models.convnext import * from utils import get_params_groups, create_lr_scheduler import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--epochs", type=int, default=100, help="number of epochs of training") parser.add_argument("--batch_siz...
[ 11748, 28034, 198, 6738, 4981, 13, 42946, 19545, 1330, 1635, 198, 6738, 3384, 4487, 1330, 651, 62, 37266, 62, 24432, 11, 2251, 62, 14050, 62, 1416, 704, 18173, 198, 11748, 1822, 29572, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.988439
173
# """ 104: Crie um programa que tenha a função leiaInt(), que vai funcionar de forma # semelhante 'a função input() do Python, só que fazendo a validação para aceitar apenas um valor numérico. # Ex: n = leiaInt('Digite um n: ')""" # # # def leia_int(num): # n = str(input(num)) # while True: # if not n.i...
[ 2, 37227, 14436, 25, 327, 5034, 23781, 1430, 64, 8358, 3478, 3099, 257, 1257, 16175, 28749, 443, 544, 5317, 22784, 8358, 410, 1872, 25439, 295, 283, 390, 1296, 64, 198, 2, 5026, 417, 71, 12427, 705, 64, 1257, 16175, 28749, 5128, 3419,...
2.071197
309
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0
[ 2, 220, 15069, 33448, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 220, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 628 ]
3.285714
35
#!/usr/bin/env python """ Code for loading the contents of VCF files into the vardb database. Use one transaction for whole file, and prompts user before committing. Adds annotation if supplied annotation is different than what is already in db. Can use specific annotation parsers to split e.g. allele specific annotat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 10669, 329, 11046, 262, 10154, 286, 569, 22495, 3696, 656, 262, 410, 446, 65, 6831, 13, 198, 198, 11041, 530, 8611, 329, 2187, 2393, 11, 290, 36454, 2836, 878, 17222, 13, ...
2.855263
608
# -*- coding: utf-8 -*- """ /*************************************************************************** Delete point. Synchonize with layer and file ------------------- begin : 2018-07-11 git sha : $Format:%H$ author : M...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 14, 17174, 17174, 4557, 8162, 198, 220, 198, 23520, 966, 13, 16065, 354, 261, 1096, 351, 7679, 290, 2393, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.563786
243
__all__=['index']
[ 834, 439, 834, 28, 17816, 9630, 20520 ]
2.428571
7
from uuid import uuid4 import time import docker import pytest @pytest.fixture(scope='session') def root_directory(request): """Return the project root directory so the docker API can locate the Dockerfile""" return str(request.config.rootdir) @pytest.fixture(scope='session') def session_uuid() -> str: ...
[ 6738, 334, 27112, 1330, 334, 27112, 19, 198, 11748, 640, 198, 11748, 36253, 198, 11748, 12972, 9288, 628, 198, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 11639, 29891, 11537, 198, 4299, 6808, 62, 34945, 7, 25927, 2599, 198, 220, 220...
3.275168
149
# Generated by Django 3.1.13 on 2021-07-29 13:49 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 1485, 319, 33448, 12, 2998, 12, 1959, 1511, 25, 2920, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, ...
3.038462
52
import unittest import unittest.mock from programy.storage.entities.braintree import BraintreeStore
[ 11748, 555, 715, 395, 198, 11748, 555, 715, 395, 13, 76, 735, 198, 198, 6738, 1430, 88, 13, 35350, 13, 298, 871, 13, 1671, 2913, 631, 1330, 1709, 2913, 631, 22658, 198 ]
3.15625
32
import os import pytorch_lightning as pl from dgl.nn.pytorch import GATConv from pytorch_lightning.callbacks import ModelCheckpoint, EarlyStopping, LearningRateMonitor from torch.nn import BCEWithLogitsLoss, ModuleList from torch.nn.functional import elu from torch.optim import Adam from torchmetrics import F1 from p...
[ 11748, 28686, 198, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 6738, 288, 4743, 13, 20471, 13, 9078, 13165, 354, 1330, 402, 1404, 3103, 85, 198, 6738, 12972, 13165, 354, 62, 2971, 768, 13, 13345, 10146, 1330, 9104, 97...
2.44175
2,103
#MIT License # #Copyright (c) 2017 Tom van Ommeren # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, pu...
[ 2, 36393, 13789, 198, 2, 198, 2, 15269, 357, 66, 8, 2177, 4186, 5719, 440, 3020, 14226, 198, 2, 198, 2, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 1659, 428, 3788, 290, 3917, ...
3.711974
309
import json import string import time import pandas as pd from datetime import timedelta, datetime from random import randint, uniform, choice, randrange, choices def random_time_range(start, end, file_format, prop): """Get a time at a proportion of a range of two formatted times. start and end should be st...
[ 11748, 33918, 198, 11748, 4731, 198, 11748, 640, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 11, 4818, 8079, 198, 6738, 4738, 1330, 43720, 600, 11, 8187, 11, 3572, 11, 43720, 9521, 11, 7747, 6...
3.01699
412
from time import time import joblib import matplotlib.pyplot as plt import numpy as np from sklearn import decomposition from sklearn import metrics from sklearn.cluster import KMeans from sklearn.decomposition import PCA from sklearn.ensemble import RandomForestRegressor from sklearn.linear_model import LinearRegressi...
[ 6738, 640, 1330, 640, 198, 11748, 1693, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 1330, 26969, 9150, 198, 6738, 1341, 35720, 1330, 20731, 198, 6738, 1...
3.642308
260
from investmentGame.Order import Order #from investmentGame.Portfolio import Portfolio from sqlalchemy import Column, Integer, String, Boolean from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base from investmentGame.db import Base #User(name='Jeroen', age=26, balance=20)#, p...
[ 6738, 4896, 8777, 13, 18743, 1330, 8284, 198, 2, 6738, 4896, 8777, 13, 13924, 13652, 1330, 4347, 13652, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 11, 10903, 11, 41146, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, ...
3.522936
109
import re import sys JIRA_ID_REGEX = re.compile(r"[A-Z]+-\d+") MISSING_JIRA_ID_MSG = """ Commit message is missing [JIRA task id]. Include [JIRA task id] in commit message, like so: ################################# ABC-123 this is my commit message ################################# where ABC-123 is a sample [JIRA t...
[ 11748, 302, 198, 11748, 25064, 198, 198, 41, 40, 3861, 62, 2389, 62, 31553, 6369, 796, 302, 13, 5589, 576, 7, 81, 17912, 32, 12, 57, 48688, 12, 59, 67, 10, 4943, 198, 198, 44, 16744, 2751, 62, 41, 40, 3861, 62, 2389, 62, 5653, ...
2.659306
317
# -*- coding: utf-8 -*- # # Copyright (C) 2021 Graz University of Technology. # # invenio-records-lom is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Permission-config classes for LOMRecordService-objects.""" from invenio_records_p...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 33448, 402, 3247, 2059, 286, 8987, 13, 198, 2, 198, 2, 287, 574, 952, 12, 8344, 3669, 12, 75, 296, 318, 1479, 3788, 26, 345, 460, 1...
3.236
250
# Leia a distancia da viagem e calcule o valor da passagem d = float(input('Informe a distância da sua viagem: ')) if d <= 200: p = d * 0.5 else: p = d * 0.45 print('Para uma viagem de {}, você pagará R$ {:.2f}'.format(d, p))
[ 2, 41212, 257, 1233, 1192, 544, 12379, 25357, 363, 368, 304, 2386, 23172, 267, 1188, 273, 12379, 1208, 363, 368, 198, 198, 67, 796, 12178, 7, 15414, 10786, 818, 687, 68, 257, 1233, 22940, 10782, 544, 12379, 424, 64, 25357, 363, 368, ...
2.155963
109
from typing import List, Optional, Union from vgdb.evaluator import Evaluator from vgdb.lexer import Lexer from vgdb.parser import Parser from vgdb.statement import CreateTable, Insert, Select from vgdb.table import Table
[ 6738, 19720, 1330, 7343, 11, 32233, 11, 4479, 198, 198, 6738, 410, 70, 9945, 13, 18206, 84, 1352, 1330, 26439, 84, 1352, 198, 6738, 410, 70, 9945, 13, 2588, 263, 1330, 17210, 263, 198, 6738, 410, 70, 9945, 13, 48610, 1330, 23042, 26...
3.343284
67
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 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.985102
537
# -*- coding: utf-8 -*- import _locale _locale._getdefaultlocale = (lambda *args: ['zh_CN', 'utf8']) import io import os import sys import six import signal from tccli.log import init from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException try: reload(sys) # Python 2.7 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4808, 17946, 1000, 198, 62, 17946, 1000, 13557, 1136, 12286, 17946, 1000, 796, 357, 50033, 1635, 22046, 25, 37250, 23548, 62, 44175, 3256, 705, 40477, 23, 6, ...
2.701408
355
from product_app.models import Book
[ 6738, 1720, 62, 1324, 13, 27530, 1330, 4897, 198 ]
4
9
from .user import User # noqa from .profiles import Profile # noqa
[ 6738, 764, 7220, 1330, 11787, 220, 1303, 645, 20402, 198, 6738, 764, 5577, 2915, 1330, 13118, 220, 1303, 645, 20402, 198 ]
3.285714
21
#!/home/jason/oss/asus-rt-n14uhp-mrtg/tmp/ve_asus-rt-n14uhp-mrtg/bin/python3.4 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
[ 2, 48443, 11195, 14, 73, 888, 14, 793, 14, 40895, 12, 17034, 12, 77, 1415, 7456, 79, 12, 76, 17034, 70, 14, 22065, 14, 303, 62, 40895, 12, 17034, 12, 77, 1415, 7456, 79, 12, 76, 17034, 70, 14, 8800, 14, 29412, 18, 13, 19, 198,...
2.3125
80
from __future__ import print_function import sys import re ######################################################## ############### PRODUCERS ############################## ######################################################## class Producer(object): """ Log producer API which sends messages to be logged ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 25064, 198, 11748, 302, 628, 198, 29113, 14468, 7804, 198, 7804, 4242, 21017, 4810, 3727, 9598, 4877, 1303, 14468, 7804, 4242, 2, 198, 29113, 14468, 7804, 628, 198, 4871, 30436, ...
4.47093
172