content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
"""C/C++ parser frontend based on libclang""" import argparse import logging import sys _LOGGER = logging.getLogger(__name__)
[ 37811, 34, 14, 34, 4880, 30751, 2166, 437, 1912, 319, 9195, 565, 648, 37811, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 62, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198 ...
3.071429
42
import logging import sys import time from pgscout.Scout import Scout from pgscout.config import use_pgpool from pgscout.utils import load_pgpool_accounts log = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 23241, 1416, 448, 13, 3351, 448, 1330, 22529, 198, 6738, 23241, 1416, 448, 13, 11250, 1330, 779, 62, 6024, 7742, 198, 6738, 23241, 1416, 448, 13, 26791, 1330, 3440, 62, ...
3.147541
61
#!/usr/bin/env python # -*- coding: utf-8 -*- from graphene import relay, ObjectType, String from graphene_django.types import DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField from legislative import models as LM
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42463, 1330, 24248, 11, 9515, 6030, 11, 10903, 198, 6738, 42463, 62, 28241, 14208, 13, 19199, 1330, 37770, 10267, ...
3.701493
67
""" Most local cited authors in references =============================================================================== See :doc:`column indicators <column_indicators>` to obtain a `pandas.Dataframe` with the data. Use the following code: .. code:: python column_indicators( column="authors", ...
[ 37811, 198, 6943, 1957, 9181, 7035, 287, 10288, 198, 23926, 25609, 18604, 198, 198, 6214, 1058, 15390, 25, 63, 28665, 21337, 1279, 28665, 62, 521, 44549, 29, 63, 284, 7330, 257, 4600, 79, 392, 292, 13, 6601, 14535, 63, 220, 198, 4480,...
3.042471
259
""" Script for analyzing theoretical bounds on model's recall """ import argparse import sys import yaml import tqdm import net.data import net.ssd import net.utilities def analyse_theoretical_performance(config, ssd_model_configuration): """ Analyse theoretical performance of SSD model on VOC dataset ...
[ 37811, 198, 7391, 329, 22712, 16200, 22303, 319, 2746, 338, 10014, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 198, 11748, 331, 43695, 198, 11748, 256, 80, 36020, 198, 198, 11748, 2010, 13, 7890, 198, 11748, 2010, ...
2.723343
694
import sys from time import sleep import numpy as np from beamngpy.beamngcommon import * import time import random, copy import math import matplotlib.pyplot as plt from matplotlib.pyplot import figure from matplotlib.pyplot import imshow import pandas as pd import seaborn as sn import matplotlib.pyplot as plt from sci...
[ 11748, 25064, 198, 6738, 640, 1330, 3993, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 15584, 782, 9078, 13, 40045, 782, 11321, 1330, 1635, 198, 11748, 640, 198, 11748, 4738, 11, 4866, 198, 11748, 10688, 198, 11748, 2603, 29487, 8019, ...
3.33557
149
from typing import Callable from benchmarking import benchmark @benchmark @benchmark @benchmark
[ 6738, 19720, 1330, 4889, 540, 198, 198, 6738, 18335, 278, 1330, 18335, 628, 198, 31, 26968, 4102, 628, 198, 198, 31, 26968, 4102, 628, 628, 198, 31, 26968, 4102, 628, 628 ]
3.516129
31
from flask import Flask, render_template, request, redirect, url_for # Init app app = Flask(__name__) db = [] # URI, endpoint @app.route('/', methods=['GET', 'POST']) @app.route('/delete/<task>', methods=['GET']) # Update list # @app.route('/update/<task>', methods=['GET']) # def update(task): # num = db.in...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 11, 19016, 62, 1640, 198, 198, 2, 44707, 598, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 9945, 796, 17635, 628, 198, 2, 43975, 11, 36123, 198, 31, 132...
2.415842
202
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Christian Heider Nielsen" import logging from enum import Enum, auto from functools import wraps
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 366, 20298, 679, 1304, 31154, 1, 198, 198, 11748, 18931, 198, 6738, 33829, 1330, 2039, 388, ...
2.927273
55
import warnings from django.test import SimpleTestCase from django.utils.deprecation import RemovedInDjango20Warning from django.utils.safestring import mark_safe from ..utils import render, setup
[ 11748, 14601, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 6738, 42625, 14208, 13, 26791, 13, 10378, 8344, 341, 1330, 28252, 818, 35, 73, 14208, 1238, 20361, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, ...
3.636364
55
import numpy as np n=int(input("Dimension de la matriz: ")) print(np.identity(n))
[ 11748, 299, 32152, 355, 45941, 220, 201, 198, 201, 198, 77, 28, 600, 7, 15414, 7203, 29271, 3004, 390, 8591, 2603, 47847, 25, 366, 4008, 201, 198, 201, 198, 4798, 7, 37659, 13, 738, 414, 7, 77, 4008 ]
2.315789
38
# 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, software # distributed under t...
[ 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, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
2.951368
329
import warnings warnings.warn( "datalad.plugin.wtf is deprecated and will be removed in a future " "release. " "Use the module from its new location datalad.local.wtf instead.", DeprecationWarning) from datalad.local.wtf import *
[ 11748, 14601, 198, 198, 40539, 654, 13, 40539, 7, 198, 220, 220, 220, 366, 67, 10254, 324, 13, 33803, 13, 86, 27110, 318, 39224, 290, 481, 307, 4615, 287, 257, 2003, 366, 198, 220, 220, 220, 366, 20979, 13, 366, 198, 220, 220, 220...
2.917647
85
from typing import List, Tuple, Dict, Any from PIL import Image
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 360, 713, 11, 4377, 198, 6738, 350, 4146, 1330, 7412, 198 ]
3.368421
19
""" mfoc module. Contains the ModflowOc class. Note that the user can access the ModflowOc class as `flopy.modflow.ModflowOc`. Additional information for this MODFLOW package can be found at the `Online MODFLOW Guide <http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?oc.htm>`_. """ import sy...
[ 37811, 201, 198, 76, 69, 420, 8265, 13, 220, 49850, 262, 3401, 11125, 46, 66, 1398, 13, 5740, 326, 262, 2836, 460, 1895, 201, 198, 1169, 3401, 11125, 46, 66, 1398, 355, 4600, 2704, 11081, 13, 4666, 11125, 13, 5841, 11125, 46, 66, ...
1.759954
12,935
from typing import List NeuronSchema = List[float] LayerSchema = List[NeuronSchema] NetworkSchema = List[LayerSchema]
[ 6738, 19720, 1330, 7343, 198, 198, 8199, 44372, 27054, 2611, 796, 7343, 58, 22468, 60, 198, 49925, 27054, 2611, 796, 7343, 58, 8199, 44372, 27054, 2611, 60, 198, 26245, 27054, 2611, 796, 7343, 58, 49925, 27054, 2611, 60, 198 ]
3.051282
39
import os from copy import copy from typing import Any, AsyncIterator, Dict, Iterator, Optional, Union, cast from pydantic import BaseModel, FilePath, validator from starlette.datastructures import State as StarletteStateClass
[ 11748, 28686, 198, 6738, 4866, 1330, 4866, 198, 6738, 19720, 1330, 4377, 11, 1081, 13361, 37787, 11, 360, 713, 11, 40806, 1352, 11, 32233, 11, 4479, 11, 3350, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 9220, 15235, 11, 49...
3.714286
63
# # Author: Daniel G. A. Smith # Created: 6/15/14 # Original content from: # http://sirius.chem.vt.edu/wiki/doku.php?id=crawdad:programming # import numpy as np from scipy import linalg as SLA #Setup a few constats for the HF computation nuclear = 8.002367061810450 ndocc = 5 print 'Reading in integrals...' # Read i...
[ 2, 198, 2, 6434, 25, 7806, 402, 13, 317, 13, 4176, 198, 2, 15622, 25, 718, 14, 1314, 14, 1415, 198, 2, 13745, 2695, 422, 25, 198, 2, 2638, 1378, 82, 343, 3754, 13, 15245, 13, 36540, 13, 15532, 14, 15466, 14, 67, 11601, 13, 101...
2.042702
1,569
#!/usr/bin/env python # -*- coding: utf-8 -*- """Define the rhythmic dynamic movement primitive. """ import numpy as np from pyrobolearn.models.dmp.canonical_systems import RhythmicCS from pyrobolearn.models.dmp.forcing_terms import RhythmicForcingTerm from pyrobolearn.models.dmp.dmp import DMP __author__ = "Brian D...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 7469, 500, 262, 14405, 9383, 8925, 3356, 20049, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 19...
2.442894
1,935
""" Unit tests for the Fragment class. Note: this class has been deprecated in favor of web_fragments.fragment.Fragment """ from __future__ import absolute_import, division, print_function, unicode_literals from unittest import TestCase from xblock.fragment import Fragment class TestFragment(TestCase): """ ...
[ 37811, 198, 26453, 5254, 329, 262, 24229, 434, 1398, 13, 198, 198, 6425, 25, 428, 1398, 468, 587, 39224, 287, 2661, 286, 3992, 62, 8310, 363, 902, 13, 8310, 363, 434, 13, 42974, 434, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 13...
2.624
250
from __future__ import print_function import torch import time from tqdm import tqdm from .util import AverageMeter, accuracy import numpy as np def validate(val_loader, model, criterion, opt): """One epoch validation""" batch_time = AverageMeter() losses = AverageMeter() top1 = AverageMeter() top...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28034, 198, 11748, 640, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 764, 22602, 1330, 13475, 44, 2357, 11, 9922, 198, 11748, 299, 32152, 355, 45941, 198, ...
1.609842
5,121
import PyPDF2 import re # Function that extracts the text from the supplied PDF and return the contents as a massive string. # Function that takes a list of text ex. ['this', 'is', 'how', 'the', 'data', 'would', 'look'] # and iterate over that list to return a new list that groups exam objectives properly. # Functio...
[ 11748, 9485, 20456, 17, 198, 11748, 302, 198, 198, 2, 15553, 326, 32139, 262, 2420, 422, 262, 14275, 12960, 290, 1441, 262, 10154, 355, 257, 4858, 4731, 13, 198, 198, 2, 15553, 326, 2753, 257, 1351, 286, 2420, 409, 13, 37250, 5661, ...
3.776398
161
# MEMBER CAPACITY OF SEGMENTS WITHOUT FULL LATERAL RESTRAINT # IN ACCORDANCE WITH AS4100-1998 - SECTION 5.6 # # V1.0 - 04/12/2020 by D.HILL from userInputs import * from alpha_m import * from alpha_s import * # Calculate Alpha M print("Alpha_m = " + str((alpha_m_moment()))) # Calculate Alpha S buckling_moment()
[ 2, 337, 28952, 20176, 2246, 9050, 3963, 311, 7156, 28957, 42881, 34958, 406, 23261, 1847, 30617, 3861, 12394, 198, 2, 3268, 15859, 12532, 19240, 13315, 7054, 19, 3064, 12, 21113, 532, 44513, 642, 13, 21, 198, 2, 198, 2, 569, 16, 13, ...
2.732759
116
from django.contrib.auth.models import User from django.utils import timezone from model_utils import Choices from pygments.lexers import get_all_lexers from pygments.styles import get_all_styles from django.contrib.auth.models import AbstractUser from django.db import models LEXERS = [item for item in get_all_lexers(...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 2746, 62, 26791, 1330, 10031, 1063, 198, 6738, 12972, 11726, 13, 2588, 364, 1330, 651, 62, 439, 62, ...
2.822222
315
import RPi.GPIO as GPIO BUTTON_PIN = 4 if __name__ == '__main__': setup() while True: GPIO.wait_for_edge(BUTTON_PIN, GPIO.RISING) print('button!')
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 198, 47526, 11357, 62, 44032, 796, 604, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 9058, 3419, 198, 220, 220, 220, 981, 6407, 25, 198, ...
2.123457
81
import typing import importlib, importlib.resources from markupsafe import Markup from .templating import set_template_global
[ 11748, 19720, 198, 11748, 1330, 8019, 11, 1330, 8019, 13, 37540, 198, 198, 6738, 1317, 4739, 8635, 1330, 2940, 929, 198, 198, 6738, 764, 11498, 489, 803, 1330, 900, 62, 28243, 62, 20541, 628, 198 ]
3.714286
35
from generator import Generator import numpy as np, random np.set_printoptions(precision=4, suppress=True, linewidth=132) from tensorflow import keras from tensorflow.keras.layers import LSTM, Dense, Input from tensorflow.keras import Model from tensorflow.keras.optimizers import Adagrad if __name__ == '__main_...
[ 6738, 17301, 1330, 35986, 198, 11748, 299, 32152, 355, 45941, 11, 4738, 198, 198, 37659, 13, 2617, 62, 4798, 25811, 7, 3866, 16005, 28, 19, 11, 18175, 28, 17821, 11, 9493, 413, 5649, 28, 19924, 8, 198, 198, 6738, 11192, 273, 11125, ...
2.701031
194
"""Align reads with STAR aligner.""" import gzip import shutil from pathlib import Path from plumbum import TEE from resolwe.process import ( BooleanField, Cmd, DataField, FileField, FloatField, GroupField, IntegerField, Process, SchedulingClass, StringField, ) SPECIES = [ ...
[ 37811, 2348, 570, 9743, 351, 25424, 10548, 263, 526, 15931, 198, 11748, 308, 13344, 198, 11748, 4423, 346, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 458, 2178, 388, 1330, 309, 6500, 198, 198, 6738, 581, 349, 732, 13, 14681, ...
2.127331
13,673
import collections import contextlib import logging import struct import time from datetime import datetime from bluepy import btle _LOGGER = logging.getLogger(__name__) UUID_UNITS = 'EBE0CCBE-7A0A-4B0C-8A1A-6FF2997DA3A6' # 0x00 - F, 0x01 - C READ WRITE UUID_HISTORY = 'EBE0CCBC-7A0A-4B0C-8A1A-6FF2997DA3A6' ...
[ 11748, 17268, 198, 11748, 4732, 8019, 198, 11748, 18931, 198, 11748, 2878, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 4171, 9078, 1330, 275, 7100, 198, 198, 62, 25294, 30373, 796, 18931, 13, 1136, 11187, 1...
1.819572
327
from itertools import takewhile, combinations start = 40756 tg = triangle_generator(start) pg = pentagonal_generator(start) hg = hexagonal_generator(start) p = pg.next() t = tg.next() for h in hg: while p < h: p = pg.next() if p != h: continue while t < h: t = tg.next() if t == h: print h
[ 6738, 340, 861, 10141, 1330, 1011, 4514, 11, 17790, 198, 198, 9688, 796, 2319, 38219, 198, 25297, 796, 22950, 62, 8612, 1352, 7, 9688, 8, 198, 6024, 796, 28145, 27923, 62, 8612, 1352, 7, 9688, 8, 198, 71, 70, 796, 17910, 27923, 62, ...
2.383459
133
import re import json import sys if len(sys.argv) > 1: fpath = sys.argv[1] else: fpath = 'galaxy-builder-subjects.csv' try: with open(fpath) as f: classificationCsv = f.read().split('\n')[1:] except FileNotFoundError: print('No subjects file found, exiting') sys.exit(0)
[ 11748, 302, 198, 11748, 33918, 198, 11748, 25064, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 1875, 352, 25, 198, 220, 220, 220, 277, 6978, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 17772, 25, 198, 220, 220, 220, 277, 6978, ...
2.351563
128
# -*- coding: utf-8 -*- from typing import Dict, Any from json import loads from pathlib import Path import logging
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 198, 6738, 33918, 1330, 15989, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 18931, 628, 198 ]
3.131579
38
# SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the Rez Project import os.path from rez.build_process import BuildType from rez.exceptions import BuildSystemError from rez.packages import get_developer_package from rez.rex_bindings import VariantBinding def get_buildsys_types(): """Returns th...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 15069, 25767, 669, 284, 262, 47753, 4935, 628, 198, 11748, 28686, 13, 6978, 198, 198, 6738, 302, 89, 13, 11249, 62, 14681, 1330, 10934, 6030, 198, 6738, ...
2.235092
6,104
# Description: Exception Handling Using Try-Except Block import sys random_list = ["a", 0, 2, "#", 33] for item in random_list: try: reciprocal = 1 / int(item) print("The reciprocal {} is {}".format(item, reciprocal)) except ValueError: # Handle one exception type ValueError p...
[ 2, 12489, 25, 35528, 49500, 8554, 9993, 12, 30313, 9726, 198, 198, 11748, 25064, 198, 198, 25120, 62, 4868, 796, 14631, 64, 1600, 657, 11, 362, 11, 25113, 1600, 4747, 60, 198, 198, 1640, 2378, 287, 4738, 62, 4868, 25, 198, 220, 220,...
2.731915
235
''' @author: redtree @contact: redtreec@gmail.com @time: 17-12-28 上午11:17 @desc: '''
[ 7061, 6, 198, 198, 31, 9800, 25, 2266, 21048, 198, 198, 31, 32057, 25, 2266, 21048, 66, 31, 14816, 13, 785, 198, 198, 31, 2435, 25, 1596, 12, 1065, 12, 2078, 220, 41468, 39355, 230, 1157, 25, 1558, 198, 198, 31, 20147, 25, 198, ...
1.893617
47
# Copyright 2017 Huawei Technologies Co.,LTD. # 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 # # Unl...
[ 2, 15069, 2177, 43208, 21852, 1766, 1539, 43, 21016, 13, 198, 2, 1439, 6923, 33876, 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...
2.317793
1,287
# Generated by Django 3.1.7 on 2021-04-09 21:35 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3023, 12, 2931, 2310, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
2.926829
41
from setuptools import * with open("README.md", "r") as fh: long_description = fh.read() my_packages=find_packages() setup( name = 'bitsbehumble', packages = my_packages, version = '0.5', long_description=long_description, long_description_content_type="text/markdown", author = 'Aly...
[ 198, 6738, 900, 37623, 10141, 1330, 1635, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 1820, 62, 43789, 28, 1...
2.576577
333
# Note: Read and understand https://gitlab.sd2e.org/sd2program/python-datacatalog/merge_requests/190 # Before running! import pymongo from datacatalog.identifiers.typeduuid import catalog_uuid # Update this to target production # This should only need to be done once dbURI = "mongodb://catalog:catalog@localhost:2701...
[ 2, 5740, 25, 4149, 290, 1833, 3740, 1378, 18300, 23912, 13, 21282, 17, 68, 13, 2398, 14, 21282, 17, 23065, 14, 29412, 12, 19608, 330, 10254, 519, 14, 647, 469, 62, 8897, 3558, 14, 19782, 220, 198, 2, 7413, 2491, 0, 198, 198, 11748...
2.292197
1,807
from django.shortcuts import render from django.views.generic.base import TemplateView from rest_framework import generics, permissions, parsers from rest_framework_docs.api_docs import ApiDocumentation from rest_framework_docs.settings import DRFSettings from api.serializers import ( IndividualSerializer, I...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 8692, 1330, 37350, 7680, 198, 198, 6738, 1334, 62, 30604, 1330, 1152, 873, 11, 21627, 11, 13544, 364, 198, 198, 6738, 1334, 62, 30604, ...
3.107692
195
# # Version 0.1 (c) 2018 Jouni Korhonen # # #import exceptions import rrcconfig as rrc import nasconfig as nas import math as m # See 36.304 subclause 7.2 # i_s=0 i_s=1 i_s=2 i_s=3 sf_pattern_npdcch_or_mpdcch_gt_3MHz_fdd = ( (9, None, None, None), # Ns = 1 (4, 9, None, None), # Ns...
[ 2, 198, 2, 10628, 657, 13, 16, 357, 66, 8, 2864, 449, 977, 72, 14769, 24130, 268, 198, 2, 198, 2, 198, 198, 2, 11748, 13269, 198, 11748, 374, 81, 535, 261, 5647, 355, 374, 6015, 198, 11748, 25221, 11250, 355, 25221, 198, 11748, ...
1.566547
556
from flask import Blueprint, render_template, flash, request, redirect, url_for, jsonify, abort from app.extensions import cache, pages from app.tasks import long_task import flam3, io, base64, struct from PIL import Image main = Blueprint('main', __name__) @main.route('/') @cache.cached(timeout=1000) @main.route(...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 7644, 11, 2581, 11, 18941, 11, 19016, 62, 1640, 11, 33918, 1958, 11, 15614, 198, 6738, 598, 13, 2302, 5736, 1330, 12940, 11, 5468, 198, 6738, 598, 13, 83, 6791, 1330, 890, 62, 35943...
2.632035
231
""" viektup.py by Ted Morin viektup <= visual interactive kektup a class for visualizing Barnette graphs via interactive visualization """ import numpy as np from vektup import Vektup from iektup import Iektup # event to call when an edge is clicked on (or "picked") # handle details of selecting an...
[ 37811, 198, 85, 494, 21841, 929, 13, 9078, 198, 1525, 11396, 3461, 259, 198, 198, 85, 494, 21841, 929, 19841, 5874, 14333, 885, 21841, 929, 198, 198, 64, 1398, 329, 5874, 2890, 11842, 5857, 28770, 2884, 14333, 32704, 198, 37811, 198, ...
2.740196
204
import collections
[ 11748, 17268, 628 ]
6.666667
3
import dtlpy as dl dataset_id = '' annotations_path = r'' # make sure they have the same hierarchy dataset = dl.datasets.get(dataset_id=dataset_id) # clean: bool - if True it remove the old annotations # remote_root_path: str - the remote root path to match remote and local items dataset.upload_annotations(local_path...
[ 11748, 288, 28781, 9078, 355, 288, 75, 198, 198, 19608, 292, 316, 62, 312, 796, 10148, 198, 34574, 602, 62, 6978, 796, 374, 7061, 198, 198, 2, 787, 1654, 484, 423, 262, 976, 18911, 198, 19608, 292, 316, 796, 288, 75, 13, 19608, 29...
2.992
125
"""Threshold the original TetMesh with a scalar array""" from vedo import * settings.useDepthPeeling = True tetm = TetMesh(dataurl+'limb_ugrid.vtk') tetm.color('prism').alpha([0,1]) # Threshold the tetrahedral mesh for values in the range: tetm.threshold(above=0.9, below=1) tetm.addScalarBar3D(title='chem_0 express...
[ 37811, 817, 10126, 262, 2656, 27351, 37031, 198, 4480, 257, 16578, 283, 7177, 37811, 198, 6738, 410, 24757, 1330, 1635, 198, 198, 33692, 13, 1904, 48791, 6435, 10809, 796, 6407, 198, 198, 83, 316, 76, 796, 27351, 37031, 7, 7890, 6371, ...
2.344086
186
import asyncio import aiohttp text = asyncio.run(main()) # Assuming you're using python 3.7+ print(text)
[ 11748, 30351, 952, 198, 11748, 257, 952, 4023, 628, 198, 198, 5239, 796, 30351, 952, 13, 5143, 7, 12417, 28955, 220, 1303, 33238, 345, 821, 1262, 21015, 513, 13, 22, 10, 198, 4798, 7, 5239, 8, 198 ]
2.945946
37
#!/usr/bin/env python """SWIG Static Binding Copier This script copies over the Python bindings generated by SWIG from the build directory to the source directory. Before using the script, make sure you have LLDB_USE_STATIC_BINDINGS set to OFF by looking at CMakeCache.txt in the LLDB build directory. The scripts kno...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 17887, 3528, 36125, 38904, 6955, 959, 198, 198, 1212, 4226, 9088, 625, 262, 11361, 34111, 7560, 416, 12672, 3528, 422, 262, 1382, 198, 34945, 284, 262, 2723, 8619, 13, 7413, ...
3.761658
193
import requests # Request URL from the user input url = input("Insert URL: ") # Set up and make the test ready for print x = requests.head(url) # Print the callback print(x.headers)
[ 11748, 7007, 201, 198, 201, 198, 2, 19390, 10289, 422, 262, 2836, 5128, 201, 198, 6371, 796, 5128, 7203, 44402, 10289, 25, 366, 8, 201, 198, 201, 198, 2, 5345, 510, 290, 787, 262, 1332, 3492, 329, 3601, 201, 198, 87, 796, 7007, 13...
3.015625
64
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 628 ]
2.790698
43
from __future__ import generator_stop from utils import check_on_input PRINT_BARE = ( """\ print """, """\ from __future__ import print_function print() """, ) PRINT_SIMPLE = ( """\ print 'Hello' """, """\ from __future__ import print_function print('Hello') """, ) PRINT_MULTIPLE = ( """\ print ...
[ 6738, 11593, 37443, 834, 1330, 17301, 62, 11338, 198, 198, 6738, 3384, 4487, 1330, 2198, 62, 261, 62, 15414, 198, 198, 4805, 12394, 62, 33, 12203, 796, 357, 198, 220, 220, 220, 37227, 59, 198, 4798, 198, 15931, 1600, 198, 220, 220, ...
2.406015
399
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """Initialize package.""" from flask import redirect, url_for from flask import session as login_session from functools import wraps def login_required(f): """Check if user is authenticated.""" @wraps(f) return wrap
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 24243, 1096, 5301, 526, 15931, 198, 198, 6738, 42903, 1330, 18941, 11, 19016, 62, 1640, 198, ...
2.907216
97
import dissertate c = get_config() c.Exporter.preprocessors = ['dissertate.preprocessors.CellElider', 'dissertate.preprocessors.EmptyCellElider'] c.Exporter.template_file = dissertate.markdown_template_path()
[ 11748, 6249, 861, 378, 198, 198, 66, 796, 651, 62, 11250, 3419, 198, 198, 66, 13, 3109, 26634, 13, 3866, 14681, 669, 796, 37250, 67, 747, 861, 378, 13, 3866, 14681, 669, 13, 28780, 9527, 1304, 3256, 198, 220, 220, 220, 220, 220, 2...
2.330097
103
import os import json import base64 import string from time import time from uuid import uuid4 from pathlib import Path from traceback import format_exc from contextlib import suppress import rollbar import boto3 from botocore.config import Config from cryptography.hazmat.primitives.hashes import SHA256 from cryptogr...
[ 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 2779, 2414, 198, 11748, 4731, 198, 6738, 640, 1330, 640, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 12854, 1891, 1330, 5794, 62, 41194, 1...
2.532987
7,518
# Copyright (c) 2017 Thierry Kleist # # MIT License # # 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, merg...
[ 2, 15069, 357, 66, 8, 2177, 536, 959, 563, 15983, 396, 198, 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2, 257, 4866, 286, 428, 3788, 290, 3917, 103...
3.793201
353
# TODO; input type verification # Adds an weighted unidirectional edge to another existing node # TODO: add verification that node exists # Returns all of the edges connected to the current node # Returns the weight of the edge connected the specified node to the current node
[ 198, 197, 2, 16926, 46, 26, 5128, 2099, 19637, 628, 197, 2, 34333, 281, 26356, 555, 312, 4154, 282, 5743, 284, 1194, 4683, 10139, 198, 197, 2, 16926, 46, 25, 751, 19637, 326, 10139, 7160, 628, 197, 2, 16409, 477, 286, 262, 13015, ...
4.348485
66
import logging import os import queue import random import re from args import get_setup_args import shutil import string import setup import torch import torch.nn.functional as F import torch.utils.data as data from collections import Counter import tqdm import numpy as np import ujson as json import spacy import json...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 16834, 198, 11748, 4738, 198, 11748, 302, 198, 6738, 26498, 1330, 651, 62, 40406, 62, 22046, 198, 11748, 4423, 346, 198, 11748, 4731, 198, 11748, 9058, 198, 11748, 28034, 198, 11748, 28034, 13,...
2.946429
168
# from './localizer' import localizer import localizer import helpers test_sense()
[ 2, 422, 705, 19571, 12001, 7509, 6, 1330, 1957, 7509, 198, 11748, 1957, 7509, 198, 11748, 49385, 628, 198, 198, 9288, 62, 33819, 3419, 198 ]
3.44
25
# Generated by Django 2.1.7 on 2019-02-23 18:47 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 2999, 12, 1954, 1248, 25, 2857, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
command = input() company_users = {} # add all company users in dictionary while command != "End": command = command.split(" -> ") company = command[0] users = command[1] company_users.setdefault(company, []).append(users) command = input() # remove duplicating users for k, v in company_users.i...
[ 21812, 796, 5128, 3419, 198, 39722, 62, 18417, 796, 23884, 198, 198, 2, 751, 477, 1664, 2985, 287, 22155, 198, 4514, 3141, 14512, 366, 12915, 1298, 628, 220, 220, 220, 3141, 796, 3141, 13, 35312, 7203, 4613, 366, 8, 198, 220, 220, 2...
2.75
228
import copy from django.contrib.auth import authenticate, get_user_model from django.contrib.auth import get_user_model from django.template.loader import render_to_string from oidcendpoint.util import instantiate from oidcendpoint.user_authn.user import (create_signed_jwt, v...
[ 11748, 4866, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 28243...
2.212441
1,704
from collections import Hashable from typing import Union, Any, TypeVar, Optional, Tuple, List from foxylib.tools.native.typing._typing_tool_helper import is_instance, \ is_subtype, is_generic T = TypeVar("T")
[ 6738, 17268, 1330, 21059, 540, 198, 6738, 19720, 1330, 4479, 11, 4377, 11, 5994, 19852, 11, 32233, 11, 309, 29291, 11, 7343, 198, 198, 6738, 21831, 2645, 571, 13, 31391, 13, 30191, 13, 774, 13886, 13557, 774, 13886, 62, 25981, 62, 297...
3.041667
72
from ..core import Menu from . import ItemListEdit from . import ChooseList
[ 6738, 11485, 7295, 1330, 21860, 198, 6738, 764, 1330, 9097, 8053, 18378, 198, 6738, 764, 1330, 17489, 8053, 198 ]
4
19
from __future__ import print_function import clr import sys from System.IO import Path import time sys.path.append(Path.GetFullPath("C:\\ControlPrograms\\EDMSuite\\MOTMaster\\bin\\CaF\\")) clr.AddReference("C:\\ControlPrograms\\EDMSuite\\MOTMaster\\bin\\CaF\\MOTMaster.exe") sys.path.append(Path.GetFullPath("C:\\Cont...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 537, 81, 198, 11748, 25064, 198, 6738, 4482, 13, 9399, 1330, 10644, 198, 11748, 640, 628, 198, 17597, 13, 6978, 13, 33295, 7, 15235, 13, 3855, 13295, 15235, 7203, 34, 25, 6852...
3.20434
553
#------------------------------------------------------------------------------- # op2mark.py # # converting an operator to its mark # # Copyright (C) 2013, Shinya Takamaeda-Yamazaki # License: Apache 2.0 #------------------------------------------------------------------------------- operator_mark = { 'Uminus':'...
[ 2, 10097, 24305, 198, 2, 1034, 17, 4102, 13, 9078, 198, 2, 220, 198, 2, 23202, 281, 10088, 284, 663, 1317, 198, 2, 198, 2, 15069, 357, 34, 8, 2211, 11, 39657, 64, 15804, 1689, 18082, 12, 56, 321, 32276, 198, 2, 13789, 25, 24843,...
2.013629
587
#!/bin/python import sys import os import re import multiprocessing pool = multiprocessing.Pool(multiprocessing.cpu_count()) for f in os.listdir('graph_data/'): tmp = re.findall("orkut-edge-list_[0-9]+.txt", f) if len(tmp) != 0: pool.apply_async(work, (f,)) pool.close() pool.join()
[ 2, 48443, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 18540, 305, 919, 278, 628, 198, 7742, 796, 18540, 305, 919, 278, 13, 27201, 7, 16680, 541, 305, 919, 278, 13, 36166, 62, 9127, 28955, ...
2.351563
128
# python3 # waste/cli.py # Copyright Tim Littlefair 2020- # This file is open source software under the MIT license. # For terms of this license, see the file LICENSE in the source # code distribution or visit # https://opensource.org/licenses/mit-license.php # This file defines the command line interface of the ...
[ 2, 21015, 18, 220, 198, 2, 7030, 14, 44506, 13, 9078, 220, 198, 198, 2, 15069, 5045, 7703, 22043, 12131, 12, 198, 2, 770, 2393, 318, 1280, 2723, 3788, 739, 262, 17168, 5964, 13, 198, 2, 1114, 2846, 286, 428, 5964, 11, 766, 262, ...
2.520531
828
'''Gathers the module docs in `.py`. ''' import importlib from pathlib import Path TARGET_SUFFIXES = ('.py',) EXCLUDED_PREFIX = '_' TEMPLATE_ITEM = '- `{}`: {}' if __name__ == '__main__': main()
[ 7061, 6, 38, 1032, 82, 262, 8265, 34165, 287, 4600, 13, 9078, 44646, 198, 7061, 6, 198, 198, 11748, 1330, 8019, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 51, 46095, 62, 12564, 5777, 10426, 1546, 796, 357, 4458, 9078, 3256, 8, 19...
2.225806
93
#!/usr/bin/env python3 from collections import deque as _deque from collections import Iterable from itertools import islice, zip_longest as izip
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 6738, 17268, 1330, 390, 4188, 355, 4808, 2934, 4188, 201, 198, 6738, 17268, 1330, 40806, 540, 201, 198, 6738, 340, 861, 10141, 1330, 318, 75, 501, 11, 19974, 62, 6...
3.081633
49
# 1. c. Visualize the results from pathlib import Path import matplotlib.pyplot as plt output_folder = Path("output") # read intermediate results with open(output_folder / "xNumbers.txt",'r') as f: xNum = [int(ele.strip()) for ele in f.readlines()] with open(output_folder / "yNumbers.txt",'r') as f: yNum = ...
[ 2, 352, 13, 269, 13, 15612, 1096, 262, 2482, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 22915, 62, 43551, 796, 10644, 7203, 22915, 4943, 198, 198, 2, 1100, 19898, ...
2.590909
198
# Copyright (c) 2008, 2012 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014, 2016-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Arun Persaud <arun@nubati.net> # Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> # Copyright (c) 2018 Nick Drozd <nicholasdrozd@gmail.com> ...
[ 2, 15069, 357, 66, 8, 3648, 11, 2321, 41605, 4146, 6242, 311, 13, 32, 13, 357, 40313, 11, 8782, 19240, 8, 1279, 32057, 31, 6404, 346, 397, 13, 8310, 29, 198, 2, 15069, 357, 66, 8, 1946, 11, 1584, 12, 42334, 36303, 16115, 8099, 6...
2.632184
348
from unittest import mock import pytest from bottery.conf import (LazySettings, Settings, UserSettingsHolder, lazy_obj_method) @mock.patch('bottery.conf.Settings') @mock.patch('bottery.conf.sys') @mock.patch('bottery.conf.import_module') @mock.patch('bottery.conf.os.getcwd', retur...
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 10214, 11471, 13, 10414, 1330, 357, 43, 12582, 26232, 11, 16163, 11, 11787, 26232, 39, 19892, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.474684
158
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 31 18:30:53 2019 @author: bernier2 """ import os import numpy as np from hexrd import imageseries from skimage import io # dirs working_dir = '/Users/Shared/APS/PUP_AFRL_Feb19' image_dir = os.path.join(working_dir, 'image_data') samp_name = '...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 5979, 3261, 1248, 25, 1270, 25, 4310, 13130, 198, 198, 31, 9800, 25, 275, 1142, 959...
2.14652
546
# coding=utf-8 fHDHR_VERSION = "v0.3.0-beta"
[ 2, 19617, 28, 40477, 12, 23, 198, 69, 10227, 17184, 62, 43717, 796, 366, 85, 15, 13, 18, 13, 15, 12, 31361, 1, 198 ]
1.875
24
import unittest import os from pathlib import Path from normalize_license_text.normalize_class import NormalizeText from configuration.config import PACKAGE_PATH from compare_template_text.normalize_template_text import NormalizeTemplate from compare_template_text.compare_normalized_files import CompareNormalizedFiles...
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 3487, 1096, 62, 43085, 62, 5239, 13, 11265, 1096, 62, 4871, 1330, 14435, 1096, 8206, 198, 6738, 8398, 13, 11250, 1330, 47035, 11879, 62, 34219,...
2.900383
261
# coding=utf-8 """ The Clients API endpoint get Documentation: https://voip.ms/m/apidocs.php """ from voipms.baseapi import BaseApi class ClientsGet(BaseApi): """ Get for the Clients endpoint. """ def __init__(self, *args, **kwargs): """ Initialize the endpoint """ sup...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 464, 1012, 2334, 7824, 36123, 651, 198, 198, 24941, 341, 25, 3740, 1378, 13038, 541, 13, 907, 14, 76, 14, 499, 312, 420, 82, 13, 10121, 198, 37811, 198, 6738, 7608, 541, 907, 13, 8692,...
2.424155
2,426
from .mixins import VegaDisplayMixin from . import utils
[ 6738, 764, 19816, 1040, 1330, 30310, 23114, 35608, 259, 198, 6738, 764, 1330, 3384, 4487, 628, 198 ]
3.470588
17
import validators import aiohttp from typing import List from typing import Optional def check_url(url: str) -> Optional[bool]: """ This function checks is valid URL or not :param url: URL :return: True if is valid, else False """ if validators.url(url): return True return False ...
[ 11748, 4938, 2024, 198, 11748, 257, 952, 4023, 198, 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 32233, 628, 198, 4299, 2198, 62, 6371, 7, 6371, 25, 965, 8, 4613, 32233, 58, 30388, 5974, 198, 220, 220, 220, 37227, 198, 220, 220, ...
2.55814
602
import asyncio import socket import ssl from contextlib import asynccontextmanager from logging import getLogger from typing import Callable from tornado.iostream import IOStream from tornado.tcpserver import TCPServer from tornado.testing import bind_unused_port from cats.errors import CatsError from cats.utils impo...
[ 11748, 30351, 952, 198, 11748, 17802, 198, 11748, 264, 6649, 198, 6738, 4732, 8019, 1330, 355, 2047, 535, 261, 5239, 37153, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 19720, 1330, 4889, 540, 198, 198, 6738, 33718, 13, 72, 455,...
3.539326
178
import sys from pathlib import Path sys.path.append(str(Path('.').absolute().parent)) from helper_functions import encode_smiles, save_smiles_charcodes, canonize_smiles import pandas as pd import numpy as np def save_active_compounds(input_file, output_file, encode=True, longest_smiles=0, smiles_charcodes_file="data...
[ 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 17597, 13, 6978, 13, 33295, 7, 2536, 7, 15235, 10786, 2637, 737, 48546, 22446, 8000, 4008, 198, 6738, 31904, 62, 12543, 2733, 1330, 37773, 62, 5796, 2915, 11, 3613, 62, 5796, 2915, ...
2.47619
1,575
# SPDX-License-Identifier: BSD-3-Clause """Package version info.""" from typing import TYPE_CHECKING # On Python 3.8+, use importlib.metadata from the standard library. # On older versions, a compatibility package can be installed from PyPI. try: if not TYPE_CHECKING: import importlib.metadata as importl...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 198, 37811, 27813, 2196, 7508, 526, 15931, 198, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 2, 1550, 11361, 513, 13, 23, 28200, 779,...
3.293233
133
import os import json import cv2 from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.structures import BoxMode import pickle import xml.etree.ElementTree as ET from typing import List, Tuple, Union from fvcore.common.file_io import PathManager import logging __all__ = ["load_face_instances", "...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 269, 85, 17, 198, 198, 6738, 4886, 1313, 17, 13, 7890, 1330, 16092, 292, 316, 49015, 11, 3395, 14706, 49015, 198, 6738, 4886, 1313, 17, 13, 7249, 942, 1330, 8315, 19076, 198, 11748, 2298, 2...
2.268873
967
from .build import * from .common_datasets import * from .transforms import * from .albumentations_transforms import * from .ct_data import * from .ct_transforms import * from .utils import *
[ 6738, 764, 11249, 1330, 1635, 198, 6738, 764, 11321, 62, 19608, 292, 1039, 1330, 1635, 198, 6738, 764, 7645, 23914, 1330, 1635, 198, 6738, 764, 282, 65, 1713, 602, 62, 7645, 23914, 1330, 1635, 198, 6738, 764, 310, 62, 7890, 1330, 1635...
3.350877
57
import os import logging import cloudpickle import numpy as np import pyomo.environ as pyo from pyaugmecon.options import Options from pyaugmecon.helper import Counter, ProgressBar from pyomo.core.base import ( Var, ConstraintList, maximize, minimize, Set, Param, NonNegativeReals, Any, )...
[ 11748, 28686, 198, 11748, 18931, 198, 11748, 6279, 27729, 293, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 17902, 13, 268, 2268, 355, 279, 8226, 198, 6738, 12972, 7493, 76, 721, 261, 13, 25811, 1330, 18634, 198, 6738, 12972, ...
2.683333
120
from tornado.websocket import WebSocketHandler
[ 6738, 33718, 13, 732, 1443, 5459, 1330, 5313, 39105, 25060, 628 ]
4.363636
11
#!/usr/bin/env python3 import os.path from setuptools import find_packages, setup def read(filename): """Read files relative to this file.""" full_path = os.path.join(os.path.dirname(__file__), filename) with open(full_path, "r") as fh: return fh.read() setup( name="uwhoisd", version="...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 13, 6978, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 628, 198, 4299, 1100, 7, 34345, 2599, 198, 220, 220, 220, 37227, 5569, 3696, 3585, ...
2.504587
545
#-*- coding: utf-8 -*- #from ryu.app import simple_switch_13 #import mitigate_switch_13#my custom simple_switch_13 from ryu.controller import ofp_event from ryu.controller.handler import ( MAIN_DISPATCHER, DEAD_DISPATCHER ) from ryu.controller.handler import set_ev_cls MITIGATE_MODE_ON = False if MITIGATE_MOD...
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 6738, 374, 24767, 13, 1324, 1330, 2829, 62, 31943, 62, 1485, 198, 2, 11748, 24237, 62, 31943, 62, 1485, 2, 1820, 2183, 2829, 62, 31943, 62, 1485, 198, 6738, 3...
2.696809
188
#!/usr/bin/env python3 # encoding: utf-8 """ @author: Medivh Xu @file: gas.py @time: 2020-03-30 15:29 """ from base.element_manager import * class GasInfo(BasePage): """油站详情""" gun_name_btn = (By.ID, 'com.xxx.xxx:id/gunName') money_input_box = (By.ID, 'com.xxx.xxx:id/et_input_money') money_btn = (By....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 31, 9800, 25, 2019, 452, 71, 33591, 198, 31, 7753, 25, 3623, 13, 9078, 198, 31, 2435, 25, 12131, 12, 3070, 12, 1270, 1315, 25...
1.831325
1,577
from grafana_backup.save_dashboards import main as save_dashboards from grafana_backup.save_datasources import main as save_datasources from grafana_backup.save_folders import main as save_folders from grafana_backup.save_alert_channels import main as save_alert_channels from grafana_backup.archive import main as archi...
[ 6738, 7933, 69, 2271, 62, 1891, 929, 13, 21928, 62, 42460, 12821, 1330, 1388, 355, 3613, 62, 42460, 12821, 198, 6738, 7933, 69, 2271, 62, 1891, 929, 13, 21928, 62, 19608, 292, 2203, 1330, 1388, 355, 3613, 62, 19608, 292, 2203, 198, ...
3.24
100
# This is Hydroponic project in MicroPython with the ESP32 board. # Using devices are SSD1306 OLED, DS18B20, BME280, and Touch Pin. # # Copyright (c) 2020 ks-tec # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to ...
[ 2, 770, 318, 15084, 1773, 9229, 1628, 287, 4527, 37906, 351, 262, 9428, 2624, 3096, 13, 198, 2, 8554, 4410, 389, 21252, 12952, 21, 47463, 11, 17400, 1507, 33, 1238, 11, 347, 11682, 21033, 11, 290, 15957, 13727, 13, 198, 2, 198, 2, ...
2.661287
5,329
import datetime from sqlalchemy import Date, func, cast from sqlalchemy.orm import sessionmaker from database.model import engine from database.model import JobRun if __name__ == '__main__': show_data()
[ 11748, 4818, 8079, 198, 198, 6738, 44161, 282, 26599, 1330, 7536, 11, 25439, 11, 3350, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 6831, 13, 19849, 1330, 3113, 198, 6738, 6831, 13, 19849, 1330, 15768, 10987, 628...
3.442623
61
import gc from collections import OrderedDict import warnings import re import pandas as pd import numpy as np from IPython import embed try: import dask.dataframe as dd has_dask = True except ImportError: warnings.warn('Dask not found') has_dask = False try: profile except NameError: from qlk...
[ 11748, 308, 66, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 14601, 198, 11748, 302, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6101, 7535, 1330, 11525, 198, 28311, 25, 198, ...
2.809756
205
# -*- coding: utf-8 -*- import matplotlib matplotlib.use('Agg') import sys import time import numpy as np from physics import ode, hamilton, nbody import unit.au as au from os import environ xp = np if environ.get('CUDA_HOME') is not None: xp = np import torch as th import torch.nn as nn import torch.optim a...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 628, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 198...
2.259561
1,229
""" Question 4 Level 1 Question: Write a program which accepts a sequence of comma-separated numbers from console and generate a list and a tuple which contains every number. Suppose the following input is supplied to the program: 34,67,55,33,12,98 Then, the output should be: ['34', '67', '55', '33', '12', '98'] ('34'...
[ 37811, 198, 24361, 604, 198, 4971, 352, 198, 198, 24361, 25, 198, 16594, 257, 1430, 543, 18178, 257, 8379, 286, 39650, 12, 25512, 515, 3146, 422, 8624, 290, 7716, 257, 1351, 290, 257, 46545, 543, 4909, 790, 1271, 13, 198, 15979, 577, ...
3.215247
223
n1 = float(input('Digite a primeira nota?')) n2 = float(input('Digite a segunda nota?')) media = (n1 + n2)/ 2 print("Primeira nota do aluno {}, \n Segunda nota do aluno {}\n Média das notas do aluno {}".format(n1, n2, media))
[ 77, 16, 796, 12178, 7, 15414, 10786, 19511, 578, 257, 6994, 8704, 407, 64, 8348, 4008, 198, 77, 17, 796, 12178, 7, 15414, 10786, 19511, 578, 257, 384, 70, 46535, 407, 64, 8348, 4008, 198, 11431, 796, 357, 77, 16, 1343, 299, 17, 20...
2.472527
91
import sys import abc from algorithms_comparisons.utility.timer import timed
[ 11748, 25064, 198, 11748, 450, 66, 198, 6738, 16113, 62, 785, 1845, 9886, 13, 315, 879, 13, 45016, 1330, 28805, 628 ]
3.714286
21
import bot.app from threading import Thread Thread(target=bot.app).start()
[ 11748, 10214, 13, 1324, 201, 198, 6738, 4704, 278, 1330, 14122, 201, 198, 201, 198, 16818, 7, 16793, 28, 13645, 13, 1324, 737, 9688, 3419 ]
3.12
25
import functools from flask import ( current_app, Blueprint, flash, Flask, g, redirect, render_template, request, session, url_for, jsonify ) import json from blaster.db import get_db from . import constants bp = Blueprint('quickstart', __name__, url_prefix='/quickstart') @bp.route('/<instance>')
[ 11748, 1257, 310, 10141, 198, 198, 6738, 42903, 1330, 357, 198, 220, 220, 220, 1459, 62, 1324, 11, 39932, 11, 7644, 11, 46947, 11, 308, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 11, 6246, 11, 19016, 62, 1640, 11, 33918, 1958, 198, ...
3.142857
98
import os local_dir = os.path.dirname(os.path.realpath(__file__)) dir_name = get_filename(local_dir) command_file = local_dir+"/command-stack.txt" f_out = open(command_file, "w") f_out.write("stop\n") f_out.close()
[ 201, 198, 11748, 28686, 201, 198, 201, 198, 201, 198, 12001, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 201, 198, 15908, 62, 3672, 796, 651, 62, 34345, 7, 12001, 62...
2.209524
105
# Generated by Django 3.2.4 on 2022-04-12 02:21 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33160, 12, 3023, 12, 1065, 7816, 25, 2481, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30